mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-03-04 16:35:57 +00:00
Add slow response notification resend interval to db/gui
This commit is contained in:
parent
daacc2842e
commit
8669c5df50
2 changed files with 12 additions and 0 deletions
|
@ -6,6 +6,7 @@ exports.up = function (knex) {
|
|||
table.integer("slow_response_notification_threshold").defaultTo(0);
|
||||
table.integer("slow_response_notification_range").defaultTo(0);
|
||||
table.string("slow_response_notification_method").defaultTo("");
|
||||
table.integer("slow_response_notification_resend_interval").defaultTo(0);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -16,5 +17,6 @@ exports.down = function (knex) {
|
|||
table.integer("slow_response_notification_threshold").defaultTo(0);
|
||||
table.integer("slow_response_notification_range").defaultTo(0);
|
||||
table.string("slow_response_notification_method").defaultTo("");
|
||||
table.integer("slow_response_notification_resend_interval").defaultTo(0);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -465,6 +465,15 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="monitor.slowResponseNotification" class="my-3">
|
||||
<label for="slow-response-notification-resend-interval" class="form-label">
|
||||
{{ $t("Resend Notification if Slow Response X times consecutively") }}
|
||||
<span v-if="monitor.slowResponseNotificationResendInterval > 0">({{ $t("resendEveryXTimes", [ monitor.slowResponseNotificationResendInterval ]) }})</span>
|
||||
<span v-else>({{ $t("resendDisabled") }})</span>
|
||||
</label>
|
||||
<input id="slow-response-notification-resend-interval" v-model="monitor.slowResponseNotificationResendInterval" type="number" class="form-control" required min="0" step="1">
|
||||
</div>
|
||||
|
||||
<h2 v-if="monitor.type !== 'push'" class="mt-5 mb-2">{{ $t("Advanced") }}</h2>
|
||||
|
||||
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' " class="my-3 form-check">
|
||||
|
@ -939,6 +948,7 @@ const monitorDefaults = {
|
|||
slowResponseNotificationThreshold: 5000,
|
||||
slowResponseNotificationRange: 60,
|
||||
slowResponseNotificationMethod: "average",
|
||||
slowResponseNotificationResendInterval: 0,
|
||||
};
|
||||
|
||||
export default {
|
||||
|
|
Loading…
Add table
Reference in a new issue