mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-17 11:44:38 -05:00
fixed edit monitor fields empty issues
This commit is contained in:
parent
5afc6a41e3
commit
d3c90df8a8
@ -1,6 +1,5 @@
|
||||
const https = require("https");
|
||||
const dayjs = require("dayjs");
|
||||
const mqtt = require("mqtt");
|
||||
const utc = require("dayjs/plugin/utc");
|
||||
let timezone = require("dayjs/plugin/timezone");
|
||||
dayjs.extend(utc);
|
||||
@ -78,6 +77,11 @@ class Monitor extends BeanModel {
|
||||
pushToken: this.pushToken,
|
||||
notificationIDList,
|
||||
tags: tags,
|
||||
mqttPort: this.mqttPort,
|
||||
mqttUsername: this.mqttUsername,
|
||||
mqttTopic: this.mqttTopic,
|
||||
mqttSuccessMessage: this.mqttSuccessMessage
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -588,6 +588,10 @@ exports.entryPage = "dashboard";
|
||||
bean.dns_resolve_type = monitor.dns_resolve_type;
|
||||
bean.dns_resolve_server = monitor.dns_resolve_server;
|
||||
bean.pushToken = monitor.pushToken;
|
||||
bean.mqttPort = monitor.mqttPort;
|
||||
bean.mqttUsername = monitor.mqttUsername;
|
||||
bean.mqttTopic = monitor.mqttTopic;
|
||||
bean.mqttSuccessMessage = monitor.mqttSuccessMessage;
|
||||
|
||||
await R.store(bean);
|
||||
|
||||
|
@ -310,6 +310,5 @@ export default {
|
||||
topicExplanation: "MQTT topic to monitor",
|
||||
successMessage: "Success Message",
|
||||
successMessageExplanation: "MQTT message that will be considered as success",
|
||||
serverUrl: "Server URL",
|
||||
recent: "Recent",
|
||||
};
|
||||
|
@ -122,7 +122,7 @@
|
||||
<!-- For MQTT Type -->
|
||||
<template v-if="monitor.type === 'mqtt'">
|
||||
<div class="my-3">
|
||||
<label for="url" class="form-label">{{ $t("serverUrl") }}</label>
|
||||
<label for="url" class="form-label">{{ $t("hostname") }}</label>
|
||||
<input id="url" v-model="monitor.url" type="text" class="form-control" required>
|
||||
</div>
|
||||
|
||||
@ -469,8 +469,11 @@ export default {
|
||||
accepted_statuscodes: ["200-299"],
|
||||
dns_resolve_type: "A",
|
||||
dns_resolve_server: "1.1.1.1",
|
||||
topic: "",
|
||||
successMessage: "",
|
||||
mqttPort: "",
|
||||
mqttUsername: "",
|
||||
mqttPassword: "",
|
||||
mqttTopic: "",
|
||||
mqttSuccessMessage: "",
|
||||
};
|
||||
|
||||
for (let i = 0; i < this.$root.notificationList.length; i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user