-
Notifications
You must be signed in to change notification settings - Fork 2.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
ui: Add error boundary in the React UI #2759
Conversation
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
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.
Awesome! One comment, then LGTM
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
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.
Looks great :)))
pkg/ui/react-app/src/thanos/pages/errorBoundary/ErrorBoundary.tsx
Outdated
Show resolved
Hide resolved
Thanos issue tracker. | ||
</a> | ||
</h3> | ||
<Button color="link" id="toggler" className={styles.detailsBtn} style={{ fontSize: '1.2em' }}> |
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.
If this is the only instance of the detailsBtn class, why split the font size out of the css? To keep the css class more generic?
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.
The internal bootstrap classes were getting priority over the detailsBtn
class, so I wasn't able to modify the font-size here. I had two options, either use !important
on use inline CSS.
I think maybe there is a third solution too. I can increase the specificity of detailsBtn
class, by declaring it as button.detailsBtn
or something.
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.
Using button.detailsBtn
instead of just .detailsBtn
worked 🎉
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.
yes let's avoid !important for sure. making it more specialized 👍
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
looks great. See,s that we need to fix a linting error. This may require regeneration of the bindata.go |
Signed-off-by: Prem Kumar <prmsrswt@gmail.com>
Changes
/api/v1/label/__name__/values
wasHere, the UI expects
data
to be an array.Fixed this by sending an empty array (
[]
) instead ofnull
Verification
Tested locally by emulating error conditions.
Screenshot