fix(ui) - slowest domain metric data as per the api changes
This commit is contained in:
parent
31dcb81b0b
commit
1df6910dec
2 changed files with 4 additions and 4 deletions
|
|
@ -10,7 +10,7 @@ interface Props {
|
|||
}
|
||||
function SlowestDomains(props: Props) {
|
||||
const { data, metric } = props;
|
||||
const firstAvg = metric.data.chart[0] && metric.data.chart[0].errorsCount;
|
||||
const firstAvg = metric.data.chart[0] && metric.data.chart[0].value;
|
||||
return (
|
||||
<NoContent
|
||||
size="small"
|
||||
|
|
@ -22,8 +22,8 @@ function SlowestDomains(props: Props) {
|
|||
<Bar
|
||||
key={i}
|
||||
className="mb-2"
|
||||
avg={numberWithCommas(Math.round(item.errorsCount))}
|
||||
width={Math.round((item.errorsCount * 100) / firstAvg) - 10}
|
||||
avg={numberWithCommas(Math.round(item.value))}
|
||||
width={Math.round((item.value * 100) / firstAvg) - 10}
|
||||
domain={item.domain}
|
||||
color={Styles.colors[i]}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const Bar = ({ className = '', width = 0, avg, domain, color }) => {
|
|||
<div className={className}>
|
||||
<div className="flex items-center">
|
||||
<div className={stl.bar} style={{ width: `${width < 5 ? 5 : width }%`, backgroundColor: color }}></div>
|
||||
<div className="ml-2">
|
||||
<div className="ml-2 shrink-0">
|
||||
<span className="font-medium">{avg}</span>
|
||||
<span> ms</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue