diff --git a/server/model/monitor.js b/server/model/monitor.js index 2d4c02e47..41c9ea277 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -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 + }; } diff --git a/server/server.js b/server/server.js index d1fd7ff29..2e59e4077 100644 --- a/server/server.js +++ b/server/server.js @@ -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); diff --git a/src/languages/en.js b/src/languages/en.js index 1c094d9ea..d6d92eca8 100644 --- a/src/languages/en.js +++ b/src/languages/en.js @@ -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", }; diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 96f91e064..f22cf6214 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -122,7 +122,7 @@