[ML] Persist URL state for Anomaly detection jobs using metric function #83507
[ML] Persist URL state for Anomaly detection jobs using metric function #83507qn895 merged 10 commits intoelastic:masterfrom
Conversation
.../application/timeseriesexplorer/components/plot_function_controls/plot_function_controls.tsx
Outdated
Show resolved
Hide resolved
.../application/timeseriesexplorer/components/plot_function_controls/plot_function_controls.tsx
Outdated
Show resolved
Hide resolved
| setFunctionDescription: (func: string) => void; | ||
| selectedDetectorIndex: any; | ||
| selectedJobId: string; | ||
| selectedEntities: Record<string, any>; |
There was a problem hiding this comment.
Could it be a more specific type?
There was a problem hiding this comment.
@qn895 can't find it in the commit hash you've mentioned
There was a problem hiding this comment.
Not sure why Github is being weird but it's https://github.com/elastic/kibana/pull/83507/commits/607d7880884564514d8fb34b4972bc4ab644ea75
.../ml/public/application/timeseriesexplorer/timeseriesexplorer_utils/get_viewable_detectors.ts
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js
Show resolved
Hide resolved
|
Pinging @elastic/ml-ui (:ml) |
darnautov
left a comment
There was a problem hiding this comment.
LGTM, just some minor issues left
| _selectedDetectorIndex: number, | ||
| _selectedEntities: Record<string, any>, | ||
| _selectedJobId: string, | ||
| _selectedJob: CombinedJob |
There was a problem hiding this comment.
I believe you don't need it and can access these arguments from the component scope
There was a problem hiding this comment.
I think doing that will require the callback to depend on those arguments, and since they are the same as the original effect we're splitting it from, I don't see the benefits of either moving it outside of the effect or using the arguments from component scope.
x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js
Show resolved
Hide resolved
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…on (elastic#83507) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
… into add-logs-to-node-details * 'add-logs-to-node-details' of github.com:phillipb/kibana: (87 commits) [Maps] Add 'crossed' & 'exited' events to tracking alert (elastic#82463) Updating code-owners to use new core/app-services team names (elastic#83731) Add Managed label to data streams and a view switch for the table (elastic#83049) [Maps] Add query bar inputs to geo threshold alerts tracked points & boundaries (elastic#80871) fix(NA): search examples kibana version declaration (elastic#83182) Fixed console error, which appears when saving changes in Edit Alert flyout (elastic#83610) [Alerting] Add `alert.updatedAt` field to represent date of last user edit (elastic#83578) Not resetting server log level if level is defined (elastic#83651) disable incremenetal build for legacy tsconfig.json (elastic#82986) [Workplace Search] Migrate SourceLogic from ent-search (elastic#83593) [Workplace Search] Port Box changes from ent-search (elastic#83675) [APM] Improve router types (elastic#83620) Bump flat to v4.1.1 (elastic#83647) Bump y18n@5 to v5.0.5 (elastic#83644) Bump jsonpointer to v4.1.0 (elastic#83641) Bump is-my-json-valid to v2.20.5 (elastic#83642) [Telemetry] Move Monitoring collection strategy to a collector (elastic#82638) Update typescript eslint to v4.8 (elastic#83520) [ML] Persist URL state for Anomaly detection jobs using metric function (elastic#83507) [ML] Performance improvements to annotations editing in Single Metric Viewer & buttons placement (elastic#83216) ...
…on (elastic#83507) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
This PR is a follow up of #81662. It brings several improvements such as:
metric(for when user bookmarks or refreshes the page)Behavior
By default, when first viewing the job in the Single Metric Viewer, it will pick the function description associated with the highest anomaly scoring record. In this example, the view defaults to

min.Upon changing the plotting function and refresh of the page, the view will be persisted to the previously selected function.

Checklist
Delete any items that are not applicable to this PR.