-
Notifications
You must be signed in to change notification settings - Fork 12.1k
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
Panel: Show multiple errors info in the inspector #64340
Conversation
Backend code coverage report for PR #64340 |
Frontend code coverage report for PR #64340
|
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
Outdated
Show resolved
Hide resolved
return null; | ||
} | ||
if (errors.length === 1) { | ||
return renderError(errors[0]); |
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.
What's the reason behind rendering a single error slightly differently (not wrapping it with an <Alert>
)?
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 didn't want to affect the current style since for one error it's clear that all the content belong to the same error. For multiple errors, the best way I found to encasulate them separately was to show different Alerts. Happy to suggestions if there is something else I could try!
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
Outdated
Show resolved
Hide resolved
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, but would be good to also wait for someone from user essentials to have a look.
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.
Great work @andresmgot 🥳
What is this feature?
The goal of this PR is to show the details of the errors in case a query with multiple targets fails more than once. Before, only the first error was shown in the panel title error and in the inspector. Now, in case there are multiple errors, only that is stated in the title error. Clicking on it displays the query inspector, in the Error tab which shows information about all the errors.
This also includes information about the status code in the error message (which was missing before):
Screencast.from.07-03-23.16.51.56.webm
Since the error could have different formats (e.g. including a json). This is how it looks for the different formats:
Why do we need this feature?
To display all the information available to the user about an error.
Who is this feature for?
Grafana users.
Which issue(s) does this PR fix?:
Fixes #54665
Fixes #58637
Special notes for your reviewer:
This supersedes #64022