1
0
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:
sveisvei 2017-01-02 20:41:49 +01:00
parent 1bdb86c7c2
commit cb879b29fe
2 changed files with 3 additions and 2 deletions

View File

@ -68,7 +68,7 @@ export default class MetricComponent extends React.Component {
lastMinute.isFallback ?
<Icon className={styles.problemIcon} name="report problem" title="No metrics avaiable" /> :
<div>
<Progress animatePercentageText strokeWidth={10} percentage={lastMinutePercent} width="50" />
<Progress color="#e91e63" animatePercentageText strokeWidth={10} percentage={lastMinutePercent} width="50" />
</div>
}
<p><strong>Last minute</strong><br /> Yes {lastMinute.yes}, No: {lastMinute.no}</p>

View File

@ -82,7 +82,7 @@ class Progress extends Component {
}
render () {
const { strokeWidth } = this.props;
const { strokeWidth, color } = this.props;
const radius = (50 - strokeWidth / 2);
const pathDescription = `
M 50,50 m 0,-${radius}
@ -92,6 +92,7 @@ class Progress extends Component {
const diameter = Math.PI * 2 * radius;
const progressStyle = {
stroke: color,
strokeDasharray: `${diameter}px ${diameter}px`,
strokeDashoffset: `${((100 - this.state.percentage) / 100 * diameter)}px`,
};