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 creation wizard: show link to results #74025

Conversation

alvarezmelissa87
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 commented Jul 31, 2020

Summary

Related meta issue: #66661

Add view results link next to analytics list link at the end of the creation wizard. Only show the link to the results if the job completed successfully.

When job is still running:

Screen Shot 2020-07-31 at 5 52 41 PM

Once job is finished:

Screen Shot 2020-07-31 at 5 53 04 PM

Checklist

Delete any items that are not applicable to this PR.

@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@alvarezmelissa87 alvarezmelissa87 force-pushed the ml-dfanalytics-wizard-results-link branch from 47c6391 to cf8ed73 Compare August 3, 2020 14:01
return (
<Fragment>
<EuiCard
// @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.

nit: would be good to comment why we need this ts-ignore

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the inline style to a separate file so this ignore isn't needed anymore. d12ebe4

const [initialized, setInitialized] = useState<boolean>(false);
const [failedJobMessage, setFailedJobMessage] = useState<string | undefined>(undefined);
const [jobFinished, setJobFinished] = useState<boolean>(false);
const [currentProgress, setCurrentProgress] = useState<
| {
currentPhase: number;
Copy link
Member

Choose a reason for hiding this comment

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

this should probably have a proper type which can also be used in ProgressStats, where currently any is currently being used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in d12ebe4


interface Props {
currentProgress: any;
failedJobMessage: any;
Copy link
Member

Choose a reason for hiding this comment

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

looks like this can be string | undefined

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot - updated in d12ebe4

return (
<Fragment>
<EuiCard
// @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.

why is this ts-ignore needed? a comment here would be helpful

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moved the inline style to a separate file so this ignore isn't needed anymore. d12ebe4

@@ -130,6 +130,6 @@ export function isCompletedAnalyticsJob(stats: DataFrameAnalyticsStats) {
return stats.state === DATA_FRAME_TASK_STATE.STOPPED && progress === 100;
}

export function getResultsUrl(jobId: string, analysisType: string) {
export function getResultsUrl(jobId: string, analysisType: ANALYSIS_CONFIG_TYPE | string) {
Copy link
Member

Choose a reason for hiding this comment

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

nit, and probably outside the scope of this PR, but it would be good if this only took ANALYSIS_CONFIG_TYPE
it looks like getAnalysisType should return a ANALYSIS_CONFIG_TYPE rather than a string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I noticed that, too, but it will involve touching more files so can be done in a separate PR.

@alvarezmelissa87 alvarezmelissa87 requested a review from a team as a code owner August 3, 2020 19:38
@alvarezmelissa87
Copy link
Contributor Author

This has been updated and is ready for a final look when you get a chance. cc @jgowdyelastic, @qn895

@qn895
Copy link
Member

qn895 commented Aug 3, 2020

Tested and LGTM 💯

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

@kbn/optimizer bundle module count

id value diff baseline
ml 1232 +4 1228

page load bundle size

id value diff baseline
ml 4.3MB +3.9KB 4.3MB

History

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

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

@alvarezmelissa87 alvarezmelissa87 merged commit 3fb77fb into elastic:master Aug 5, 2020
alvarezmelissa87 added a commit to alvarezmelissa87/kibana that referenced this pull request Aug 5, 2020
* show view results card once job complete

* update types

* update types and move css to own file
@alvarezmelissa87 alvarezmelissa87 deleted the ml-dfanalytics-wizard-results-link branch August 5, 2020 14:45
gmmorris added a commit to gmmorris/kibana that referenced this pull request Aug 5, 2020
* master:
  [ML] DF Analytics creation wizard: show link to results (elastic#74025)
alvarezmelissa87 added a commit that referenced this pull request Aug 5, 2020
)

* show view results card once job complete

* update types

* update types and move css to own file
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