diff --git a/db/knex_migrations/2025-12-09-0000-add-local-service-monitor.js b/db/knex_migrations/2025-12-09-0000-add-local-service-monitor.js index 1522312f..deb41104 100644 --- a/db/knex_migrations/2025-12-09-0000-add-local-service-monitor.js +++ b/db/knex_migrations/2025-12-09-0000-add-local-service-monitor.js @@ -1,7 +1,6 @@ -const { settings } = require("../../server/util-server"); - /** - * @param {import("knex").Knex} knex + * @param {import("knex").Knex} knex Database connection + * @returns {Promise} */ exports.up = async (knex) => { await knex.schema.alterTable("monitor", (table) => { @@ -12,7 +11,8 @@ exports.up = async (knex) => { }; /** - * @param {import("knex").Knex} knex + * @param {import("knex").Knex} knex Database connection + * @returns {Promise} */ exports.down = async (knex) => { if (await knex.schema.hasColumn("monitor", "local_service_command")) { diff --git a/server/monitor-types/local-service.js b/server/monitor-types/local-service.js index 70866839..d5eaeb84 100644 --- a/server/monitor-types/local-service.js +++ b/server/monitor-types/local-service.js @@ -1,11 +1,14 @@ const { MonitorType } = require("./monitor-type"); const { exec } = require("child_process"); -const { DOWN, UP, log, evaluateJsonQuery } = require("../../src/util"); +const { DOWN, UP, evaluateJsonQuery } = require("../../src/util"); class LocalServiceMonitorType extends MonitorType { name = "local-service"; description = "Checks if a local service is running by executing a command."; + /** + * @inheritdoc + */ async check(monitor, heartbeat, server) { return new Promise((resolve, reject) => { exec(monitor.local_service_command, async (error, stdout, stderr) => { @@ -59,4 +62,4 @@ class LocalServiceMonitorType extends MonitorType { module.exports = { LocalServiceMonitorType, -}; \ No newline at end of file +}; diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 637c2adf..e45740b1 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -659,7 +659,6 @@ - - - + + - - + + - - + + - -
+ +
@@ -827,8 +826,8 @@ {{ $t("minimumIntervalWarning") }}
- - + +
- -

{{ $t("Advanced") }}

+ +

{{ $t("Advanced") }}

@@ -857,8 +856,8 @@
- -
+ +
Sec-Websocket-Accept @@ -874,8 +873,8 @@ {{ monitor.type === "redis" ? $t("ignoreTLSErrorGeneral") : $t("ignoreTLSError") }}
- -
+ +
- -
+ +
- - + +
- - + +
@@ -973,8 +972,8 @@ {{ $t("acceptedStatusCodesDescription") }}
- -
+ +
@@ -1017,8 +1016,8 @@
- - + +

{{ $t("Notifications") }}

{{ $t("Not available, please setup.") }} @@ -1038,8 +1037,8 @@ - - + +

{{ $t("Proxy") }}

@@ -1058,8 +1057,8 @@ {{ proxy.host }}:{{ proxy.port }} ({{ proxy.protocol }}) {{ $t("Edit") }} - - {{ $t("default") }} + + {{ $t("default") }}

-
+
@@ -1170,8 +1169,8 @@
- - + +

{{ $t("Authentication") }}

@@ -1250,8 +1249,8 @@
- -
+ +
@@ -1297,8 +1296,8 @@ {{ $t("grpcMethodDescription") }}
- - + +