Compare commits

..

13 commits

Author SHA1 Message Date
Ilkka Myller
39c32d4dc8 Translated using Weblate (Finnish)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Ilkka Myller <ilkka.myller@nodefield.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fi/
Translation: Uptime Kuma/Uptime Kuma
2024-10-25 00:04:17 +00:00
AnnAngela
b2c016f69d Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: AnnAngela <naganjue@vip.qq.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/zh_Hans/
Translation: Uptime Kuma/Uptime Kuma
2024-10-25 00:04:17 +00:00
stanol
cbf1e4eaf8 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: stanol <stanol777@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/uk/
Translation: Uptime Kuma/Uptime Kuma
2024-10-25 00:04:17 +00:00
Ivan Bratović
79fdb906a3 Translated using Weblate (Croatian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Ivan Bratović <ivanbratovic4@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/hr/
Translation: Uptime Kuma/Uptime Kuma
2024-10-25 00:04:17 +00:00
Marco
6c2d925812 Translated using Weblate (German)
Currently translated at 100.0% (1062 of 1062 strings)

Translated using Weblate (German (Switzerland))

Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: Marco <marco@nanoweb.ch>
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
2024-10-25 00:04:17 +00:00
MrEddX
b6d4a26024 Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1062 of 1062 strings)

Co-authored-by: MrEddX <mreddx@chatrix.one>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/bg/
Translation: Uptime Kuma/Uptime Kuma
2024-10-25 00:04:17 +00:00
Louis Lam
79a26180af
Verify language json files format (#5233)
Some checks failed
json-yaml-validate / check-lang-json (push) Has been cancelled
Auto Test / auto-test (18, ARM64) (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Auto Test / auto-test (18, macos-latest) (push) Has been cancelled
Auto Test / auto-test (18, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (18, windows-latest) (push) Has been cancelled
Auto Test / auto-test (20, ARM64) (push) Has been cancelled
Auto Test / auto-test (20, macos-latest) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-latest) (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Auto Test / auto-test (20, windows-latest) (push) Has been cancelled
Auto Test / armv7-simple-test (18, ARMv7) (push) Has been cancelled
Auto Test / armv7-simple-test (20, ARMv7) (push) Has been cancelled
Auto Test / check-linters (push) Has been cancelled
Auto Test / e2e-test (push) Has been cancelled
json-yaml-validate / json-yaml-validate (push) Has been cancelled
2024-10-23 12:47:04 +08:00
Louis Lam
7a82ae039c
Fix weblate conflict and new translations (#5232)
Co-authored-by: Jochem Pluim <jochem@pluim.nu>
Co-authored-by: Zandor Smith <info@zsinfo.nl>
Co-authored-by: Anonymous <noreply@weblate.org>
Co-authored-by: Ryo Hanafusa <ryo7gumi@gmail.com>
Co-authored-by: Eduard Dev <legocuedy09@gmail.com>
Co-authored-by: Gunnar Norin <gunnar.norin@gmail.com>
Co-authored-by: AmadeusGraves <angelfx19@gmail.com>
Co-authored-by: Dan Misener <dan@misener.org>
Co-authored-by: Алексей Добрый <support@diera.ru>
Co-authored-by: Ilkka Myller <ilkka.myller@nodefield.com>
Co-authored-by: Nelson Chan <chakflying@hotmail.com>
Co-authored-by: Lance <2124757129@qq.com>
Co-authored-by: Peter Dave Hello <hsu@peterdavehello.org>
Co-authored-by: PhongPham <pttphong1202@gmail.com>
2024-10-23 08:36:22 +08:00
Easy
d2f71d11d6
Update API URL to compatible with the latest version of ServerChan (#5227)
Some checks are pending
Auto Test / auto-test (18, ARM64) (push) Blocked by required conditions
Auto Test / auto-test (18, macos-latest) (push) Blocked by required conditions
Auto Test / auto-test (18, ubuntu-latest) (push) Blocked by required conditions
Auto Test / auto-test (18, windows-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, ARM64) (push) Blocked by required conditions
Auto Test / auto-test (20, macos-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, ubuntu-latest) (push) Blocked by required conditions
Auto Test / auto-test (20, windows-latest) (push) Blocked by required conditions
Auto Test / armv7-simple-test (18, ARMv7) (push) Waiting to run
Auto Test / armv7-simple-test (20, ARMv7) (push) Waiting to run
Auto Test / check-linters (push) Waiting to run
Auto Test / e2e-test (push) Waiting to run
CodeQL / Analyze (push) Waiting to run
Merge Conflict Labeler / Labeling (push) Waiting to run
json-yaml-validate / json-yaml-validate (push) Waiting to run
2024-10-22 10:48:51 +02:00
Suven-p
c01494ec33
feat: add RabbitMQ monitor (#5199)
Some checks failed
Auto Test / auto-test (18, ARM64) (push) Has been cancelled
Auto Test / auto-test (18, macos-latest) (push) Has been cancelled
Auto Test / auto-test (18, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (18, windows-latest) (push) Has been cancelled
Auto Test / auto-test (20, ARM64) (push) Has been cancelled
Auto Test / auto-test (20, macos-latest) (push) Has been cancelled
Auto Test / auto-test (20, ubuntu-latest) (push) Has been cancelled
Auto Test / auto-test (20, windows-latest) (push) Has been cancelled
Auto Test / armv7-simple-test (18, ARMv7) (push) Has been cancelled
Auto Test / armv7-simple-test (20, ARMv7) (push) Has been cancelled
Auto Test / check-linters (push) Has been cancelled
Auto Test / e2e-test (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
json-yaml-validate / json-yaml-validate (push) Has been cancelled
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2024-10-20 15:57:03 +02:00
Ryo Hanafusa
a7e9bdd43e
fix: expand hover trigger area of beat (#5223)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2024-10-20 15:30:03 +02:00
sctnightcore
d7ffa33950
feat: add notification provider SendGrid (#5205)
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2024-10-18 02:25:23 +02:00
Frank Elsinga
a20a43b8aa
tests: add testcase for the mqtt monitor with testcontainers (#4451) 2024-10-17 16:25:45 +02:00
36 changed files with 1838 additions and 137 deletions

View file

@ -25,3 +25,13 @@ jobs:
with: with:
comment: "true" # enable comment mode comment: "true" # enable comment mode
exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions
check-lang-json:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- run: node ./extra/check-lang-json.js

View file

@ -0,0 +1,17 @@
exports.up = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.text("rabbitmq_nodes");
table.string("rabbitmq_username");
table.string("rabbitmq_password");
});
};
exports.down = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.dropColumn("rabbitmq_nodes");
table.dropColumn("rabbitmq_username");
table.dropColumn("rabbitmq_password");
});
};

27
extra/check-lang-json.js Normal file
View file

@ -0,0 +1,27 @@
// For #5231
const fs = require("fs");
let path = "./src/lang";
// list directories in the lang directory
let jsonFileList = fs.readdirSync(path);
for (let jsonFile of jsonFileList) {
if (!jsonFile.endsWith(".json")) {
continue;
}
let jsonPath = path + "/" + jsonFile;
let originalContent = fs.readFileSync(jsonPath, "utf8");
let langData = JSON.parse(originalContent);
let formattedContent = JSON.stringify(langData, null, 4) + "\n";
if (originalContent !== formattedContent) {
console.error(`File ${jsonFile} is not formatted correctly.`);
process.exit(1);
}
}
console.log("All lang json files are formatted correctly.");

View file

@ -0,0 +1,25 @@
// For #5231
const fs = require("fs");
let path = "../src/lang";
// list directories in the lang directory
let jsonFileList = fs.readdirSync(path);
for (let jsonFile of jsonFileList) {
if (!jsonFile.endsWith(".json")) {
continue;
}
let jsonPath = path + "/" + jsonFile;
let langData = JSON.parse(fs.readFileSync(jsonPath, "utf8"));
for (let key in langData) {
if (langData[key] === "") {
delete langData[key];
}
}
fs.writeFileSync(jsonPath, JSON.stringify(langData, null, 4) + "\n");
}

997
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -154,6 +154,8 @@
"@fortawesome/vue-fontawesome": "~3.0.0-5", "@fortawesome/vue-fontawesome": "~3.0.0-5",
"@playwright/test": "~1.39.0", "@playwright/test": "~1.39.0",
"@popperjs/core": "~2.10.2", "@popperjs/core": "~2.10.2",
"@testcontainers/hivemq": "^10.13.1",
"@testcontainers/rabbitmq": "^10.13.2",
"@types/bootstrap": "~5.1.9", "@types/bootstrap": "~5.1.9",
"@types/node": "^20.8.6", "@types/node": "^20.8.6",
"@typescript-eslint/eslint-plugin": "^6.7.5", "@typescript-eslint/eslint-plugin": "^6.7.5",
@ -189,6 +191,7 @@
"stylelint-config-standard": "~25.0.0", "stylelint-config-standard": "~25.0.0",
"terser": "~5.15.0", "terser": "~5.15.0",
"test": "~3.3.0", "test": "~3.3.0",
"testcontainers": "^10.13.1",
"typescript": "~4.4.4", "typescript": "~4.4.4",
"v-pagination-3": "~0.1.7", "v-pagination-3": "~0.1.7",
"vite": "~5.2.8", "vite": "~5.2.8",

View file

@ -153,6 +153,7 @@ class Monitor extends BeanModel {
snmpOid: this.snmpOid, snmpOid: this.snmpOid,
jsonPathOperator: this.jsonPathOperator, jsonPathOperator: this.jsonPathOperator,
snmpVersion: this.snmpVersion, snmpVersion: this.snmpVersion,
rabbitmqNodes: JSON.parse(this.rabbitmqNodes),
conditions: JSON.parse(this.conditions), conditions: JSON.parse(this.conditions),
}; };
@ -183,6 +184,8 @@ class Monitor extends BeanModel {
tlsCert: this.tlsCert, tlsCert: this.tlsCert,
tlsKey: this.tlsKey, tlsKey: this.tlsKey,
kafkaProducerSaslOptions: JSON.parse(this.kafkaProducerSaslOptions), kafkaProducerSaslOptions: JSON.parse(this.kafkaProducerSaslOptions),
rabbitmqUsername: this.rabbitmqUsername,
rabbitmqPassword: this.rabbitmqPassword,
}; };
} }

View file

@ -0,0 +1,67 @@
const { MonitorType } = require("./monitor-type");
const { log, UP, DOWN } = require("../../src/util");
const { axiosAbortSignal } = require("../util-server");
const axios = require("axios");
class RabbitMqMonitorType extends MonitorType {
name = "rabbitmq";
/**
* @inheritdoc
*/
async check(monitor, heartbeat, server) {
let baseUrls = [];
try {
baseUrls = JSON.parse(monitor.rabbitmqNodes);
} catch (error) {
throw new Error("Invalid RabbitMQ Nodes");
}
heartbeat.status = DOWN;
for (let baseUrl of baseUrls) {
try {
// Without a trailing slash, path in baseUrl will be removed. https://example.com/api -> https://example.com
if ( !baseUrl.endsWith("/") ) {
baseUrl += "/";
}
const options = {
// Do not start with slash, it will strip the trailing slash from baseUrl
url: new URL("api/health/checks/alarms/", baseUrl).href,
method: "get",
timeout: monitor.timeout * 1000,
headers: {
"Accept": "application/json",
"Authorization": "Basic " + Buffer.from(`${monitor.rabbitmqUsername || ""}:${monitor.rabbitmqPassword || ""}`).toString("base64"),
},
signal: axiosAbortSignal((monitor.timeout + 10) * 1000),
// Capture reason for 503 status
validateStatus: (status) => status === 200 || status === 503,
};
log.debug("monitor", `[${monitor.name}] Axios Request: ${JSON.stringify(options)}`);
const res = await axios.request(options);
log.debug("monitor", `[${monitor.name}] Axios Response: status=${res.status} body=${JSON.stringify(res.data)}`);
if (res.status === 200) {
heartbeat.status = UP;
heartbeat.msg = "OK";
break;
} else if (res.status === 503) {
heartbeat.msg = res.data.reason;
} else {
heartbeat.msg = `${res.status} - ${res.statusText}`;
}
} catch (error) {
if (axios.isCancel(error)) {
heartbeat.msg = "Request timed out";
log.debug("monitor", `[${monitor.name}] Request timed out`);
} else {
log.debug("monitor", `[${monitor.name}] Axios Error: ${JSON.stringify(error.message)}`);
heartbeat.msg = error.message;
}
}
}
}
}
module.exports = {
RabbitMqMonitorType,
};

View file

@ -0,0 +1,65 @@
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
class SendGrid extends NotificationProvider {
name = "SendGrid";
/**
* @inheritdoc
*/
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
const okMsg = "Sent Successfully.";
try {
let config = {
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${notification.sendgridApiKey}`,
},
};
let personalizations = {
to: [{ email: notification.sendgridToEmail }],
};
// Add CC recipients if provided
if (notification.sendgridCcEmail) {
personalizations.cc = notification.sendgridCcEmail
.split(",")
.map((email) => ({ email: email.trim() }));
}
// Add BCC recipients if provided
if (notification.sendgridBccEmail) {
personalizations.bcc = notification.sendgridBccEmail
.split(",")
.map((email) => ({ email: email.trim() }));
}
let data = {
personalizations: [ personalizations ],
from: { email: notification.sendgridFromEmail.trim() },
subject:
notification.sendgridSubject ||
"Notification from Your Uptime Kuma",
content: [
{
type: "text/plain",
value: msg,
},
],
};
await axios.post(
"https://api.sendgrid.com/v3/mail/send",
data,
config
);
return okMsg;
} catch (error) {
this.throwGeneralAxiosError(error);
}
}
}
module.exports = SendGrid;

View file

@ -12,8 +12,9 @@ class ServerChan extends NotificationProvider {
const okMsg = "Sent Successfully."; const okMsg = "Sent Successfully.";
// serverchan3 requires sending via ft07.com // serverchan3 requires sending via ft07.com
const url = String(notification.serverChanSendKey).startsWith("sctp") const matchResult = String(notification.serverChanSendKey).match(/^sctp(\d+)t/i);
? `https://${notification.serverChanSendKey}.push.ft07.com/send` const url = matchResult && matchResult[1]
? `https://${matchResult[1]}.push.ft07.com/send/${notification.serverChanSendKey}.send`
: `https://sctapi.ftqq.com/${notification.serverChanSendKey}.send`; : `https://sctapi.ftqq.com/${notification.serverChanSendKey}.send`;
try { try {

View file

@ -68,6 +68,7 @@ const GtxMessaging = require("./notification-providers/gtx-messaging");
const Cellsynt = require("./notification-providers/cellsynt"); const Cellsynt = require("./notification-providers/cellsynt");
const Onesender = require("./notification-providers/onesender"); const Onesender = require("./notification-providers/onesender");
const Wpush = require("./notification-providers/wpush"); const Wpush = require("./notification-providers/wpush");
const SendGrid = require("./notification-providers/send-grid");
class Notification { class Notification {
@ -153,6 +154,7 @@ class Notification {
new GtxMessaging(), new GtxMessaging(),
new Cellsynt(), new Cellsynt(),
new Wpush(), new Wpush(),
new SendGrid()
]; ];
for (let item of list) { for (let item of list) {
if (! item.name) { if (! item.name) {

View file

@ -718,6 +718,8 @@ let needSetup = false;
monitor.conditions = JSON.stringify(monitor.conditions); monitor.conditions = JSON.stringify(monitor.conditions);
monitor.rabbitmqNodes = JSON.stringify(monitor.rabbitmqNodes);
bean.import(monitor); bean.import(monitor);
bean.user_id = socket.userID; bean.user_id = socket.userID;
@ -868,6 +870,9 @@ let needSetup = false;
bean.snmpOid = monitor.snmpOid; bean.snmpOid = monitor.snmpOid;
bean.jsonPathOperator = monitor.jsonPathOperator; bean.jsonPathOperator = monitor.jsonPathOperator;
bean.timeout = monitor.timeout; bean.timeout = monitor.timeout;
bean.rabbitmqNodes = JSON.stringify(monitor.rabbitmqNodes);
bean.rabbitmqUsername = monitor.rabbitmqUsername;
bean.rabbitmqPassword = monitor.rabbitmqPassword;
bean.conditions = JSON.stringify(monitor.conditions); bean.conditions = JSON.stringify(monitor.conditions);
bean.validate(); bean.validate();

View file

@ -115,6 +115,7 @@ class UptimeKumaServer {
UptimeKumaServer.monitorTypeList["mqtt"] = new MqttMonitorType(); UptimeKumaServer.monitorTypeList["mqtt"] = new MqttMonitorType();
UptimeKumaServer.monitorTypeList["snmp"] = new SNMPMonitorType(); UptimeKumaServer.monitorTypeList["snmp"] = new SNMPMonitorType();
UptimeKumaServer.monitorTypeList["mongodb"] = new MongodbMonitorType(); UptimeKumaServer.monitorTypeList["mongodb"] = new MongodbMonitorType();
UptimeKumaServer.monitorTypeList["rabbitmq"] = new RabbitMqMonitorType();
// Allow all CORS origins (polling) in development // Allow all CORS origins (polling) in development
let cors = undefined; let cors = undefined;
@ -552,4 +553,5 @@ const { DnsMonitorType } = require("./monitor-types/dns");
const { MqttMonitorType } = require("./monitor-types/mqtt"); const { MqttMonitorType } = require("./monitor-types/mqtt");
const { SNMPMonitorType } = require("./monitor-types/snmp"); const { SNMPMonitorType } = require("./monitor-types/snmp");
const { MongodbMonitorType } = require("./monitor-types/mongodb"); const { MongodbMonitorType } = require("./monitor-types/mongodb");
const { RabbitMqMonitorType } = require("./monitor-types/rabbitmq");
const Monitor = require("./model/monitor"); const Monitor = require("./model/monitor");

View file

@ -4,12 +4,18 @@
<div <div
v-for="(beat, index) in shortBeatList" v-for="(beat, index) in shortBeatList"
:key="index" :key="index"
class="beat-hover-area"
:class="{ 'empty': (beat === 0) }"
:style="beatHoverAreaStyle"
:title="getBeatTitle(beat)"
>
<div
class="beat" class="beat"
:class="{ 'empty': (beat === 0), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }" :class="{ 'empty': (beat === 0), 'down': (beat.status === 0), 'pending': (beat.status === 2), 'maintenance': (beat.status === 3) }"
:style="beatStyle" :style="beatStyle"
:title="getBeatTitle(beat)"
/> />
</div> </div>
</div>
<div <div
v-if="!$root.isMobile && size !== 'small' && beatList.length > 4 && $root.styleElapsedTime !== 'none'" v-if="!$root.isMobile && size !== 'small' && beatList.length > 4 && $root.styleElapsedTime !== 'none'"
class="d-flex justify-content-between align-items-center word" :style="timeStyle" class="d-flex justify-content-between align-items-center word" :style="timeStyle"
@ -47,7 +53,7 @@ export default {
beatWidth: 10, beatWidth: 10,
beatHeight: 30, beatHeight: 30,
hoverScale: 1.5, hoverScale: 1.5,
beatMargin: 4, beatHoverAreaPadding: 4,
move: false, move: false,
maxBeat: -1, maxBeat: -1,
}; };
@ -123,7 +129,7 @@ export default {
barStyle() { barStyle() {
if (this.move && this.shortBeatList.length > this.maxBeat) { if (this.move && this.shortBeatList.length > this.maxBeat) {
let width = -(this.beatWidth + this.beatMargin * 2); let width = -(this.beatWidth + this.beatHoverAreaPadding * 2);
return { return {
transition: "all ease-in-out 0.25s", transition: "all ease-in-out 0.25s",
@ -137,12 +143,17 @@ export default {
}, },
beatHoverAreaStyle() {
return {
padding: this.beatHoverAreaPadding + "px",
"--hover-scale": this.hoverScale,
};
},
beatStyle() { beatStyle() {
return { return {
width: this.beatWidth + "px", width: this.beatWidth + "px",
height: this.beatHeight + "px", height: this.beatHeight + "px",
margin: this.beatMargin + "px",
"--hover-scale": this.hoverScale,
}; };
}, },
@ -152,7 +163,7 @@ export default {
*/ */
timeStyle() { timeStyle() {
return { return {
"margin-left": this.numPadding * (this.beatWidth + this.beatMargin * 2) + "px", "margin-left": this.numPadding * (this.beatWidth + this.beatHoverAreaPadding * 2) + "px",
}; };
}, },
@ -219,20 +230,20 @@ export default {
if (this.size !== "big") { if (this.size !== "big") {
this.beatWidth = 5; this.beatWidth = 5;
this.beatHeight = 16; this.beatHeight = 16;
this.beatMargin = 2; this.beatHoverAreaPadding = 2;
} }
// Suddenly, have an idea how to handle it universally. // Suddenly, have an idea how to handle it universally.
// If the pixel * ratio != Integer, then it causes render issue, round it to solve it!! // If the pixel * ratio != Integer, then it causes render issue, round it to solve it!!
const actualWidth = this.beatWidth * window.devicePixelRatio; const actualWidth = this.beatWidth * window.devicePixelRatio;
const actualMargin = this.beatMargin * window.devicePixelRatio; const actualHoverAreaPadding = this.beatHoverAreaPadding * window.devicePixelRatio;
if (!Number.isInteger(actualWidth)) { if (!Number.isInteger(actualWidth)) {
this.beatWidth = Math.round(actualWidth) / window.devicePixelRatio; this.beatWidth = Math.round(actualWidth) / window.devicePixelRatio;
} }
if (!Number.isInteger(actualMargin)) { if (!Number.isInteger(actualHoverAreaPadding)) {
this.beatMargin = Math.round(actualMargin) / window.devicePixelRatio; this.beatHoverAreaPadding = Math.round(actualHoverAreaPadding) / window.devicePixelRatio;
} }
window.addEventListener("resize", this.resize); window.addEventListener("resize", this.resize);
@ -245,7 +256,7 @@ export default {
*/ */
resize() { resize() {
if (this.$refs.wrap) { if (this.$refs.wrap) {
this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2)); this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatHoverAreaPadding * 2));
} }
}, },
@ -273,11 +284,25 @@ export default {
} }
.hp-bar-big { .hp-bar-big {
.beat { .beat-hover-area {
display: inline-block; display: inline-block;
&:not(.empty):hover {
transition: all ease-in-out 0.15s;
opacity: 0.8;
transform: scale(var(--hover-scale));
}
.beat {
background-color: $primary; background-color: $primary;
border-radius: $border-radius; border-radius: $border-radius;
/*
pointer-events needs to be changed because
tooltip momentarily disappears when crossing between .beat-hover-area and .beat
*/
pointer-events: none;
&.empty { &.empty {
background-color: aliceblue; background-color: aliceblue;
} }
@ -293,11 +318,6 @@ export default {
&.maintenance { &.maintenance {
background-color: $maintenance; background-color: $maintenance;
} }
&:not(.empty):hover {
transition: all ease-in-out 0.15s;
opacity: 0.8;
transform: scale(var(--hover-scale));
} }
} }
} }

View file

@ -165,6 +165,7 @@ export default {
"whapi": "WhatsApp (Whapi)", "whapi": "WhatsApp (Whapi)",
"gtxmessaging": "GtxMessaging", "gtxmessaging": "GtxMessaging",
"Cellsynt": "Cellsynt", "Cellsynt": "Cellsynt",
"SendGrid": "SendGrid"
}; };
// Put notifications here if it's not supported in most regions or its documentation is not in English // Put notifications here if it's not supported in most regions or its documentation is not in English

View file

@ -0,0 +1,47 @@
<template>
<div class="mb-3">
<label for="sendgrid-api-key" class="form-label">{{ $t("SendGrid API Key") }}</label>
<HiddenInput id="push-api-key" v-model="$parent.notification.sendgridApiKey" :required="true" autocomplete="new-password"></HiddenInput>
</div>
<div class="mb-3">
<label for="sendgrid-from-email" class="form-label">{{ $t("From Email") }}</label>
<input id="sendgrid-from-email" v-model="$parent.notification.sendgridFromEmail" type="email" class="form-control" required>
</div>
<div class="mb-3">
<label for="sendgrid-to-email" class="form-label">{{ $t("To Email") }}</label>
<input id="sendgrid-to-email" v-model="$parent.notification.sendgridToEmail" type="email" class="form-control" required>
</div>
<div class="mb-3">
<label for="sendgrid-cc-email" class="form-label">{{ $t("smtpCC") }}</label>
<input id="sendgrid-cc-email" v-model="$parent.notification.sendgridCcEmail" type="email" class="form-control">
<div class="form-text">{{ $t("Separate multiple email addresses with commas") }}</div>
</div>
<div class="mb-3">
<label for="sendgrid-bcc-email" class="form-label">{{ $t("smtpBCC") }}</label>
<input id="sendgrid-bcc-email" v-model="$parent.notification.sendgridBccEmail" type="email" class="form-control">
<small class="form-text text-muted">{{ $t("Separate multiple email addresses with commas") }}</small>
</div>
<div class="mb-3">
<label for="sendgrid-subject" class="form-label">{{ $t("Subject:") }}</label>
<input id="sendgrid-subject" v-model="$parent.notification.sendgridSubject" type="text" class="form-control">
<small class="form-text text-muted">{{ $t("leave blank for default subject") }}</small>
</div>
<i18n-t tag="p" keypath="More info on:" style="margin-top: 8px;">
<a href="https://docs.sendgrid.com/api-reference/mail-send/mail-send" target="_blank">https://docs.sendgrid.com/api-reference/mail-send/mail-send</a>
</i18n-t>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
mounted() {
if (typeof this.$parent.notification.sendgridSubject === "undefined") {
this.$parent.notification.sendgridSubject = "Notification from Your Uptime Kuma";
}
},
};
</script>

View file

@ -66,6 +66,7 @@ import Whapi from "./Whapi.vue";
import Cellsynt from "./Cellsynt.vue"; import Cellsynt from "./Cellsynt.vue";
import WPush from "./WPush.vue"; import WPush from "./WPush.vue";
import SIGNL4 from "./SIGNL4.vue"; import SIGNL4 from "./SIGNL4.vue";
import SendGrid from "./SendGrid.vue";
/** /**
* Manage all notification form. * Manage all notification form.
@ -139,7 +140,8 @@ const NotificationFormList = {
"whapi": Whapi, "whapi": Whapi,
"gtxmessaging": GtxMessaging, "gtxmessaging": GtxMessaging,
"Cellsynt": Cellsynt, "Cellsynt": Cellsynt,
"WPush": WPush "WPush": WPush,
"SendGrid": SendGrid,
}; };
export default NotificationFormList; export default NotificationFormList;

View file

@ -1088,5 +1088,14 @@
"From": "От", "From": "От",
"Can be found on:": "Можте да се откриете на: {0}", "Can be found on:": "Можте да се откриете на: {0}",
"The phone number of the recipient in E.164 format.": "Телефонният номер на получателя във формат E.164.", "The phone number of the recipient in E.164 format.": "Телефонният номер на получателя във формат E.164.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Идентификационен номер на подателя на текста или телефонен номер във формат E.164, в случай, че желаете да получавате отговори." "Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Идентификационен номер на подателя на текста или телефонен номер във формат E.164, в случай, че желаете да получавате отговори.",
"rabbitmqNodesRequired": "Моля, задайте възлите за този монитор.",
"rabbitmqNodesInvalid": "Моля, използвайте пълния URL адрес (започващ с 'http') за RabbitMQ възли.",
"RabbitMQ Password": "RabbitMQ парола",
"RabbitMQ Username": "RabbitMQ потребител",
"SendGrid API Key": "SendGrid API ключ",
"Separate multiple email addresses with commas": "Разделяйте отделните имейл адреси със запетаи",
"RabbitMQ Nodes": "Възли за управление на RabbitMQ",
"rabbitmqNodesDescription": "Въведете URL адреса на възлите за управление на RabbitMQ, включително протокол и порт. Пример: {0}",
"rabbitmqHelpText": "За да използвате монитора, ще трябва да активирате добавката за управление във вашата настройка на RabbitMQ. За повече информация моля, вижте {rabitmq_documentation}."
} }

View file

@ -1085,5 +1085,14 @@
"Can be found on:": "Ist zu finden auf: {0}", "Can be found on:": "Ist zu finden auf: {0}",
"From": "Von", "From": "Von",
"Arcade": "Spielhalle", "Arcade": "Spielhalle",
"Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Zeitkritische Benachrichtigungen werden sofort zugestellt, auch wenn sich das Gerät im Nicht stören-Modus befindet." "Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Zeitkritische Benachrichtigungen werden sofort zugestellt, auch wenn sich das Gerät im Nicht stören-Modus befindet.",
"RabbitMQ Nodes": "RabbitMQ-Verwaltungsknoten",
"rabbitmqNodesDescription": "Gib die URL für die RabbitMQ-Verwaltungsknoten einschliesslich Protokoll und Port ein. Beispiel: {0}",
"rabbitmqNodesRequired": "Setze die Knoten für diesen Monitor.",
"RabbitMQ Username": "RabbitMQ Benutzername",
"RabbitMQ Password": "RabbitMQ Passwort",
"SendGrid API Key": "SendGrid-API-Schlüssel",
"Separate multiple email addresses with commas": "Mehrere E-Mail-Adressen mit Kommas trennen",
"rabbitmqNodesInvalid": "Benutze eine vollständig qualifizierte URL (beginnend mit 'http') für RabbitMQ-Knoten.",
"rabbitmqHelpText": "Um den Monitor zu benutzen, musst du das Management Plugin in deinem RabbitMQ-Setup aktivieren. Weitere Informationen siehe {rabitmq_documentation}."
} }

View file

@ -1088,5 +1088,14 @@
"Bubble": "Blase", "Bubble": "Blase",
"Clear": "Klar", "Clear": "Klar",
"Pop": "Pop", "Pop": "Pop",
"Arcade": "Spielhalle" "Arcade": "Spielhalle",
"rabbitmqNodesRequired": "Setze die Knoten für diesen Monitor.",
"RabbitMQ Username": "RabbitMQ Benutzername",
"RabbitMQ Password": "RabbitMQ Passwort",
"SendGrid API Key": "SendGrid-API-Schlüssel",
"Separate multiple email addresses with commas": "Mehrere E-Mail-Adressen mit Kommas trennen",
"RabbitMQ Nodes": "RabbitMQ-Verwaltungsknoten",
"rabbitmqNodesDescription": "Gib die URL für die RabbitMQ-Verwaltungsknoten einschließlich Protokoll und Port ein. Beispiel: {0}",
"rabbitmqNodesInvalid": "Benutze eine vollständig qualifizierte URL (beginnend mit 'http') für RabbitMQ-Knoten.",
"rabbitmqHelpText": "Um den Monitor zu benutzen, musst du das Management Plugin in deinem RabbitMQ-Setup aktivieren. Weitere Informationen siehe {rabitmq_documentation}."
} }

View file

@ -251,7 +251,7 @@
"PushUrl": "Push URL", "PushUrl": "Push URL",
"HeadersInvalidFormat": "The request headers are not valid JSON: ", "HeadersInvalidFormat": "The request headers are not valid JSON: ",
"BodyInvalidFormat": "The request body is not valid JSON: ", "BodyInvalidFormat": "The request body is not valid JSON: ",
"CopyToClipboardError": "Couldn't copy to clipbard: {error}", "CopyToClipboardError": "Couldn't copy to clipboard: {error}",
"CopyToClipboardSuccess": "Copied!", "CopyToClipboardSuccess": "Copied!",
"CurlDebugInfo": "To debug the monitor, you can either paste this into your own machines terminal or into the machines terminal which uptime kuma is running on and see what you are requesting.{newiline}Please be aware of networking differences like {firewalls}, {dns_resolvers} or {docker_networks}.", "CurlDebugInfo": "To debug the monitor, you can either paste this into your own machines terminal or into the machines terminal which uptime kuma is running on and see what you are requesting.{newiline}Please be aware of networking differences like {firewalls}, {dns_resolvers} or {docker_networks}.",
"firewalls": "firewalls", "firewalls": "firewalls",
@ -1051,5 +1051,14 @@
"From": "From", "From": "From",
"Can be found on:": "Can be found on: {0}", "Can be found on:": "Can be found on: {0}",
"The phone number of the recipient in E.164 format.": "The phone number of the recipient in E.164 format.", "The phone number of the recipient in E.164 format.": "The phone number of the recipient in E.164 format.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.":"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies." "Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.",
"RabbitMQ Nodes": "RabbitMQ Management Nodes",
"rabbitmqNodesDescription": "Enter the URL for the RabbitMQ management nodes including protocol and port. Example: {0}",
"rabbitmqNodesRequired": "Please set the nodes for this monitor.",
"rabbitmqNodesInvalid": "Please use a fully qualified (starting with 'http') URL for RabbitMQ nodes.",
"RabbitMQ Username": "RabbitMQ Username",
"RabbitMQ Password": "RabbitMQ Password",
"rabbitmqHelpText": "To use the monitor, you will need to enable the Management Plugin in your RabbitMQ setup. For more information, please consult the {rabitmq_documentation}.",
"SendGrid API Key": "SendGrid API Key",
"Separate multiple email addresses with commas": "Separate multiple email addresses with commas"
} }

View file

@ -242,7 +242,6 @@
"Running": "Töötab", "Running": "Töötab",
"resendEveryXTimes": "Saada uuesti {0} korda", "resendEveryXTimes": "Saada uuesti {0} korda",
"statusMaintenance": "Hooldus", "statusMaintenance": "Hooldus",
"Webhook URL": "",
"Server URL": "Serveri URL", "Server URL": "Serveri URL",
"Priority": "Tähtsus", "Priority": "Tähtsus",
"emojiCheatSheet": "Emotikoni spikker: {0}", "emojiCheatSheet": "Emotikoni spikker: {0}",
@ -254,7 +253,6 @@
"PushUrl": "Lükka URL", "PushUrl": "Lükka URL",
"Monitor History": "Monitori ajalugu", "Monitor History": "Monitori ajalugu",
"PasswordsDoNotMatch": "Paroolid ei ühti.", "PasswordsDoNotMatch": "Paroolid ei ühti.",
"records": "",
"Current User": "Praegune kasutaja", "Current User": "Praegune kasutaja",
"topic": "Teema", "topic": "Teema",
"successMessage": "Edukas sõnum", "successMessage": "Edukas sõnum",
@ -308,7 +306,6 @@
"General Monitor Type": "Üldine monitori tüüp", "General Monitor Type": "Üldine monitori tüüp",
"webhookAdditionalHeadersDesc": "Lisab täiendavad päised saadetud webhookiga.", "webhookAdditionalHeadersDesc": "Lisab täiendavad päised saadetud webhookiga.",
"Read more": "Loe rohkem", "Read more": "Loe rohkem",
"HeadersInvalidFormat": "",
"clearDataOlderThan": "Hoia monitori ajalugu alles {0} päeva.", "clearDataOlderThan": "Hoia monitori ajalugu alles {0} päeva.",
"steamApiKeyDescription": "Steam Game Serveri monitoorimiseks on vaja sul Steam Web-API võtit. Sa saad registreerida enda API võtme siin: ", "steamApiKeyDescription": "Steam Game Serveri monitoorimiseks on vaja sul Steam Web-API võtit. Sa saad registreerida enda API võtme siin: ",
"Done": "Tehtud", "Done": "Tehtud",

View file

@ -1048,5 +1048,52 @@
"greater than": "enemmän kuin", "greater than": "enemmän kuin",
"less than or equal to": "vähemmän tai yhtä paljon kuin", "less than or equal to": "vähemmän tai yhtä paljon kuin",
"greater than or equal to": "enemmän tai yhtä paljon kuin", "greater than or equal to": "enemmän tai yhtä paljon kuin",
"record": "tietue" "record": "tietue",
"Notification Channel": "Ilmoituskanava",
"Custom sound to override default notification sound": "Mukautettu ääni oletusäänen sijaan",
"Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Aikaherkät ilmoitukset toimitetaan välittömästi vaikka laite olisi Älä Häiritse-tilassa.",
"ignoredTLSError": "TLS/SSL-virheitä ei huomioida",
"Debug": "Debug",
"Copy": "Kopioi",
"CopyToClipboardError": "Leikepöydälle kopiointi ei onnistunut: {error}",
"CopyToClipboardSuccess": "Kopioitu!",
"CurlDebugInfo": "Debugataksesi seurainta, voit joko kopioida tämän oman tietokoneesi komentoriville tai sen tietokoneen komentoriville jossa uptime kuma on käynissä nähdäksesi pyyntösi.{newiline}Otathan huomioon verkkoympäristöjen erot kuten {firewalls}, {dns_resolvers} tai {docker_networks}.",
"firewalls": "palomuurit",
"dns resolvers": "DNS-palvelimet",
"docker networks": "Docker-verkot",
"CurlDebugInfoOAuth2CCUnsupported": "{curl} ei tue täydellistä oauth-asiakkaan kirjautumistietojen välittämistä.{newline}Hanki bearer token -tunnus ja välitä se {oauth2_bearer}-vaihtoehdon kautta.",
"CurlDebugInfoProxiesUnsupported": "Välityspalvelimen tukea yllä olevassa {curl}-komennossa ei ole tällä hetkellä toteutettu.",
"shrinkDatabaseDescriptionSqlite": "Käynnistä tietokannan {vacuum} SQLitelle. {auto_vacuum} on jo käytössä, mutta se ei eheytä tietokantaa tai uudelleenpakkaa yksittäisiä tietokantasivuja samoin kuin {vacuum}.",
"Message format": "Viestin muoto",
"Send rich messages": "Lähetä monipuolisia viestejä (rich messages)",
"Sound": "Ääni",
"Alphanumerical string and hyphens only": "Vain aakkosnumeerinen merkkijono ja yhdysmerkit",
"Arcade": "Pelihalli",
"Harp": "Harppu",
"Fail": "Virhe",
"Correct": "Onnistuminen",
"Reveal": "Ilmestys",
"Bubble": "Kupla",
"Doorbell": "Ovikello",
"Flute": "Huilu",
"Money": "Raha",
"Clear": "Kirkas",
"Elevator": "Hissi",
"Guitar": "Kitara",
"Time Sensitive (iOS Only)": "Aikaherkkä (vain iOS)",
"From": "Lähettäjä",
"Can be found on:": "Löydettävissä: {0}",
"The phone number of the recipient in E.164 format.": "Vastaanottajan puhelinnumero E.164-muodossa.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Joko lähettäjätunnus (sender ID) tai puhelinnumero E-164-muodossa jos haluat pystyä vastaanottamaan vastausviestejä.",
"Scifi": "Tieteisseikkailu",
"Pop": "Poksahdus",
"rabbitmqNodesRequired": "Aseta tämän seuraimen solmut.",
"rabbitmqNodesInvalid": "Käytä RabbitMQ-solmuille täysin hyväksyttyä ('http' alkavaa) URL-osoitetta.",
"RabbitMQ Username": "RabbitMQ Käyttäjänimi",
"RabbitMQ Password": "RabbitMQ Salasana",
"SendGrid API Key": "SendGrid API-avain",
"Separate multiple email addresses with commas": "Erottele useammat sähköpostiosoitteet pilkuilla",
"RabbitMQ Nodes": "RabbitMQ-hallintasolmut",
"rabbitmqNodesDescription": "Anna URL RabbitMQ-hallintasolmuille sisältäen protokollan ja portin. Esimerkki: {0}",
"rabbitmqHelpText": "Jotta voit käyttää seurainta, sinun on otettava hallintalaajennus käyttöön RabbitMQ-asetuksissa. Lisätietoja saat osoitteesta {rabitmq_documentation}."
} }

View file

@ -1053,7 +1053,7 @@
"record": "enregistrer", "record": "enregistrer",
"shrinkDatabaseDescriptionSqlite": "Déclencher la commande {vacuum} pour la base de données SQLite. {auto_vacuum} est déjà activé, mais cela ne défragmente pas la base de données ni ne réorganise les pages individuelles de la base de données de la même manière que la commande {vacuum}.", "shrinkDatabaseDescriptionSqlite": "Déclencher la commande {vacuum} pour la base de données SQLite. {auto_vacuum} est déjà activé, mais cela ne défragmente pas la base de données ni ne réorganise les pages individuelles de la base de données de la même manière que la commande {vacuum}.",
"ignoredTLSError": "Les erreurs TLS/SSL ont été ignorées", "ignoredTLSError": "Les erreurs TLS/SSL ont été ignorées",
"CopyToClipboardError": "Impossible de copier dans Clipbard : {error}", "CopyToClipboardError": "Impossible de copier dans le presse-papiers : {error}",
"CurlDebugInfo": "Pour déboguer la sonde, vous pouvez soit le coller dans le terminal de votre propre machine, soit dans le terminal de la machine sur lequel kuma de disponibilité s'exécute et voir ce qui vous est demandé. {newiline} Veuillez être conscient des différences de réseau telles que {firewalls}, {dns_resolvers}. ou {docker_networks}.", "CurlDebugInfo": "Pour déboguer la sonde, vous pouvez soit le coller dans le terminal de votre propre machine, soit dans le terminal de la machine sur lequel kuma de disponibilité s'exécute et voir ce qui vous est demandé. {newiline} Veuillez être conscient des différences de réseau telles que {firewalls}, {dns_resolvers}. ou {docker_networks}.",
"Notification Channel": "Canal de notification", "Notification Channel": "Canal de notification",
"Alphanumerical string and hyphens only": "Chaîne alphanumérique et tirets uniquement", "Alphanumerical string and hyphens only": "Chaîne alphanumérique et tirets uniquement",

View file

@ -1082,5 +1082,14 @@
"Can be found on:": "Može se pronaći na: {0}", "Can be found on:": "Može se pronaći na: {0}",
"The phone number of the recipient in E.164 format.": "Telefonski broj primatelja u formatu E.164.", "The phone number of the recipient in E.164 format.": "Telefonski broj primatelja u formatu E.164.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Ili identifikator pošiljatelja tekstualne poruke ili telefonski broj u formatu E.164 ako želite primati odgovore.", "Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Ili identifikator pošiljatelja tekstualne poruke ili telefonski broj u formatu E.164 ako želite primati odgovore.",
"jsonQueryDescription": "Izvršite JSON upit nad primljenim odgovorom i provjerite očekivanu povratnu vrijednost. Koristite \"$\" za zahtjeve u kojima ne očekujete JSON odgovor. Povratna vrijednost će se za usporedbu pretvoriti u niz znakova (string). Pogledajte stranicu {0} za dokumentaciju o jeziku upita. Testno okruženje možete pronaći na {1}." "jsonQueryDescription": "Izvršite JSON upit nad primljenim odgovorom i provjerite očekivanu povratnu vrijednost. Koristite \"$\" za zahtjeve u kojima ne očekujete JSON odgovor. Povratna vrijednost će se za usporedbu pretvoriti u niz znakova (string). Pogledajte stranicu {0} za dokumentaciju o jeziku upita. Testno okruženje možete pronaći na {1}.",
"rabbitmqNodesRequired": "Postavite čvorove za ovaj Monitor.",
"rabbitmqNodesInvalid": "Koristite potpuni URL (onaj koji počinje s 'http') za RabbitMQ čvorove.",
"RabbitMQ Username": "RabbitMQ korisničko ime",
"RabbitMQ Password": "RabbitMQ lozinka",
"SendGrid API Key": "SendGrid API ključ",
"Separate multiple email addresses with commas": "Više adresa e-pošte potrebno je odvojiti zarezima",
"RabbitMQ Nodes": "RabbitMQ upravljački čvorovi",
"rabbitmqNodesDescription": "Unesite URL za upravljačke čvorove RabbitMQ uključujući protokol i port. Primjer: {0}",
"rabbitmqHelpText": "Za korištenje ovog Monitora morat ćete omogućiti dodatak \"Management Plugin\" u svom RabbitMQ-u. Za više informacija pogledajte {rabitmq_documentation}."
} }

View file

@ -679,5 +679,28 @@
"Json Query Expression": "Jsonクエリ表現", "Json Query Expression": "Jsonクエリ表現",
"ignoredTLSError": "TLS/SSLエラーは無視されました", "ignoredTLSError": "TLS/SSLエラーは無視されました",
"locally configured mail transfer agent": "独自設定されたメール転送エージェント", "locally configured mail transfer agent": "独自設定されたメール転送エージェント",
"ignoreTLSErrorGeneral": "接続確立時に TLS/SSL エラーを無視する" "ignoreTLSErrorGeneral": "接続時のTLS/SSLエラーを無視する",
"successKeyword": "成功時のキーワード",
"pushViewCode": "Push モニターの使い方(コードを見る)",
"Reset Token": "トークンのリセット",
"templateLimitedToUpDownCertNotifications": "監視対象の UP/DOWN と証明書の有効期限通知でのみ利用可能",
"templateLimitedToUpDownNotifications": "監視対象の UP/DOWN の通知でのみ利用可能",
"webhookBodyPresetOption": "プリセット - {0}",
"Optional": "オプション",
"and": "かつ",
"From Email": "Emailより",
"CurlDebugInfoProxiesUnsupported": "上記コマンド {curl} のProxyサポートは現在、実装されていません。",
"Your User ID": "あなたのユーザーID",
"programmingLanguages": "プログラミング言語",
"Debug": "デバッグ",
"Copy": "コピー",
"CopyToClipboardError": "クリップボードにコピーできません: {error}",
"CopyToClipboardSuccess": "コピーしました!",
"firewalls": "ファイアウォール",
"dns resolvers": "DNSリゾルバ",
"docker networks": "Dockerネットワーク",
"sameAsServerTimezone": "サーバータイムゾーンと同じ",
"cronExpression": "Cron表記",
"invalidCronExpression": "不正なCron表記です: {0}",
"Single Maintenance Window": "シングルメンテナンスウィンドウ"
} }

View file

@ -294,7 +294,7 @@
"emailCustomSubject": "Niestandardowy temat", "emailCustomSubject": "Niestandardowy temat",
"checkPrice": "Sprawdź ceny {0}:", "checkPrice": "Sprawdź ceny {0}:",
"octopushLegacyHint": "Czy używasz starszej wersji Octopush (2011-2020) czy nowej wersji?", "octopushLegacyHint": "Czy używasz starszej wersji Octopush (2011-2020) czy nowej wersji?",
"Feishu WebHookUrl": "Feishu WebHookURL", "Feishu WebHookUrl": "Adres webhooka Feishu",
"matrixHomeserverURL": "Adres URL serwera domowego (z http(s):// i opcjonalnie port)", "matrixHomeserverURL": "Adres URL serwera domowego (z http(s):// i opcjonalnie port)",
"Internal Room Id": "Wewnętrzne ID pokoju", "Internal Room Id": "Wewnętrzne ID pokoju",
"matrixDesc1": "Możesz znaleźć wewnętrzne ID pokoju, patrząc w zaawansowanej sekcji ustawień pokoju w twoim kliencie Matrix. Powinien on wyglądać jak !QMdRCpUIfLwsfjxye6:home.server.", "matrixDesc1": "Możesz znaleźć wewnętrzne ID pokoju, patrząc w zaawansowanej sekcji ustawień pokoju w twoim kliencie Matrix. Powinien on wyglądać jak !QMdRCpUIfLwsfjxye6:home.server.",
@ -410,7 +410,7 @@
"SignName": "Podpis", "SignName": "Podpis",
"Sms template must contain parameters: ": "Szablon sms musi posiadać parametry: ", "Sms template must contain parameters: ": "Szablon sms musi posiadać parametry: ",
"Bark Endpoint": "Punkt końcowy Bark", "Bark Endpoint": "Punkt końcowy Bark",
"WebHookUrl": "WebHookUrl", "WebHookUrl": "Adres webhooka",
"SecretKey": "Tajny klucz", "SecretKey": "Tajny klucz",
"For safety, must use secret key": "Ze względów bezpieczeństwa musisz użyć tajnego klucza", "For safety, must use secret key": "Ze względów bezpieczeństwa musisz użyć tajnego klucza",
"Device Token": "Token urządzenia", "Device Token": "Token urządzenia",
@ -993,5 +993,100 @@
"-year": "-rok", "-year": "-rok",
"and": "i", "and": "i",
"now": "teraz", "now": "teraz",
"cacheBusterParam": "Dodaj parametr {0}" "cacheBusterParam": "Dodaj parametr {0}",
"CopyToClipboardError": "Błąd podczas kopiowania do schowka: {error}",
"CurlDebugInfo": "Aby zdebugować monitor, możesz wkleić ten ciąg do terminala na swojej maszynie lub na maszynie gdzie uptime kuma jest uruchomina aby zobaczyć co żądasz.{newiline} Miej na uwadzę różnice sieciowe takich jak {firewalls}, {dns_resolvers} lub {docker_networks}.",
"shrinkDatabaseDescriptionSqlite": "Zażądaj {vacuum} bazy dla SQLite. {auto_vacuum} jest już włączone jednak nie defragmentuje to bazy ani nie przepakowuje indywidualnych stron bazy w taki sam sposób jak robi to polecenie {vacuum}.",
"cacheBusterParamDescription": "Losowo wygenerowany parametr w celu pominięcia pamięci podręcznej.",
"Group Name": "Nazwa grupy",
"OAuth2: Client Credentials": "OAuth2: Poświadczenia klienta",
"signl4Docs": "Aby zdobyć więcej informacji jak skonfigurować SIGNL4 i jak zdobyć odnośnik webhooka SIGNL4 udaj się do {0}.",
"Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Czasowo wrażliwe powiadomienia zostaną dostarczone natychmiastowo, nawet jeśli urzadzenie jest w trybie nie przeszkadzać.",
"time ago": "{0} temu",
"Json Query Expression": "Wyrażenie zapytania JSON",
"Condition": "Warunek",
"snmpCommunityStringHelptext": "Ten ciąg funkcjonuje jako hasło do uwierzytelnienia i kontroli dostęp do urządzeń SNMP. Dopasuj go do konfiguracji urządzenia SNMP.",
"SNMP Version": "Wersja SNMP",
"OID (Object Identifier)": "OID (Identyfikator obiektu)",
"snmpOIDHelptext": "Wprowadź OID sensora lub statusu który chcesz monitorować. Użyj narzędzia do zarządzania siecią jak przeglądarki MIB lub oprogramowanie SNMP jeśli nie masz pewności co do OID.",
"Please enter a valid OID.": "Wprowadź poprawny OID.",
"Host Onesender": "Serwer Onesender",
"Token Onesender": "Token Onesender",
"Recipient Type": "Typ odbiorcy",
"Go back to home page.": "Powróć do strony domowej.",
"No tags found.": "Nie znaleziono etykiet.",
"Authorization Header": "Nagłówek autoryzacji",
"Form Data Body": "Zawartość formularza danych",
"OAuth Token URL": "Odnośnik tokena OAuth",
"Client ID": "Identyfikator klienta",
"Client Secret": "Sekret klienta",
"OAuth Scope": "Zakres OAuth",
"Optional: Space separated list of scopes": "Opcjonalne: Oddzielona spacją lista zakresów",
"SIGNL4 Webhook URL": "Odnośnik webhooka SIGNL4",
"Lost connection to the socket server.": "Utracono połączenie do serwera.",
"Cannot connect to the socket server.": "Nie można połączyć z serwerem.",
"SIGNL4": "SIGNL4",
"less than": "mniej niż",
"Conditions": "Warunek",
"conditionAdd": "Dodaj warunek",
"conditionDelete": "Usuń warunek",
"conditionAddGroup": "Dodaj grupę",
"conditionDeleteGroup": "Usuń grupę",
"conditionValuePlaceholder": "Wartość",
"equals": "równa się",
"not equals": "nie jest równe",
"contains": "zawiera",
"not contains": "nie zawiera",
"starts with": "zaczyna się od",
"not starts with": "nie zaczyna się od",
"ends with": "kończy się",
"ignoredTLSError": "Błędy TLS/SSL zostały zignorowane",
"Debug": "Debuguj",
"Copy": "Kopiuj",
"CopyToClipboardSuccess": "Skopiowano!",
"firewalls": "zapory sieciowe",
"dns resolvers": "serwery rozwiązywania nazw domenowych",
"docker networks": "sieci docker",
"CurlDebugInfoOAuth2CCUnsupported": "Pełen ciąg poświadczeń klienta oauth nie jest obsługiwany w {curl}.{newline}Zdobądź bearer token i przekaż go przez opcję {oauth2_bearer}.",
"CurlDebugInfoProxiesUnsupported": "Obsługa proxy w powyższym poleceniu {curl} nie jest aktualnie zaimplementowana.",
"Message format": "Format wiadomości",
"Send rich messages": "Wysyłaj bogate wiadomości",
"Community String": "Ciąg community",
"Private Number": "Numer prywatny",
"groupOnesenderDesc": "Upewnij się, że GroupID jest poprawne. Aby wysłać wiadomość do grupy, np.: 628123456789-342345",
"privateOnesenderDesc": "Upewnij się, że numer telefonu jest poprawny. Aby wysłać wiadomość do prywatnego numeru, np.: 628123456789",
"Group ID": "ID grupy",
"wayToGetOnesenderUrlandToken": "Aby zdobyć odnośnik i token udaj się na stronę Onesender. Więcej informacji {0}",
"Add Remote Browser": "Dodaj zdalną przeglądarkę",
"New Group": "Nowa grupa",
"Authentication Method": "Metoda uwierzytelnienia",
"not ends with": "nie kończy się",
"greater than": "więcej niż",
"less than or equal to": "mniej lub równe",
"greater than or equal to": "więcej lub równe",
"record": "rekord",
"Notification Channel": "Kanał powiadomień",
"Sound": "Dźwięk",
"Alphanumerical string and hyphens only": "Tylko ciąg alfanumeryczny i dywiz (kreska)",
"Time Sensitive (iOS Only)": "Czasowo wrażliwe (tylko iOS)",
"From": "Od",
"Can be found on:": "Może być znalezione w: {0}",
"The phone number of the recipient in E.164 format.": "Numer telefonu odbiorcy w formacie E.164.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Identyfikator wysyłającego wiadomość lub numer telefonu w formacie E.164 jeśli chcesz otrzymywać odpowiedzi.",
"jsonQueryDescription": "Przetwórz i wyciągnij specyficzne dane z odpowiedzi JSON serwera używając zapytania JSON lub użyj \"$\" dla nieprzetworzonej odpowiedzi, jeśli nie spodziewasz się formatu JSON. Wynik jest następnie porównywany, jako ciągi, do spodziewanej wartości. Po dokumetnację zobacz {0} lub użyj {1} aby poeksperymentować z zapytaniami.",
"Custom sound to override default notification sound": "Własny dzwięk nadpisujący domyślny dzwięk powiadomień",
"Arcade": "Arcade",
"Correct": "Correct",
"Fail": "Fail",
"Harp": "Harp",
"Reveal": "Reveal",
"Bubble": "Bubble",
"Doorbell": "Doorbell",
"Flute": "Flute",
"Money": "Money",
"Scifi": "Scifi",
"Clear": "Clear",
"Elevator": "Elevator",
"Guitar": "Guitar",
"Pop": "Pop"
} }

View file

@ -980,5 +980,12 @@
"Group Name": "Nome do Grupo", "Group Name": "Nome do Grupo",
"OAuth2: Client Credentials": "OAuth2: Client Credentials", "OAuth2: Client Credentials": "OAuth2: Client Credentials",
"Authentication Method": "Método de Autenticação", "Authentication Method": "Método de Autenticação",
"Authorization Header": "Header de Autorização" "Authorization Header": "Header de Autorização",
"ignoredTLSError": "Erros TLS/SSL foram ignorados",
"Debug": "Depurar",
"Copy": "Copiar",
"CopyToClipboardError": "Não foi possível copiar para a área de transferência: {error}",
"CopyToClipboardSuccess": "Copiado!",
"firewalls": "firewalls",
"docker networks": "redes docker"
} }

View file

@ -971,5 +971,20 @@
"Select message type": "Выберите тип сообщения", "Select message type": "Выберите тип сообщения",
"Send to channel": "Отправить в канал", "Send to channel": "Отправить в канал",
"Refresh Interval": "Интервал обновления", "Refresh Interval": "Интервал обновления",
"ignoreTLSErrorGeneral": "Игнорировать ошибки TLS/SSL для подключения" "ignoreTLSErrorGeneral": "Игнорировать ошибки TLS/SSL для подключения",
"CurlDebugInfoOAuth2CCUnsupported": "Полная поддержка потока клиентских учетных данных OAuth отсутствует в {curl}.{newline}Пожалуйста, получите токен доступа и передайте его через параметр {oauth2_bearer}.",
"now": "сейчас",
"time ago": "{0} назад",
"Refresh Interval Description": "Страница статуса будет полностью обновляться каждые {0} секунд",
"and": "и",
"e.g. {discordThreadID}": "например {discordThreadID}",
"ignoredTLSError": "Ошибки TLS/SSL были проигнорированы",
"Debug": "Отладка",
"Copy": "Скопировать",
"CopyToClipboardError": "Не удалось скопировать: {error}",
"CopyToClipboardSuccess": "Скопировано!",
"firewalls": "файрволы",
"dns resolvers": "dns резолверы",
"docker networks": "докер-сети",
"CurlDebugInfoProxiesUnsupported": "Поддержка прокси в верхней {curl} команде в настоящее время не реализована."
} }

View file

@ -94,7 +94,7 @@
"Password": "Lösenord", "Password": "Lösenord",
"Remember me": "Kom ihåg mig", "Remember me": "Kom ihåg mig",
"Login": "Logga in", "Login": "Logga in",
"No Monitors, please": "Inga övervakare, tack", "No Monitors, please": "Inga övervakare",
"add one": "lägg till en", "add one": "lägg till en",
"Notification Type": "Notifieringstyp", "Notification Type": "Notifieringstyp",
"Email": "Epost", "Email": "Epost",
@ -957,5 +957,38 @@
"threemaSenderIdentityFormat": "8 tecken, startar oftast med *", "threemaSenderIdentityFormat": "8 tecken, startar oftast med *",
"threemaApiAuthenticationSecret": "Gateway-ID hemlighet", "threemaApiAuthenticationSecret": "Gateway-ID hemlighet",
"threemaBasicModeInfo": "Notera: Denna integration använder Threema Gateway i standardläge (server-baserad kryptering). Mer detaljer kan hittas {0}.", "threemaBasicModeInfo": "Notera: Denna integration använder Threema Gateway i standardläge (server-baserad kryptering). Mer detaljer kan hittas {0}.",
"apiKeysDisabledMsg": "API-nycklar är inaktiverade för att autentisering är inaktiverad." "apiKeysDisabledMsg": "API-nycklar är inaktiverade för att autentisering är inaktiverad.",
"CopyToClipboardError": "Kunde inte kopiera till urklipp: {fel}",
"Message format": "Meddelandeformat",
"Condition": "Villkor",
"SNMP Version": "SNMP-version",
"No tags found.": "Inga taggar hittades.",
"now": "nu",
"time ago": "{0} sedan",
"-year": "-år",
"Json Query Expression": "Json-frågeutryck",
"and": "och",
"Recipient Type": "Mottagartyp",
"Private Number": "Privat nummer",
"New Group": "Ny grupp",
"Group Name": "Gruppnamn",
"OAuth2: Client Credentials": "OAuth2: Klientuppgifter",
"Authentication Method": "Autentiseringsmetod",
"Authorization Header": "Autentiseringshuvud",
"Client ID": "Klient ID",
"Client Secret": "Klienthemlighet",
"Go back to home page.": "Gå tillbaka till hemsidan.",
"ignoredTLSError": "TLS/SSL-fel har ignorerats",
"Debug": "Felsöka",
"Copy": "Kopiera",
"CopyToClipboardSuccess": "Kopierat!",
"firewalls": "brandväggar",
"dns resolvers": "dns-upplösare",
"docker networks": "docker-nätverk",
"cacheBusterParam": "Lägg till {0} parameter",
"Community String": "Gruppsträng",
"OID (Object Identifier)": "OID (Objektsidentifierare)",
"Please enter a valid OID.": "Ange ett giltigt OID.",
"Group ID": "GruppID",
"Add Remote Browser": "Lägg till fjärrbläddrare"
} }

View file

@ -1051,5 +1051,42 @@
"greater than or equal to": "büyük veya eşit", "greater than or equal to": "büyük veya eşit",
"record": "kayıt", "record": "kayıt",
"jsonQueryDescription": "JSON sorgusunu kullanarak sunucunun JSON yanıtından belirli verileri ayrıştırın ve çıkarın. JSON beklemiyorsanız ham yanıt için \"$\" sembolünü kullanın. Sonuç daha sonra metin olarak beklenen değerle karşılaştırılır. Belgeler için {0}'a bakın ve sorgularla denemeler yapmak için {1}'i kullanın.", "jsonQueryDescription": "JSON sorgusunu kullanarak sunucunun JSON yanıtından belirli verileri ayrıştırın ve çıkarın. JSON beklemiyorsanız ham yanıt için \"$\" sembolünü kullanın. Sonuç daha sonra metin olarak beklenen değerle karşılaştırılır. Belgeler için {0}'a bakın ve sorgularla denemeler yapmak için {1}'i kullanın.",
"shrinkDatabaseDescriptionSqlite": "SQLite için {vacuum} veritabanını tetikle. {auto_vacuum} zaten etkin ancak bu, {vacuum} komutunun yaptığı gibi veritabanını birleştirmez veya tek tek veritabanı sayfalarını yeniden paketlemez." "shrinkDatabaseDescriptionSqlite": "SQLite için {vacuum} veritabanını tetikle. {auto_vacuum} zaten etkin ancak bu, {vacuum} komutunun yaptığı gibi veritabanını birleştirmez veya tek tek veritabanı sayfalarını yeniden paketlemez.",
"Debug": "Hata ayıklama",
"Copy": "Kopyala",
"CopyToClipboardError": "Panoya kopyalanamadı: {hata}",
"CopyToClipboardSuccess": "Kopyalandı!",
"firewalls": "güvenlik duvarları",
"dns resolvers": "dns çözücüler",
"docker networks": "Docker ağları",
"CurlDebugInfoOAuth2CCUnsupported": "Tam Oauth istemci kimlik bilgisi akışı {curl}'de desteklenmiyor.{newline}Lütfen bir taşıyıcı belirteci alın ve bunu {oauth2_bearer} seçeneği aracılığıyla iletin.",
"CurlDebugInfoProxiesUnsupported": "Yukarıdaki {curl} komutunda proxy desteği şu anda uygulanmamıştır.",
"Message format": "Mesaj biçimi",
"Send rich messages": "Zengin mesajlar gönder",
"Notification Channel": "Bildirim Kanalı",
"Sound": "Ses",
"Alphanumerical string and hyphens only": "Yalnızca alfanümerik dize ve tireler",
"Arcade": "Çarşı",
"Correct": "Doğru",
"Fail": "Hata",
"Harp": "Harp",
"Reveal": "Ortaya çıkarmak",
"Bubble": "Kabarcık",
"Doorbell": "Kapı zili",
"Flute": "Flüt",
"Money": "Para",
"Scifi": "Bilimkurgu",
"Clear": "Temizlemek",
"Elevator": "Asansör",
"Guitar": "Gitar",
"Pop": "Pop",
"Custom sound to override default notification sound": "Varsayılan bildirim sesini geçersiz kılmak için özel ses",
"Time Sensitive (iOS Only)": "Zaman Duyarlı (Yalnızca iOS)",
"From": "Kimden",
"Can be found on:": "Şurada bulunabilir: {0}",
"The phone number of the recipient in E.164 format.": "Alıcının E.164 formatındaki telefon numarası.",
"ignoredTLSError": "TLS/SSL hataları göz ardı edildi",
"CurlDebugInfo": "Monitörü hata ayıklamak için, bunu kendi makinenizin terminaline veya uptime kuma'nın çalıştığı makinenin terminaline yapıştırabilir ve ne istediğinizi görebilirsiniz.{newiline}Lütfen {firewalls}, {dns_resolvers} veya {docker_networks} gibi ağ farklılıklarına dikkat edin.",
"Time sensitive notifications will be delivered immediately, even if the device is in do not disturb mode.": "Cihaz rahatsız etmeyin modunda olsa bile, zaman açısından hassas bildirimler anında iletilecek.",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Cevap alabilmek istiyorsanız E.164 formatında bir kısa mesaj gönderici kimliği veya bir telefon numarası."
} }

View file

@ -1094,5 +1094,14 @@
"CurlDebugInfo": "Для налагодження монітора ви можете вставити цей файл у термінал вашої власної машини або у термінал машини, на якій запущено uptime kuma, і подивитися, що ви запитуєте.{newline}Зверніть увагу на мережеві відмінності, такі як {firewalls}, {dns_resolvers} або {docker_networks}.", "CurlDebugInfo": "Для налагодження монітора ви можете вставити цей файл у термінал вашої власної машини або у термінал машини, на якій запущено uptime kuma, і подивитися, що ви запитуєте.{newline}Зверніть увагу на мережеві відмінності, такі як {firewalls}, {dns_resolvers} або {docker_networks}.",
"CurlDebugInfoOAuth2CCUnsupported": "Повний потік облікових даних клієнта oauth не підтримується в {curl}.{newline}Потрібно отримати bearer-токен і передати його за допомогою опції {oauth2_bearer}.", "CurlDebugInfoOAuth2CCUnsupported": "Повний потік облікових даних клієнта oauth не підтримується в {curl}.{newline}Потрібно отримати bearer-токен і передати його за допомогою опції {oauth2_bearer}.",
"Can be found on:": "Можна знайти на: {0}", "Can be found on:": "Можна знайти на: {0}",
"Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Або ідентифікатор відправника тексту, або номер телефону у форматі E.164, якщо ви хочете отримувати відповіді." "Either a text sender ID or a phone number in E.164 format if you want to be able to receive replies.": "Або ідентифікатор відправника тексту, або номер телефону у форматі E.164, якщо ви хочете отримувати відповіді.",
"rabbitmqNodesRequired": "Будь ласка, встановіть вузли для цього монітора.",
"RabbitMQ Username": "Ім'я користувача RabbitMQ",
"RabbitMQ Password": "Пароль RabbitMQ",
"SendGrid API Key": "API-ключ SendGrid",
"Separate multiple email addresses with commas": "Розділяйте кілька адрес комами",
"RabbitMQ Nodes": "Вузли керування RabbitMQ",
"rabbitmqNodesDescription": "Введіть URL-адресу для вузлів керування RabbitMQ, включаючи протокол і порт. Приклад: {0}",
"rabbitmqNodesInvalid": "Будь ласка, використовуйте повну URL-адресу (починаючи з 'http') для вузлів RabbitMQ.",
"rabbitmqHelpText": "Щоб використовувати монітор, вам потрібно увімкнути плагін керування у налаштуваннях RabbitMQ. Для отримання додаткової інформації, будь ласка, зверніться до {rabitmq_documentation}."
} }

View file

@ -1090,5 +1090,14 @@
"Money": "Money", "Money": "Money",
"CurlDebugInfoOAuth2CCUnsupported": "{curl} 不支持完整的 oauth 客户端凭证流。{newline}请获取承载令牌bearer token并通过 {oauth2_bearer} 选项传递。", "CurlDebugInfoOAuth2CCUnsupported": "{curl} 不支持完整的 oauth 客户端凭证流。{newline}请获取承载令牌bearer token并通过 {oauth2_bearer} 选项传递。",
"CurlDebugInfo": "要调试监控项,您可以将该命令粘贴到您自己的或 uptime kuma 正在运行的机器的命令行终端中,并查看结果。{newiline}请注意网络差异,例如 {firewalls}、{dns_resolvers} 或 {docker_networks}。", "CurlDebugInfo": "要调试监控项,您可以将该命令粘贴到您自己的或 uptime kuma 正在运行的机器的命令行终端中,并查看结果。{newiline}请注意网络差异,例如 {firewalls}、{dns_resolvers} 或 {docker_networks}。",
"ignoredTLSError": "TLS/SSL 错误已被忽略" "ignoredTLSError": "TLS/SSL 错误已被忽略",
"SendGrid API Key": "SendGrid API 密钥",
"RabbitMQ Password": "RabbitMQ 密码",
"RabbitMQ Username": "RabbitMQ 用户名",
"rabbitmqNodesInvalid": "请使用 RabbitMQ 节点的完整 URL即完全限定 URL以 http 开头)。",
"rabbitmqNodesRequired": "请设置此监视项的节点。",
"rabbitmqNodesDescription": "输入 RabbitMQ 管理节点的 URL包括协议和端口。例如{0}",
"RabbitMQ Nodes": "RabbitMQ 管理节点",
"Separate multiple email addresses with commas": "用逗号分隔多个电子邮件地址",
"rabbitmqHelpText": "要使用此监控项,您需要在 RabbitMQ 设置中启用管理插件。有关更多信息,请参阅 {rabitmq_documentation}。"
} }

View file

@ -64,6 +64,9 @@
<option value="mqtt"> <option value="mqtt">
MQTT MQTT
</option> </option>
<option value="rabbitmq">
RabbitMQ
</option>
<option value="kafka-producer"> <option value="kafka-producer">
Kafka Producer Kafka Producer
</option> </option>
@ -90,6 +93,13 @@
</option> </option>
</optgroup> </optgroup>
</select> </select>
<i18n-t v-if="monitor.type === 'rabbitmq'" keypath="rabbitmqHelpText" tag="div" class="form-text">
<template #rabitmq_documentation>
<a href="https://www.rabbitmq.com/management" target="_blank" rel="noopener noreferrer">
RabbitMQ documentation
</a>
</template>
</i18n-t>
</div> </div>
<div v-if="monitor.type === 'tailscale-ping'" class="alert alert-warning" role="alert"> <div v-if="monitor.type === 'tailscale-ping'" class="alert alert-warning" role="alert">
@ -233,6 +243,43 @@
</div> </div>
</template> </template>
<template v-if="monitor.type === 'rabbitmq'">
<!-- RabbitMQ Nodes List -->
<div class="my-3">
<label for="rabbitmqNodes" class="form-label">{{ $t("RabbitMQ Nodes") }}</label>
<VueMultiselect
id="rabbitmqNodes"
v-model="monitor.rabbitmqNodes"
:required="true"
:multiple="true"
:options="[]"
:placeholder="$t('Enter the list of nodes')"
:tag-placeholder="$t('Press Enter to add node')"
:max-height="500"
:taggable="true"
:show-no-options="false"
:close-on-select="false"
:clear-on-select="false"
:preserve-search="false"
:preselect-first="false"
@tag="addRabbitmqNode"
></VueMultiselect>
<div class="form-text">
{{ $t("rabbitmqNodesDescription", ["https://node1.rabbitmq.com:15672"]) }}
</div>
</div>
<div class="my-3">
<label for="rabbitmqUsername" class="form-label">RabbitMQ {{ $t("RabbitMQ Username") }}</label>
<input id="rabbitmqUsername" v-model="monitor.rabbitmqUsername" type="text" required class="form-control">
</div>
<div class="my-3">
<label for="rabbitmqPassword" class="form-label">{{ $t("RabbitMQ Password") }}</label>
<HiddenInput id="rabbitmqPassword" v-model="monitor.rabbitmqPassword" autocomplete="false" required="true"></HiddenInput>
</div>
</template>
<!-- Hostname --> <!-- Hostname -->
<!-- TCP Port / Ping / DNS / Steam / MQTT / Radius / Tailscale Ping / SNMP only --> <!-- TCP Port / Ping / DNS / Steam / MQTT / Radius / Tailscale Ping / SNMP only -->
<div v-if="monitor.type === 'port' || monitor.type === 'ping' || monitor.type === 'dns' || monitor.type === 'steam' || monitor.type === 'gamedig' || monitor.type === 'mqtt' || monitor.type === 'radius' || monitor.type === 'tailscale-ping' || monitor.type === 'snmp'" class="my-3"> <div v-if="monitor.type === 'port' || monitor.type === 'ping' || monitor.type === 'dns' || monitor.type === 'steam' || monitor.type === 'gamedig' || monitor.type === 'mqtt' || monitor.type === 'radius' || monitor.type === 'tailscale-ping' || monitor.type === 'snmp'" class="my-3">
@ -549,7 +596,7 @@
</div> </div>
<!-- Timeout: HTTP / Keyword / SNMP only --> <!-- Timeout: HTTP / Keyword / SNMP only -->
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'snmp'" class="my-3"> <div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'snmp' || monitor.type === 'rabbitmq'" class="my-3">
<label for="timeout" class="form-label">{{ $t("Request Timeout") }} ({{ $t("timeoutAfter", [ monitor.timeout || clampTimeout(monitor.interval) ]) }})</label> <label for="timeout" class="form-label">{{ $t("Request Timeout") }} ({{ $t("timeoutAfter", [ monitor.timeout || clampTimeout(monitor.interval) ]) }})</label>
<input id="timeout" v-model="monitor.timeout" type="number" class="form-control" required min="0" step="0.1"> <input id="timeout" v-model="monitor.timeout" type="number" class="form-control" required min="0" step="0.1">
</div> </div>
@ -1122,6 +1169,9 @@ const monitorDefaults = {
kafkaProducerAllowAutoTopicCreation: false, kafkaProducerAllowAutoTopicCreation: false,
gamedigGivenPortOnly: true, gamedigGivenPortOnly: true,
remote_browser: null, remote_browser: null,
rabbitmqNodes: [],
rabbitmqUsername: "",
rabbitmqPassword: "",
conditions: [] conditions: []
}; };
@ -1709,6 +1759,10 @@ message HealthCheckResponse {
this.monitor.kafkaProducerBrokers.push(newBroker); this.monitor.kafkaProducerBrokers.push(newBroker);
}, },
addRabbitmqNode(newNode) {
this.monitor.rabbitmqNodes.push(newNode);
},
/** /**
* Validate form input * Validate form input
* @returns {boolean} Is the form input valid? * @returns {boolean} Is the form input valid?
@ -1736,6 +1790,17 @@ message HealthCheckResponse {
return false; return false;
} }
} }
if (this.monitor.type === "rabbitmq") {
if (this.monitor.rabbitmqNodes.length === 0) {
toast.error(this.$t("rabbitmqNodesRequired"));
return false;
}
if (!this.monitor.rabbitmqNodes.every(node => node.startsWith("http://") || node.startsWith("https://"))) {
toast.error(this.$t("rabbitmqNodesInvalid"));
return false;
}
}
return true; return true;
}, },

View file

@ -0,0 +1,102 @@
const { describe, test } = require("node:test");
const assert = require("node:assert");
const { HiveMQContainer } = require("@testcontainers/hivemq");
const mqtt = require("mqtt");
const { MqttMonitorType } = require("../../server/monitor-types/mqtt");
const { UP, PENDING } = require("../../src/util");
/**
* Runs an MQTT test with the
* @param {string} mqttSuccessMessage the message that the monitor expects
* @param {null|"keyword"|"json-query"} mqttCheckType the type of check we perform
* @param {string} receivedMessage what message is recieved from the mqtt channel
* @returns {Promise<Heartbeat>} the heartbeat produced by the check
*/
async function testMqtt(mqttSuccessMessage, mqttCheckType, receivedMessage) {
const hiveMQContainer = await new HiveMQContainer().start();
const connectionString = hiveMQContainer.getConnectionString();
const mqttMonitorType = new MqttMonitorType();
const monitor = {
jsonPath: "firstProp", // always return firstProp for the json-query monitor
hostname: connectionString.split(":", 2).join(":"),
mqttTopic: "test",
port: connectionString.split(":")[2],
mqttUsername: null,
mqttPassword: null,
interval: 20, // controls the timeout
mqttSuccessMessage: mqttSuccessMessage, // for keywords
expectedValue: mqttSuccessMessage, // for json-query
mqttCheckType: mqttCheckType,
};
const heartbeat = {
msg: "",
status: PENDING,
};
const testMqttClient = mqtt.connect(hiveMQContainer.getConnectionString());
testMqttClient.on("connect", () => {
testMqttClient.subscribe("test", (error) => {
if (!error) {
testMqttClient.publish("test", receivedMessage);
}
});
});
try {
await mqttMonitorType.check(monitor, heartbeat, {});
} finally {
testMqttClient.end();
hiveMQContainer.stop();
}
return heartbeat;
}
describe("MqttMonitorType", {
concurrency: true,
skip: !!process.env.CI && (process.platform !== "linux" || process.arch !== "x64")
}, () => {
test("valid keywords (type=default)", async () => {
const heartbeat = await testMqtt("KEYWORD", null, "-> KEYWORD <-");
assert.strictEqual(heartbeat.status, UP);
assert.strictEqual(heartbeat.msg, "Topic: test; Message: -> KEYWORD <-");
});
test("valid keywords (type=keyword)", async () => {
const heartbeat = await testMqtt("KEYWORD", "keyword", "-> KEYWORD <-");
assert.strictEqual(heartbeat.status, UP);
assert.strictEqual(heartbeat.msg, "Topic: test; Message: -> KEYWORD <-");
});
test("invalid keywords (type=default)", async () => {
await assert.rejects(
testMqtt("NOT_PRESENT", null, "-> KEYWORD <-"),
new Error("Message Mismatch - Topic: test; Message: -> KEYWORD <-"),
);
});
test("invalid keyword (type=keyword)", async () => {
await assert.rejects(
testMqtt("NOT_PRESENT", "keyword", "-> KEYWORD <-"),
new Error("Message Mismatch - Topic: test; Message: -> KEYWORD <-"),
);
});
test("valid json-query", async () => {
// works because the monitors' jsonPath is hard-coded to "firstProp"
const heartbeat = await testMqtt("present", "json-query", "{\"firstProp\":\"present\"}");
assert.strictEqual(heartbeat.status, UP);
assert.strictEqual(heartbeat.msg, "Message received, expected value is found");
});
test("invalid (because query fails) json-query", async () => {
// works because the monitors' jsonPath is hard-coded to "firstProp"
await assert.rejects(
testMqtt("[not_relevant]", "json-query", "{}"),
new Error("Message received but value is not equal to expected value, value was: [undefined]"),
);
});
test("invalid (because successMessage fails) json-query", async () => {
// works because the monitors' jsonPath is hard-coded to "firstProp"
await assert.rejects(
testMqtt("[wrong_success_messsage]", "json-query", "{\"firstProp\":\"present\"}"),
new Error("Message received but value is not equal to expected value, value was: [present]")
);
});
});

View file

@ -0,0 +1,53 @@
const { describe, test } = require("node:test");
const assert = require("node:assert");
const { RabbitMQContainer } = require("@testcontainers/rabbitmq");
const { RabbitMqMonitorType } = require("../../server/monitor-types/rabbitmq");
const { UP, DOWN, PENDING } = require("../../src/util");
describe("RabbitMQ Single Node", {
skip: !!process.env.CI && (process.platform !== "linux" || process.arch !== "x64"),
}, () => {
test("RabbitMQ is running", async () => {
// The default timeout of 30 seconds might not be enough for the container to start
const rabbitMQContainer = await new RabbitMQContainer().withStartupTimeout(60000).start();
const rabbitMQMonitor = new RabbitMqMonitorType();
const connectionString = `http://${rabbitMQContainer.getHost()}:${rabbitMQContainer.getMappedPort(15672)}`;
const monitor = {
rabbitmqNodes: JSON.stringify([ connectionString ]),
rabbitmqUsername: "guest",
rabbitmqPassword: "guest",
};
const heartbeat = {
msg: "",
status: PENDING,
};
try {
await rabbitMQMonitor.check(monitor, heartbeat, {});
assert.strictEqual(heartbeat.status, UP);
assert.strictEqual(heartbeat.msg, "OK");
} finally {
rabbitMQContainer.stop();
}
});
test("RabbitMQ is not running", async () => {
const rabbitMQMonitor = new RabbitMqMonitorType();
const monitor = {
rabbitmqNodes: JSON.stringify([ "http://localhost:15672" ]),
rabbitmqUsername: "rabbitmqUser",
rabbitmqPassword: "rabbitmqPass",
};
const heartbeat = {
msg: "",
status: PENDING,
};
await rabbitMQMonitor.check(monitor, heartbeat, {});
assert.strictEqual(heartbeat.status, DOWN);
});
});