mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-20 00:08:02 +01:00
red color on minute circle on metrics view
This commit is contained in:
parent
1bdb86c7c2
commit
cb879b29fe
@ -68,7 +68,7 @@ export default class MetricComponent extends React.Component {
|
|||||||
lastMinute.isFallback ?
|
lastMinute.isFallback ?
|
||||||
<Icon className={styles.problemIcon} name="report problem" title="No metrics avaiable" /> :
|
<Icon className={styles.problemIcon} name="report problem" title="No metrics avaiable" /> :
|
||||||
<div>
|
<div>
|
||||||
<Progress animatePercentageText strokeWidth={10} percentage={lastMinutePercent} width="50" />
|
<Progress color="#e91e63" animatePercentageText strokeWidth={10} percentage={lastMinutePercent} width="50" />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<p><strong>Last minute</strong><br /> Yes {lastMinute.yes}, No: {lastMinute.no}</p>
|
<p><strong>Last minute</strong><br /> Yes {lastMinute.yes}, No: {lastMinute.no}</p>
|
||||||
|
@ -82,7 +82,7 @@ class Progress extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
const { strokeWidth } = this.props;
|
const { strokeWidth, color } = this.props;
|
||||||
const radius = (50 - strokeWidth / 2);
|
const radius = (50 - strokeWidth / 2);
|
||||||
const pathDescription = `
|
const pathDescription = `
|
||||||
M 50,50 m 0,-${radius}
|
M 50,50 m 0,-${radius}
|
||||||
@ -92,6 +92,7 @@ class Progress extends Component {
|
|||||||
|
|
||||||
const diameter = Math.PI * 2 * radius;
|
const diameter = Math.PI * 2 * radius;
|
||||||
const progressStyle = {
|
const progressStyle = {
|
||||||
|
stroke: color,
|
||||||
strokeDasharray: `${diameter}px ${diameter}px`,
|
strokeDasharray: `${diameter}px ${diameter}px`,
|
||||||
strokeDashoffset: `${((100 - this.state.percentage) / 100 * diameter)}px`,
|
strokeDashoffset: `${((100 - this.state.percentage) / 100 * diameter)}px`,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user