-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Performance improvements to annotations editing in Single Metric Viewer & buttons placement #83216
Conversation
Pinging @elastic/ml-ui (:ml) |
...ins/ml/public/application/timeseriesexplorer/components/timeseries_chart/timeseries_chart.js
Outdated
Show resolved
Hide resolved
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
x-pack/plugins/ml/public/application/components/annotations/annotation_flyout/index.tsx
Outdated
Show resolved
Hide resolved
...gins/ml/public/application/components/annotations/annotations_service/annotation_service.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/services/annotations_service.tsx
Outdated
Show resolved
Hide resolved
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.
Great job with AnnotationUpdatesService
, just some minor issues around one method need to be resolved
x-pack/plugins/ml/public/application/components/annotations/annotation_flyout/index.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/services/annotations_service.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/services/annotations_service.test.tsx
Outdated
Show resolved
Hide resolved
x-pack/plugins/ml/public/application/components/annotations/annotation_flyout/index.test.tsx
Outdated
Show resolved
Hide resolved
|
||
test('Update button is disabled with empty annotation', () => { | ||
const annotationUpdatesService = new AnnotationUpdatesService(); |
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.
you should instantiate a service in before
hook
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.
@qn895 inside of describe('AnnotationFlyout', () => {
creating the following
let annotationUpdatesService: AnnotationUpdatesService = null
beforeEach(() => {
annotationUpdatesService = new AnnotationUpdatesService();
})
to make sure each test is isolated
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.
My apologies - missed this comment yesterday. Updated here: 9b8020b
x-pack/plugins/ml/public/application/components/annotations/annotation_flyout/index.test.tsx
Outdated
Show resolved
Hide resolved
@qn895 I see you've created a context, but you haven't provided a value itself using |
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 SucceededMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
… Viewer & buttons placement (elastic#83216)
…o-node-details * 'master' of github.com:elastic/kibana: [ML] Performance improvements to annotations editing in Single Metric Viewer & buttons placement (elastic#83216) [Metrics UI] Add Process tab to Enhanced Node Details (elastic#83477)
… 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) ...
Summary
This PR addresses a performance issue which cause typing in the annotation flyout editor in Single Metric View to be slow and unresponsive when typing fast. Follow up of #72299.
renderFocusChart()
will be called with every keystroke. This PR fixes this issue.Before
After
It also updates the button placement in the footer to match with Kibana's design convention [ML] Anomaly Detection: Annotations enhancements #70198 (comment).
Before
After
Previously, switching from the Single Metric Viewer to the Anomaly Explorer and vice versa will keep persisting the annotation fly-out. This PR fixes so that there are three separate
AnnotationUpdatesService
instances for the job list, the Single Metric Viewer, and the Anomaly Explorer page.Before
After
Checklist
Delete any items that are not applicable to this PR.