From 7ad4392529160fc7dc10b1cad5026330baabda4a Mon Sep 17 00:00:00 2001 From: MrEddX <66828538+MrEddX@users.noreply.github.com> Date: Fri, 6 Jan 2023 09:00:45 +0200 Subject: [PATCH 01/10] Update bg-BG.js Translation Updated --- src/languages/bg-BG.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/languages/bg-BG.js b/src/languages/bg-BG.js index dfd11c67e..d8a789f3c 100644 --- a/src/languages/bg-BG.js +++ b/src/languages/bg-BG.js @@ -669,4 +669,10 @@ export default { "General Monitor Type": "Общ тип монитор", "Passive Monitor Type": "Пасивет тип монитор", "Specific Monitor Type": "Специфичен тип монитор", + ZohoCliq: "ZohoCliq", + wayToGetZohoCliqURL: "Можете да научите как се създава URL адрес за уеб кука {0}.", + Kook: "Kook", + wayToGetKookBotToken: "Създайте приложение и вземете вашия бот токен на {0}", + wayToGetKookGuildID: "Превключете в 'Developer Mode' в 'Kook' настройките, след което десен клик върху 'guild' за да вземете неговото 'ID'", + "Guild ID": "Guild ID", }; From e8e4361e0940437a8ba858fa317aeb1af634d922 Mon Sep 17 00:00:00 2001 From: DimitriDR Date: Sat, 7 Jan 2023 13:10:25 +0100 Subject: [PATCH 02/10] Adding translations for Kook & ZohoCliq --- src/languages/fr-FR.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/languages/fr-FR.js b/src/languages/fr-FR.js index aeb847314..6a6323a96 100644 --- a/src/languages/fr-FR.js +++ b/src/languages/fr-FR.js @@ -209,6 +209,7 @@ export default { here: "ici", Required: "Requis", telegram: "Telegram", + "ZohoCliq": "ZohoCliq", "Bot Token": "Jeton du robot", wayToGetTelegramToken: "Vous pouvez obtenir un token depuis {0}.", "Chat ID": "Chat ID", @@ -240,7 +241,8 @@ export default { "Hello @everyone is...": "Bonjour {'@'}everyone il...", teams: "Microsoft Teams", "Webhook URL": "URL vers le webhook", - wayToGetTeamsURL: "Vous pouvez apprendre comment créer un Webhook {0}.", + wayToGetTeamsURL: "Vous pouvez apprendre comment créer une URL Webhook {0}.", + wayToGetZohoCliqURL: "Vous pouvez apprendre comment créer une URL Webhook {0}.", signal: "Signal", Number: "Numéro", Recipients: "Destinataires", @@ -270,6 +272,10 @@ export default { apprise: "Apprise (prend en charge plus de 50 services de notification)", GoogleChat: "Google Chat (Google Workspace uniquement)", pushbullet: "Pushbullet", + Kook: "Kook", + wayToGetKookBotToken: "Créez une application et récupérer le jeton de robot à l'addresse {0}", + wayToGetKookGuildID: "Passez en « mode développeur » dans les paramètres de Kook, et cliquez droit sur le Guild pour obtenir son identifiant", + "Guild ID": "Identifiant de Guild", line: "Line Messenger", mattermost: "Mattermost", "User Key": "Clé d'utilisateur", From 221d1d40f57fbd21fab63dceb8e850e337f2ea0e Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 8 Jan 2023 00:32:13 +0800 Subject: [PATCH 03/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a1a4a982f..05987537c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -27,7 +27,7 @@ The frontend code build into "dist" directory. The server (express.js) exposes t ## Can I create a pull request for Uptime Kuma? -Yes or no, it depends on what you will try to do. Since I don't want to waste your time, be sure to **create an empty draft pull request or open an issue, so we can discuss first**. Especially for a large pull request or you don't know it will be merged or not. +Yes or no, it depends on what you will try to do. Since I don't want to waste your time, be sure to **create an empty draft pull request or open an issue, so we can have a discussion first**. Especially for a large pull request or you don't know it will be merged or not. Here are some references: @@ -51,6 +51,10 @@ Here are some references: - Convert existing code into other programming languages - Unnecessary large code changes (Hard to review, causes code conflicts to other pull requests) +The above cases cannot cover all situations. + +I (@louislam) have the final say. If your pull request does not meet my expectations, I will reject it, no matter how much time you spend on it. Therefore, it is essential to have a discussion beforehand. + I will mark your pull request in the [milestones](https://github.com/louislam/uptime-kuma/milestones), if I am plan to review and merge it. Also, please don't rush or ask for ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests. From 23a525e36a0dc3a9904ca227c60a2ea323b48407 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 8 Jan 2023 00:42:15 +0800 Subject: [PATCH 04/10] Update CONTRIBUTING.md --- CONTRIBUTING.md | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 05987537c..5cfa93e28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Project Info -First of all, thank you everyone who made pull requests for Uptime Kuma, I never thought GitHub Community can be that nice! And also because of this, I also never thought other people actually read my code and edit my code. It is not structured and commented so well, lol. Sorry about that. +First of all, I want to thank everyone who made pull requests for Uptime Kuma. I never thought the GitHub Community would be so nice! Because of this, I also never thought that other people would actually read and edit my code. It is not very well structured or commented, sorry about that. The project was created with vite.js (vue3). Then I created a subdirectory called "server" for server part. Both frontend and backend share the same package.json. @@ -77,9 +77,9 @@ Before deep into coding, discussion first is preferred. Creating an empty pull r ## Project Styles -I personally do not like something need to learn so much and need to config so much before you can finally start the app. +I personally do not like it when something requires so much learning and configuration before you can finally start the app. -- Easy to install for non-Docker users, no native build dependency is needed (at least for x86_64), no extra config, no extra effort to get it run +- Easy to install for non-Docker users, no native build dependency is needed (at least for x86_64), no extra config, no extra effort required to get it running - Single container for Docker users, no very complex docker-compose file. Just map the volume and expose the port, then good to go - Settings should be configurable in the frontend. Environment variable is not encouraged, unless it is related to startup such as `DATA_DIR`. - Easy to use @@ -177,15 +177,11 @@ The data and socket logic are in `src/mixins/socket.js`. ## Unit Test -It is an end-to-end testing. It is using Jest and Puppeteer. - ```bash npm run build npm test ``` -By default, the Chromium window will be shown up during the test. Specifying `HEADLESS_TEST=1` for terminal environments. - ## Dependencies Both frontend and backend share the same package.json. However, the frontend dependencies are eventually not used in the production environment, because it is usually also baked into dist files. So: From f8658d6160e280827fe6f35b6cc825bd771b73f5 Mon Sep 17 00:00:00 2001 From: SlothCroissant Date: Thu, 5 Jan 2023 10:53:41 -0600 Subject: [PATCH 05/10] Removed redundant title in Pushover notification --- server/notification-providers/pushover.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/pushover.js b/server/notification-providers/pushover.js index ebcb88c4f..bafde56e0 100644 --- a/server/notification-providers/pushover.js +++ b/server/notification-providers/pushover.js @@ -10,7 +10,7 @@ class Pushover extends NotificationProvider { let pushoverlink = "https://api.pushover.net/1/messages.json"; let data = { - "message": "Uptime Kuma Alert\n\nMessage:" + msg, + "message": "Message:" + msg, "user": notification.pushoveruserkey, "token": notification.pushoverapptoken, "sound": notification.pushoversounds, From 32f7a0084acbf7c5f0984d55082b320e32a63fb0 Mon Sep 17 00:00:00 2001 From: Matthew Nickson Date: Sun, 8 Jan 2023 19:09:06 +0000 Subject: [PATCH 06/10] Fixed negative retention time values Signed-off-by: Matthew Nickson --- server/jobs/clear-old-data.js | 21 ++++++++----- src/components/settings/MonitorHistory.vue | 6 +++- src/languages/en.js | 2 ++ src/pages/Settings.vue | 36 +++++++++++++++++----- 4 files changed, 49 insertions(+), 16 deletions(-) diff --git a/server/jobs/clear-old-data.js b/server/jobs/clear-old-data.js index 0ec5ffa5f..ed80b0f74 100644 --- a/server/jobs/clear-old-data.js +++ b/server/jobs/clear-old-data.js @@ -25,15 +25,20 @@ const DEFAULT_KEEP_PERIOD = 180; parsedPeriod = DEFAULT_KEEP_PERIOD; } - log(`Clearing Data older than ${parsedPeriod} days...`); + if (parsedPeriod < 1) { + log(`Data deletion has been disabled as period is less than 1. Period is ${parsedPeriod} days.`); + } else { - try { - await R.exec( - "DELETE FROM heartbeat WHERE time < DATETIME('now', '-' || ? || ' days') ", - [ parsedPeriod ] - ); - } catch (e) { - log(`Failed to clear old data: ${e.message}`); + log(`Clearing Data older than ${parsedPeriod} days...`); + + try { + await R.exec( + "DELETE FROM heartbeat WHERE time < DATETIME('now', '-' || ? || ' days') ", + [ parsedPeriod ] + ); + } catch (e) { + log(`Failed to clear old data: ${e.message}`); + } } exit(); diff --git a/src/components/settings/MonitorHistory.vue b/src/components/settings/MonitorHistory.vue index c78c6aaf7..afcb7bc9e 100644 --- a/src/components/settings/MonitorHistory.vue +++ b/src/components/settings/MonitorHistory.vue @@ -7,6 +7,7 @@ settings.keepDataPeriodDays, ]) }} + {{ $t("infiniteRetention") }} +
+ {{ $t("dataRetentionTimeError") }} +