From 91df39bdb9c80b0b237f9fc0d3ed0f3daf7d3531 Mon Sep 17 00:00:00 2001 From: joxley-elastic <73481302+joxley-elastic@users.noreply.github.com> Date: Thu, 11 Feb 2021 10:55:35 -0500 Subject: [PATCH 1/5] Add files via upload In the dev console, working with component_templates autocomplete will only provide suggestions for deleting them. This set of fixes adds in support to autocomplete puts and gets for component templates --- .../cluster.get_component_template.json | 17 +++++++++++++++++ .../cluster.put_component_template.json | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json create mode 100644 src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json new file mode 100644 index 0000000000000..bd7f66c0dfaee --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json @@ -0,0 +1,17 @@ +{ + "indices.get_template": { + "url_params": { + "include_type_name": "__flag__", + "flat_settings": "__flag__", + "master_timeout": "", + "local": "__flag__" + }, + "methods": [ + "GET" + ], + "patterns": [ + "_component_template", + "_component_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html" } +} diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json new file mode 100644 index 0000000000000..e39c15b352c49 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json @@ -0,0 +1,17 @@ +{ + "indices.put_template": { + "url_params": { + "include_type_name": "__flag__", + "order": "", + "create": "__flag__", + "master_timeout": "", + "flat_settings": "__flag__" + }, + "methods": [ + "PUT" + ], + "patterns": [ + "_component_template/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html" } +} From 07cc1a5d7168bd44acfe1e891d4afecf752f9ea5 Mon Sep 17 00:00:00 2001 From: John Dorlus Date: Wed, 24 Feb 2021 23:47:58 -0500 Subject: [PATCH 2/5] Added overrides for request body --- .../overrides/cluster.put_component_template.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/plugins/console/server/lib/spec_definitions/json/overrides/cluster.put_component_template.json diff --git a/src/plugins/console/server/lib/spec_definitions/json/overrides/cluster.put_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/overrides/cluster.put_component_template.json new file mode 100644 index 0000000000000..7fdd9ff23fd17 --- /dev/null +++ b/src/plugins/console/server/lib/spec_definitions/json/overrides/cluster.put_component_template.json @@ -0,0 +1,13 @@ +{ + "indices.put_template": { + "data_autocomplete_rules": { + "template": {}, + "aliases": {}, + "settings": {}, + "mappings": {}, + "version": 0, + "_meta": {}, + "allow_auto_create": false + } + } +} From d7cf3231d835f8542a676bcf306cd3157c07f3b1 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Thu, 25 Feb 2021 11:14:24 -0500 Subject: [PATCH 3/5] Update src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json --- .../json/generated/cluster.get_component_template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json index bd7f66c0dfaee..ad94fbbac3564 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json @@ -13,5 +13,5 @@ "_component_template", "_component_template/{name}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html" } + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/getting-component-templates.html" } } From b11a2453bd6e182eec489cc11f245c2421794ea9 Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Thu, 25 Feb 2021 11:14:34 -0500 Subject: [PATCH 4/5] Update src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json --- .../json/generated/cluster.put_component_template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json index e39c15b352c49..edad475aeea57 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json @@ -13,5 +13,5 @@ "patterns": [ "_component_template/{name}" ], - "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-component-templates.html" } + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html" } } From 65aacdea8cd527fae06d4d077c4a7089fd34efbe Mon Sep 17 00:00:00 2001 From: Alison Goryachev Date: Thu, 25 Feb 2021 11:27:30 -0500 Subject: [PATCH 5/5] remove inapplicable params --- .../json/generated/cluster.get_component_template.json | 1 - .../json/generated/cluster.put_component_template.json | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json index ad94fbbac3564..f2ef49f6e13e2 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.get_component_template.json @@ -1,7 +1,6 @@ { "indices.get_template": { "url_params": { - "include_type_name": "__flag__", "flat_settings": "__flag__", "master_timeout": "", "local": "__flag__" diff --git a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json index edad475aeea57..fbd5a0905d4d8 100644 --- a/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json +++ b/src/plugins/console/server/lib/spec_definitions/json/generated/cluster.put_component_template.json @@ -1,11 +1,8 @@ { "indices.put_template": { "url_params": { - "include_type_name": "__flag__", - "order": "", "create": "__flag__", - "master_timeout": "", - "flat_settings": "__flag__" + "master_timeout": "" }, "methods": [ "PUT"