mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-12-28 23:19:44 -08:00
[MQTT] Use existing fields instead of creating new ones (Server)
This commit is contained in:
parent
1c8407a433
commit
6272514820
|
@ -79,11 +79,9 @@ class Monitor extends BeanModel {
|
||||||
pushToken: this.pushToken,
|
pushToken: this.pushToken,
|
||||||
notificationIDList,
|
notificationIDList,
|
||||||
tags: tags,
|
tags: tags,
|
||||||
mqttPort: this.mqttPort,
|
|
||||||
mqttUsername: this.mqttUsername,
|
mqttUsername: this.mqttUsername,
|
||||||
mqttTopic: this.mqttTopic,
|
mqttTopic: this.mqttTopic,
|
||||||
mqttSuccessMessage: this.mqttSuccessMessage
|
mqttSuccessMessage: this.mqttSuccessMessage
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,7 +352,7 @@ class Monitor extends BeanModel {
|
||||||
} else if (this.type === "mqtt") {
|
} else if (this.type === "mqtt") {
|
||||||
try {
|
try {
|
||||||
bean.msg = await mqttAsync(this.url, this.mqttTopic, this.mqttSuccessMessage, {
|
bean.msg = await mqttAsync(this.url, this.mqttTopic, this.mqttSuccessMessage, {
|
||||||
mqttPort: this.mqttPort,
|
mqttPort: this.port,
|
||||||
mqttUsername: this.mqttUsername,
|
mqttUsername: this.mqttUsername,
|
||||||
mqttPassword: this.mqttPassword,
|
mqttPassword: this.mqttPassword,
|
||||||
interval: this.interval,
|
interval: this.interval,
|
||||||
|
|
|
@ -588,7 +588,6 @@ exports.entryPage = "dashboard";
|
||||||
bean.dns_resolve_type = monitor.dns_resolve_type;
|
bean.dns_resolve_type = monitor.dns_resolve_type;
|
||||||
bean.dns_resolve_server = monitor.dns_resolve_server;
|
bean.dns_resolve_server = monitor.dns_resolve_server;
|
||||||
bean.pushToken = monitor.pushToken;
|
bean.pushToken = monitor.pushToken;
|
||||||
bean.mqttPort = monitor.mqttPort;
|
|
||||||
bean.mqttUsername = monitor.mqttUsername;
|
bean.mqttUsername = monitor.mqttUsername;
|
||||||
bean.mqttTopic = monitor.mqttTopic;
|
bean.mqttTopic = monitor.mqttTopic;
|
||||||
bean.mqttSuccessMessage = monitor.mqttSuccessMessage;
|
bean.mqttSuccessMessage = monitor.mqttSuccessMessage;
|
||||||
|
|
|
@ -472,7 +472,6 @@ export default {
|
||||||
accepted_statuscodes: ["200-299"],
|
accepted_statuscodes: ["200-299"],
|
||||||
dns_resolve_type: "A",
|
dns_resolve_type: "A",
|
||||||
dns_resolve_server: "1.1.1.1",
|
dns_resolve_server: "1.1.1.1",
|
||||||
mqttPort: "",
|
|
||||||
mqttUsername: "",
|
mqttUsername: "",
|
||||||
mqttPassword: "",
|
mqttPassword: "",
|
||||||
mqttTopic: "",
|
mqttTopic: "",
|
||||||
|
|
Loading…
Reference in a new issue