Skip to content

Commit

Permalink
Don't try to delete index template along with pattern
Browse files Browse the repository at this point in the history
This commit reverts a change to use the ingest API when deleting index
patterns via the Kibana UI. Back when I was building the Filebeat wizard
it made sense to try to delete any index templates or pipelines that may
have been created along with an index pattern. But now that we're only
shipping with CSV Upload, and we don't delete the actual indices that
CSV upload creates, it doesn't make much sense to delete the template.
Now we'll treate the indices and templates consistently.

This also fixes an issue where users would get a fatal error if they
were using Security and they didn't have permissions to delete
templates. Every index pattern deletion would also attempt to delete an
associated template, so if the user didn't have the correct permissions
they would get a 403.

Related: elastic#6457
  • Loading branch information
Bargs committed Sep 20, 2016
1 parent 935b812 commit daa5b3b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ uiModules.get('apps/management')
}
}

ingest.delete($scope.indexPattern.id)
.then($scope.indexPattern.destroy.bind($scope.indexPattern))
courier.indexPatterns.delete($scope.indexPattern)
.then(refreshKibanaIndex)
.then(function () {
$location.url('/management/data/index');
Expand Down

0 comments on commit daa5b3b

Please sign in to comment.