-
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] Model management UI fixes and enhancements #79072
Conversation
Pinging @elastic/ml-ui (:ml) |
import { formatDate } from '@elastic/eui/lib/services/format'; | ||
import { TIME_FORMAT } from '../constants/time_format'; | ||
|
||
export const timeFormatter = (value: number) => { |
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.
this is very similar to the functions in https://github.com/elastic/kibana/blob/master/x-pack/plugins/ml/public/application/util/date_utils.ts
Also we have quite a few places that have almost identical functions to this, which are local to the file and not shared.
kibana/x-pack/plugins/ml/public/application/components/model_snapshots/model_snapshots_table.tsx
Line 249 in addbdf7
function renderDate(date: number) { |
Line 380 in addbdf7
function renderDate(date) { |
plus a handful of places where we're doing something like this:
Line 64 in addbdf7
value = formatDate(value, TIME_FORMAT); |
I think it be worth moving date_utils.ts
to common and merging with this file and then changing all uses of formatDate
were it's being using with TIME_FORMAT
I don't know if all of that work would be too out of scope for this PR, if so, then maybe just the merging of date_utils.ts
would be enough for now.
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.
Refactored in 35b1c8c
- Moved
date_utils
to common - Introduced a
timeFormatter
based onTIME_FORMAT
indate_utils
and replaced all duplicates
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.
Code 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.
Tested and LGTM
💚 Build SucceededMetrics [docs]async chunks size
distributable file count
History
To update your PR or re-run it, just comment with: |
…aly-detection-partition-field * 'master' of github.com:elastic/kibana: (76 commits) Fix z-index of KQL Suggestions dropdown (elastic#79184) [babel] remove unused/unneeded babel plugins (elastic#79173) [Search] Fix timeout upgrade link (elastic#79045) Always Show Embeddable Panel Header in Edit Mode (elastic#79152) [Ingest]: add more test for transform index (elastic#79154) [ML] DF Analytics: Collapsable sections on results pages (elastic#76641) [Fleet] Fix agent policy change action migration (elastic#79046) [Ingest Manager] Match package spec `dataset`->`data_stream` and `config_templates`->`policy_templates` renaming (elastic#78699) Revert "[Metrics UI] Add ability to override datafeeds and job config for partition field (elastic#78875)" [ML] Update transform cloning to include description and new fields (elastic#78364) chore(NA): remove non existing plugin paths from case api integration tests (elastic#79127) [Ingest Manager] Ensure we trigger agent policy updated event when we bump revision. (elastic#78836) [Metrics UI] Display No Data context.values as [NO DATA] (elastic#78038) [Monitoring] Missing data alert (elastic#78208) [Lens] Fix embeddable title and description for reporting and dashboard tooltip (elastic#78767) [Lens] Consistent Drag and Drop styles (elastic#78674) [ML] Model management UI fixes and enhancements (elastic#79072) [Metrics UI] Add ability to override datafeeds and job config for partition field (elastic#78875) [Security Solution]Fix basepath used by endpoint telemetry tests (elastic#79027) update rum agent version which contains longtasks (elastic#79105) ...
* [ML] link to edit pipeline * [ML] view training data link * [ML] format stats and configs * [ML] refactor date_utils * [ML] fix types * [ML] change "View" icon and label * [ML] revert label change
Summary
Follow-up on #74978.
Fixes date formatting
Wraps JSON values in the EUI code block component
"View training data" URL navigates to the results page with predefined
is_training
value in the queryIntroduces "Edit" URL to the Ingest Pipeline edit page
Checklist