mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 11:35:15 +08:00
Avg. Ping and Avg. Response translation keys
This commit is contained in:
@@ -49,7 +49,7 @@
|
||||
<div class="shadow-box big-padding text-center stats">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h4>{{ pingTitle }}</h4>
|
||||
<h4>{{ pingTitle() }}</h4>
|
||||
<p>({{ $t("Current") }})</p>
|
||||
<span class="num">
|
||||
<a href="#" @click.prevent="showPingChartBox = !showPingChartBox">
|
||||
@@ -58,7 +58,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="col">
|
||||
<h4>{{ $t("Avg.") }} {{ pingTitle }}</h4>
|
||||
<h4>{{ pingTitle(true) }}</h4>
|
||||
<p>(24{{ $t("-hour") }})</p>
|
||||
<span class="num"><CountUp :value="avgPing" /></span>
|
||||
</div>
|
||||
@@ -240,14 +240,6 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
pingTitle() {
|
||||
if (this.monitor.type === "http") {
|
||||
return this.$t("Response");
|
||||
}
|
||||
return this.$t("Ping");
|
||||
},
|
||||
|
||||
monitor() {
|
||||
let id = this.$route.params.id
|
||||
return this.$root.monitorList[id];
|
||||
@@ -378,6 +370,19 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
pingTitle(average = false) {
|
||||
let translationPrefix = ""
|
||||
if (average) {
|
||||
translationPrefix = "Avg. "
|
||||
}
|
||||
|
||||
if (this.monitor.type === "http") {
|
||||
return this.$t(translationPrefix + "Response");
|
||||
}
|
||||
|
||||
return this.$t(translationPrefix + "Ping");
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user