From 09540e3e60db84c92c88bb329132b3990131b07d Mon Sep 17 00:00:00 2001 From: Bill McConaghy Date: Mon, 29 Oct 2018 16:18:48 -0400 Subject: [PATCH] [Console] Add ccr apis to console autocomplete (#24739) (#24762) * fixing issue with doc link paths * dding ccr API endpoints to autocomplet * fixing issue with documentation links * fixing generated specs {indices} -> {index} --- .../src/controllers/sense_controller.js | 3 ++- .../ccr.delete_auto_follow_pattern.json | 11 +++++++++++ .../spec/generated/ccr.follow.json | 11 +++++++++++ .../spec/generated/ccr.follow_stats.json | 11 +++++++++++ .../ccr.get_auto_follow_pattern.json | 12 ++++++++++++ .../spec/generated/ccr.pause_follow.json | 11 +++++++++++ .../ccr.put_auto_follow_pattern.json | 11 +++++++++++ .../spec/generated/ccr.resume_follow.json | 11 +++++++++++ .../spec/generated/ccr.stats.json | 11 +++++++++++ .../spec/generated/ccr.unfollow.json | 11 +++++++++++ .../spec/overrides/ccr.follow.json | 18 ++++++++++++++++++ .../ccr.put_auto_follow_pattern.json | 19 +++++++++++++++++++ .../spec/overrides/ccr.resume_follow.json | 16 ++++++++++++++++ 13 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.follow.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.follow_stats.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.pause_follow.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.resume_follow.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.stats.json create mode 100644 x-pack/plugins/console_extensions/spec/generated/ccr.unfollow.json create mode 100644 x-pack/plugins/console_extensions/spec/overrides/ccr.follow.json create mode 100644 x-pack/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json create mode 100644 x-pack/plugins/console_extensions/spec/overrides/ccr.resume_follow.json diff --git a/src/core_plugins/console/public/src/controllers/sense_controller.js b/src/core_plugins/console/public/src/controllers/sense_controller.js index ce0e03880118..9f1c9be68f9c 100644 --- a/src/core_plugins/console/public/src/controllers/sense_controller.js +++ b/src/core_plugins/console/public/src/controllers/sense_controller.js @@ -67,7 +67,8 @@ module.controller('SenseController', function SenseController(Private, $scope, $ if (endpoint && endpoint.documentation && endpoint.documentation.indexOf('http') !== -1) { - $scope.documentation = endpoint.documentation.replace('master', DOC_LINK_VERSION); + $scope.documentation = endpoint.documentation.replace('/master/', `/${DOC_LINK_VERSION}/`); + $scope.documentation = $scope.documentation.replace('/current/', `/${DOC_LINK_VERSION}/`); $scope.$apply(); } else { $scope.documentation = null; diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json b/x-pack/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json new file mode 100644 index 000000000000..36c50a37c865 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.delete_auto_follow_pattern.json @@ -0,0 +1,11 @@ +{ + "ccr.delete_auto_follow_pattern": { + "methods": [ + "DELETE" + ], + "patterns": [ + "_ccr/auto_follow/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-delete-auto-follow-pattern.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.follow.json b/x-pack/plugins/console_extensions/spec/generated/ccr.follow.json new file mode 100644 index 000000000000..704cb082161a --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.follow.json @@ -0,0 +1,11 @@ +{ + "ccr.follow": { + "methods": [ + "PUT" + ], + "patterns": [ + "{index}/_ccr/follow" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-follow.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.follow_stats.json b/x-pack/plugins/console_extensions/spec/generated/ccr.follow_stats.json new file mode 100644 index 000000000000..47553262c95d --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.follow_stats.json @@ -0,0 +1,11 @@ +{ + "ccr.follow_stats": { + "methods": [ + "GET" + ], + "patterns": [ + "{index}/_ccr/stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-follow-stats.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json b/x-pack/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json new file mode 100644 index 000000000000..3f988d9796f0 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.get_auto_follow_pattern.json @@ -0,0 +1,12 @@ +{ + "ccr.get_auto_follow_pattern": { + "methods": [ + "GET" + ], + "patterns": [ + "_ccr/auto_follow", + "_ccr/auto_follow/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-auto-follow-pattern.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.pause_follow.json b/x-pack/plugins/console_extensions/spec/generated/ccr.pause_follow.json new file mode 100644 index 000000000000..4dcb0fdaf9b8 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.pause_follow.json @@ -0,0 +1,11 @@ +{ + "ccr.pause_follow": { + "methods": [ + "POST" + ], + "patterns": [ + "{index}/_ccr/pause_follow" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-pause-follow.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json new file mode 100644 index 000000000000..26a197d17d71 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.put_auto_follow_pattern.json @@ -0,0 +1,11 @@ +{ + "ccr.put_auto_follow_pattern": { + "methods": [ + "PUT" + ], + "patterns": [ + "_ccr/auto_follow/{name}" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-put-auto-follow-pattern.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.resume_follow.json b/x-pack/plugins/console_extensions/spec/generated/ccr.resume_follow.json new file mode 100644 index 000000000000..00b889d0d5f9 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.resume_follow.json @@ -0,0 +1,11 @@ +{ + "ccr.resume_follow": { + "methods": [ + "POST" + ], + "patterns": [ + "{index}/_ccr/resume_follow" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.stats.json b/x-pack/plugins/console_extensions/spec/generated/ccr.stats.json new file mode 100644 index 000000000000..f9d389c99e59 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.stats.json @@ -0,0 +1,11 @@ +{ + "ccr.stats": { + "methods": [ + "GET" + ], + "patterns": [ + "_ccr/stats" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-get-stats.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/generated/ccr.unfollow.json b/x-pack/plugins/console_extensions/spec/generated/ccr.unfollow.json new file mode 100644 index 000000000000..9d9d6868a2fc --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/generated/ccr.unfollow.json @@ -0,0 +1,11 @@ +{ + "ccr.unfollow": { + "methods": [ + "POST" + ], + "patterns": [ + "{index}/_ccr/unfollow" + ], + "documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-unfollow.html" + } +} diff --git a/x-pack/plugins/console_extensions/spec/overrides/ccr.follow.json b/x-pack/plugins/console_extensions/spec/overrides/ccr.follow.json new file mode 100644 index 000000000000..f95b6618fe51 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/overrides/ccr.follow.json @@ -0,0 +1,18 @@ +{ + "ccr.follow": { + "data_autocomplete_rules": { + "remote_cluster" : "", + "leader_index" : "", + "max_read_request_operation_count": "", + "max_outstanding_read_requests": "", + "max_read_request_size": "", + "max_write_request_operation_count": "", + "max_write_request_size": "", + "max_outstanding_write_requests": "", + "max_write_buffer_count": "", + "max_write_buffer_size": "", + "max_retry_delay": "", + "read_poll_timeout": "" + } + } +} diff --git a/x-pack/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json b/x-pack/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json new file mode 100644 index 000000000000..2f050efa6016 --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/overrides/ccr.put_auto_follow_pattern.json @@ -0,0 +1,19 @@ +{ + "ccr.put_auto_follow_pattern": { + "data_autocomplete_rules": { + "remote_cluster" : "", + "leader_index_patterns" : "", + "follow_index_pattern" : "", + "max_read_request_operation_count": "", + "max_outstanding_read_requests": "", + "max_read_request_size": "", + "max_write_request_operation_count": "", + "max_write_request_size": "", + "max_outstanding_write_requests": "", + "max_write_buffer_count": "", + "max_write_buffer_size": "", + "max_retry_delay": "", + "read_poll_timeout": "" + } + } +} diff --git a/x-pack/plugins/console_extensions/spec/overrides/ccr.resume_follow.json b/x-pack/plugins/console_extensions/spec/overrides/ccr.resume_follow.json new file mode 100644 index 000000000000..06d917343cda --- /dev/null +++ b/x-pack/plugins/console_extensions/spec/overrides/ccr.resume_follow.json @@ -0,0 +1,16 @@ +{ + "ccr.resume_follow": { + "data_autocomplete_rules": { + "max_read_request_operation_count": "", + "max_outstanding_read_requests": "", + "max_read_request_size": "", + "max_write_request_operation_count": "", + "max_write_request_size": "", + "max_outstanding_write_requests": "", + "max_write_buffer_count": "", + "max_write_buffer_size": "", + "max_retry_delay": "", + "read_poll_timeout": "" + } + } +}