-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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: Add support for pending & maintenance in badges #2525
Conversation
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.
Good addition, could perhaps merge the two switch statements and use ternary expression to set badgeLabel
Co-authored-by: Frank Elsinga <[email protected]>
case 0: | ||
badgeValues.color = downColor; | ||
badgeValues.message = downLabel; | ||
break; | ||
case 1: | ||
badgeValues.color = upColor; | ||
badgeValues.message = upLabel; | ||
break; | ||
case 2: | ||
badgeValues.color = pendingColor; | ||
badgeValues.message = pendingLabel; | ||
break; | ||
case 3: |
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.
Can you use our key names? (PENDING, UP etc)
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.
Good point, but this is merged already I'm not sure how should I handle this.
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.
New PR ;)
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #2456
Type of change
Please delete any options that are not relevant.
Checklist
(including JSDoc for methods)
Screenshots (if any)