-
Notifications
You must be signed in to change notification settings - Fork 77
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
Change colors of health checker results #1584
Conversation
@@ -1,11 +1,13 @@ | |||
import React, {useState} from 'react'; | |||
import PropTypes from 'prop-types'; | |||
import {Progress, Tooltip} from 'reactstrap'; | |||
import '../styles/progressbar.css'; |
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 change this to a css module, so we don't introduce global styles with generic names?
|
||
function PluginHealthScoreProgressBar({healthScore, name}) { | ||
const score = healthScore.value || 0; | ||
const color = | ||
score > 80 ? 'success' : score > 60 ? 'warning' : 'danger'; | ||
score >= 80 ? "first" : score >=60 && score <80 ? 'second' : score >=40 && score <60 ? 'third' |
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'm not sure this needs to be css classes for a single style attribute change.
The referenced issue is about the health-score tab, which is not affected by this PR. Instead this changes the color of helth bars, which are already using reasonable colors. The current scheme seems logical (resembles traffic lights), the proposed one seems random. @AayushSaini101 I appreciate the effort, but I currently don't see this as an improvement. Contributions that would make the health-score tab (e.g. https://plugins.jenkins.io/slack/healthscore/ ) more colorful would be appreciated though! |
I agree we should close this. There is a |
Related: #1555
![image](https://private-user-images.githubusercontent.com/60972989/294450184-aa7af164-3406-43c0-bd87-f241315f2537.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTYzNDgsIm5iZiI6MTczODk1NjA0OCwicGF0aCI6Ii82MDk3Mjk4OS8yOTQ0NTAxODQtYWE3YWYxNjQtMzQwNi00M2MwLWJkODctZjI0MTMxNWYyNTM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA3VDE5MjA0OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4ZTMzYzBjNjM5YTlmYzY2YmM4Y2MwODQwZmRlMTA0NzZlZGQ1NTE4ZDI4NWFkMTYyMjY0ODY5OWU2NDg3NDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.K3j8IIHw_t2DNvlFzegoHT8Uc780a0afHg_PWxIbVqw)
SuggestedColors and Range: