From 64073eaf71bbbd6e49f7d49e535be51e62b3a666 Mon Sep 17 00:00:00 2001 From: Ole Date: Thu, 18 Jul 2024 02:40:56 +0200 Subject: [PATCH 1/6] Update Stale GitHub Action from v8 to v9 --- .github/workflows/stale-bot.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stale-bot.yml b/.github/workflows/stale-bot.yml index 6acd303fb..60eca6403 100644 --- a/.github/workflows/stale-bot.yml +++ b/.github/workflows/stale-bot.yml @@ -9,7 +9,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-issue-message: |- We are clearing up our old `help`-issues and your issue has been open for 60 days with no activity. @@ -21,7 +21,7 @@ jobs: exempt-issue-labels: 'News,Medium,High,discussion,bug,doc,feature-request' exempt-issue-assignees: 'louislam' operations-per-run: 200 - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-issue-message: |- This issue was marked as `cannot-reproduce` by a maintainer. From cd5644d6d27f06c3bd4f6ae8c4862303dbc4f147 Mon Sep 17 00:00:00 2001 From: taisei <46064673+taisei-86@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:58:13 +0900 Subject: [PATCH 2/6] Remove markdown with meta tags (#4968) Co-authored-by: Frank Elsinga --- server/model/status_page.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/model/status_page.js b/server/model/status_page.js index 528d1dd49..e40b28f6f 100644 --- a/server/model/status_page.js +++ b/server/model/status_page.js @@ -4,6 +4,7 @@ const cheerio = require("cheerio"); const { UptimeKumaServer } = require("../uptime-kuma-server"); const jsesc = require("jsesc"); const googleAnalytics = require("../google-analytics"); +const { marked } = require("marked"); class StatusPage extends BeanModel { @@ -46,7 +47,11 @@ class StatusPage extends BeanModel { */ static async renderHTML(indexHTML, statusPage) { const $ = cheerio.load(indexHTML); - const description155 = statusPage.description?.substring(0, 155) ?? ""; + + const description155 = marked(statusPage.description ?? "") + .replace(/<[^>]+>/gm, "") + .trim() + .substring(0, 155); $("title").text(statusPage.title); $("meta[name=description]").attr("content", description155); From 13f67462adeea35fcba8880a8a80f48cb3612076 Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Sat, 3 Aug 2024 16:49:49 +0900 Subject: [PATCH 3/6] docs: fixed typo in the contribution guide (#4988) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 916a4b934..6b37b5d85 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -127,7 +127,7 @@ Different guidelines exist for different types of pull requests (PRs): - `server/monitor-types/MONITORING_TYPE.js` is the core of each monitor. the `async check(...)`-function should: - throw an error for each fault that is detected with an actionable error message - - in the happy-path, you should set `heartbeat.msg` to a successfull message and set `heartbeat.status = UP` + - in the happy-path, you should set `heartbeat.msg` to a successful message and set `heartbeat.status = UP` - `server/uptime-kuma-server.js` is where the monitoring backend needs to be registered. *If you have an idea how we can skip this step, we would love to hear about it ^^* - `src/pages/EditMonitor.vue` is the shared frontend users interact with. From 92e982a91004e8f519e21ee6a0e4d4d21ecae99c Mon Sep 17 00:00:00 2001 From: Hasan Basri Date: Thu, 8 Aug 2024 07:48:37 +0700 Subject: [PATCH 4/6] Add OneSender Webhook notification (#4971) Co-authored-by: Frank Elsinga --- server/notification-providers/onesender.js | 47 +++++++++++++ server/notification.js | 2 + src/components/NotificationDialog.vue | 1 + src/components/notifications/Onesender.vue | 81 ++++++++++++++++++++++ src/components/notifications/index.js | 2 + src/lang/en.json | 10 ++- 6 files changed, 142 insertions(+), 1 deletion(-) create mode 100644 server/notification-providers/onesender.js create mode 100644 src/components/notifications/Onesender.vue diff --git a/server/notification-providers/onesender.js b/server/notification-providers/onesender.js new file mode 100644 index 000000000..4a33931a2 --- /dev/null +++ b/server/notification-providers/onesender.js @@ -0,0 +1,47 @@ +const NotificationProvider = require("./notification-provider"); +const axios = require("axios"); + +class Onesender extends NotificationProvider { + name = "Onesender"; + + /** + * @inheritdoc + */ + async send(notification, msg, monitorJSON = null, heartbeatJSON = null) { + const okMsg = "Sent Successfully."; + + try { + let data = { + heartbeat: heartbeatJSON, + monitor: monitorJSON, + msg, + to: notification.onesenderReceiver, + type: "text", + recipient_type: "individual", + text: { + body: msg + } + }; + if (notification.onesenderTypeReceiver === "private") { + data.to = notification.onesenderReceiver + "@s.whatsapp.net"; + } else { + data.recipient_type = "group"; + data.to = notification.onesenderReceiver + "@g.us"; + } + let config = { + headers: { + "Authorization": "Bearer " + notification.onesenderToken, + } + }; + await axios.post(notification.onesenderURL, data, config); + return okMsg; + + } catch (error) { + this.throwGeneralAxiosError(error); + } + + } + +} + +module.exports = Onesender; diff --git a/server/notification.js b/server/notification.js index 28b0db758..e6a2e6d5e 100644 --- a/server/notification.js +++ b/server/notification.js @@ -64,6 +64,7 @@ const SevenIO = require("./notification-providers/sevenio"); const Whapi = require("./notification-providers/whapi"); const GtxMessaging = require("./notification-providers/gtx-messaging"); const Cellsynt = require("./notification-providers/cellsynt"); +const Onesender = require("./notification-providers/onesender"); class Notification { @@ -111,6 +112,7 @@ class Notification { new Ntfy(), new Octopush(), new OneBot(), + new Onesender(), new Opsgenie(), new PagerDuty(), new FlashDuty(), diff --git a/src/components/NotificationDialog.vue b/src/components/NotificationDialog.vue index 427366619..288b00559 100644 --- a/src/components/NotificationDialog.vue +++ b/src/components/NotificationDialog.vue @@ -135,6 +135,7 @@ export default { "ntfy": "Ntfy", "octopush": "Octopush", "OneBot": "OneBot", + "Onesender": "Onesender", "Opsgenie": "Opsgenie", "PagerDuty": "PagerDuty", "PagerTree": "PagerTree", diff --git a/src/components/notifications/Onesender.vue b/src/components/notifications/Onesender.vue new file mode 100644 index 000000000..81dbe7f0a --- /dev/null +++ b/src/components/notifications/Onesender.vue @@ -0,0 +1,81 @@ + + + + + diff --git a/src/components/notifications/index.js b/src/components/notifications/index.js index 5d49b8a4a..51642d7da 100644 --- a/src/components/notifications/index.js +++ b/src/components/notifications/index.js @@ -29,6 +29,7 @@ import Nostr from "./Nostr.vue"; import Ntfy from "./Ntfy.vue"; import Octopush from "./Octopush.vue"; import OneBot from "./OneBot.vue"; +import Onesender from "./Onesender.vue"; import Opsgenie from "./Opsgenie.vue"; import PagerDuty from "./PagerDuty.vue"; import FlashDuty from "./FlashDuty.vue"; @@ -98,6 +99,7 @@ const NotificationFormList = { "ntfy": Ntfy, "octopush": Octopush, "OneBot": OneBot, + "Onesender": Onesender, "Opsgenie": Opsgenie, "PagerDuty": PagerDuty, "FlashDuty": FlashDuty, diff --git a/src/lang/en.json b/src/lang/en.json index 7cb663b69..1382707d5 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -962,5 +962,13 @@ "threemaSenderIdentityFormat": "8 characters, usually starts with *", "threemaApiAuthenticationSecret": "Gateway-ID Secret", "threemaBasicModeInfo": "Note: This integration uses Threema Gateway in basic mode (server-based encryption). Further details can be found {0}.", - "apiKeysDisabledMsg": "API keys are disabled because authentication is disabled." + "apiKeysDisabledMsg": "API keys are disabled because authentication is disabled.", + "Host Onesender": "Host Onesender", + "Token Onesender": "Token Onesender", + "Recipient Type": "Recipient Type", + "Private Number": "Private Number", + "privateOnesenderDesc": "Make sure the number phone is valid. To send message into private number phone, ex: 628123456789", + "groupOnesenderDesc": "Make sure the GroupID is valid. To send message into Group, ex: 628123456789-342345", + "Group ID": "Group ID", + "wayToGetOnesenderUrlandToken":"You can get the URL and Token by going to the Onesender website. More info {0}" } From bab771df056e317b2361e9a5102c204dfc89a8db Mon Sep 17 00:00:00 2001 From: solidsniper <31854951+solidsniper@users.noreply.github.com> Date: Wed, 14 Aug 2024 16:58:33 +0200 Subject: [PATCH 5/6] fix: `!important` in the prim-css editor is rendered incorrectly (#5018) --- src/assets/app.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/assets/app.scss b/src/assets/app.scss index c7e56ba74..28eeca87c 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -576,6 +576,12 @@ optgroup { outline: none !important; } +.prism-editor__container { + .important { + font-weight: var(--bs-body-font-weight) !important; + } +} + h5.settings-subheading::after { content: ""; display: block; From 2a820ab16d41a3aa4882854fa158850a5c5edc4c Mon Sep 17 00:00:00 2001 From: vishalsabhaya <86877856+vishalsabhaya@users.noreply.github.com> Date: Mon, 19 Aug 2024 22:11:27 +0900 Subject: [PATCH 6/6] =?UTF-8?q?marked=20library=20move=20devDependencies?= =?UTF-8?q?=20=E2=86=92=20dependencies=20(#5029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package-lock.json | 27 +++++---------------------- package.json | 2 +- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/package-lock.json b/package-lock.json index 98d351db4..e2f6fbd5e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -48,6 +48,7 @@ "knex": "^2.4.2", "limiter": "~2.1.0", "liquidjs": "^10.7.0", + "marked": "^14.0.0", "mitt": "~3.0.1", "mongodb": "~4.17.1", "mqtt": "~4.3.7", @@ -113,7 +114,6 @@ "eslint-plugin-vue": "~8.7.1", "favico.js": "~0.3.10", "get-port-please": "^3.1.1", - "marked": "~4.2.5", "node-ssh": "~13.1.0", "postcss-html": "~1.5.0", "postcss-rtlcss": "~3.7.2", @@ -10645,16 +10645,15 @@ } }, "node_modules/marked": { - "version": "4.2.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.12.tgz", - "integrity": "sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==", - "dev": true, + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-14.0.0.tgz", + "integrity": "sha512-uIj4+faQ+MgHgwUW1l2PsPglZLOLOT1uErt06dAPtx2kjteLAkbsd/0FiYg/MGS+i7ZKLb7w2WClxHkzOOuryQ==", "license": "MIT", "bin": { "marked": "bin/marked.js" }, "engines": { - "node": ">= 12" + "node": ">= 18" } }, "node_modules/mathml-tag-names": { @@ -11299,22 +11298,6 @@ "smart-buffer": "^4.1.0" } }, - "node_modules/node-abi": { - "version": "3.62.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.62.0.tgz", - "integrity": "sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==", - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-abort-controller": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-3.1.1.tgz", - "integrity": "sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==" - }, "node_modules/node-cloudflared-tunnel": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/node-cloudflared-tunnel/-/node-cloudflared-tunnel-1.0.10.tgz", diff --git a/package.json b/package.json index a74e4677e..e42f8e554 100644 --- a/package.json +++ b/package.json @@ -113,6 +113,7 @@ "knex": "^2.4.2", "limiter": "~2.1.0", "liquidjs": "^10.7.0", + "marked": "^14.0.0", "mitt": "~3.0.1", "mongodb": "~4.17.1", "mqtt": "~4.3.7", @@ -178,7 +179,6 @@ "eslint-plugin-vue": "~8.7.1", "favico.js": "~0.3.10", "get-port-please": "^3.1.1", - "marked": "~4.2.5", "node-ssh": "~13.1.0", "postcss-html": "~1.5.0", "postcss-rtlcss": "~3.7.2",