Skip to content
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] DF Analytics results table: use index pattern field format if one exists #61709

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Mar 27, 2020

Summary

Fixes #60892

Updates classification/regression/outlier detections result views to use destination index pattern (if exists) or source index pattern (if dest doesn't exist) to get field caps and field format data.

If format data exists for that field, use that format. Otherwise use existing format (human readable dates, etc).

Before:
image

After:
image

Checklist

Delete any items that are not applicable to this PR.

@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner March 27, 2020 22:55
@alvarezmelissa87 alvarezmelissa87 self-assigned this Mar 27, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and LGTM

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few nits, nothing important. LGTM

: [];

allFields.push(...fields);
// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be good to have a comment explaining what is being ignored on this line.

} else {
column.render = (d: any) => {
if (d !== undefined) {
return formatHumanReadableDateTimeSeconds(moment(d).unix() * 1000);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, moment's valueOf() is already in milliseconds

@@ -12,6 +12,10 @@ import { EuiDataGrid, EuiDataGridPaginationProps, EuiDataGridSorting } from '@el

import { euiDataGridStyle, euiDataGridToolbarSettings } from '../../../../common';

import { mlFieldFormatService } from '../../../../../services/field_format_service';

import { IndexPattern } from '../../../../../../../../../../src/plugins/data/public';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this path can just be src/plugins/data/public

@alvarezmelissa87 alvarezmelissa87 force-pushed the ml-df-analytics-field-format branch from af06025 to cdf1f4b Compare March 30, 2020 18:36
@alvarezmelissa87
Copy link
Contributor Author

retest

1 similar comment
@alvarezmelissa87
Copy link
Contributor Author

retest

@alvarezmelissa87 alvarezmelissa87 force-pushed the ml-df-analytics-field-format branch from cdf1f4b to 49dd643 Compare March 31, 2020 13:09
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

  • 💔 Build #37390 failed cdf1f4b6e31fbeb24f774f24a0b79a83d91aaf5a
  • 💔 Build #37323 failed cdf1f4b6e31fbeb24f774f24a0b79a83d91aaf5a
  • 💔 Build #37265 failed cdf1f4b6e31fbeb24f774f24a0b79a83d91aaf5a
  • 💚 Build #37130 succeeded af06025dd7dcfa05dfe52f4366eb9c563fdbacf8
  • 💔 Build #36952 failed 2fb1dd829247682cee52d7f51be2df4892df0377

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alvarezmelissa87 alvarezmelissa87 merged commit 069439a into elastic:master Mar 31, 2020
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Mar 31, 2020
…e exists (elastic#61709)

* classification: use index field format in results table

* regression: use index field format in results table

* outlier: use index field format in results table

* update types

* add destIndex specific fields when using sourceIndex for fields
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Mar 31, 2020
…e exists (elastic#61709)

* classification: use index field format in results table

* regression: use index field format in results table

* outlier: use index field format in results table

* update types

* add destIndex specific fields when using sourceIndex for fields
@alvarezmelissa87 alvarezmelissa87 deleted the ml-df-analytics-field-format branch March 31, 2020 15:08
alvarezmelissa87 added a commit that referenced this pull request Mar 31, 2020
…e exists (#61709) (#61989)

* classification: use index field format in results table

* regression: use index field format in results table

* outlier: use index field format in results table

* update types

* add destIndex specific fields when using sourceIndex for fields
alvarezmelissa87 added a commit that referenced this pull request Mar 31, 2020
…e exists (#61709) (#61990)

* classification: use index field format in results table

* regression: use index field format in results table

* outlier: use index field format in results table

* update types

* add destIndex specific fields when using sourceIndex for fields
gmmorris added a commit to gmmorris/kibana that referenced this pull request Mar 31, 2020
* upstream/master: (69 commits)
  Adding PagerDuty icon to connectors cards (elastic#60805)
  Fix drag and drop flakiness (elastic#61993)
  Grok debugger migration (elastic#60658)
  Endpoint: Fix resolver SVG position issue (elastic#61886)
  [SIEM] version 7.7 rule import (elastic#61903)
  Added styles to make combobox list items wider for alerting flyout (elastic#61894)
  [UA] Tight worker loop can cause high CPU usage (elastic#60950)
  [ML] DF Analytics results table: use index pattern field format if one exists (elastic#61709)
  [ML] Catching unknown index pattern errors (elastic#61935)
  [Discover] Deangularize and euificate sidebar  (elastic#47559)
  Endpoint: Add ts-node dev dependency (elastic#61884)
  Add an onBlur handler for the kuery bar. Only resubmit when input changes. (elastic#61901)
  [ML] Handle Empty Partition Field Values in Single Metric Viewer (elastic#61649)
  Auto interval on date histogram is getting displayed as timestamp per… (elastic#59171)
  [Maps] Explicitly pass fetch function to ems-client (elastic#61846)
  [SIEM][CASE] Fix aria-labels and translations (elastic#61670)
  [ML] Settings: Increase number of items that can be paged in calendars and filters lists (elastic#61842)
  [EPM] update epm filepath route (elastic#61910)
  APM] Set ignore_above to 1024 for telemetry saved object (elastic#61732)
  [Logs UI] Log stream row rendering (elastic#60773)
  ...
gmmorris added a commit to gmmorris/kibana that referenced this pull request Apr 1, 2020
* master: (64 commits)
  Adding PagerDuty icon to connectors cards (elastic#60805)
  Fix drag and drop flakiness (elastic#61993)
  Grok debugger migration (elastic#60658)
  Endpoint: Fix resolver SVG position issue (elastic#61886)
  [SIEM] version 7.7 rule import (elastic#61903)
  Added styles to make combobox list items wider for alerting flyout (elastic#61894)
  [UA] Tight worker loop can cause high CPU usage (elastic#60950)
  [ML] DF Analytics results table: use index pattern field format if one exists (elastic#61709)
  [ML] Catching unknown index pattern errors (elastic#61935)
  [Discover] Deangularize and euificate sidebar  (elastic#47559)
  Endpoint: Add ts-node dev dependency (elastic#61884)
  Add an onBlur handler for the kuery bar. Only resubmit when input changes. (elastic#61901)
  [ML] Handle Empty Partition Field Values in Single Metric Viewer (elastic#61649)
  Auto interval on date histogram is getting displayed as timestamp per… (elastic#59171)
  [Maps] Explicitly pass fetch function to ems-client (elastic#61846)
  [SIEM][CASE] Fix aria-labels and translations (elastic#61670)
  [ML] Settings: Increase number of items that can be paged in calendars and filters lists (elastic#61842)
  [EPM] update epm filepath route (elastic#61910)
  APM] Set ignore_above to 1024 for telemetry saved object (elastic#61732)
  [Logs UI] Log stream row rendering (elastic#60773)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ML] Data frame analytics results grid should use index pattern field format if one exists
5 participants