Merge pull request #380 from No0Vad/retry-heartbeat-interval

Added support for a retry interval to monitors
This commit is contained in:
Louis Lam 2021-09-16 00:21:53 +08:00 committed by GitHub
commit 72783fd94c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 4 deletions

View file

@ -106,6 +106,14 @@
</div>
</div>
<div class="my-3">
<label for="retry-interval" class="form-label">
{{ $t("Heartbeat Retry Interval") }}
<span>({{ $t("retryCheckEverySecond", [ monitor.retryInterval ]) }})</span>
</label>
<input id="retry-interval" v-model="monitor.retryInterval" type="number" class="form-control" required min="20" step="1">
</div>
<h2 class="mt-5 mb-2">{{ $t("Advanced") }}</h2>
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' " class="my-3 form-check">
@ -255,6 +263,12 @@ export default {
"$route.fullPath"() {
this.init();
},
"monitor.interval"(value, oldValue) {
// Link interval and retryInerval if they are the same value.
if (this.monitor.retryInterval === oldValue) {
this.monitor.retryInterval = value;
}
}
},
mounted() {
this.init();
@ -296,6 +310,7 @@ export default {
name: "",
url: "https://",
interval: 60,
retryInterval: this.interval,
maxretries: 0,
notificationIDList: {},
ignoreTls: false,