Fix default value of pagerduty-integration-url

This commit is contained in:
Louis Lam 2022-05-25 23:34:47 +08:00
parent 058e5442af
commit 0a8c922abf

View file

@ -8,7 +8,7 @@
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="pagerduty-integration-url" class="form-label">{{ $t("Integration URL") }}</label> <label for="pagerduty-integration-url" class="form-label">{{ $t("Integration URL") }}</label>
<input id="pagerduty-integration-url" v-model="$parent.notification.pagerdutyIntegrationUrl" type="text" class="form-control" autocomplete="false" value="https://events.pagerduty.com/v2/enqueue"> <input id="pagerduty-integration-url" v-model="$parent.notification.pagerdutyIntegrationUrl" type="text" class="form-control" autocomplete="false">
</div> </div>
<div class="mb-3"> <div class="mb-3">
<label for="pagerduty-priority" class="form-label">{{ $t("Priority") }}</label> <label for="pagerduty-priority" class="form-label">{{ $t("Priority") }}</label>
@ -36,5 +36,10 @@ export default {
components: { components: {
HiddenInput, HiddenInput,
}, },
mounted() {
if (typeof this.$parent.notification.pagerdutyIntegrationUrl === "undefined") {
this.$parent.notification.pagerdutyIntegrationUrl = "https://events.pagerduty.com/v2/enqueue";
}
}
}; };
</script> </script>