[Console] Update autocomplete variables #162156
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is WIP
Closes #160539
Summary
This PR updates the autocomplete variables defined in the Console code so that they correspond to the variables in the Es specification repo.
The following differences have been identified:
nodes
node_id
(e.g. GET _nodes/{node_id})nodes
variable tonode_id
indices
index
(e.g. GET _cat/indices/{index})indices
variable (since anindex
variable already exists)types
types
variablenode
node
variabletype
template
name
(e.g. GET _template/{name})name
variable with_template
parent to a template autocomplete componentindex_template
name
(e.g. GET _index_template/{name})name
variable with_index_template
parent to a index template autocomplete componentcomponent_template
name
(e.g. GET _component_template/{name})name
variable with_component_template
parent to a component template autocomplete componentdata_stream
name
(e.g. GET _data_stream/{name})name
variable with_data_stream
parent to a data stream autocomplete componentHow to test:
node scripts/generate_console_definitions.js --source <ES_SPECIFICATION_REPO> --dest src/plugins/console/server/lib/spec_definitions/json/new_script/generated
where<ES_SPECIFICATION_REPO>
is the absolute path to the root of the ES specification repo'../../server/lib/spec_definitions/json/new_script'
yarn es snapshot
and run Kibana withyarn start
.GET _cat/indices/
should suggest a list of index names.