From 9404efd86dc7f5156ada3eb63f23397b937fadd2 Mon Sep 17 00:00:00 2001 From: Ruben Date: Wed, 28 Dec 2022 10:37:25 +0100 Subject: [PATCH 001/216] Fixed the metrics for the push type. --- server/routers/api-router.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index bbecbced..e22f9fae 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -9,6 +9,7 @@ const StatusPage = require("../model/status_page"); const { UptimeKumaServer } = require("../uptime-kuma-server"); const { makeBadge } = require("badge-maker"); const { badgeConstants } = require("../config"); +const { Prometheus } = require("../prometheus"); let router = express.Router(); @@ -87,6 +88,7 @@ router.get("/api/push/:pushToken", async (request, response) => { io.to(monitor.user_id).emit("heartbeat", bean.toJSON()); Monitor.sendStats(io, monitor.id, monitor.user_id); + new Prometheus(monitor).update(bean, undefined); response.json({ ok: true, From fe0317054095184c04a5d3b8f262a801588d3fc9 Mon Sep 17 00:00:00 2001 From: Matthew Nickson Date: Fri, 6 Jan 2023 20:41:25 +0000 Subject: [PATCH 002/216] [empty commit] pull request for #1685 Add API key for metrics page From 66d5408aadd083dd38fe89086794b46d5cfeb0c6 Mon Sep 17 00:00:00 2001 From: Matthew Nickson Date: Mon, 9 Jan 2023 20:20:09 +0000 Subject: [PATCH 003/216] Added DB schema for api keys Signed-off-by: Matthew Nickson --- db/patch-api-key-table.sql | 13 +++++++++++++ server/database.js | 1 + 2 files changed, 14 insertions(+) create mode 100644 db/patch-api-key-table.sql diff --git a/db/patch-api-key-table.sql b/db/patch-api-key-table.sql new file mode 100644 index 00000000..151b6918 --- /dev/null +++ b/db/patch-api-key-table.sql @@ -0,0 +1,13 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. +BEGIN TRANSACTION; +CREATE TABLE [api_key] ( + [id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + [key] VARCHAR(255) NOT NULL, + [name] VARCHAR(255) NOT NULL, + [user_id] INTEGER NOT NULL, + [created_date] DATETIME DEFAULT (DATETIME('now')) NOT NULL, + [active] BOOLEAN DEFAULT 1 NOT NULL, + [expires] DATETIME DEFAULT NULL, + CONSTRAINT FK_user FOREIGN KEY ([user_id]) REFERENCES [user]([id]) ON DELETE CASCADE ON UPDATE CASCADE +); +COMMIT; \ No newline at end of file diff --git a/server/database.js b/server/database.js index 2544f197..acf6f87a 100644 --- a/server/database.js +++ b/server/database.js @@ -66,6 +66,7 @@ class Database { "patch-add-radius-monitor.sql": true, "patch-monitor-add-resend-interval.sql": true, "patch-maintenance-table2.sql": true, + "patch-api-key-table.sql": true, }; /** From 71f00b369055b36110d854e0399344a8157dc9d6 Mon Sep 17 00:00:00 2001 From: Ruben Date: Thu, 12 Jan 2023 18:33:39 +0100 Subject: [PATCH 004/216] Parse push ping parameter with parseInt. --- server/routers/api-router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/routers/api-router.js b/server/routers/api-router.js index e22f9fae..5e94d9a0 100644 --- a/server/routers/api-router.js +++ b/server/routers/api-router.js @@ -37,7 +37,7 @@ router.get("/api/push/:pushToken", async (request, response) => { let pushToken = request.params.pushToken; let msg = request.query.msg || "OK"; - let ping = request.query.ping || null; + let ping = parseInt(request.query.ping) || null; let statusString = request.query.status || "up"; let status = (statusString === "up") ? UP : DOWN; From ef54d9e3b648b7f7c538b512dcbe0b00b3a8a403 Mon Sep 17 00:00:00 2001 From: Austin Miller Date: Mon, 6 Feb 2023 11:33:14 -0700 Subject: [PATCH 005/216] Add PagerTree Notification Provider --- server/notification-providers/pagertree.js | 91 ++++++++++++++++++++++ server/notification.js | 2 + src/components/notifications/PagerTree.vue | 33 ++++++++ src/components/notifications/index.js | 2 + src/lang/en.json | 11 ++- 5 files changed, 138 insertions(+), 1 deletion(-) create mode 100644 server/notification-providers/pagertree.js create mode 100644 src/components/notifications/PagerTree.vue diff --git a/server/notification-providers/pagertree.js b/server/notification-providers/pagertree.js new file mode 100644 index 00000000..c39f5681 --- /dev/null +++ b/server/notification-providers/pagertree.js @@ -0,0 +1,91 @@ +const NotificationProvider = require("./notification-provider"); +const axios = require("axios"); +const { UP, DOWN, getMonitorRelativeURL } = require("../../src/util"); +const { setting } = require("../util-server"); +let successMessage = "Sent Successfully."; + +class PagerTree extends NotificationProvider { + name = "PagerTree"; + + /** + * @inheritdoc + */ + async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { + try { + if (heartbeatJSON == null) { + const title = "[Test] Uptime Kuma Alert"; + return this.postNotification(notification, title, monitorJSON, heartbeatJSON); + } + + if (heartbeatJSON.status === UP && notification.pagertreeAutoResolve === "resolve") { + return this.postNotification(notification, null, monitorJSON, heartbeatJSON, notification.pagertreeAutoResolve); + } + + if (heartbeatJSON.status === DOWN) { + const title = `Uptime Kuma Monitor "${monitorJSON.name}" is DOWN`; + return this.postNotification(notification, title, monitorJSON, heartbeatJSON); + } + } catch (error) { + this.throwGeneralAxiosError(error); + } + } + + /** + * Check if result is successful, result code should be in range 2xx + * @param {Object} result Axios response object + * @throws {Error} The status code is not in range 2xx + */ + checkResult(result) { + if (result.status == null) { + throw new Error("PagerTree notification failed with invalid response!"); + } + if (result.status < 200 || result.status >= 300) { + throw new Error("PagerTree notification failed with status code " + result.status); + } + } + + /** + * Send the message + * @param {BeanModel} notification Message title + * @param {string} title Message title + * @param {Object} monitorJSON Monitor details (For Up/Down only) + * @param {?string} eventAction Action event for PagerTree (create, resolve) + * @returns {string} + */ + async postNotification(notification, title, monitorJSON, heartbeatJSON, eventAction = "create") { + + if (eventAction == null) { + return "No action required"; + } + + const options = { + method: "POST", + url: notification.pagertreeIntegrationUrl, + headers: { "Content-Type": "application/json" }, + data: { + event_type: eventAction, + id: heartbeatJSON?.monitorID || "uptime-kuma-test", + title: title, + urgency: notification.pagertreeUrgency, + heartbeat: heartbeatJSON, + monitor: monitorJSON + } + }; + + const baseURL = await setting("primaryBaseURL"); + if (baseURL && monitorJSON) { + options.client = "Uptime Kuma"; + options.client_url = baseURL + getMonitorRelativeURL(monitorJSON.id); + } + + let result = await axios.request(options); + this.checkResult(result); + if (result.statusText != null) { + return "PagerTree notification succeed: " + result.statusText; + } + + return successMessage; + } +} + +module.exports = PagerTree; diff --git a/server/notification.js b/server/notification.js index fd349123..1897f5cc 100644 --- a/server/notification.js +++ b/server/notification.js @@ -24,6 +24,7 @@ const Ntfy = require("./notification-providers/ntfy"); const Octopush = require("./notification-providers/octopush"); const OneBot = require("./notification-providers/onebot"); const PagerDuty = require("./notification-providers/pagerduty"); +const PagerTree = require("./notification-providers/pagertree"); const PromoSMS = require("./notification-providers/promosms"); const Pushbullet = require("./notification-providers/pushbullet"); const PushDeer = require("./notification-providers/pushdeer"); @@ -83,6 +84,7 @@ class Notification { new Octopush(), new OneBot(), new PagerDuty(), + new PagerTree(), new PromoSMS(), new Pushbullet(), new PushDeer(), diff --git a/src/components/notifications/PagerTree.vue b/src/components/notifications/PagerTree.vue new file mode 100644 index 00000000..823eb23b --- /dev/null +++ b/src/components/notifications/PagerTree.vue @@ -0,0 +1,33 @@ + + + diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js index 3c8b2621..ed9dde0f 100644 --- a/src/components/notifications/index.js +++ b/src/components/notifications/index.js @@ -22,6 +22,7 @@ import Ntfy from "./Ntfy.vue"; import Octopush from "./Octopush.vue"; import OneBot from "./OneBot.vue"; import PagerDuty from "./PagerDuty.vue"; +import PagerTree from "./PagerTree.vue"; import PromoSMS from "./PromoSMS.vue"; import Pushbullet from "./Pushbullet.vue"; import PushDeer from "./PushDeer.vue"; @@ -76,6 +77,7 @@ const NotificationFormList = { "octopush": Octopush, "OneBot": OneBot, "PagerDuty": PagerDuty, + "PagerTree": PagerTree, "promosms": PromoSMS, "pushbullet": Pushbullet, "PushByTechulus": TechulusPush, diff --git a/src/lang/en.json b/src/lang/en.json index d907f4e0..4383aca9 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -695,5 +695,14 @@ "Google Analytics ID": "Google Analytics ID", "Edit Tag": "Edit Tag", "Server Address": "Server Address", - "Learn More": "Learn More" + "Learn More": "Learn More", + "pagertreeIntegrationUrl": "Integration URL", + "pagertreeUrgency": "Urgency", + "pagertreeSilent": "Silent", + "pagertreeLow": "Low", + "pagertreeMedium": "Medium", + "pagertreeHigh": "High", + "pagertreeCritical": "Critical", + "pagertreeResolve": "Auto Resolve", + "pagertreeDoNothing": "Do Nothing" } From 1c0174c3192f862aa5bd17bad7c381e4a94fb638 Mon Sep 17 00:00:00 2001 From: Austin Miller Date: Mon, 6 Feb 2023 13:07:56 -0700 Subject: [PATCH 006/216] ESLint and verbiage changes --- src/components/notifications/PagerTree.vue | 8 +++----- src/lang/en.json | 3 ++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/notifications/PagerTree.vue b/src/components/notifications/PagerTree.vue index 823eb23b..0121f65e 100644 --- a/src/components/notifications/PagerTree.vue +++ b/src/components/notifications/PagerTree.vue @@ -2,6 +2,9 @@
+ + {{ $t("here") }} +
@@ -23,11 +26,6 @@ diff --git a/src/lang/en.json b/src/lang/en.json index 4383aca9..f29f0646 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -704,5 +704,6 @@ "pagertreeHigh": "High", "pagertreeCritical": "Critical", "pagertreeResolve": "Auto Resolve", - "pagertreeDoNothing": "Do Nothing" + "pagertreeDoNothing": "Do Nothing", + "wayToGetPagerTreeIntegrationURL": "After creating the Uptime Kuma integration in PagerTree, copy the Endpoint. See full details {0}" } From ab3b2bddba0843e7bec6e66bb5d3907bf914bf00 Mon Sep 17 00:00:00 2001 From: Suriya Soutmun Date: Wed, 4 Jan 2023 14:33:05 +0700 Subject: [PATCH 007/216] [empty commit] pull request for http/http keyword mTLS authen From faa78443d6d41659029ce8d3b1c988637c97021d Mon Sep 17 00:00:00 2001 From: Suriya Soutmun Date: Wed, 4 Jan 2023 14:37:03 +0700 Subject: [PATCH 008/216] chore: alter table monitor add column tls_ca, tls_cert, tls_key for certificate data --- db/patch-monitor-tls.sql | 13 +++++++++++++ server/database.js | 1 + 2 files changed, 14 insertions(+) create mode 100644 db/patch-monitor-tls.sql diff --git a/db/patch-monitor-tls.sql b/db/patch-monitor-tls.sql new file mode 100644 index 00000000..ac4edb79 --- /dev/null +++ b/db/patch-monitor-tls.sql @@ -0,0 +1,13 @@ +-- You should not modify if this have pushed to Github, unless it does serious wrong with the db. +BEGIN TRANSACTION; + +ALTER TABLE monitor + ADD tls_ca TEXT default null; + +ALTER TABLE monitor + ADD tls_cert TEXT default null; + +ALTER TABLE monitor + ADD tls_key TEXT default null; + +COMMIT; diff --git a/server/database.js b/server/database.js index 19c09a00..859f12ff 100644 --- a/server/database.js +++ b/server/database.js @@ -70,6 +70,7 @@ class Database { "patch-maintenance-table2.sql": true, "patch-add-gamedig-monitor.sql": true, "patch-add-google-analytics-status-page-tag.sql": true, + "patch-monitor-tls.sql": true, }; /** From 43941fa2c60fbd9370699ff4e304188e176a067d Mon Sep 17 00:00:00 2001 From: Suriya Soutmun Date: Wed, 4 Jan 2023 14:37:30 +0700 Subject: [PATCH 009/216] feat: add mtls authen method in http/http keyword --- server/model/monitor.js | 16 ++++++++++++- server/server.js | 3 +++ src/pages/EditMonitor.vue | 47 +++++++++++++++++++++++++++------------ 3 files changed, 51 insertions(+), 15 deletions(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index 4cbb56e1..2cb309e0 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -131,6 +131,9 @@ class Monitor extends BeanModel { mqttPassword: this.mqttPassword, authWorkstation: this.authWorkstation, authDomain: this.authDomain, + tlsCa: this.tlsCa, + tlsCert: this.tlsCert, + tlsKey: this.tlsKey, }; } @@ -308,6 +311,18 @@ class Monitor extends BeanModel { options.httpsAgent = new https.Agent(httpsAgentOptions); } + if (this.auth_method === "mtls") { + if (this.tlsCert !== null && this.tlsCert !== "") { + options.httpsAgent.options.cert = Buffer.from(this.tlsCert); + } + if (this.tlsCa !== null && this.tlsCa !== "") { + options.httpsAgent.options.ca = Buffer.from(this.tlsCa); + } + if (this.tlsKey !== null && this.tlsKey !== "") { + options.httpsAgent.options.key = Buffer.from(this.tlsKey); + } + } + log.debug("monitor", `[${this.name}] Axios Options: ${JSON.stringify(options)}`); log.debug("monitor", `[${this.name}] Axios Request`); @@ -813,7 +828,6 @@ class Monitor extends BeanModel { domain: this.authDomain, workstation: this.authWorkstation ? this.authWorkstation : undefined }); - } else { res = await axios.request(options); } diff --git a/server/server.js b/server/server.js index 1073f3be..91b0a944 100644 --- a/server/server.js +++ b/server/server.js @@ -688,6 +688,9 @@ let needSetup = false; bean.headers = monitor.headers; bean.basic_auth_user = monitor.basic_auth_user; bean.basic_auth_pass = monitor.basic_auth_pass; + bean.tlsCa = monitor.tlsCa; + bean.tlsCert = monitor.tlsCert; + bean.tlsKey = monitor.tlsKey; bean.interval = monitor.interval; bean.retryInterval = monitor.retryInterval; bean.resendInterval = monitor.resendInterval; diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index e9cbd824..6d7353fe 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -531,28 +531,47 @@ +
From 8725e5daf91399fd59a5d016fcb3ae7ac98b9e25 Mon Sep 17 00:00:00 2001 From: Bobby Ore Date: Wed, 8 Feb 2023 14:08:25 -0600 Subject: [PATCH 010/216] Add ability to use User ID for LunaSea notifications --- server/notification-providers/lunasea.js | 15 ++++++++++----- src/components/notifications/LunaSea.vue | 13 +++++++++++-- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/server/notification-providers/lunasea.js b/server/notification-providers/lunasea.js index 2985425e..48f7b4f2 100644 --- a/server/notification-providers/lunasea.js +++ b/server/notification-providers/lunasea.js @@ -8,15 +8,20 @@ class LunaSea extends NotificationProvider { async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { let okMsg = "Sent Successfully."; - let lunaseadevice = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaDevice; - + let lunaseaurl = ""; + if(notification.lunaseaNotificationType === "device") { + lunaseaurl = "https://notify.lunasea.app/v1/custom/device/" + notification.lunaseaId; + } else { + lunaseaurl = "https://notify.lunasea.app/v1/custom/user/" + notification.lunaseaId; + } + try { if (heartbeatJSON == null) { let testdata = { "title": "Uptime Kuma Alert", "body": msg, }; - await axios.post(lunaseadevice, testdata); + await axios.post(lunaseaurl, testdata); return okMsg; } @@ -25,7 +30,7 @@ class LunaSea extends NotificationProvider { "title": "UptimeKuma Alert: " + monitorJSON["name"], "body": "[🔴 Down] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"], }; - await axios.post(lunaseadevice, downdata); + await axios.post(lunaseaurl, downdata); return okMsg; } @@ -34,7 +39,7 @@ class LunaSea extends NotificationProvider { "title": "UptimeKuma Alert: " + monitorJSON["name"], "body": "[✅ Up] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"], }; - await axios.post(lunaseadevice, updata); + await axios.post(lunaseaurl, updata); return okMsg; } diff --git a/src/components/notifications/LunaSea.vue b/src/components/notifications/LunaSea.vue index 34a98688..6367af7e 100644 --- a/src/components/notifications/LunaSea.vue +++ b/src/components/notifications/LunaSea.vue @@ -1,7 +1,16 @@ diff --git a/src/lang/en.json b/src/lang/en.json index e7656c47..cf7185a8 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -394,6 +394,10 @@ "backupRecommend": "Please backup the volume or the data folder (./data/) directly instead.", "Optional": "Optional", "or": "or", + "sameAsServerTimezone": "Same as Server Timezone", + "startDateTime": "Start Date/Time", + "endDateTime": "End Date/Time", + "cronExpression": "Cron Expression", "recurringInterval": "Interval", "Recurring": "Recurring", "strategyManual": "Active/Inactive Manually", diff --git a/src/pages/EditMaintenance.vue b/src/pages/EditMaintenance.vue index 00e64938..be2abe8c 100644 --- a/src/pages/EditMaintenance.vue +++ b/src/pages/EditMaintenance.vue @@ -85,14 +85,13 @@

{{ $t("Date and Time") }}

-
⚠️ {{ $t("warningTimezone") }}: {{ $root.info.serverTimezone }} ({{ $root.info.serverTimezoneOffset }})
-
@@ -103,6 +102,25 @@ + + From 524cf7c6077cf5a499709b789d95ea075add3b1e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Fri, 31 Mar 2023 21:34:05 +0800 Subject: [PATCH 196/216] WIP --- server/model/maintenance.js | 3 +-- server/model/status_page.js | 25 ++++++++++--------------- src/pages/StatusPage.vue | 6 +++++- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/server/model/maintenance.js b/server/model/maintenance.js index c92f8189..189a513a 100644 --- a/server/model/maintenance.js +++ b/server/model/maintenance.js @@ -1,6 +1,5 @@ const { BeanModel } = require("redbean-node/dist/bean-model"); -const { parseTimeObject, parseTimeFromTimeObject, utcToLocal, localToUTC, log } = require("../../src/util"); -const { timeObjectToUTC, timeObjectToLocal } = require("../util-server"); +const { parseTimeObject, parseTimeFromTimeObject, log } = require("../../src/util"); const { R } = require("redbean-node"); const dayjs = require("dayjs"); const Cron = require("croner"); diff --git a/server/model/status_page.js b/server/model/status_page.js index 84af99e8..65b77367 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -3,7 +3,6 @@ const { R } = require("redbean-node"); const cheerio = require("cheerio"); const { UptimeKumaServer } = require("../uptime-kuma-server"); const jsesc = require("jsesc"); -const Maintenance = require("./maintenance"); const googleAnalytics = require("../google-analytics"); class StatusPage extends BeanModel { @@ -290,21 +289,17 @@ class StatusPage extends BeanModel { try { const publicMaintenanceList = []; - let activeCondition = Maintenance.getActiveMaintenanceSQLCondition(); - let maintenanceBeanList = R.convertToBeans("maintenance", await R.getAll(` - SELECT DISTINCT maintenance.* - FROM maintenance - JOIN maintenance_status_page - ON maintenance_status_page.maintenance_id = maintenance.id - AND maintenance_status_page.status_page_id = ? - LEFT JOIN maintenance_timeslot - ON maintenance_timeslot.maintenance_id = maintenance.id - WHERE ${activeCondition} - ORDER BY maintenance.end_date - `, [ statusPageId ])); + let maintenanceIDList = await R.getCol(` + SELECT DISTINCT maintenance_id + FROM maintenance_status_page + WHERE status_page_id = ? + `, [ statusPageId ]); - for (const bean of maintenanceBeanList) { - publicMaintenanceList.push(await bean.toPublicJSON()); + for (const maintenanceID of maintenanceIDList) { + let maintenance = UptimeKumaServer.getInstance().getMaintenance(maintenanceID); + if (maintenance && await maintenance.isUnderMaintenance()) { + publicMaintenanceList.push(await maintenance.toPublicJSON()); + } } return publicMaintenanceList; diff --git a/src/pages/StatusPage.vue b/src/pages/StatusPage.vue index b202be30..defa458e 100644 --- a/src/pages/StatusPage.vue +++ b/src/pages/StatusPage.vue @@ -923,7 +923,11 @@ export default { * @returns {string} Sanitized HTML */ maintenanceHTML(description) { - return DOMPurify.sanitize(marked(description)); + if (description) { + return DOMPurify.sanitize(marked(description)); + } else { + return ""; + } }, } From 17ae47d091e60268fe4814c87153e9e03f077ec4 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Fri, 31 Mar 2023 23:52:24 +0800 Subject: [PATCH 197/216] Drop database backup logic, because duplicating a relative large database likely causes a disk space issue, users should take backup manually instead. --- server/database.js | 107 +-------------------------------------------- 1 file changed, 1 insertion(+), 106 deletions(-) diff --git a/server/database.js b/server/database.js index b678714e..25e50750 100644 --- a/server/database.js +++ b/server/database.js @@ -199,15 +199,7 @@ class Database { } else { log.info("db", "Database patch is needed"); - try { - this.backup(version); - } catch (e) { - log.error("db", e); - log.error("db", "Unable to create a backup before patching the database. Please make sure you have enough space and permission."); - process.exit(1); - } - - // Try catch anything here, if gone wrong, restore the backup + // Try catch anything here try { for (let i = version + 1; i <= this.latestVersion; i++) { const sqlFile = `./db/patch${i}.sql`; @@ -223,7 +215,6 @@ class Database { log.error("db", "Start Uptime-Kuma failed due to issue patching the database"); log.error("db", "Please submit a bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues"); - this.restore(); process.exit(1); } } @@ -265,8 +256,6 @@ class Database { log.error("db", "Start Uptime-Kuma failed due to issue patching the database"); log.error("db", "Please submit the bug report if you still encounter the problem after restart: https://github.com/louislam/uptime-kuma/issues"); - this.restore(); - process.exit(1); } @@ -451,100 +440,6 @@ class Database { process.removeListener("unhandledRejection", listener); } - /** - * One backup one time in this process. - * Reset this.backupPath if you want to backup again - * @param {string} version Version code of backup - */ - static backup(version) { - if (! this.backupPath) { - log.info("db", "Backing up the database"); - this.backupPath = this.dataDir + "kuma.db.bak" + version; - fs.copyFileSync(Database.path, this.backupPath); - - const shmPath = Database.path + "-shm"; - if (fs.existsSync(shmPath)) { - this.backupShmPath = shmPath + ".bak" + version; - fs.copyFileSync(shmPath, this.backupShmPath); - } - - const walPath = Database.path + "-wal"; - if (fs.existsSync(walPath)) { - this.backupWalPath = walPath + ".bak" + version; - fs.copyFileSync(walPath, this.backupWalPath); - } - - // Double confirm if all files actually backup - if (!fs.existsSync(this.backupPath)) { - throw new Error("Backup failed! " + this.backupPath); - } - - if (fs.existsSync(shmPath)) { - if (!fs.existsSync(this.backupShmPath)) { - throw new Error("Backup failed! " + this.backupShmPath); - } - } - - if (fs.existsSync(walPath)) { - if (!fs.existsSync(this.backupWalPath)) { - throw new Error("Backup failed! " + this.backupWalPath); - } - } - } - } - - /** Restore from most recent backup */ - static restore() { - if (this.backupPath) { - log.error("db", "Patching the database failed!!! Restoring the backup"); - - const shmPath = Database.path + "-shm"; - const walPath = Database.path + "-wal"; - - // Make sure we have a backup to restore before deleting old db - if ( - !fs.existsSync(this.backupPath) - && !fs.existsSync(shmPath) - && !fs.existsSync(walPath) - ) { - log.error("db", "Backup file not found! Leaving database in failed state."); - process.exit(1); - } - - // Delete patch failed db - try { - if (fs.existsSync(Database.path)) { - fs.unlinkSync(Database.path); - } - - if (fs.existsSync(shmPath)) { - fs.unlinkSync(shmPath); - } - - if (fs.existsSync(walPath)) { - fs.unlinkSync(walPath); - } - } catch (e) { - log.error("db", "Restore failed; you may need to restore the backup manually"); - process.exit(1); - } - - // Restore backup - fs.copyFileSync(this.backupPath, Database.path); - - if (this.backupShmPath) { - fs.copyFileSync(this.backupShmPath, shmPath); - } - - if (this.backupWalPath) { - fs.copyFileSync(this.backupWalPath, walPath); - } - - } else { - log.info("db", "Nothing to restore"); - } - } - /** Get the size of the database */ static getSize() { log.debug("db", "Database.getSize()"); From c01055efb36cfe42987c959e15cbefd23eb1e200 Mon Sep 17 00:00:00 2001 From: DevMirza Date: Wed, 29 Mar 2023 16:29:13 +0000 Subject: [PATCH 198/216] Translated using Weblate (Urdu) Currently translated at 62.4% (445 of 713 strings) Translation: Uptime Kuma/Uptime Kuma Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/ur/ --- src/lang/ur.json | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/lang/ur.json b/src/lang/ur.json index 7d591a59..0e364e3e 100644 --- a/src/lang/ur.json +++ b/src/lang/ur.json @@ -270,7 +270,7 @@ "No Monitors": "کوئی مانیٹر نہیں", "Cancel": "منسوخ کریں", "Powered by": "کی طرف سے طاقت", - "Custom CSS": "حسب ضرورت سی ایس ایس", + "Custom CSS": "اپنی مرضی کے مطابق سی ایس ایس", "deleteProxyMsg": "کیا آپ واقعی اس پراکسی کو تمام مانیٹر کے لیے حذف کرنا چاہتے ہیں؟", "enableProxyDescription": "یہ پراکسی مانیٹر کی درخواستوں پر اس وقت تک اثر نہیں کرے گی جب تک کہ اسے فعال نہ کیا جائے۔ آپ ایکٹیویشن اسٹیٹس کے ذریعے تمام مانیٹرس سے پراکسی کو عارضی طور پر غیر فعال کر سکتے ہیں۔", "setAsDefaultProxyDescription": "یہ پراکسی نئے مانیٹرز کے لیے بطور ڈیفالٹ فعال ہو جائے گی۔ آپ اب بھی ہر مانیٹر کے لیے الگ الگ پراکسی کو غیر فعال کر سکتے ہیں۔", @@ -409,7 +409,7 @@ "maintenanceStatus-scheduled": "طے شدہ", "maintenanceStatus-ended": "ختم ہوا", "recurringInterval": "وقفہ", - "Recurring": "بار بار چلنے والا", + "Recurring": "بار چلنے والا", "strategyManual": "دستی طور پر فعال/غیر فعال", "warningTimezone": "یہ سرور کا ٹائم زون استعمال کر رہا ہے", "weekdayShortMon": "پیر", @@ -427,5 +427,25 @@ "lastDay4": "مہینے کا چوتھا آخری دن", "pauseMaintenanceMsg": "کیا آپ واقعی روکنا چاہتے ہیں؟", "No Maintenance": "کوئی دیکھ بھال نہیں", - "weekdayShortTue": "منگل" + "weekdayShortTue": "منگل", + "Add New Tag": "نیا ٹیگ شامل کریں", + "Enable DNS Cache": "ڈی این ایس کیشے کو فعال کریں", + "Effective Date Range": "مؤثر تاریخ کی حد", + "Schedule Maintenance": "شیڈول کی بحالی", + "Date and Time": "تاریخ اور وقت", + "DateTime Range": "تاریخ کے وقت کی حد", + "loadingError": "ڈیٹا حاصل نہیں کیا جا سکتا، براہ کرم بعد میں دوبارہ کوشش کریں۔", + "Enable": "فعال", + "Disable": "غیر فعال کریں", + "dnsCacheDescription": "ہو سکتا ہے یہ کچھ IPv6 ماحول میں کام نہ کر رہا ہو، اگر آپ کو کوئی مسئلہ درپیش ہو تو اسے غیر فعال کر دیں۔", + "Single Maintenance Window": "سنگل مینٹیننس ونڈو", + "Maintenance Time Window of a Day": "ایک دن کی مینٹیننس ٹائم ونڈو", + "plugin": "پلگ ان | پلگ انز", + "install": "انسٹال کریں", + "statusPageRefreshIn": "اس میں ریفریش کریں: {0}", + "maintenanceStatus-unknown": "نامعلوم", + "Display Timezone": "ٹائم زون ڈسپلے کریں", + "Server Timezone": "سرور ٹائم زون", + "statusPageMaintenanceEndDate": "ختم", + "IconUrl": "آئیکن یو آر ایل" } From e8d48561fc1c69b91419a3daeae48c74be7f7022 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 1 Apr 2023 01:45:16 +0800 Subject: [PATCH 199/216] Change `Retries` from `0` to `1` --- src/pages/EditMonitor.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index addcc7c9..0b8e5507 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -907,7 +907,7 @@ message HealthCheckResponse { interval: 60, retryInterval: this.interval, resendInterval: 0, - maxretries: 0, + maxretries: 1, notificationIDList: {}, ignoreTls: false, upsideDown: false, From 511038b45a4d57f605c3cfb792732fef89e14cff Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 1 Apr 2023 04:22:10 +0800 Subject: [PATCH 200/216] Remove unused code --- server/database.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/server/database.js b/server/database.js index 25e50750..8576bded 100644 --- a/server/database.js +++ b/server/database.js @@ -30,11 +30,6 @@ class Database { */ static patched = false; - /** - * For Backup only - */ - static backupPath = null; - /** * Add patch filename in key * Values: @@ -357,8 +352,6 @@ class Database { } } - this.backup(dayjs().format("YYYYMMDDHHmmss")); - log.info("db", sqlFilename + " is patching"); this.patched = true; await this.importSQLFile("./db/" + sqlFilename); From dbfaddafca84ec910b0eee57172ba7b05deac1dc Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 1 Apr 2023 16:30:55 +0800 Subject: [PATCH 201/216] Validate cron before submit --- server/model/maintenance.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/model/maintenance.js b/server/model/maintenance.js index 189a513a..e3ce5d32 100644 --- a/server/model/maintenance.js +++ b/server/model/maintenance.js @@ -164,6 +164,7 @@ class Maintenance extends BeanModel { if (bean.strategy === "cron") { bean.duration = obj.durationMinutes * 60; bean.cron = obj.cron; + this.validateCron(bean.cron); } if (bean.strategy.startsWith("recurring-")) { @@ -172,11 +173,21 @@ class Maintenance extends BeanModel { bean.weekdays = JSON.stringify(obj.weekdays); bean.days_of_month = JSON.stringify(obj.daysOfMonth); await bean.generateCron(); + this.validateCron(bean.cron); } - return bean; } + /** + * Throw error if cron is invalid + * @param cron + * @returns {Promise} + */ + static async validateCron(cron) { + let job = new Cron(cron, () => {}); + job.stop(); + } + /** * Run the cron */ From 8f449ab738c19631e70e4c71709c4064ef088e3e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 1 Apr 2023 16:36:51 +0800 Subject: [PATCH 202/216] Update to 1.21.2-beta.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0b8bcbf6..39a7641c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "1.21.1", + "version": "1.21.2-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.21.1", + "version": "1.21.2-beta.0", "license": "MIT", "dependencies": { "@grpc/grpc-js": "~1.7.3", diff --git a/package.json b/package.json index 90e50643..55479549 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.21.1", + "version": "1.21.2-beta.0", "license": "MIT", "repository": { "type": "git", From 22f730499f6e83c4eae048763654322bc8a5caf4 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 3 Apr 2023 02:57:14 +0800 Subject: [PATCH 203/216] Improve the database connection string input --- src/pages/EditMonitor.vue | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index 0b8e5507..997faf95 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -283,13 +283,13 @@
@@ -301,7 +301,7 @@ @@ -311,7 +311,7 @@
@@ -692,6 +692,13 @@ export default { ipOrHostnameRegexPattern: hostNameRegexPattern(), mqttIpOrHostnameRegexPattern: hostNameRegexPattern(true), gameList: null, + connectionStringTemplates: { + "sqlserver": "Server=,;Database=;User Id=;Password=;Encrypt=;TrustServerCertificate=;Connection Timeout=", + "postgres": "postgres://username:password@host:port/database", + "mysql": "mysql://username:password@host:port/database", + "redis": "redis://user:password@host:port", + "mongodb": "mongodb://username:password@host:port/database", + } }; }, @@ -853,6 +860,24 @@ message HealthCheckResponse { } }); } + + // Set default database connection string if empty or it is a template from another database monitor type + for (let monitorType in this.connectionStringTemplates) { + if (this.monitor.type === monitorType) { + let isTemplate = false; + for (let key in this.connectionStringTemplates) { + if (this.monitor.databaseConnectionString === this.connectionStringTemplates[key]) { + isTemplate = true; + break; + } + } + if (!this.monitor.databaseConnectionString || isTemplate) { + this.monitor.databaseConnectionString = this.connectionStringTemplates[monitorType]; + } + break; + } + } + }, currentGameObject(newGameObject, previousGameObject) { @@ -860,8 +885,7 @@ message HealthCheckResponse { this.monitor.port = newGameObject.options.port; } this.monitor.game = newGameObject.keys[0]; - } - + }, }, mounted() { this.init(); From 45ef7b2f69d5091e7d391406780378730f9fd025 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 3 Apr 2023 21:01:58 +0800 Subject: [PATCH 204/216] Fix Effective Date Range cannot be removed --- server/model/maintenance.js | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/server/model/maintenance.js b/server/model/maintenance.js index e3ce5d32..787953fb 100644 --- a/server/model/maintenance.js +++ b/server/model/maintenance.js @@ -18,9 +18,12 @@ class Maintenance extends BeanModel { let dateRange = []; if (this.start_date) { dateRange.push(this.start_date); - if (this.end_date) { - dateRange.push(this.end_date); - } + } else { + dateRange.push(null); + } + + if (this.end_date) { + dateRange.push(this.end_date); } let timeRange = []; @@ -155,10 +158,14 @@ class Maintenance extends BeanModel { if (obj.dateRange[0]) { bean.start_date = obj.dateRange[0]; + } else { + bean.start_date = null; + } - if (obj.dateRange[1]) { - bean.end_date = obj.dateRange[1]; - } + if (obj.dateRange[1]) { + bean.end_date = obj.dateRange[1]; + } else { + bean.end_date = null; } if (bean.strategy === "cron") { From d173a3c663ba7b54cbd520f008693b2afe0bac9a Mon Sep 17 00:00:00 2001 From: Cyril59310 Date: Mon, 3 Apr 2023 16:06:57 +0000 Subject: [PATCH 205/216] Translated using Weblate (French) Currently translated at 100.0% (719 of 719 strings) Translated using Weblate (French) Currently translated at 99.8% (718 of 719 strings) Co-authored-by: Cyril59310 Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fr/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/fr-FR.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lang/fr-FR.json b/src/lang/fr-FR.json index 9e725ad0..9eca1bae 100644 --- a/src/lang/fr-FR.json +++ b/src/lang/fr-FR.json @@ -658,7 +658,7 @@ "dnsCacheDescription": "Il peut ne pas fonctionner dans certains environnements IPv6, désactivez-le si vous rencontrez des problèmes.", "Single Maintenance Window": "Créneau de maintenance unique", "Maintenance Time Window of a Day": "Créneau de la maintenance", - "Effective Date Range": "Plage de dates d'effet", + "Effective Date Range": "Plage de dates d'effet (facultatif)", "Schedule Maintenance": "Créer une maintenance", "Date and Time": "Date et heure", "DateTime Range": "Plage de dates et d'heures", @@ -743,5 +743,11 @@ "twilioFromNumber": "Du Nombre", "twilioToNumber": "Au Nombre", "twilioAccountSID": "ID du compte", - "twilioAuthToken": "Jeton d'authentification" + "twilioAuthToken": "Jeton d'authentification", + "sameAsServerTimezone": "Identique au fuseau horaire du serveur", + "startDateTime": "Date/heure de début", + "endDateTime": "Date/heure de fin", + "cronExpression": "Expression cron", + "cronSchedule": "Calendrier : ", + "invalidCronExpression": "Expression Cron non valide : {0}" } From 4ddc3b5f5eec79008ebc096f6b35e7b0812d3d85 Mon Sep 17 00:00:00 2001 From: Ademaro Date: Mon, 3 Apr 2023 16:06:57 +0000 Subject: [PATCH 206/216] Translated using Weblate (Russian) Currently translated at 100.0% (719 of 719 strings) Co-authored-by: Ademaro Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/ru/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/ru-RU.json | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/lang/ru-RU.json b/src/lang/ru-RU.json index 8e46e20d..39e6b00c 100644 --- a/src/lang/ru-RU.json +++ b/src/lang/ru-RU.json @@ -441,7 +441,7 @@ "Accept characters:": "Принимаемые символы:", "startOrEndWithOnly": "Начинается или кончается только {0}", "No consecutive dashes": "Без последовательных тире", - "The slug is already taken. Please choose another slug.": "The slug is already taken. Please choose another slug.", + "The slug is already taken. Please choose another slug.": "Слово уже занято. Пожалуйста, выберите другой вариант.", "Page Not Found": "Страница не найдена", "wayToGetCloudflaredURL": "(Скачать cloudflared с {0})", "cloudflareWebsite": "Веб-сайт Cloudflare", @@ -565,7 +565,7 @@ "Frontend Version": "Версия интерфейса", "Frontend Version do not match backend version!": "Версия интерфейса не соответствует версии серверной части!", "Base URL": "Базовый URL", - "goAlertInfo": "GoAlert is a An open source application for on-call scheduling, automated escalations and notifications (like SMS or voice calls). Automatically engage the right person, the right way, and at the right time! {0}", + "goAlertInfo": "GoAlert — это приложение с открытым исходным кодом для составления расписания вызовов, автоматической эскалации и уведомлений (например, SMS или голосовых звонков). Автоматически привлекайте нужного человека, нужным способом и в нужное время! {0}", "goAlertIntegrationKeyInfo": "Получить общий ключ интеграции API для сервиса в этом формате \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\" обычно значение параметра токена скопированного URL.", "goAlert": "GoAlert", "backupOutdatedWarning": "Устарело: поскольку добавлено множество функций, а эта функция резервного копирования немного не поддерживается, она не может создать или восстановить полную резервную копию.", @@ -669,7 +669,7 @@ "smseagle": "SMSEagle", "Google Analytics ID": "ID Google Аналитики", "wayToGetZohoCliqURL": "Вы можете узнать как создать webhook URL тут {0}.", - "Effective Date Range": "Даты действия", + "Effective Date Range": "Даты действия (Опционально)", "wayToGetKookGuildID": "Включите \"Режим разработчика\" в настройках Kook, а затем нажмите правой кнопкой по гильдии чтобы скопировать её ID", "Enable TLS": "Включить TLS", "Integration Key": "Ключ интеграции", @@ -721,7 +721,7 @@ "apiKey-inactive": "Неактивный", "Expires": "Истекает", "disableAPIKeyMsg": "Вы уверены, что хотите отключить этот ключ?", - "Generate": "Создать", + "Generate": "Сгенерировать", "pagertreeResolve": "Автоматическое разрешение", "pagertreeDoNothing": "ничего не делать", "lunaseaTarget": "Цель", @@ -740,7 +740,7 @@ "Economy": "Экономия", "wayToGetPagerDutyKey": "Вы можете получить это, перейдя в службу -> Каталог служб -> (Выберите службу) -> Интеграции -> Добавить интеграцию. Здесь вы можете выполнить поиск по \"Events API V2\". Дополнительная информация {0}", "apiKeyAddedMsg": "Ваш API ключ был добавлен. Пожалуйста, запишите это, так как оно больше не будет показан.", - "deleteAPIKeyMsg": "Вы уверены, что хотите удалить этот ключ?", + "deleteAPIKeyMsg": "Вы уверены, что хотите удалить этот ключ API?", "wayToGetPagerTreeIntegrationURL": "После создания интеграции Uptime Kuma в PagerTree, скопируйте конечную точку. Смотрите полную информацию {0}", "telegramMessageThreadIDDescription": "Необязательный уникальный идентификатор для цепочки сообщений (темы) форума; только для форумов-супергрупп", "grpcMethodDescription": "Название метода - преобразовать в формат cammelCase, такой как sayHello, check и т.д.", @@ -748,5 +748,15 @@ "Proto Method": "Метод Proto", "Proto Content": "Содержание Proto", "telegramMessageThreadID": "(Необязательно) ID цепочки сообщений", - "statusPageRefreshIn": "Обновлять каждые: {0}" + "statusPageRefreshIn": "Обновлять каждые: {0}", + "twilioAccountSID": "SID учетной записи", + "twilioAuthToken": "Токен авторизации", + "twilioFromNumber": "С номера", + "twilioToNumber": "На номер", + "sameAsServerTimezone": "Аналогично часовому поясу сервера", + "startDateTime": "Начальная дата и время", + "endDateTime": "Конечная дата и время", + "cronExpression": "Выражение для Cron", + "cronSchedule": "Расписание: ", + "invalidCronExpression": "Неверное выражение Cron: {0}" } From 80f195987165e99685e05b26ccd730bc392ffe6e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Mon, 3 Apr 2023 16:06:57 +0000 Subject: [PATCH 207/216] Translated using Weblate (Chinese (Traditional, Hong Kong)) Currently translated at 96.1% (691 of 719 strings) Co-authored-by: Louis Lam Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/zh_Hant_HK/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/zh-HK.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/lang/zh-HK.json b/src/lang/zh-HK.json index b567b72f..fd5d35e3 100644 --- a/src/lang/zh-HK.json +++ b/src/lang/zh-HK.json @@ -549,7 +549,7 @@ "confirmUninstallPlugin": "你確定要解除安裝?", "dataRetentionTimeError": "保留限期必需為 0 或正數", "infiniteRetention": "設定為 0 以作無限期保留。", - "Effective Date Range": "有效日期範圍", + "Effective Date Range": "有效日期範圍 (可選)", "Hello @everyone is...": "Hello {'@'}everyone is…", "Packet Size": "Packet 大小", "Event type:": "事件類型:", @@ -709,5 +709,15 @@ "high": "高價", "statusPageRefreshIn": "將於 {0} 後重新整理", "SendKey": "SendKey", - "SMSManager API Docs": "SMSManager API 文件 " + "SMSManager API Docs": "SMSManager API 文件 ", + "startDateTime": "開始時間", + "pagertreeLow": "低", + "endDateTime": "結束時間", + "cronExpression": "Cron 表達式", + "cronSchedule": "排程: ", + "invalidCronExpression": "無效 Cron 表達式:{0}", + "sameAsServerTimezone": "使用伺服器時區", + "WeCom Bot Key": "WeCom 機器人 Key", + "pagertreeMedium": "中", + "pagertreeHigh": "高" } From fb3804815902d8ad3b6244fd894d32406f829ab3 Mon Sep 17 00:00:00 2001 From: MaxGremory Date: Mon, 3 Apr 2023 16:06:57 +0000 Subject: [PATCH 208/216] Translated using Weblate (Spanish) Currently translated at 99.0% (712 of 719 strings) Co-authored-by: MaxGremory Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/es/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/es-ES.json | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/lang/es-ES.json b/src/lang/es-ES.json index 3d051bae..7eda6194 100644 --- a/src/lang/es-ES.json +++ b/src/lang/es-ES.json @@ -303,7 +303,7 @@ "Maintenance": "Mantenimiento", "General Monitor Type": "Monitor Tipo General", "Specific Monitor Type": "Monitor Tipo Específico", - "Monitor": "Monitores", + "Monitor": "Monitor | Monitores", "Resend Notification if Down X times consecutively": "Reenviar Notificación si Caído X veces consecutivamente", "resendEveryXTimes": "Reenviar cada {0} veces", "resendDisabled": "Reenvío deshabilitado", @@ -681,7 +681,7 @@ "smseagleGroup": "Nombre(s) de grupo de Guía Telefónica", "Unpin": "Quitar de destacados", "Prefix Custom Message": "Prefijo personalizado", - "markdownSupported": "Soporta sintaxis Markdown", + "markdownSupported": "Sintaxis de Markdown soportada", "Server Address": "Dirección del Servidor", "Learn More": "Aprende Más", "Pick a RR-Type...": "Seleccione un Tipo RR", @@ -738,5 +738,15 @@ "lunaseaUserID": "ID Usuario", "lunaseaDeviceID": "ID Dispositivo", "disableAPIKeyMsg": "¿Está seguro de que desea desactivar esta clave API?", - "Expires": "Expira" + "Expires": "Expira", + "twilioAccountSID": "SID de Cuenta", + "twilioFromNumber": "Desde el numero", + "twilioToNumber": "Hasta el numero", + "startDateTime": "Fecha/Hora Inicio", + "sameAsServerTimezone": "Igual a Zona horaria del Servidor", + "endDateTime": "Fecha/Hora Fin", + "cronExpression": "Expresión Cron", + "cronSchedule": "Cronograma: ", + "invalidCronExpression": "Expresión Cron invalida:{0}", + "statusPageRefreshIn": "Reinicio en: {0}" } From e76d29dee508def4b967c8a74f9879d7872037c8 Mon Sep 17 00:00:00 2001 From: rubesaca Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 209/216] Translated using Weblate (Spanish) Currently translated at 99.0% (712 of 719 strings) Co-authored-by: rubesaca Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/es/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/es-ES.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lang/es-ES.json b/src/lang/es-ES.json index 7eda6194..2b42a566 100644 --- a/src/lang/es-ES.json +++ b/src/lang/es-ES.json @@ -679,7 +679,7 @@ "serwersms": "SerwerSMS.pl", "serwersmsAPIUser": "Nombre de usuario de API (inc. webapi_ prefix)", "smseagleGroup": "Nombre(s) de grupo de Guía Telefónica", - "Unpin": "Quitar de destacados", + "Unpin": "Dejar de Fijar", "Prefix Custom Message": "Prefijo personalizado", "markdownSupported": "Sintaxis de Markdown soportada", "Server Address": "Dirección del Servidor", @@ -687,7 +687,7 @@ "Pick a RR-Type...": "Seleccione un Tipo RR", "onebotHttpAddress": "Dirección HTTP OneBot", "SendKey": "Clave de Envío", - "octopushAPIKey": "\"Clave API\" de las credenciales HTTP API en el panel de control", + "octopushAPIKey": "\"Key de API\" desde credenciales API HTTP en panel de control", "octopushLogin": "\"Inicio de Sesión\" a partir de las credenciales API HTTP en el panel de control", "ntfy Topic": "Tema ntfy", "Google Analytics ID": "ID Analíticas de Google", From d8511fa2016bc3fb096e8bdbc3c04f0f36f67e2b Mon Sep 17 00:00:00 2001 From: MaxGremory Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 210/216] Translated using Weblate (Spanish) Currently translated at 99.0% (712 of 719 strings) Co-authored-by: MaxGremory Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/es/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/es-ES.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lang/es-ES.json b/src/lang/es-ES.json index 2b42a566..e59f5a6b 100644 --- a/src/lang/es-ES.json +++ b/src/lang/es-ES.json @@ -687,7 +687,7 @@ "Pick a RR-Type...": "Seleccione un Tipo RR", "onebotHttpAddress": "Dirección HTTP OneBot", "SendKey": "Clave de Envío", - "octopushAPIKey": "\"Key de API\" desde credenciales API HTTP en panel de control", + "octopushAPIKey": "\"Clave API\" desde credenciales API HTTP en panel de control", "octopushLogin": "\"Inicio de Sesión\" a partir de las credenciales API HTTP en el panel de control", "ntfy Topic": "Tema ntfy", "Google Analytics ID": "ID Analíticas de Google", From 190e85d2c8cadeff7ebc5e24049dce370c69b027 Mon Sep 17 00:00:00 2001 From: Alex Javadi <15309978+aljvdi@users.noreply.github.com> Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 211/216] Translated using Weblate (Persian) Currently translated at 100.0% (719 of 719 strings) Co-authored-by: Alex Javadi <15309978+aljvdi@users.noreply.github.com> Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fa/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/fa.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lang/fa.json b/src/lang/fa.json index e9692351..7b85e472 100644 --- a/src/lang/fa.json +++ b/src/lang/fa.json @@ -346,7 +346,7 @@ "Security": "امنیت", "light": "روشن", "Query": "کوئری", - "Effective Date Range": "محدوده تاریخ مورد تاثیر", + "Effective Date Range": "محدوده تاریخ مورد تاثیر (اختیاری)", "statusPageRefreshIn": "بارگذاری مجدد در هر:‌ {0}", "Content Type": "نوع محتوا (Content Type)", "Server URL": "آدرس سرور", @@ -712,5 +712,11 @@ "endpoint": "نقطه پایانی", "Status:": "وضعیت: {0}", "Strategy": "استراتژی", - "Icon Emoji": "ایموجی آیکون" + "Icon Emoji": "ایموجی آیکون", + "sameAsServerTimezone": "مشابه با منطقه زمانی سرور", + "startDateTime": "ساعت/روز شروع", + "endDateTime": "ساعت/روز پایان", + "cronSchedule": "برنامه زمانی: ", + "invalidCronExpression": "حالت کرون نامعتبر است: {0}", + "cronExpression": "حالت کرون" } From ddd3d3bc9291e1e8064905c6873ac4285b47f0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Buchti=C4=8D?= Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 212/216] Translated using Weblate (Czech) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (719 of 719 strings) Co-authored-by: Buchtič Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/cs/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/cs-CZ.json | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/lang/cs-CZ.json b/src/lang/cs-CZ.json index 44a6ac8a..1249868e 100644 --- a/src/lang/cs-CZ.json +++ b/src/lang/cs-CZ.json @@ -542,7 +542,7 @@ "promosmsPassword": "API Password", "pushoversounds pushover": "Pushover (výchozí)", "pushoversounds bike": "Kolo", - "pushoversounds bugle": "Bugle", + "pushoversounds bugle": "Trumpeta", "pushoversounds cashregister": "Pokladna", "pushoversounds classical": "Classical", "pushoversounds cosmic": "Kosmický", @@ -554,9 +554,9 @@ "pushoversounds mechanical": "Mechanika", "pushoversounds pianobar": "Barové piano", "pushoversounds siren": "Siréna", - "pushoversounds spacealarm": "Space Alarm", - "pushoversounds tugboat": "Tug Boat", - "pushoversounds alien": "Alien Alarm (dlouhý)", + "pushoversounds spacealarm": "Vesmírný alarm", + "pushoversounds tugboat": "Remorkér", + "pushoversounds alien": "Mimozemský poplach (dlouhý)", "pushoversounds climb": "Climb (dlouhý)", "pushoversounds persistent": "Persistent (dlouhý)", "pushoversounds echo": "Pushover Echo (dlouhý)", @@ -661,7 +661,7 @@ "dnsCacheDescription": "V některých IPv6 prostředích nemusí fungovat. Pokud narazíte na nějaké problémy, vypněte jej.", "Single Maintenance Window": "Konkrétní časové okno pro údržbu", "Maintenance Time Window of a Day": "Časové okno pro údržbu v daný den", - "Effective Date Range": "Časové období", + "Effective Date Range": "Časové období (volitelné)", "Schedule Maintenance": "Naplánovat údržbu", "Date and Time": "Datum a čas", "DateTime Range": "Rozsah data a času", @@ -739,5 +739,15 @@ "lunaseaTarget": "Cíl", "lunaseaDeviceID": "ID zařízení", "lunaseaUserID": "ID uživatele", - "statusPageRefreshIn": "Obnovení za: {0}" + "statusPageRefreshIn": "Obnovení za: {0}", + "twilioAccountSID": "SID účtu", + "twilioFromNumber": "Číslo odesílatele", + "twilioToNumber": "Číslo příjemce", + "twilioAuthToken": "Autorizační token", + "sameAsServerTimezone": "Stejné jako časové pásmo serveru", + "cronExpression": "Cron výraz", + "cronSchedule": "Plán: ", + "invalidCronExpression": "Neplatný cron výraz: {0}", + "startDateTime": "Počáteční datum/čas", + "endDateTime": "Datum/čas konce" } From 84d1cb73b692606eeb7a05727aba03d238ef113d Mon Sep 17 00:00:00 2001 From: __filename Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 213/216] Translated using Weblate (Korean) Currently translated at 99.7% (717 of 719 strings) Co-authored-by: __filename Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/ko/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/ko-KR.json | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/lang/ko-KR.json b/src/lang/ko-KR.json index 2a8696e0..ff341717 100644 --- a/src/lang/ko-KR.json +++ b/src/lang/ko-KR.json @@ -660,7 +660,7 @@ "Disable": "비활성화", "Single Maintenance Window": "단일 점검", "Maintenance Time Window of a Day": "점검 시간", - "Effective Date Range": "유효 날짜 범위", + "Effective Date Range": "유효 날짜 범위 (옵션)", "Schedule Maintenance": "점검 예약하기", "Date and Time": "날짜 및 시간", "DateTime Range": "날짜 시간 범위", @@ -699,7 +699,7 @@ "cloneOf": "{0}의 복제본", "Clone Monitor": "모니터링 복제", "telegramProtectContent": "포워딩/저장 보호", - "telegramProtectContentDescription": "활성화 시, 텔레그램 봇 메시지는 포워딩 및 저장으로부터 보호됩니다.", + "telegramProtectContentDescription": "활성화 할경우 텔레그램 봇 메시지는 포워딩 및 저장으로부터 보호됩니다.", "telegramSendSilentlyDescription": "조용히 메시지를 보냅니다. 사용자들은 무음으로 알림을 받습니다.", "telegramSendSilently": "무음 알림", "Add New Tag": "태그 추가", @@ -720,9 +720,33 @@ "Google Analytics ID": "Google Analytics ID", "Add API Key": "API 키 추가", "apiKeyAddedMsg": "API 키가 추가되었습니다. 다시 표시되지 않을 것이므로 메모해 두세요.", - "pagertreeCritical": "치명적인", + "pagertreeCritical": "긴급", "apiKey-active": "사용 가능", "lunaseaUserID": "사용자 ID", "apiKey-expired": "만료됨", - "Expires": "만료일" + "Expires": "만료일", + "twilioAuthToken": "인증 토큰", + "twilioFromNumber": "번호에서", + "twilioToNumber": "번호에서", + "twilioAccountSID": "계정 SID", + "pagertreeUrgency": "긴급", + "sameAsServerTimezone": "서버 시간대로 설정하기", + "startDateTime": "시작 시간", + "endDateTime": "종료 시간", + "cronExpression": "Cron 값", + "cronSchedule": "스케줄: ", + "invalidCronExpression": "알수없는 Cron 값입니다: {0}", + "Add Another": "다른 항목 추가", + "apiKey-inactive": "비활성화", + "pagertreeIntegrationUrl": "Integration 링크", + "pagertreeLow": "낮음", + "pagertreeMedium": "중간", + "pagertreeHigh": "높음", + "pagertreeResolve": "자동으로 해결하기", + "pagertreeDoNothing": "아무것도 하지 않음", + "wayToGetPagerTreeIntegrationURL": "PagerTree에서 Uptime Kuma 통합을 생성한 후 Endpoint를 복사합니다. 전체 세부 정보 보기 {0}", + "lunaseaTarget": "대상", + "lunaseaDeviceID": "기기 ID", + "statusPageRefreshIn": "{0} 후 새로고침", + "telegramMessageThreadIDDescription": "포럼의 대상 메시지 쓰레드(주제)에 대한 선택적 고유 식별인, 포럼 관리자 그룹에만 해당" } From e314d517adbb10108b8e49b632fe481c6963f277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=96mer=20Faruk=20Gen=C3=A7?= Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 214/216] Translated using Weblate (Turkish) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently translated at 100.0% (719 of 719 strings) Co-authored-by: Ömer Faruk Genç Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/tr/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/tr-TR.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/lang/tr-TR.json b/src/lang/tr-TR.json index fdced11f..dcaadfe7 100644 --- a/src/lang/tr-TR.json +++ b/src/lang/tr-TR.json @@ -648,7 +648,7 @@ "dnsCacheDescription": "Bazı IPv6 ortamlarında çalışmıyor olabilir, herhangi bir sorunla karşılaşırsanız devre dışı bırakın.", "Single Maintenance Window": "Tek Seferlik Bakım", "Maintenance Time Window of a Day": "Bür Günlük Bakım", - "Effective Date Range": "Bakim Tarih Aralığı", + "Effective Date Range": "Geçerlilik Tarihi Aralığı (Opsiyonel)", "Schedule Maintenance": "Bakım Planla", "Date and Time": "Tarih ve Saat", "DateTime Range": "Tarih ve Saat Aralığı", @@ -743,5 +743,11 @@ "twilioAuthToken": "Kimlik Doğrulama Jetonu", "twilioFromNumber": "Gönderen Numara", "twilioToNumber": "Alıcı Numara", - "twilioAccountSID": "Hesap ID" + "twilioAccountSID": "Hesap ID", + "sameAsServerTimezone": "Sunucu Saat Dilimi ile aynı", + "startDateTime": "Başlangıç Tarihi/Saati", + "endDateTime": "Bitiş Tarihi/Saati", + "cronExpression": "Cron İfadesi", + "cronSchedule": "Zamanlama: ", + "invalidCronExpression": "Geçersiz Cron İfadesi: {0}" } From 1db25a329f2c9c0f82d7f7b568750ab444ee8f62 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 3 Apr 2023 16:06:58 +0000 Subject: [PATCH 215/216] Translated using Weblate (German) Currently translated at 100.0% (719 of 719 strings) Translated using Weblate (German (Switzerland)) Currently translated at 100.0% (719 of 719 strings) Co-authored-by: Marco Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de/ Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de_CH/ Translation: Uptime Kuma/Uptime Kuma --- src/lang/de-CH.json | 10 ++++++++-- src/lang/de-DE.json | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/lang/de-CH.json b/src/lang/de-CH.json index a47d74fc..df66d1bc 100644 --- a/src/lang/de-CH.json +++ b/src/lang/de-CH.json @@ -645,7 +645,7 @@ "Single Maintenance Window": "Einmaliges Wartungsfenster", "dnsCacheDescription": "In einigen IPv6-Umgebungen funktioniert es möglicherweise nicht. Deaktiviere es, wenn Probleme auftreten.", "Maintenance Time Window of a Day": "Wartungszeitfenster eines Tages", - "Effective Date Range": "Gültigkeitsbereich", + "Effective Date Range": "Gültigkeitsbereich (Optional)", "Schedule Maintenance": "Wartung planen", "Date and Time": "Datum und Uhrzeit", "DateTime Range": "Datums- und Zeitbereich", @@ -740,5 +740,11 @@ "twilioFromNumber": "Absender", "twilioToNumber": "Empfänger", "twilioAuthToken": "Auth Token", - "statusPageRefreshIn": "Aktualisierung in: {0}" + "statusPageRefreshIn": "Aktualisierung in: {0}", + "sameAsServerTimezone": "Gleiche Zeitzone wie Server", + "startDateTime": "Start Datum/Uhrzeit", + "endDateTime": "Ende Datum/Uhrzeit", + "cronExpression": "Cron-Ausdruck", + "cronSchedule": "Zeitplan: ", + "invalidCronExpression": "Ungültiger Cron-Ausdruck: {0}" } diff --git a/src/lang/de-DE.json b/src/lang/de-DE.json index 11e00bd2..0e1c0ce1 100644 --- a/src/lang/de-DE.json +++ b/src/lang/de-DE.json @@ -607,7 +607,7 @@ "Recurring": "Wiederkehrend", "Single Maintenance Window": "Einmaliges Wartungsfenster", "Maintenance Time Window of a Day": "Zeitfenster für die Wartung", - "Effective Date Range": "Bereich der Wirksamkeitsdaten", + "Effective Date Range": "Bereich der Wirksamkeitsdaten (Optional)", "strategyManual": "Aktiv/Inaktiv Manuell", "warningTimezone": "Es wird die Zeitzone des Servers verwendet", "weekdayShortMon": "Mo", @@ -743,5 +743,11 @@ "twilioFromNumber": "Absender", "twilioToNumber": "Empfänger", "twilioAuthToken": "Auth Token", - "statusPageRefreshIn": "Aktualisierung in: {0}" + "statusPageRefreshIn": "Aktualisierung in: {0}", + "sameAsServerTimezone": "Gleiche Zeitzone wie Server", + "startDateTime": "Start Datum/Uhrzeit", + "endDateTime": "Ende Datum/Uhrzeit", + "cronExpression": "Cron-Ausdruck", + "cronSchedule": "Zeitplan: ", + "invalidCronExpression": "Ungültiger Cron-Ausdruck: {0}" } From 03aa685d3f7654c2b0823e1f9b0f23741e8fa985 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Tue, 4 Apr 2023 01:58:56 +0800 Subject: [PATCH 216/216] Update to 1.21.2 --- package-lock.json | 4 ++-- package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 39a7641c..e99f0ccf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "1.21.2-beta.0", + "version": "1.21.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "1.21.2-beta.0", + "version": "1.21.2", "license": "MIT", "dependencies": { "@grpc/grpc-js": "~1.7.3", diff --git a/package.json b/package.json index 55479549..5af6b18b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.21.2-beta.0", + "version": "1.21.2", "license": "MIT", "repository": { "type": "git", @@ -39,7 +39,7 @@ "build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain", "build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push", "upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain", - "setup": "git checkout 1.21.1 && npm ci --production && npm run download-dist", + "setup": "git checkout 1.21.2 && npm ci --production && npm run download-dist", "download-dist": "node extra/download-dist.js", "mark-as-nightly": "node extra/mark-as-nightly.js", "reset-password": "node extra/reset-password.js",