mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-10-01 01:25:45 -04: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,
|
||||
notificationIDList,
|
||||
tags: tags,
|
||||
mqttPort: this.mqttPort,
|
||||
mqttUsername: this.mqttUsername,
|
||||
mqttTopic: this.mqttTopic,
|
||||
mqttSuccessMessage: this.mqttSuccessMessage
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@ -354,7 +352,7 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "mqtt") {
|
||||
try {
|
||||
bean.msg = await mqttAsync(this.url, this.mqttTopic, this.mqttSuccessMessage, {
|
||||
mqttPort: this.mqttPort,
|
||||
mqttPort: this.port,
|
||||
mqttUsername: this.mqttUsername,
|
||||
mqttPassword: this.mqttPassword,
|
||||
interval: this.interval,
|
||||
|
@ -588,7 +588,6 @@ 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;
|
||||
|
@ -472,7 +472,6 @@ export default {
|
||||
accepted_statuscodes: ["200-299"],
|
||||
dns_resolve_type: "A",
|
||||
dns_resolve_server: "1.1.1.1",
|
||||
mqttPort: "",
|
||||
mqttUsername: "",
|
||||
mqttPassword: "",
|
||||
mqttTopic: "",
|
||||
|
Loading…
Reference in New Issue
Block a user