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] Single metric viewer: Fixes full page refresh behavior. #44884

Merged

Conversation

walterra
Copy link
Contributor

@walterra walterra commented Sep 5, 2019

Summary

Part of #42909.

Fixes the behavior where a refresh triggered by timefilter would completely reload the page and e.g. reset the visibility and state of the Create rules flyout.

The refresh() method now features a fullRefresh flag which defaults to the previous behaviour of a full reload. A full reload still gets triggered e.g. if a user changes the selection in one of the detector or entity dropdowns. A 'soft' refresh using fullRefresh=false is used if timefilter triggers a refresh. To be able to indicate that a 'soft' refresh is going on, a full-width progress bar was added below the tab menu item's horizontal line.

Checklist

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

For maintainers

@walterra walterra added bug Fixes for quality problems that affect the customer experience regression :ml Feature:Anomaly Detection ML anomaly detection v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.4.0 v7.5.0 labels Sep 5, 2019
@walterra walterra requested review from a team as code owners September 5, 2019 13:35
@walterra walterra self-assigned this Sep 5, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

@walterra walterra changed the title [ML] Single metric viewer: Fixes refresh behavior. [ML] Single metric viewer: Fixes full page refresh behavior. Sep 5, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

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, including IE11, and LGTM

of the horizontal bar below the tab menu elements in its inactive state. */
.mlTimeSeriesExplorerProgress { background-color: $euiColorEmptyShade; }
.mlTimeSeriesExplorerProgress::-moz-progress-bar { background-color: $euiColorEmptyShade; }
.mlTimeSeriesExplorerProgress::-webkit-progress-bar { background-color: $euiColorEmptyShade; }
Copy link
Contributor

Choose a reason for hiding this comment

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

for scss you may also use the following:

Suggested change
.mlTimeSeriesExplorerProgress::-webkit-progress-bar { background-color: $euiColorEmptyShade; }
.mlTimeSeriesExplorerProgress {
background-color: $euiColorEmptyShade;
&::-moz-progress-bar, &::-webkit-progress-bar {
background-color: $euiColorEmptyShade;
}
}

hasResults: false,
dataNotChartable: false
...(fullRefresh ? {
chartDetails: undefined,
Copy link
Contributor

Choose a reason for hiding this comment

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

Component's state is pretty massive, maybe chart related props deserve a dedicated method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This PR has a note about the history of this file, it's a recent mostly as-is conversion from angularjs to React.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@walterra walterra merged commit 3cfe728 into elastic:master Sep 7, 2019
@walterra walterra deleted the ml-fix-single-metric-viewer-reload branch September 7, 2019 16:06
walterra added a commit to walterra/kibana that referenced this pull request Sep 7, 2019
…#44884)

Fixes the behavior where a refresh triggered by timefilter would completely reload the page and e.g. reset the visibility and state of the Create rules flyout.

The refresh() method now features a fullRefresh flag which defaults to the previous behaviour of a full reload. A full reload still gets triggered e.g. if a user changes the selection in one of the detector or entity dropdowns. A 'soft' refresh using fullRefresh=false is used if timefilter triggers a refresh. To be able to indicate that a 'soft' refresh is going on, a full-width progress bar was added below the tab menu item's horizontal line.
walterra added a commit to walterra/kibana that referenced this pull request Sep 7, 2019
…#44884)

Fixes the behavior where a refresh triggered by timefilter would completely reload the page and e.g. reset the visibility and state of the Create rules flyout.

The refresh() method now features a fullRefresh flag which defaults to the previous behaviour of a full reload. A full reload still gets triggered e.g. if a user changes the selection in one of the detector or entity dropdowns. A 'soft' refresh using fullRefresh=false is used if timefilter triggers a refresh. To be able to indicate that a 'soft' refresh is going on, a full-width progress bar was added below the tab menu item's horizontal line.
walterra added a commit that referenced this pull request Sep 7, 2019
…#45102)

Fixes the behavior where a refresh triggered by timefilter would completely reload the page and e.g. reset the visibility and state of the Create rules flyout.

The refresh() method now features a fullRefresh flag which defaults to the previous behaviour of a full reload. A full reload still gets triggered e.g. if a user changes the selection in one of the detector or entity dropdowns. A 'soft' refresh using fullRefresh=false is used if timefilter triggers a refresh. To be able to indicate that a 'soft' refresh is going on, a full-width progress bar was added below the tab menu item's horizontal line.
walterra added a commit that referenced this pull request Sep 8, 2019
…#45103)

Fixes the behavior where a refresh triggered by timefilter would completely reload the page and e.g. reset the visibility and state of the Create rules flyout.

The refresh() method now features a fullRefresh flag which defaults to the previous behaviour of a full reload. A full reload still gets triggered e.g. if a user changes the selection in one of the detector or entity dropdowns. A 'soft' refresh using fullRefresh=false is used if timefilter triggers a refresh. To be able to indicate that a 'soft' refresh is going on, a full-width progress bar was added below the tab menu item's horizontal line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Anomaly Detection ML anomaly detection :ml regression release_note:skip Skip the PR/issue when compiling release notes v7.4.0 v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants