link interval and retryInterval

pull/380/head
LouisLam 3 years ago
parent 2617e1f4d8
commit fc9b4617ca

@ -112,7 +112,7 @@
<span v-if="monitor.retryInterval > 0">({{ $t("retryCheckEverySecond", [ monitor.retryInterval ]) }})</span> <span v-if="monitor.retryInterval > 0">({{ $t("retryCheckEverySecond", [ monitor.retryInterval ]) }})</span>
<span v-else>({{ $t("retryIntervalInactive") }})</span> <span v-else>({{ $t("retryIntervalInactive") }})</span>
</label> </label>
<input id="retry-interval" v-model="monitor.retryInterval" type="number" class="form-control" required min="0" step="1"> <input id="retry-interval" v-model="monitor.retryInterval" type="number" class="form-control" required min="20" step="1">
<div class="form-text"> <div class="form-text">
{{ $t("retryIntervalDescription") }} {{ $t("retryIntervalDescription") }}
</div> </div>
@ -261,6 +261,12 @@ export default {
"$route.fullPath"() { "$route.fullPath"() {
this.init(); 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() { mounted() {
this.init(); this.init();
@ -302,7 +308,7 @@ export default {
name: "", name: "",
url: "https://", url: "https://",
interval: 60, interval: 60,
retryInterval: 0, retryInterval: this.interval,
maxretries: 0, maxretries: 0,
notificationIDList: {}, notificationIDList: {},
ignoreTls: false, ignoreTls: false,

Loading…
Cancel
Save