mirror of https://github.com/statping/statping
Use short codes for ms and μs
Also added space between number and symbol according to International System of Units (SI)pull/645/head
parent
811236f8b4
commit
2fe56b1e92
|
@ -131,9 +131,9 @@
|
|||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||
let val = series[seriesIndex][dataPointIndex];
|
||||
if (val >= 1000) {
|
||||
val = (val / 1000).toFixed(0) + " milliseconds"
|
||||
val = (val / 1000).toFixed(0) + " ms"
|
||||
} else {
|
||||
val = (val).toFixed(0) + " microseconds"
|
||||
val = (val).toFixed(0) + " μs"
|
||||
}
|
||||
return `<div class="chartmarker"><span>Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
||||
},
|
||||
|
|
|
@ -56,9 +56,9 @@
|
|||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||
let val = series[seriesIndex][dataPointIndex];
|
||||
if (val >= 1000) {
|
||||
val = (val / 1000).toFixed(0) + " milliseconds"
|
||||
val = (val / 1000).toFixed(0) + " ms"
|
||||
} else {
|
||||
val = (val).toFixed(0) + " microseconds"
|
||||
val = (val).toFixed(0) + " μs"
|
||||
}
|
||||
return `<div class="chartmarker"><span>Average Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
||||
},
|
||||
|
|
|
@ -167,9 +167,9 @@ export default Vue.mixin({
|
|||
},
|
||||
humanTime(val) {
|
||||
if (val >= 1000) {
|
||||
return Math.floor(val / 1000) + "ms"
|
||||
return Math.floor(val / 1000) + " ms"
|
||||
}
|
||||
return Math.floor(val) + "μs"
|
||||
return Math.floor(val) + " μs"
|
||||
},
|
||||
firstDayOfMonth(date) {
|
||||
return startOfMonth(date)
|
||||
|
|
|
@ -270,9 +270,9 @@ export default {
|
|||
const dt = new Date(ts).toLocaleDateString("en-us", timeoptions)
|
||||
let val = series[seriesIndex][dataPointIndex];
|
||||
if (val >= 1000) {
|
||||
val = (val / 1000).toFixed(0) + " milliseconds"
|
||||
val = (val / 1000).toFixed(0) + " ms"
|
||||
} else {
|
||||
val = (val).toFixed(0) + " microseconds"
|
||||
val = (val).toFixed(0) + " μs"
|
||||
}
|
||||
return `<div class="chartmarker"><span>Response Time: </span><span class="font-3">${val}</span><span>${dt}</span></div>`
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue