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] Adds Preview table tab to Data Frames list expanded row #39983

Merged

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Jul 1, 2019

Summary

Adds Preview table tab to Data Frame jobs list expanded row.

Screen Shot 2019-07-02 at 11 28 44 AM

  • Add a route for fetching transform data for a particular job
  • Use transform data to create a query body for preview request

Note:

Currently, there is a bit a duplication (like the sorting function). The goal is to have the same component used to display the preview table here and in the wizard. For now, I've kept them separate (as refactoring will be required) and copied a bit of what I've needed.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

- [ ] This was checked for breaking API changes and was labeled appropriately
- [ ] This includes a feature addition or change that requires a release note and was labeled appropriately

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Looks great! Just added a few questions/suggestions.


import { DataFramePreviewRequest } from '../../../../common';

interface Transform {
Copy link
Contributor

Choose a reason for hiding this comment

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

On latest master you should be able to use DataFrameTransform from ml/public/data_frame/common/job.ts.


async function getPreview() {
try {
const transformData: any = await ml.dataFrame.getDataFrameTransforms(transformId);
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can pass on the transform config as a prop and don't need to fetch it again? It's available as .config on the DataFrameJobListRow objects.

@peteharverson
Copy link
Contributor

Is it possible to format the date type columns in the Preview table, as happens inside the wizard?

image

@walterra
Copy link
Contributor

walterra commented Jul 1, 2019

@peteharverson This is a regression of the removal of automatic date formatting in the wizard done in this PR #39811. Once we do the second part of #39250 we can have human readable dates in the preview table, so this needs to be done in a follow up.

@peteharverson
Copy link
Contributor

The headers in the new Preview table (and also in the table inside the wizard) are hyperlinks, which implies sorting functionality, but when I click on them nothing happens. Can sorting be added in? If not, the columns should be set marked as not sortable if possible.

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

Latest changes LGTM 🍾

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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.

LGTM

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.

Latest edits LGTM

@alvarezmelissa87 alvarezmelissa87 merged commit d178532 into elastic:master Jul 2, 2019
@alvarezmelissa87 alvarezmelissa87 deleted the ml-data-frames-preview-tab branch July 2, 2019 11:29
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Jul 2, 2019
…#39983)

* create preview tab in DF list expanded row

* add route for fetching transform data

* sort table columns. fix types

* update snapshot

* update tab label

* add refresh functionality

* pass transformConfig as prop instead of fetching
alvarezmelissa87 added a commit that referenced this pull request Jul 2, 2019
…#40132)

* create preview tab in DF list expanded row

* add route for fetching transform data

* sort table columns. fix types

* update snapshot

* update tab label

* add refresh functionality

* pass transformConfig as prop instead of fetching
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.

5 participants