mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-21 16:15:25 +08:00
Merge branch 'master' into public-dashboard
# Conflicts: # server/server.js
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>
|
||||
|
@@ -333,6 +333,11 @@ export default {
|
||||
this.$root.getSocket().emit("getMonitor", this.$route.params.id, (res) => {
|
||||
if (res.ok) {
|
||||
this.monitor = res.monitor;
|
||||
|
||||
// Handling for monitors that are created before 1.7.0
|
||||
if (this.monitor.retryInterval === 0) {
|
||||
this.monitor.retryInterval = this.monitor.interval;
|
||||
}
|
||||
} else {
|
||||
toast.error(res.msg)
|
||||
}
|
||||
|
Reference in New Issue
Block a user