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 += parseInt(f.y)
|
||||||
});
|
});
|
||||||
total = total / data.length
|
total = total / data.length
|
||||||
return total.toFixed(0) + "ms"
|
return Math.round(total) + " ms"
|
||||||
} else {
|
} else {
|
||||||
return "Offline"
|
return "Offline"
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,11 +55,7 @@
|
||||||
let ts = w.globals.seriesX[seriesIndex][dataPointIndex];
|
let ts = w.globals.seriesX[seriesIndex][dataPointIndex];
|
||||||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||||
let val = series[seriesIndex][dataPointIndex];
|
let val = series[seriesIndex][dataPointIndex];
|
||||||
if (val >= 10000) {
|
val = val + " ms"
|
||||||
val = Math.round(val / 1000) + " ms"
|
|
||||||
} else {
|
|
||||||
val = val + " μs"
|
|
||||||
}
|
|
||||||
return `<div class="chartmarker"><span>Average Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
return `<div class="chartmarker"><span>Average Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
||||||
},
|
},
|
||||||
fixed: {
|
fixed: {
|
||||||
|
|
Loading…
Reference in New Issue