-
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
[ML] Migrate Anomaly Explorer to React (except job selector) #28234
Conversation
Pinging @elastic/ml-ui |
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to SASS are approved ;)
098a1ee
to
f0fff26
Compare
💔 Build Failed |
💔 Build Failed |
x-pack/plugins/ml/public/components/controls/select_interval/select_interval.js
Show resolved
Hide resolved
…ctor instead of jQuery.
💔 Build Failed |
💔 Build Failed |
retest |
💔 Build Failed |
💔 Build Failed |
d85e63d
to
705ceac
Compare
💔 Build Failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of comments, but otherwise LGTM,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⚡️
💔 Build Failed |
💔 Build Failed |
💚 Build Succeeded |
…#28234) * [ML] Move Anomaly Explorer Loading indicator to React. * [ML] Move no-jobs message to React/Eui. * [ML] Move no-results message to React/Eui. * [ML] Refactored explorer.js to return earlier. * [ML] Refactored influencers column to react. * [ML] Refactored Overall Swimlane and view-by dropdown to react/eui. * [ML] Refactored limit dropdown to react/eui. * [ML] Refactored view-by swimlanes to React/Eui. * [ML] Refactored annotations table to React/Eui. * [ML] Refactored table controls to React/Eui. * [ML] Refactored explorer charts to use React/Eui. * [ML] Refactored anomalies table to React/Eui. * [ML] Move explorer charts data listener to ExplorerChartsContainer component. * [ML] Make AppState dependent services importable by React components. * [ML] Removes deprecated code. * [ML] Simplify state handling for anomaly charts. * [ML] Simplify swimlaneCellClick(). * [ML] Review feedback: Fix file structure, add propTypes. * [ML] Review feedback: Avoid anonymous inline functions. * [ML] Fixes tests to reflect code changes. * [ML] Fixes InfluencerList DOM position. * [ML] Show a loading indicator when the view-by swimlane updates. * [ML] Review feedback: Import only relevant lodash bits. Use querySelector instead of jQuery. * [ML] Adds snapshot tests for new smallish components. * [ML] Fix test stub. * [ML] More resilient getChartContainerWidth(). * [ML] Review feedback: Comment on legacy utils and dropdown widths.
💚 Build Succeeded |
…#28558) * [ML] Move Anomaly Explorer Loading indicator to React. * [ML] Move no-jobs message to React/Eui. * [ML] Move no-results message to React/Eui. * [ML] Refactored explorer.js to return earlier. * [ML] Refactored influencers column to react. * [ML] Refactored Overall Swimlane and view-by dropdown to react/eui. * [ML] Refactored limit dropdown to react/eui. * [ML] Refactored view-by swimlanes to React/Eui. * [ML] Refactored annotations table to React/Eui. * [ML] Refactored table controls to React/Eui. * [ML] Refactored explorer charts to use React/Eui. * [ML] Refactored anomalies table to React/Eui. * [ML] Move explorer charts data listener to ExplorerChartsContainer component. * [ML] Make AppState dependent services importable by React components. * [ML] Removes deprecated code. * [ML] Simplify state handling for anomaly charts. * [ML] Simplify swimlaneCellClick(). * [ML] Review feedback: Fix file structure, add propTypes. * [ML] Review feedback: Avoid anonymous inline functions. * [ML] Fixes tests to reflect code changes. * [ML] Fixes InfluencerList DOM position. * [ML] Show a loading indicator when the view-by swimlane updates. * [ML] Review feedback: Import only relevant lodash bits. Use querySelector instead of jQuery. * [ML] Adds snapshot tests for new smallish components. * [ML] Fix test stub. * [ML] More resilient getChartContainerWidth(). * [ML] Review feedback: Comment on legacy utils and dropdown widths.
Summary
Migrates most parts of Anomaly Explorer to React.
explorer.html
is mostly eliminated. It now only contains the job selector and filter bar (which is not in use). Instead of the previous angular code, the template now includes<ml-explorer-react-wrapper />
.<ml-explorer-react-wrapper />
is a directive that inherits the scope ofexplorer_controller.js
. Once all ofexplorer.html
is migrated, this directive can go away again. The directive listens forscope
changes inexplorer_controller.js
and passes on the required scope attributes as props to<Explorer />
(explorer.js
).EuiEmptyPrompt
, angular code which used plain EUI classes now uses EUI component likeEuiFlexGroup
etc. This was done for parts which were straight-forward to migrate without touching too much application logic and risk of breaking things.influencers_list_directive.js
). Some of these included logic to transform scope to props which is now part ofexplorer.js
.explorer.html
.<Explorer />
component. We should soon get rid of this completely.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibilityFor maintainers
Part of #18374.