[Console] Refactor and cleanup of public and server#60513
[Console] Refactor and cleanup of public and server#60513jloleysens merged 6 commits intoelastic:masterfrom
Conversation
Remove ace from lib/autocomplete.ts and set up hooking up of ace in legacy_core_editor. Also remove use of ace mocks in tests.
Refactored the loading of spec into a new SpecDefinitionsService. In this way, state can be contained inside of the service as much as possible. Also converted all JS spec to TS and updated the Console plugin contract so that processors (which alter loaded spec) happen at plugin "start" phase.
|
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
| done(); | ||
| return; | ||
| } | ||
| senseEditor.autocomplete._test.getCompletions(senseEditor, null, cursor, '', function( |
There was a problem hiding this comment.
Preferably ignore these changes for now, they are mostly whitespace and the spec is hard to read. We should definitely address this at some point but for now they provide really decent coverage.
There was a problem hiding this comment.
No worries, Github "Hide whitespace changes" makes this easy to parse 😊
…ole/cleanup * 'master' of github.com:elastic/kibana: (47 commits) [Remote clusters] Update copy (elastic#60382) Sort by name when fetching alerts and connectors (elastic#60506) Make slack param validation handle empty messages (elastic#60468) [Alerting] Adds navigation by consumer and alert type to alerting (elastic#58997) Introduce search interceptor (elastic#60523) [ML] Add functional tests for file data visualizer (elastic#60413) [APM] Optimize service map query (elastic#60412) [SIEM][Detection Engine] Adds lists feature flag and list values to the REST interfaces Enhancement/update esdocs datasource (elastic#59512) [junit] only include stdout in report for failures (elastic#60530) Update dependency nock to v12 (elastic#60422) upgrade execa to get stdout/stderr in error messages (elastic#60537) skip flaky suite (elastic#60471) [Ingest] Agent Config Details - Data sources list ui (elastic#60429) [SIEM] Create ML Rules (elastic#58053) skip flaky suite (elastic#60559) fix agent type (elastic#60554) Fixed default message for index threshold includes both threshold values (elastic#60545) [Ingest] Add support for `yaml` field types (elastic#60440) Solved the issue for a GROUP BY expression validation (elastic#60558) ...
sebelga
left a comment
There was a problem hiding this comment.
LGTM! Tested locally both oss and x-pack and could not spot any regression. 👍
| done(); | ||
| return; | ||
| } | ||
| senseEditor.autocomplete._test.getCompletions(senseEditor, null, cursor, '', function( |
There was a problem hiding this comment.
No worries, Github "Hide whitespace changes" makes this easy to parse 😊
|
|
||
| return { | ||
| getCompletions, | ||
| // TODO: This needs to be cleaned up |
There was a problem hiding this comment.
Yes! Exporting a special object for testing indicates some spaghetti code somewhere 😊
- Updated naming of argument variable in registerAutocompleter - Refactored the SpecDefinitionsService to handle binding of it's own functions
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
* Clean up use of ace in autocomplete in public Remove ace from lib/autocomplete.ts and set up hooking up of ace in legacy_core_editor. Also remove use of ace mocks in tests. * Added TODO in lib/kb (console public) * Server-side cleanup Refactored the loading of spec into a new SpecDefinitionsService. In this way, state can be contained inside of the service as much as possible. Also converted all JS spec to TS and updated the Console plugin contract so that processors (which alter loaded spec) happen at plugin "start" phase. * Fix types * Small refactor - Updated naming of argument variable in registerAutocompleter - Refactored the SpecDefinitionsService to handle binding of it's own functions
* Clean up use of ace in autocomplete in public Remove ace from lib/autocomplete.ts and set up hooking up of ace in legacy_core_editor. Also remove use of ace mocks in tests. * Added TODO in lib/kb (console public) * Server-side cleanup Refactored the loading of spec into a new SpecDefinitionsService. In this way, state can be contained inside of the service as much as possible. Also converted all JS spec to TS and updated the Console plugin contract so that processors (which alter loaded spec) happen at plugin "start" phase. * Fix types * Small refactor - Updated naming of argument variable in registerAutocompleter - Refactored the SpecDefinitionsService to handle binding of it's own functions Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
This cleanup targets:
How to test
_mlendpoints in Xpack).