mirror of https://github.com/statping/statping
Remove calculation from ServiceSparkLine.vue
ServiceSparkLine gets ms, not μs Also changed another toFixed to roundpull/645/head
parent
1d5c2737aa
commit
489b837972
|
@ -186,7 +186,7 @@
|
|||
total += parseInt(f.y)
|
||||
});
|
||||
total = total / data.length
|
||||
return total.toFixed(0) + "ms"
|
||||
return Math.round(total) + " ms"
|
||||
} else {
|
||||
return "Offline"
|
||||
}
|
||||
|
|
|
@ -55,11 +55,7 @@
|
|||
let ts = w.globals.seriesX[seriesIndex][dataPointIndex];
|
||||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||
let val = series[seriesIndex][dataPointIndex];
|
||||
if (val >= 10000) {
|
||||
val = Math.round(val / 1000) + " ms"
|
||||
} else {
|
||||
val = val + " μs"
|
||||
}
|
||||
val = val + " ms"
|
||||
return `<div class="chartmarker"><span>Average Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
||||
},
|
||||
fixed: {
|
||||
|
|
Loading…
Reference in New Issue