From 7d9c0bc81982dbb88e0de2b2cbce56df5616a6f5 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Tue, 26 Nov 2019 13:27:56 +0100 Subject: [PATCH] - Update _template completion to work even when the index does not exist (#51592) (#51604) - Update _template body completions --- .../components/template_autocomplete_component.js | 2 +- .../spec/overrides/indices.put_template.json | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/legacy/core_plugins/console/public/quarantined/src/autocomplete/components/template_autocomplete_component.js b/src/legacy/core_plugins/console/public/quarantined/src/autocomplete/components/template_autocomplete_component.js index e6cae3f1710bc..0c00b2f93ee6f 100644 --- a/src/legacy/core_plugins/console/public/quarantined/src/autocomplete/components/template_autocomplete_component.js +++ b/src/legacy/core_plugins/console/public/quarantined/src/autocomplete/components/template_autocomplete_component.js @@ -21,7 +21,7 @@ import { ListComponent } from './list_component'; export class TemplateAutocompleteComponent extends ListComponent { constructor(name, parent) { - super(name, mappings.getTemplates, parent); + super(name, mappings.getTemplates, parent, true, true); } getContextKey() { return 'template'; diff --git a/src/legacy/core_plugins/console/server/api_server/spec/overrides/indices.put_template.json b/src/legacy/core_plugins/console/server/api_server/spec/overrides/indices.put_template.json index cc7218be2e48d..c19836e2f9eb0 100644 --- a/src/legacy/core_plugins/console/server/api_server/spec/overrides/indices.put_template.json +++ b/src/legacy/core_plugins/console/server/api_server/spec/overrides/indices.put_template.json @@ -1,10 +1,16 @@ { "indices.put_template": { "data_autocomplete_rules": { - "template": "index*", - "warmers": { "__scope_link": "_warmer" }, + "index_patterns": [], "mappings": { "__scope_link": "put_mapping" }, - "settings": { "__scope_link": "put_settings" } + "settings": { "__scope_link": "put_settings" }, + "version": 0, + "order": 0, + "aliases": { + "__template": { + "NAME": {} + } + } }, "patterns": [ "_template/{template}"