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

Don't trigger autorefresh when autofetch false #30405

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

timroes
Copy link
Contributor

@timroes timroes commented Feb 7, 2019

Summary

Fixes #30347

Discover used the visualize_loader but set autoFetch: false, to prevent it auto fetching the data. That flag usually mean you want to manually call render, etc. so I extended that flag to also prevent the autoRefreshFetch of the timepicker to trigger a fetch/render, since that failed on Discover since there was no valid vis configuration to actually fetch the data, since it's passed in directly into the render method by the Discover app.

Checklist

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

For maintainers

@timroes timroes added bug Fixes for quality problems that affect the customer experience v7.0.0 Feature:Vis Loader Visualize loader APIs Feature:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 v6.7.0 v7.2.0 labels Feb 7, 2019
@timroes timroes requested a review from lukeelmers February 7, 2019 16:27
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@@ -127,8 +127,6 @@ export class EmbeddedVisualizeHandler {
forceFetch: false,
};

this.autoFetch = !(autoFetch === false);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used a default value up, to make that a bit better readable.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

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

This LGTM. Could use some tests, but as discussed, we will cover that in #30422.

Tested locally Chrome OSX, compared to master, verified fixed 🚀

@lukeelmers lukeelmers merged commit f9aac03 into elastic:master Feb 7, 2019
@lukeelmers
Copy link
Member

Merging/backporting now so I can update #30167 accordingly.

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:ExpressionLanguage Interpreter expression language (aka canvas pipeline) Feature:Vis Loader Visualize loader APIs Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants