-
Notifications
You must be signed in to change notification settings - Fork 14k
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
fix(dashboard): Chart stuck in loading state when when datasets request and chart request fail #19327
Conversation
…st and chart request fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - thanks for getting to the bottom of this edge case!
datasource === PLACEHOLDER_DATASOURCE | ||
datasource === PLACEHOLDER_DATASOURCE && | ||
datasetsStatus !== ResourceStatus.ERROR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't worked on this component for a while, but I would have expected it to check the other way around, i.e. are the conditions met for displaying the error, and if not, only then display the spinner. But I don't propose changing this now as it would probably introduce unnecessary regression risk.
Codecov Report
@@ Coverage Diff @@
## master #19327 +/- ##
==========================================
- Coverage 66.62% 66.61% -0.01%
==========================================
Files 1671 1672 +1
Lines 64556 64545 -11
Branches 6506 6500 -6
==========================================
- Hits 43009 42997 -12
Misses 19864 19864
- Partials 1683 1684 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
…st and chart request fail (apache#19327)
…st and chart request fail (apache#19327)
SUMMARY
When chart's request fails, we wait with displaying an error message until datasources are loaded. However, when datasources request also fails, the chart is stuck in loading state instead of displaying an error. This PR fixes that issue by passing the status of datasets request to the chart renderer, so that when datasources request fails, we display chart's error message.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before:
After:
TESTING INSTRUCTIONS
/dashboard/${id}/datasets
request fails (maybe with some intercepting tool like Requestly?)ADDITIONAL INFORMATION