From f79e54de7bda85713ca6a972cf242e77d7c0c231 Mon Sep 17 00:00:00 2001 From: Elastic Jasper Date: Thu, 22 Sep 2016 18:59:17 -0400 Subject: [PATCH] Backport PR #8391 --------- **Commit 1:** Don't try to delete index template along with pattern 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: https://github.com/elastic/kibana/pull/6457 * Original sha: daa5b3b31f2fc609b8d1f8320ec081d93d347e7b * Authored by Matthew Bargar on 2016-09-20T22:43:03Z --- .../kibana/public/management/sections/indices/_edit.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core_plugins/kibana/public/management/sections/indices/_edit.js b/src/core_plugins/kibana/public/management/sections/indices/_edit.js index 81cb8aaa52233..7c38ae787fd8e 100644 --- a/src/core_plugins/kibana/public/management/sections/indices/_edit.js +++ b/src/core_plugins/kibana/public/management/sections/indices/_edit.js @@ -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');