-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Console] Update the logic for variables #160539
Labels
enhancement
New value added to drive a business result
Feature:Console
Dev Tools Console Feature
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
Comments
yuliacech
added
Feature:Console
Dev Tools Console Feature
enhancement
New value added to drive a business result
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
labels
Jun 26, 2023
Pinging @elastic/platform-deployment-management (Team:Deployment Management) |
yuliacech
added a commit
that referenced
this issue
Aug 4, 2023
## Summary Fixes #160539 This PR updates the logic for dynamic parameters in the Console autocomplete engine in preparation for the new script. #### Changes - The old script `packages/spec-to-console` contained some logic that would rename parameters in the json specs: `{index} -> {indices`}, `{node_id} -> {nodes}, {metric} -> {metrics}`. I don't think we need this anymore because such logic only introduces more hidden mechanics to the script. There is no significant improvements to autocomplete suggestions due to these replacements. - The dynamic parameters defined in the Console autocomplete engine: - `indices` - is deleted and only `index` is used instead. Originally, there was a minor difference between `indices` and `index`: the former should accept several index names, the latter only 1. [But this logic is not working for urls currently anyways](#163000). I don't think there is a significant improvement for UX to keep this distinction. The main useful feature of this parameter is to display a list of indices in the deployment. - `type` and `types` - deleted because `index mapping types` is a removed ES feature (see this [doc](https://www.elastic.co/guide/en/elasticsearch/reference/6.0/removal-of-types.html)) - `id`, `transform_id`, `ids`, `task_id` - deleted as not working. Also definitions using these parameters don't intend them to be autofilled. For example, in the url `/_async_search/{id}` the parameter `{id}` can be any string. - `user` and `username` - deleted as incorrectly being resolved to a list of indices. Also definitions using these parameters don't intend them to be autofilled, for example `_security/user/{username}` when creating a new user. - `node` - delete because it was just an empty list - `nodes` - deleted because the suggestions of the form `['_local', '_master', 'data:true', 'data:false', 'master:true', 'master:false']` are not correct for definitions where a node ID is expected. - Renamed `variables` to `dynamic parameters` in the Console README file: I first used the word `variables` in readme for the values defined in the file [`kb.js`](https://github.com/elastic/kibana/blob/6e1445b66aae27a9a762ed5632549b3f6a6dfa51/src/plugins/console/public/lib/kb/kb.js). But then variables support was added to Console and there were several sections in the readme using the word `variables` for different concepts. Since in the autocomplete engine code, the function is called `parametrizedComponentFactories` I think calling these values `dynamic parameters` makes more sense and avoids confusion. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Alison Goryachev <alisonmllr20@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New value added to drive a business result
Feature:Console
Dev Tools Console Feature
Team:Kibana Management
Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more
This is a follow up issue for work started in #159241
The Console autocomplete engine uses a set of variables defined in this file (see
parametrizedComponentFactories
function). These variables are used the definitions for url patterns and parameters. We need to check which variables are used in the ES specification and if needed update the logic in the Console code.The text was updated successfully, but these errors were encountered: