Compare commits

..

74 Commits

Author SHA1 Message Date
Louis Lam
b1170211b7 Update to 1.19.0-beta.1 2022-12-05 19:24:04 +08:00
Louis Lam
eadf2c810a Fix check version 2022-12-05 19:17:24 +08:00
Louis Lam
8aa97635ec Improve the clear filter button 2022-12-05 18:21:16 +08:00
Louis Lam
ee1a56caae Update /test-webhook and reevaluate sensitive fields 2022-12-05 18:18:19 +08:00
Louis Lam
e886df4788 Fix typo 2022-12-05 17:55:45 +08:00
Louis Lam
5196abfd36 Merge remote-tracking branch 'origin/master' into feat/add-auth-header-to-webhook-notification-#1919 2022-12-05 17:52:02 +08:00
Louis Lam
3e68cf2a1c Specify Accept-Encoding for axios request (Fix #2253) 2022-12-04 22:55:05 +08:00
Louis Lam
0ab82e6de3 Generate random nightly version 2022-12-04 22:44:50 +08:00
Louis Lam
8cdbe37f6f Update core-js 2022-12-04 21:41:08 +08:00
Louis Lam
28d13e198c Merge pull request #2350 from MrEddX/bulgarian
Bulgarian
2022-11-26 20:52:33 +08:00
MrEddX
14a062804e Update bg-BG.js
- Translation fixes
2022-11-25 22:00:52 +02:00
MrEddX
cf3e03ab40 Update bg-BG.js
- Added new  fields
- Translated new fields
- Fixed some typos
2022-11-25 21:56:00 +02:00
Louis Lam
191f3ad53b Merge pull request #2339 from jbrunner/fix-2296
Add socks5h support
2022-11-25 16:24:21 +08:00
Louis Lam
370d522920 Pin dependency of axios-ntlm to 1.3.0. As 1.3.1 causes error 2022-11-25 14:00:33 +08:00
Louis Lam
e0a1ad8a1c Update dependencies and drop start-server-watch-dev as it is unstable 2022-11-25 01:32:33 +08:00
Louis Lam
9720006934 Merge pull request #2151 from Computroniks/feature/#1817-add-mysql-monitor
Feat  Add MySQL/MariaDB monitor #1817
2022-11-25 01:27:40 +08:00
Joshua Brunner
cd270bd8b5 Add socks5h support
Add socks5h support as an extra option to not break previous socks5 implementation.
Allows to toggle between socks5 and socks5h explicit.

Fixes #2296
2022-11-22 11:18:16 +01:00
Louis Lam
bc3229828e Merge remote-tracking branch 'origin/master' 2022-11-20 00:11:38 +08:00
Louis Lam
a5f23b9839 Update Apprise from 1.0 to 1.2 2022-11-20 00:07:19 +08:00
Matthew Nickson
2052fa175f Merge branch 'master' into feature/#1817-add-mysql-monitor
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-11-17 19:04:14 +00:00
Matthew Nickson
15b63c82c3 Merge remote-tracking branch 'upstream/master' into feature/#1817-add-mysql-monitor
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-11-17 18:46:58 +00:00
Matthew Nickson
b053bc61ce Fixed MySQL monitor to close connection
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-11-17 18:34:02 +00:00
Jan Hartje
258ff56962 Merge branch 'louislam:master' into feat/add-auth-header-to-webhook-notification-#1919 2022-11-14 20:17:36 +01:00
Louis Lam
cb4e512dc6 Merge pull request #2316 from Dafnik/patch-fix-link-preview-description
Fix 'undefined' in link preview generation
2022-11-15 02:37:28 +08:00
Dafnik
4042c26390 Fix 'undefined' in link preview generation 2022-11-14 18:05:52 +01:00
Louis Lam
5da2315534 Merge pull request #2310 from Ealrang/patch-1
Update zh-CN.js
2022-11-14 22:02:43 +08:00
Ealrang
204015f1f5 Update zh-CN.js
Correct typos
2022-11-12 22:15:04 +08:00
Louis Lam
cc6d17d2e0 Merge pull request #1964 from minhhoangvn/feat/add-gRPC-protocol
Feat/add gRPC protocol
2022-11-11 12:34:35 +08:00
Louis Lam
68862c0b3f Fix Pushbullet do not handle general message correctly and fix name convention (Close #1890) 2022-11-01 20:27:40 +08:00
Louis Lam
fd15e7c2dc Merge remote-tracking branch 'origin/master' into ntfy-icon
# Conflicts:
#	server/notification-providers/ntfy.js
#	src/components/notifications/Ntfy.vue
#	src/languages/en.js
2022-10-31 17:10:20 +08:00
Louis Lam
5c4cf68937 Merge pull request #2260 from m-kiszka/smseagle
Added support for SMSEagle device API notifications
2022-10-31 17:03:34 +08:00
Louis Lam
214ddc264d Fix mistake 2022-10-29 23:40:09 +08:00
Louis Lam
2ea71839d1 Add npm run start-server-watch-dev for watching server code changes and restart (Node.js 19 only) 2022-10-29 23:37:05 +08:00
Louis Lam
54efde8185 Update socket.io and remove an useless event listener 2022-10-29 23:29:33 +08:00
Louis Lam
705124d4ac Merge pull request #2274 from 5idereal/patch-1
update zh-tw translation
2022-10-28 16:50:24 +08:00
5idereal
1cb6940590 update zh-tw translation 2022-10-28 15:50:00 +08:00
Louis Lam
0f8ad288f3 Merge pull request #2255 from b-reich/update-german-translation
Add german translations
2022-10-27 16:47:11 +08:00
Adam Stachowicz
434174d350 I18n PL update (#2264)
* [PL] Only formatting by ESLint for now

* Translate new i18n keys to polish + small grammar/typo fixes

* ESLint again after npm install...
2022-10-27 16:46:32 +08:00
minhhn3
3d1237ed53 fix: resolve conflict 2022-10-26 20:50:34 +07:00
minhhn3
b459408b10 fix: resolve conflict 2022-10-26 20:41:21 +07:00
Benjamin Reich
f04fe4d230 add new german translations 2022-10-25 10:50:58 +02:00
Louis Lam
e579610426 Merge pull request #2265 from Saibamen/patch-1
Add info about `npm install` to translators
2022-10-25 14:32:43 +08:00
Louis Lam
b115d3f8b9 Merge pull request #2266 from Saibamen/fix_linters
Fix 'dayjs' is never used warning
2022-10-25 14:23:59 +08:00
Adam Stachowicz
134b3b8ac1 Fix 'dayjs' is never used warning 2022-10-25 01:27:25 +02:00
Adam Stachowicz
e7e7751e7b Correct order 2022-10-24 23:38:38 +02:00
Adam Stachowicz
5cd58e6fa3 Add info about npm install to translators
Without this, you can have wrong indentation from ESLint
2022-10-24 23:36:21 +02:00
Marcin Kiszka
08763b700a Added support for SMSEagle device API notifications 2022-10-24 12:45:56 +02:00
Marcin Kiszka
781f855921 [empty commit] pull request for Added support for SMSEagle device API notifications 2022-10-24 12:44:29 +02:00
Louis Lam
9e81fe120f Merge pull request #2235 from dave9123/patch-3
Update id-ID.js
2022-10-20 15:57:39 +08:00
Dave
c0e67b6de9 Update id-ID.js 2022-10-17 20:09:25 +07:00
Louis Lam
a17084f75d Merge pull request #2229 from falentio/fix-id-lang
fix typos in id lang
2022-10-16 16:25:35 +08:00
Louis Lam
e4fe7b802a Update bg-BG.js #2228 2022-10-16 16:24:39 +08:00
falentio
5761bc9b90 fix typos in id lang 2022-10-16 13:49:25 +07:00
MrEddX
92ea019fd4 Update bg-BG.js
- Added new  fields
- Translated new fields
2022-10-16 07:21:23 +03:00
Cyril59310
a774b37369 Update FR language + fixed daytime error (#2226)
* Update FR language

* fix a daytime error + add for translation

* Update language file FR + fixed daytime error
2022-10-16 01:42:28 +08:00
Christian Meis
1e8a16504b Make icon optional for ntfy notificaation provider. Add Icon header to ntfy request only, if icon is actually defined. 2022-10-11 11:15:33 +02:00
janhartje
b879428a03 feat(notification): add additional Header to webhook 2022-10-05 17:48:07 +02:00
janhartje
3c5de1c889 Merge branch 'master' of https://github.com/louislam/uptime-kuma into feat/add-auth-header-to-webhook-notification-#1919 2022-10-05 16:44:13 +02:00
Matthew Nickson
f9be918246 Add support for MySQL/MariaDB databases #1817
This commit adds support for monitoring MySQL and MariaDB database
servers. The mysql2 package was choosen over mysql as it provides a
promise wrapper and is reportedly faster than the original mysql package
whilst still maintaining the same API.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-10-02 01:52:53 +01:00
Matthew Nickson
314ae38f91 Changed name of SQL Server to avoid confusion
It appears that SQL Server causes some confusion among users as they
believe that it means any SQL database, not the Microsoft product SQL
Server. To avoid this issue, the display value has been changed to
Microsoft SQL Server. No backend changes have been made and it is still
stored as sqlserver in the database. This is only a frontent change.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-10-01 21:35:33 +01:00
Christian Meis
c03d911657 Update src/languages/en.js
Co-authored-by: Matthew Nickson <mnickson@sidingsmedia.com>
2022-09-28 11:39:13 +02:00
Christian Meis
e12642cf21 Fix double quotes in fallback for no icon url in ntfy notification provider settings 2022-09-28 10:24:56 +02:00
Christian Meis
618d904001 [empty commit] pull request for icon support in ntfy notification provider (fixes #2135) 2022-09-28 10:17:02 +02:00
Christian Meis
6f86236b63 Add support for icon to ntfy notification provider (requires minimum ntfy server version 1.28.0 and Android app 1.14.0, no iOS support as of today) 2022-09-28 10:13:18 +02:00
Louis Lam
68875c3091 Fix merging issue 2022-09-13 22:22:01 +08:00
Louis Lam
f35d7c0a1a Merge remote-tracking branch 'origin/master' into feat/add-gRPC-protocol
# Conflicts:
#	package-lock.json
2022-09-13 22:19:41 +08:00
minhhn3
3a90d246a4 fix: wrong type 2022-08-20 22:45:11 +07:00
minhhn3
6bb79597e8 fix: resolve merge conflict 2022-08-13 13:26:05 +07:00
minhhn3
34ab6142db fix: remove new space line 2022-08-08 19:38:43 +07:00
minhhn3
2232236a7a [empty commit] pull request for add gRPC protocol 2022-08-03 13:39:31 +07:00
Minh Hoàng
dcecd10c88 Feat/add gRPC protocol (#1)
* feat: added monitor with gRPC

Co-authored-by: minhhn3 <minhhn3@vng.com.vn>
2022-08-03 12:00:39 +07:00
Jan Hartje
af07c7f050 feat(notification): add Authorization Header option to backend 2022-07-18 16:04:27 +00:00
Jan Hartje
95dba6dcaf feat(notification): add Authorization Header option to frontend 2022-07-18 16:04:18 +00:00
Jan Hartje
90c2bf7c94 [empty commit] pull request for #1919 2022-07-18 15:56:53 +00:00
38 changed files with 3652 additions and 2362 deletions

25
db/patch-grpc-monitor.sql Normal file
View File

@@ -0,0 +1,25 @@
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
BEGIN TRANSACTION;
ALTER TABLE monitor
ADD grpc_url VARCHAR(255) default null;
ALTER TABLE monitor
ADD grpc_protobuf TEXT default null;
ALTER TABLE monitor
ADD grpc_body TEXT default null;
ALTER TABLE monitor
ADD grpc_metadata TEXT default null;
ALTER TABLE monitor
ADD grpc_method VARCHAR(255) default null;
ALTER TABLE monitor
ADD grpc_service_name VARCHAR(255) default null;
ALTER TABLE monitor
ADD grpc_enable_tls BOOLEAN default 0 not null;
COMMIT;

View File

@@ -4,5 +4,5 @@ WORKDIR /app
# Install apprise, iputils for non-root ping, setpriv
RUN apk add --no-cache iputils setpriv dumb-init python3 py3-cryptography py3-pip py3-six py3-yaml py3-click py3-markdown py3-requests py3-requests-oauthlib && \
pip3 --no-cache-dir install apprise==1.0.0 && \
pip3 --no-cache-dir install apprise==1.2.0 && \
rm -rf /root/.cache

View File

@@ -11,7 +11,7 @@ WORKDIR /app
RUN apt update && \
apt --yes --no-install-recommends install python3 python3-pip python3-cryptography python3-six python3-yaml python3-click python3-markdown python3-requests python3-requests-oauthlib \
sqlite3 iputils-ping util-linux dumb-init && \
pip3 --no-cache-dir install apprise==1.0.0 && \
pip3 --no-cache-dir install apprise==1.2.0 && \
rm -rf /var/lib/apt/lists/* && \
apt --yes autoremove

View File

@@ -5,7 +5,7 @@ const util = require("../src/util");
util.polyfill();
const oldVersion = pkg.version;
const newVersion = oldVersion + "-nightly";
const newVersion = oldVersion + "-nightly-" + util.genSecret(8);
console.log("Old Version: " + oldVersion);
console.log("New Version: " + newVersion);

5010
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
{
"name": "uptime-kuma",
"version": "1.19.0-beta.0",
"version": "1.19.0-beta.1",
"license": "MIT",
"repository": {
"type": "git",
@@ -63,10 +63,11 @@
"cypress-open": "concurrently -k -r \"node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/\" \"cypress open --config-file ./config/cypress.config.js\""
},
"dependencies": {
"@grpc/grpc-js": "~1.7.3",
"@louislam/sqlite3": "15.1.2",
"args-parser": "~1.3.0",
"axios": "~0.27.0",
"axios-ntlm": "~1.3.0",
"axios-ntlm": "1.3.0",
"badge-maker": "~3.3.1",
"bcryptjs": "~2.4.3",
"bree": "~7.1.5",
@@ -93,6 +94,7 @@
"limiter": "~2.1.0",
"mqtt": "~4.3.7",
"mssql": "~8.1.4",
"mysql2": "~2.3.3",
"node-cloudflared-tunnel": "~1.0.9",
"node-radius-client": "~1.0.0",
"nodemailer": "~6.6.5",
@@ -102,9 +104,10 @@
"pg-connection-string": "~2.5.0",
"prom-client": "~13.2.0",
"prometheus-api-metrics": "~3.2.1",
"protobufjs": "~7.1.1",
"redbean-node": "0.1.4",
"socket.io": "~4.4.1",
"socket.io-client": "~4.4.1",
"socket.io": "~4.5.3",
"socket.io-client": "~4.5.3",
"socks-proxy-agent": "6.1.1",
"tar": "~6.1.11",
"tcp-ping": "~0.1.1",
@@ -130,7 +133,7 @@
"chart.js": "~3.6.2",
"chartjs-adapter-dayjs": "~1.0.0",
"concurrently": "^7.1.0",
"core-js": "~3.18.3",
"core-js": "~3.26.1",
"cross-env": "~7.0.3",
"cypress": "^10.1.0",
"delay": "^5.0.0",

View File

@@ -25,7 +25,7 @@ exports.startInterval = () => {
let checkBeta = await setting("checkBeta");
if (checkBeta && res.data.beta) {
if (compareVersions.compare(res.data.beta, res.data.beta, ">")) {
if (compareVersions.compare(res.data.beta, res.data.slow, ">")) {
exports.latestVersion = res.data.beta;
return;
}

View File

@@ -62,6 +62,7 @@ class Database {
"patch-add-clickable-status-page-link.sql": true,
"patch-add-sqlserver-monitor.sql": true,
"patch-add-other-auth.sql": { parents: [ "patch-monitor-basic-auth.sql" ] },
"patch-grpc-monitor.sql": true,
"patch-add-radius-monitor.sql": true,
"patch-monitor-add-resend-interval.sql": true,
"patch-maintenance-table2.sql": true,

View File

@@ -1,4 +1,3 @@
const dayjs = require("dayjs");
const { BeanModel } = require("redbean-node/dist/bean-model");
/**

View File

@@ -3,7 +3,7 @@ const dayjs = require("dayjs");
const axios = require("axios");
const { Prometheus } = require("../prometheus");
const { log, UP, DOWN, PENDING, MAINTENANCE, flipStatus, TimeLogger } = require("../../src/util");
const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, postgresQuery, mqttAsync, setSetting, httpNtlm, radius } = require("../util-server");
const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, postgresQuery, mysqlQuery, mqttAsync, setSetting, httpNtlm, radius, grpcQuery } = require("../util-server");
const { R } = require("redbean-node");
const { BeanModel } = require("redbean-node/dist/bean-model");
const { Notification } = require("../notification");
@@ -89,27 +89,23 @@ class Monitor extends BeanModel {
dns_resolve_type: this.dns_resolve_type,
dns_resolve_server: this.dns_resolve_server,
dns_last_result: this.dns_last_result,
pushToken: this.pushToken,
docker_container: this.docker_container,
docker_host: this.docker_host,
proxyId: this.proxy_id,
notificationIDList,
tags: tags,
maintenance: await Monitor.isUnderMaintenance(this.id),
mqttUsername: this.mqttUsername,
mqttPassword: this.mqttPassword,
mqttTopic: this.mqttTopic,
mqttSuccessMessage: this.mqttSuccessMessage,
databaseConnectionString: this.databaseConnectionString,
databaseQuery: this.databaseQuery,
authMethod: this.authMethod,
authWorkstation: this.authWorkstation,
authDomain: this.authDomain,
radiusUsername: this.radiusUsername,
radiusPassword: this.radiusPassword,
grpcUrl: this.grpcUrl,
grpcProtobuf: this.grpcProtobuf,
grpcMethod: this.grpcMethod,
grpcServiceName: this.grpcServiceName,
grpcEnableTls: this.getGrpcEnableTls(),
radiusCalledStationId: this.radiusCalledStationId,
radiusCallingStationId: this.radiusCallingStationId,
radiusSecret: this.radiusSecret,
};
if (includeSensitiveData) {
@@ -117,12 +113,23 @@ class Monitor extends BeanModel {
...data,
headers: this.headers,
body: this.body,
grpcBody: this.grpcBody,
grpcMetadata: this.grpcMetadata,
basic_auth_user: this.basic_auth_user,
basic_auth_pass: this.basic_auth_pass,
pushToken: this.pushToken,
databaseConnectionString: this.databaseConnectionString,
radiusUsername: this.radiusUsername,
radiusPassword: this.radiusPassword,
radiusSecret: this.radiusSecret,
mqttUsername: this.mqttUsername,
mqttPassword: this.mqttPassword,
authWorkstation: this.authWorkstation,
authDomain: this.authDomain,
};
}
data.includeSensitiveData = includeSensitiveData;
return data;
}
@@ -167,6 +174,14 @@ class Monitor extends BeanModel {
return Boolean(this.upsideDown);
}
/**
* Parse to boolean
* @returns {boolean}
*/
getGrpcEnableTls() {
return Boolean(this.grpcEnableTls);
}
/**
* Get accepted status codes
* @returns {Object}
@@ -252,17 +267,22 @@ class Monitor extends BeanModel {
log.debug("monitor", `[${this.name}] Prepare Options for axios`);
// Axios Options
const options = {
url: this.url,
method: (this.method || "get").toLowerCase(),
...(this.body ? { data: JSON.parse(this.body) } : {}),
timeout: this.interval * 1000 * 0.8,
headers: {
// Fix #2253
// Read more: https://stackoverflow.com/questions/1759956/curl-error-18-transfer-closed-with-outstanding-read-data-remaining
"Accept-Encoding": "gzip, deflate",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"User-Agent": "Uptime-Kuma/" + version,
...(this.headers ? JSON.parse(this.headers) : {}),
...(basicAuthHeader),
},
decompress: true,
maxRedirects: this.maxredirects,
validateStatus: (status) => {
return checkStatusCode(status, this.getAcceptedStatuscodes());
@@ -527,11 +547,50 @@ class Monitor extends BeanModel {
bean.msg = "";
bean.status = UP;
bean.ping = dayjs().valueOf() - startTime;
} else if (this.type === "grpc-keyword") {
let startTime = dayjs().valueOf();
const options = {
grpcUrl: this.grpcUrl,
grpcProtobufData: this.grpcProtobuf,
grpcServiceName: this.grpcServiceName,
grpcEnableTls: this.grpcEnableTls,
grpcMethod: this.grpcMethod,
grpcBody: this.grpcBody,
keyword: this.keyword
};
const response = await grpcQuery(options);
bean.ping = dayjs().valueOf() - startTime;
log.debug("monitor:", `gRPC response: ${JSON.stringify(response)}`);
let responseData = response.data;
if (responseData.length > 50) {
responseData = response.substring(0, 47) + "...";
}
if (response.code !== 1) {
bean.status = DOWN;
bean.msg = `Error in send gRPC ${response.code} ${response.errorMessage}`;
} else {
if (response.data.toString().includes(this.keyword)) {
bean.status = UP;
bean.msg = `${responseData}, keyword [${this.keyword}] is found`;
} else {
log.debug("monitor:", `GRPC response [${response.data}] + ", but keyword [${this.keyword}] is not in [" + ${response.data} + "]"`);
bean.status = DOWN;
bean.msg = `, but keyword [${this.keyword}] is not in [" + ${responseData} + "]`;
}
}
} else if (this.type === "postgres") {
let startTime = dayjs().valueOf();
await postgresQuery(this.databaseConnectionString, this.databaseQuery);
bean.msg = "";
bean.status = UP;
bean.ping = dayjs().valueOf() - startTime;
} else if (this.type === "mysql") {
let startTime = dayjs().valueOf();
await mysqlQuery(this.databaseConnectionString, this.databaseQuery);
bean.msg = "";
bean.status = UP;
bean.ping = dayjs().valueOf() - startTime;

View File

@@ -38,7 +38,7 @@ class StatusPage extends BeanModel {
*/
static async renderHTML(indexHTML, statusPage) {
const $ = cheerio.load(indexHTML);
const description155 = statusPage.description?.substring(0, 155);
const description155 = statusPage.description?.substring(0, 155) ?? "";
$("title").text(statusPage.title);
$("meta[name=description]").attr("content", description155);

View File

@@ -20,6 +20,11 @@ class Ntfy extends NotificationProvider {
"priority": notification.ntfyPriority || 4,
"title": "Uptime-Kuma",
};
if (notification.ntfyIcon) {
data.icon = notification.ntfyIcon;
}
await axios.post(`${notification.ntfyserverurl}`, data, { headers: headers });
return okMsg;

View File

@@ -19,26 +19,26 @@ class Pushbullet extends NotificationProvider {
}
};
if (heartbeatJSON == null) {
let testdata = {
let data = {
"type": "note",
"title": "Uptime Kuma Alert",
"body": "Testing Successful.",
"body": msg,
};
await axios.post(pushbulletUrl, testdata, config);
await axios.post(pushbulletUrl, data, config);
} else if (heartbeatJSON["status"] === DOWN) {
let downdata = {
let downData = {
"type": "note",
"title": "UptimeKuma Alert: " + monitorJSON["name"],
"body": "[🔴 Down] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
};
await axios.post(pushbulletUrl, downdata, config);
await axios.post(pushbulletUrl, downData, config);
} else if (heartbeatJSON["status"] === UP) {
let updata = {
let upData = {
"type": "note",
"title": "UptimeKuma Alert: " + monitorJSON["name"],
"body": "[✅ Up] " + heartbeatJSON["msg"] + "\nTime (UTC): " + heartbeatJSON["time"],
};
await axios.post(pushbulletUrl, updata, config);
await axios.post(pushbulletUrl, upData, config);
}
return okMsg;
} catch (error) {

View File

@@ -0,0 +1,71 @@
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
class SMSEagle extends NotificationProvider {
name = "SMSEagle";
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully.";
try {
let config = {
headers: {
"Content-Type": "application/json",
}
};
let postData;
let sendMethod;
let recipientType;
let encoding = (notification.smseagleEncoding) ? "1" : "0";
let priority = (notification.smseaglePriority) ? notification.smseaglePriority : "0";
if (notification.smseagleRecipientType === "smseagle-contact") {
recipientType = "contactname";
sendMethod = "sms.send_tocontact";
}
if (notification.smseagleRecipientType === "smseagle-group") {
recipientType = "groupname";
sendMethod = "sms.send_togroup";
}
if (notification.smseagleRecipientType === "smseagle-to") {
recipientType = "to";
sendMethod = "sms.send_sms";
}
let params = {
access_token: notification.smseagleToken,
[recipientType]: notification.smseagleRecipient,
message: msg,
responsetype: "extended",
unicode: encoding,
highpriority: priority
};
postData = {
method: sendMethod,
params: params
};
let resp = await axios.post(notification.smseagleUrl + "/jsonrpc/sms", postData, config);
if ((JSON.stringify(resp.data)).indexOf("message_id") === -1) {
let error = "";
if (resp.data.result && resp.data.result.error_text) {
error = `SMSEagle API returned error: ${JSON.stringify(resp.data.result.error_text)}`;
} else {
error = "SMSEagle API returned an unexpected response";
}
throw new Error(error);
}
return okMsg;
} catch (error) {
this.throwGeneralAxiosError(error);
}
}
}
module.exports = SMSEagle;

View File

@@ -16,20 +16,29 @@ class Webhook extends NotificationProvider {
msg,
};
let finalData;
let config = {};
let config = {
headers: {}
};
if (notification.webhookContentType === "form-data") {
finalData = new FormData();
finalData.append("data", JSON.stringify(data));
config = {
headers: finalData.getHeaders(),
};
config.headers = finalData.getHeaders();
} else {
finalData = data;
}
if (notification.webhookAdditionalHeaders) {
try {
config.headers = {
...config.headers,
...JSON.parse(notification.webhookAdditionalHeaders)
};
} catch (err) {
throw "Additional Headers is not a valid JSON";
}
}
await axios.post(notification.webhookURL, finalData, config);
return okMsg;

View File

@@ -32,6 +32,7 @@ const RocketChat = require("./notification-providers/rocket-chat");
const SerwerSMS = require("./notification-providers/serwersms");
const Signal = require("./notification-providers/signal");
const Slack = require("./notification-providers/slack");
const SMSEagle = require("./notification-providers/smseagle");
const SMTP = require("./notification-providers/smtp");
const Squadcast = require("./notification-providers/squadcast");
const Stackfield = require("./notification-providers/stackfield");
@@ -89,6 +90,7 @@ class Notification {
new Signal(),
new SMSManager(),
new Slack(),
new SMSEagle(),
new SMTP(),
new Squadcast(),
new Stackfield(),

View File

@@ -7,7 +7,7 @@ const { UptimeKumaServer } = require("./uptime-kuma-server");
class Proxy {
static SUPPORTED_PROXY_PROTOCOLS = [ "http", "https", "socks", "socks5", "socks4" ];
static SUPPORTED_PROXY_PROTOCOLS = [ "http", "https", "socks", "socks5", "socks5h", "socks4" ];
/**
* Saves and updates given proxy entity
@@ -126,6 +126,7 @@ class Proxy {
break;
case "socks":
case "socks5":
case "socks5h":
case "socks4":
agent = new SocksProxyAgent({
...httpAgentOptions,

View File

@@ -203,6 +203,7 @@ let needSetup = false;
if (isDev) {
app.post("/test-webhook", async (request, response) => {
log.debug("test", request.headers);
log.debug("test", request.body);
response.send("OK");
});
@@ -706,6 +707,12 @@ let needSetup = false;
bean.authMethod = monitor.authMethod;
bean.authWorkstation = monitor.authWorkstation;
bean.authDomain = monitor.authDomain;
bean.grpcUrl = monitor.grpcUrl;
bean.grpcProtobuf = monitor.grpcProtobuf;
bean.grpcMethod = monitor.grpcMethod;
bean.grpcBody = monitor.grpcBody;
bean.grpcMetadata = monitor.grpcMetadata;
bean.grpcEnableTls = monitor.grpcEnableTls;
bean.radiusUsername = monitor.radiusUsername;
bean.radiusPassword = monitor.radiusPassword;
bean.radiusCalledStationId = monitor.radiusCalledStationId;

View File

@@ -13,8 +13,11 @@ const { badgeConstants } = require("./config");
const mssql = require("mssql");
const { Client } = require("pg");
const postgresConParse = require("pg-connection-string").parse;
const mysql = require("mysql2");
const { NtlmClient } = require("axios-ntlm");
const { Settings } = require("./settings");
const grpc = require("@grpc/grpc-js");
const protojs = require("protobufjs");
const radiusClient = require("node-radius-client");
const {
dictionaries: {
@@ -292,6 +295,28 @@ exports.postgresQuery = function (connectionString, query) {
});
};
/**
* Run a query on MySQL/MariaDB
* @param {string} connectionString The database connection string
* @param {string} query The query to validate the database with
* @returns {Promise<(string[]|Object[]|Object)>}
*/
exports.mysqlQuery = function (connectionString, query) {
return new Promise((resolve, reject) => {
const connection = mysql.createConnection(connectionString);
connection.promise().query(query)
.then(res => {
resolve(res);
})
.catch(err => {
reject(err);
})
.finally(() => {
connection.end();
});
});
};
/**
* Query radius server
* @param {string} hostname Hostname of radius server
@@ -720,3 +745,51 @@ module.exports.timeObjectToUTC = (obj, timezone = undefined) => {
module.exports.timeObjectToLocal = (obj, timezone = undefined) => {
return timeObjectConvertTimezone(obj, timezone, false);
};
/**
* Create gRPC client stib
* @param {Object} options from gRPC client
*/
module.exports.grpcQuery = async (options) => {
const { grpcUrl, grpcProtobufData, grpcServiceName, grpcEnableTls, grpcMethod, grpcBody } = options;
const protocObject = protojs.parse(grpcProtobufData);
const protoServiceObject = protocObject.root.lookupService(grpcServiceName);
const Client = grpc.makeGenericClientConstructor({});
const credentials = grpcEnableTls ? grpc.credentials.createSsl() : grpc.credentials.createInsecure();
const client = new Client(
grpcUrl,
credentials
);
const grpcService = protoServiceObject.create(function (method, requestData, cb) {
const fullServiceName = method.fullName;
const serviceFQDN = fullServiceName.split(".");
const serviceMethod = serviceFQDN.pop();
const serviceMethodClientImpl = `/${serviceFQDN.slice(1).join(".")}/${serviceMethod}`;
log.debug("monitor", `gRPC method ${serviceMethodClientImpl}`);
client.makeUnaryRequest(
serviceMethodClientImpl,
arg => arg,
arg => arg,
requestData,
cb);
}, false, false);
return new Promise((resolve, _) => {
return grpcService[`${grpcMethod}`](JSON.parse(grpcBody), function (err, response) {
const responseData = JSON.stringify(response);
if (err) {
return resolve({
code: err.code,
errorMessage: err.details,
data: ""
});
} else {
log.debug("monitor:", `gRPC response: ${response}`);
return resolve({
code: 1,
errorMessage: "",
data: responseData
});
}
});
});
};

View File

@@ -3,8 +3,6 @@
</template>
<script>
import dayjs from "dayjs";
export default {
props: {
/** Value of date time */

View File

@@ -206,6 +206,16 @@ export default {
.search-icon {
padding: 10px;
color: #c0c0c0;
// Clear filter button (X)
svg[data-icon="times"] {
cursor: pointer;
transition: all ease-in-out 0.1s;
&:hover {
color: white;
}
}
}
.search-input {

View File

@@ -17,6 +17,7 @@
<option value="http">HTTP</option>
<option value="socks">SOCKS</option>
<option value="socks5">SOCKS v5</option>
<option value="socks5h">SOCKS v5 (+DNS)</option>
<option value="socks4">SOCKS v4</option>
</select>
</div>

View File

@@ -27,6 +27,10 @@
<HiddenInput id="ntfy-password" v-model="$parent.notification.ntfypassword" autocomplete="new-password"></HiddenInput>
</div>
</div>
<div class="mb-3">
<label for="ntfy-icon" class="form-label">{{ $t("IconUrl") }}</label>
<input id="ntfy-icon" v-model="$parent.notification.ntfyIcon" type="text" class="form-control">
</div>
</template>
<script>

View File

@@ -0,0 +1,40 @@
<template>
<div class="mb-3">
<label for="smseagle-url" class="form-label">{{ $t("smseagleUrl") }}</label>
<input id="smseagle-url" v-model="$parent.notification.smseagleUrl" type="text" minlength="7" class="form-control" placeholder="http://127.0.0.1" required>
</div>
<div class="mb-3">
<label for="smseagle-token" class="form-label">{{ $t("smseagleToken") }}</label>
<HiddenInput id="smseagle-token" v-model="$parent.notification.smseagleToken" :required="true"></HiddenInput>
</div>
<div class="mb-3">
<label for="smseagle-recipient-type" class="form-label">{{ $t("smseagleRecipientType") }}</label>
<select id="smseagle-recipient-type" v-model="$parent.notification.smseagleRecipientType" class="form-select">
<option value="smseagle-to" selected>{{ $t("smseagleTo") }}</option>
<option value="smseagle-group">{{ $t("smseagleGroup") }}</option>
<option value="smseagle-contact">{{ $t("smseagleContact") }}</option>
</select>
</div>
<div class="mb-3">
<label for="smseagle-recipient" class="form-label">{{ $t("smseagleRecipient") }}</label>
<input id="smseagle-recipient" v-model="$parent.notification.smseagleRecipient" type="text" class="form-control" required>
</div>
<div class="mb-3">
<label for="smseagle-priority" class="form-label">{{ $t("smseaglePriority") }}</label>
<input id="smseagle-priority" v-model="$parent.notification.smseaglePriority" type="number" class="form-control" min="0" max="9" step="1" placeholder="0">
</div>
<div class="mb-3 form-check form-switch">
<label for="smseagle-encoding" class="form-label">{{ $t("smseagleEncoding") }}</label>
<input id="smseagle-encoding" v-model="$parent.notification.smseagleEncoding" type="checkbox" class="form-check-input">
</div>
</template>
<script>
import HiddenInput from "../HiddenInput.vue";
export default {
components: {
HiddenInput,
},
};
</script>

View File

@@ -1,22 +1,32 @@
<template>
<div class="mb-3">
<label for="webhook-url" class="form-label">{{ $t("Post URL") }}</label>
<input id="webhook-url" v-model="$parent.notification.webhookURL" type="url" pattern="https?://.+" class="form-control" required>
<input
id="webhook-url"
v-model="$parent.notification.webhookURL"
type="url"
pattern="https?://.+"
class="form-control"
required
/>
</div>
<div class="mb-3">
<label for="webhook-content-type" class="form-label">{{ $t("Content Type") }}</label>
<select id="webhook-content-type" v-model="$parent.notification.webhookContentType" class="form-select" required>
<option value="json">
application/json
</option>
<option value="form-data">
multipart/form-data
</option>
<label for="webhook-content-type" class="form-label">{{
$t("Content Type")
}}</label>
<select
id="webhook-content-type"
v-model="$parent.notification.webhookContentType"
class="form-select"
required
>
<option value="json">application/json</option>
<option value="form-data">multipart/form-data</option>
</select>
<div class="form-text">
<p>{{ $t("webhookJsonDesc", ["\"application/json\""]) }}</p>
<p>{{ $t("webhookJsonDesc", ['"application/json"']) }}</p>
<i18n-t tag="p" keypath="webhookFormDataDesc">
<template #multipart>"multipart/form-data"</template>
<template #decodeFunction>
@@ -25,4 +35,44 @@
</i18n-t>
</div>
</div>
<div class="mb-3">
<i18n-t
tag="label"
class="form-label"
for="additionalHeaders"
keypath="webhookAdditionalHeadersTitle"
>
</i18n-t>
<textarea
id="additionalHeaders"
v-model="$parent.notification.webhookAdditionalHeaders"
class="form-control"
:placeholder="headersPlaceholder"
></textarea>
<div class="form-text">
<i18n-t tag="p" keypath="webhookAdditionalHeadersDesc"> </i18n-t>
</div>
</div>
</template>
<script>
export default {
computed: {
headersPlaceholder() {
return this.$t("Example:", [
`
{
"HeaderName": "HeaderValue"
}`,
]);
},
},
};
</script>
<style lang="scss" scoped>
textarea {
min-height: 200px;
}
</style>

View File

@@ -33,6 +33,7 @@ import Signal from "./Signal.vue";
import SMSManager from "./SMSManager.vue";
import Slack from "./Slack.vue";
import Squadcast from "./Squadcast.vue";
import SMSEagle from "./SMSEagle.vue";
import Stackfield from "./Stackfield.vue";
import STMP from "./SMTP.vue";
import Teams from "./Teams.vue";
@@ -83,6 +84,7 @@ const NotificationFormList = {
"SMSManager": SMSManager,
"slack": Slack,
"squadcast": Squadcast,
"SMSEagle": SMSEagle,
"smtp": STMP,
"stackfield": Stackfield,
"teams": Teams,

View File

@@ -1,13 +1,14 @@
# How to translate
1. Fork this repo.
2. Run `npm run update-language-files --language=<code>` where `<code>`
2. Run `npm install`
3. Run `npm run update-language-files --language=<code>` where `<code>`
is a valid ISO language code:
http://www.lingoes.net/en/translator/langcode.htm. You can also use
this command to check if there are new strings to
translate for your language.
3. Your language file should be filled in. You can translate now.
4. Add it into `languageList` constant.
5. Make a [pull request](https://github.com/louislam/uptime-kuma/pulls) when you have done.
4. Your language file should be filled in. You can translate now.
5. Add it into `languageList` constant.
6. Make a [pull request](https://github.com/louislam/uptime-kuma/pulls) when you have done.
If you do not have programming skills, let me know in [the issues section](https://github.com/louislam/uptime-kuma/issues). I will assist you. 😏

View File

@@ -582,4 +582,66 @@ export default {
goAlert: "GoAlert",
backupOutdatedWarning: "Отпаднало: Тъй като са добавени много функции, тази опция за архивиране не е достатъчно поддържана и не може да генерира или възстанови пълен архив.",
backupRecommend: "Моля, архивирайте дяла или папката (./data/) директно вместо това.",
Maintenance: "Поддръжка",
statusMaintenance: "Поддръжка",
"Schedule maintenance": "Планиране на поддръжка",
"Affected Monitors": "Засегнати монитори",
"Pick Affected Monitors...": "Изберете засегнати монитори...",
"Start of maintenance": "Стартирай поддръжка",
"All Status Pages": "Всички статус страници",
"Select status pages...": "Изберете статус страници...",
recurringIntervalMessage: "Изпълнявай ежедневно | Изпълнявай всеки {0} дни",
affectedMonitorsDescription: "Изберете монитори, засегнати от текущата поддръжка",
affectedStatusPages: "Покажи това съобщение за поддръжка на избрани статус страници",
atLeastOneMonitor: "Изберете поне един засегнат монитор",
deleteMaintenanceMsg: "Сигурни ли сте, че желаете да изтриете тази поддръжка?",
Optional: "По желание",
squadcast: "Squadcast",
SendKey: "SendKey",
"SMSManager API Docs": "SMSManager API Документация ",
"Gateway Type": "Тип на шлюза",
SMSManager: "SMSManager",
"You can divide numbers with": "Може да разделяте числата с",
or: "или",
recurringInterval: "Интервал",
Recurring: "Повтаряне",
strategyManual: "Активен/Неактивен ръчно",
warningTimezone: "Използва се часовата зона на сървъра",
weekdayShortMon: "Пон",
weekdayShortTue: "Вт",
weekdayShortWed: "Ср",
weekdayShortThu: "Чет",
weekdayShortFri: "Пет",
weekdayShortSat: "Съб",
weekdayShortSun: "Нед",
dayOfWeek: "Ден",
dayOfMonth: "Дата",
lastDay: "Последен ден",
lastDay1: "Последен ден от месеца",
lastDay2: "2-ри последен ден на месеца",
lastDay3: "3-ти последен ден на месеца",
lastDay4: "4-ти последен ден на месеца",
"No Maintenance": "Няма поддръжка",
pauseMaintenanceMsg: "Сигурни ли сте, че желаете да направите пауза?",
"maintenanceStatus-under-maintenance": "В режим поддръжка",
"maintenanceStatus-inactive": "Неактивна",
"maintenanceStatus-scheduled": "Планирана",
"maintenanceStatus-ended": "Приключена",
"maintenanceStatus-unknown": "Неизвестна",
"Display Timezone": "Покажи часова зона",
"Server Timezone": "Часова зона на сървъра",
statusPageMaintenanceEndDate: "Край",
enableGRPCTls: "Разреши изпращане на gRPC заявка с TLS връзка",
grpcMethodDescription: "Името на метода се форматира в \"cammelCase\", например sayHello, check, и т.н.",
smseagle: "SMSEagle",
smseagleTo: "Тел. номер(а)",
smseagleGroup: "Име на група/и от тел. указател",
smseagleContact: "Име(на) от тел. указател",
smseagleRecipientType: "Получател тип",
smseagleRecipient: "Получател(и) (при повече от един разделете със запетая)",
smseagleToken: "API токен за достъп",
smseagleUrl: "Вашият SMSEagle URL на устройството",
smseagleEncoding: "Изпрати като Unicode",
smseaglePriority: "Приоритет на съобщението (0-9, по подразбиране = 0)",
IconUrl: "Икона URL адрес",
};

View File

@@ -576,4 +576,59 @@ export default {
"Then choose an action, for example switch the scene to where an RGB light is red.": "Dann eine Aktion wählen, zum Beispiel eine Scene wählen in der ein RGB Licht rot ist.",
"Frontend Version": "Frontend Version",
"Frontend Version do not match backend version!": "Die Frontend Version stimmt nicht mit der backend version überein!",
Maintenance: "Wartung",
statusMaintenance: "Wartung",
"Schedule maintenance": "Geplante Wartung",
"Affected Monitors": "Betroffene Monitore",
"Pick Affected Monitors...": "Wähle betroffene Monitore...",
"Start of maintenance": "Beginn der Wartung",
"All Status Pages": "Alle Status Seiten",
"Select status pages...": "Wähle Status Seiten...",
recurringIntervalMessage: "einmal pro Tag ausgeführt | Wird alle {0} Tage ausgführt",
affectedMonitorsDescription: "Wähle alle Monitore die von der Wartung betroffen sind",
affectedStatusPages: "Zeige diese Nachricht auf ausgewählten Status Seiten",
atLeastOneMonitor: "Wähle mindestens einen Monitor",
deleteMaintenanceMsg: "Möchtest du diese Wartung löschen?",
"Base URL": "Basis URL",
goAlertInfo: "GoAlert ist eine Open-Source Applikation für Rufbereitschaft Planung, automaitsche Esklaltion und Benachrichtigung (z.B. SMS oder Telefonanrufe). Beauftragen Sie automatisch die richtige Person, auf die richtige Art und Weise und zum richtigen Zeitpunkt! {0}",
goAlertIntegrationKeyInfo: "Bekomm einenen gernerischen API Schlüssel in folgeden Format \"aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\". Normalerweise der Wert des Token aus der URL.",
goAlert: "GoAlert",
backupOutdatedWarning: "Veraltet: Eine menge Neuerungen sind eingeflossen und diese Funktion wurde etwas vernachlässigt worden. Es kann kein vollständiges Backup erstellt oder eingspielt werden.",
backupRecommend: "Bitte Backup das Volume oder den Ordner (./ data /) selbst.",
Optional: "Optional",
squadcast: "Squadcast",
SendKey: "SendKey",
"SMSManager API Docs": "SMSManager API Dokumente",
"Gateway Type": "Gateway Type",
SMSManager: "SMSManager",
"You can divide numbers with": "Du kannst Zahlen teilen mit",
or: "oder",
recurringInterval: "Intervall",
Recurring: "Wiederkehrend",
strategyManual: "Active/Inactive Manually",
warningTimezone: "Es wird die Zeitzone des Servers genutzt",
weekdayShortMon: "Mo",
weekdayShortTue: "Di",
weekdayShortWed: "Mi",
weekdayShortThu: "Do",
weekdayShortFri: "Fr",
weekdayShortSat: "Sa",
weekdayShortSun: "So",
dayOfWeek: "Tag der Woche",
dayOfMonth: "Tag im Monat",
lastDay: "Letzter Tag",
lastDay1: "Letzter Tag im Monat",
lastDay2: "Vorletzer Tag im Monat",
lastDay3: "3. letzter Tag im Monat",
lastDay4: "4. letzter Tag im Monat",
"No Maintenance": "Keine Wartung",
pauseMaintenanceMsg: "Möchtest du wirklich pausieren?",
"maintenanceStatus-under-maintenance": "Unter Wartung",
"maintenanceStatus-inactive": "Inaktiv",
"maintenanceStatus-scheduled": "Geplant",
"maintenanceStatus-ended": "Ende",
"maintenanceStatus-unknown": "Unbekannt",
"Display Timezone": "Zeitzone anzeigen",
"Server Timezone": "Server Zeitzone",
statusPageMaintenanceEndDate: "Ende",
};

View File

@@ -8,6 +8,8 @@ export default {
ignoreTLSError: "Ignore TLS/SSL error for HTTPS websites",
upsideDownModeDescription: "Flip the status upside down. If the service is reachable, it is DOWN.",
maxRedirectDescription: "Maximum number of redirects to follow. Set to 0 to disable redirects.",
enableGRPCTls: "Allow to send gRPC request with TLS connection",
grpcMethodDescription: "Method name is convert to cammelCase format such as sayHello, check, etc.",
acceptedStatusCodesDescription: "Select status codes which are considered as a successful response.",
Maintenance: "Maintenance",
statusMaintenance: "Maintenance",
@@ -219,6 +221,8 @@ export default {
"Content Type": "Content Type",
webhookJsonDesc: "{0} is good for any modern HTTP servers such as Express.js",
webhookFormDataDesc: "{multipart} is good for PHP. The JSON will need to be parsed with {decodeFunction}",
webhookAdditionalHeadersTitle: "Additional Headers",
webhookAdditionalHeadersDesc: "Sets additional headers sent with the webhook.",
smtp: "Email (SMTP)",
secureOptionNone: "None / STARTTLS (25, 587)",
secureOptionTLS: "TLS (465)",
@@ -378,6 +382,16 @@ export default {
serwersmsAPIPassword: "API Password",
serwersmsPhoneNumber: "Phone number",
serwersmsSenderName: "SMS Sender Name (registered via customer portal)",
smseagle: "SMSEagle",
smseagleTo: "Phone number(s)",
smseagleGroup: "Phonebook group name(s)",
smseagleContact: "Phonebook contact name(s)",
smseagleRecipientType: "Recipient type",
smseagleRecipient: "Recipient(s) (multiple must be separated with comma)",
smseagleToken: "API Access token",
smseagleUrl: "Your SMSEagle device URL",
smseagleEncoding: "Send as Unicode",
smseaglePriority: "Message priority (0-9, default = 0)",
stackfield: "Stackfield",
Customize: "Customize",
"Custom Footer": "Custom Footer",
@@ -631,4 +645,5 @@ export default {
"Display Timezone": "Display Timezone",
"Server Timezone": "Server Timezone",
statusPageMaintenanceEndDate: "End",
IconUrl: "Icon URL",
};

View File

@@ -531,4 +531,57 @@ export default {
backupRecommend: "Veuillez sauvegarder le volume ou le dossier de données (./data/) directement à la place.",
Optional: "Optionnel",
squadcast: "Squadcast",
Maintenance: "Maintenance",
statusMaintenance: "Maintenance",
"Schedule maintenance": "Planifier la maintenance",
"Affected Monitors": "Moniteurs concernés",
"Pick Affected Monitors...": "Sélectionnez les moniteurs concernés...",
"Start of maintenance": "Début de la maintenance",
"All Status Pages": "Toutes les pages d'état",
"Select status pages...": "Sélectionnez les pages d'état...",
recurringIntervalMessage: "Exécuter une fois par jour | Exécuter une fois tous les {0} jours",
affectedMonitorsDescription: "Sélectionnez les moniteurs concernés par la maintenance en cours",
affectedStatusPages: "Afficher ce message de maintenance sur les pages d'état sélectionnées",
atLeastOneMonitor: "Sélectionnez au moins un moniteur concerné",
deleteMaintenanceMsg: "Voulez-vous vraiment supprimer cette maintenance ?",
pushyAPIKey: "Clé API secrète",
pushyToken: "Jeton d'appareil",
"You can divide numbers with": "Vous pouvez diviser des nombres avec",
or: "ou",
recurringInterval: "Intervalle",
Recurring: "Récurrent",
"Single Maintenance Window": "Fenêtre de maintenance unique",
"Maintenance Time Window of a Day": "Fenêtre de temps de maintenance",
"Effective Date Range": "Plage de dates d'effet",
strategyManual: "activer/desactiver manuellement",
warningTimezone: "Il utilise le fuseau horaire du serveur",
weekdayShortMon: "Lun",
weekdayShortTue: "Mar",
weekdayShortWed: "Mer",
weekdayShortThu: "Jeu",
weekdayShortFri: "Ven",
weekdayShortSat: "Sam",
weekdayShortSun: "Dim",
dayOfWeek: "Jour de la semaine",
dayOfMonth: "Jour du mois",
lastDay: "Dernier jour",
lastDay1: "Dernier jour du mois",
lastDay2: "2ème dernier jour du mois",
lastDay3: "3ème dernier jour du mois",
lastDay4: "4ème dernier jour du mois",
"No Maintenance": "Aucune Maintenance",
pauseMaintenanceMsg: "Voulez-vous vraiment mettre en pause ?",
"maintenanceStatus-under-maintenance": "En maintenance",
"maintenanceStatus-inactive": "Inactif",
"maintenanceStatus-scheduled": "Programmé",
"maintenanceStatus-ended": "Terminé",
"maintenanceStatus-unknown": "Inconnue",
"Display Timezone": "Afficher le fuseau horaire",
"Server Timezone": "Fuseau horaire du serveur",
"Date and Time": "Date et heure",
"DateTime Range": "Plage de dates et d'heures",
Strategy: "Stratégie",
statusPageMaintenanceEndDate: "Fin",
"Free Mobile User Identifier": "Identifiant d'utilisateur Free Mobile",
"Free Mobile API Key": "Clé API Free Mobile",
};

View File

@@ -27,8 +27,8 @@ export default {
confirmImportMsg: "Apakah Anda yakin untuk mengimpor cadangan? Pastikan Anda telah memilih opsi impor yang tepat.",
twoFAVerifyLabel: "Silakan ketik token Anda untuk memverifikasi bahwa 2FA berfungsi",
tokenValidSettingsMsg: "Token benar! Anda sekarang dapat menyimpan pengaturan 2FA.",
confirmEnableTwoFAMsg: "Apakah anda yakin ingin mengaktifkan 2FA?",
confirmDisableTwoFAMsg: "Apakah anda yakin ingin menonaktifkan 2FA?",
confirmEnableTwoFAMsg: "Apakah Anda yakin ingin mengaktifkan 2FA?",
confirmDisableTwoFAMsg: "Apakah Anda yakin ingin menonaktifkan 2FA?",
Settings: "Pengaturan",
Dashboard: "Dasbor",
"New Update": "Pembaruan Baru",
@@ -126,7 +126,7 @@ export default {
"Resolver Server": "Resolver Server",
"Resource Record Type": "Resource Record Type",
"Last Result": "Hasil Terakhir",
"Create your admin account": "Buat akun admin anda",
"Create your admin account": "Buat akun admin Anda",
"Repeat Password": "Ulangi Sandi",
"Import Backup": "Impor Cadangan",
"Export Backup": "Ekspor Cadangan",
@@ -568,7 +568,7 @@ export default {
"Long-Lived Access Token can be created by clicking on your profile name (bottom left) and scrolling to the bottom then click Create Token. ": "Token Akses Berumur Panjang dapat dibuat dengan mengklik nama profil Anda (kiri bawah) dan menggulir ke bawah lalu klik Buat Token. ",
"Notification Service": "Layanan Pemberitahuan",
"default: notify all devices": "bawaan: notifikasi seluruh perangkat",
"A listof Notification Services can be found in Home Assistant under \"Developer Tools > Services\" search for \"notification\" to find your device/phone name.": "Daftar Layanan Pemberitahuan dapat ditemukan di Home Assistant pada \"Developer Tools > Services\" cari \"notification\" lalu cari nama perangkat Anda.",
"A list of Notification Services can be found in Home Assistant under \"Developer Tools > Services\" search for \"notification\" to find your device/phone name.": "Daftar Layanan Pemberitahuan dapat ditemukan di Home Assistant pada \"Developer Tools > Services\" cari \"notification\" lalu cari nama perangkat Anda.",
"Automations can optionally be triggered in Home Assistant:": "Otomatisasi dapat dipicu secara opsional di Home Assistant:",
"Trigger type:": "Tipe Trigger/Pemicu:",
"Event type:": "Tipe event:",

View File

@@ -125,7 +125,7 @@ export default {
Export: "Eksportuj",
Import: "Importuj",
respTime: "Czas odp. (ms)",
notAvailableShort: "N/A",
notAvailableShort: "N/D",
"Default enabled": "Włącz domyślnie",
"Apply on all existing monitors": "Zastosuj do istniejących monitorów",
Create: "Stwórz",
@@ -181,7 +181,7 @@ export default {
"Edit Status Page": "Edytuj stronę statusu",
"Go to Dashboard": "Idź do panelu",
"Status Page": "Strona statusu",
"Status Pages": "Strona statusu",
"Status Pages": "Strony statusów",
defaultNotificationName: "Moje powiadomienie {notification} ({number})",
here: "tutaj",
Required: "Wymagane",
@@ -359,6 +359,16 @@ export default {
serwersmsAPIPassword: "Hasło API",
serwersmsPhoneNumber: "Numer telefonu",
serwersmsSenderName: "Nazwa nadawcy (zatwierdzona w panelu klienta)",
smseagle: "SMSEagle",
smseagleTo: "Numer/y telefonu",
smseagleGroup: "Grupa/y z Książki adresowej",
smseagleContact: "Kontakt/y z Książki adresowej",
smseagleRecipientType: "Typ odbiorcy",
smseagleRecipient: "Odbiorca/y (wiele musi być oddzielone przecinkami)",
smseagleToken: "Klucz dostępu API",
smseagleUrl: "URL Twojego urządzenia SMSEagle",
smseagleEncoding: "Wyślij jako Unicode",
smseaglePriority: "Priorytet wiadomości (0-9, domyślnie = 0)",
stackfield: "Stackfield",
Customize: "Dostosuj",
"Custom Footer": "Niestandardowa stopka",
@@ -435,7 +445,7 @@ export default {
"HTTP Basic Auth": "Podstawowa autoryzacja HTTP",
"New Status Page": "Nowa strona statusu",
"Page Not Found": "Strona nie została znaleziona",
"Reverse Proxy": "Odwrotne Proxy",
"Reverse Proxy": "Zwrotny serwer proxy",
Backup: "Backup",
About: "O skrypcie",
wayToGetCloudflaredURL: "(Pobierz cloudflared z {0})",
@@ -447,7 +457,7 @@ export default {
"For example: nginx, Apache and Traefik.": "Na przykład: nginx, Apache i Traefik.",
"Please read": "Przeczytaj proszę",
"Subject:": "Temat:",
"Valid To:": "Ważdny do:",
"Valid To:": "Ważny do:",
"Days Remaining:": "Pozostało dni:",
"Issuer:": "Wydawca:",
"Fingerprint:": "Odcisk palca:",
@@ -467,4 +477,168 @@ export default {
"Domain Names": "Domeny",
signedInDisp: "Zalogowany jako {0}",
signedInDispDisabled: "Autoryzacja wyłączona.",
resendEveryXTimes: "Wysyłaj ponownie co {0} razy",
resendDisabled: "Ponowne wysyłanie jest wyłączone",
Maintenance: "Konserwacja",
statusMaintenance: "Konserwacja",
"Schedule maintenance": "Planowanie konserwacji",
"Affected Monitors": "Monitory dotknięte problemem",
"Pick Affected Monitors...": "Wybierz monitory, których to dotyczy...",
"Start of maintenance": "Rozpoczęcie konserwacji",
"All Status Pages": "Wszystkie strony statusu",
"Select status pages...": "Wybierz strony statusu...",
recurringIntervalMessage: "Uruchom raz dziennie | Uruchom raz na {0} dni",
affectedMonitorsDescription: "Wybierz monitory, których dotyczy bieżąca konserwacja",
affectedStatusPages: "Pokaż ten komunikat o konserwacji na wybranych stronach statusu",
atLeastOneMonitor: "Wybierz co najmniej jeden monitor, którego dotyczy problem",
deleteMaintenanceMsg: "Czy na pewno chcesz usunąć tę konserwację?",
dnsPortDescription: "Port serwera DNS. Domyślnie 53. Możesz zmienić port w dowolnym momencie.",
"Resend Notification if Down X times consequently": "Wyślij ponownie powiadomienie, jeśli nie działa X razy pod rząd",
error: "błąd",
critical: "krytyczny",
wayToGetPagerDutyKey: "Możesz to uzyskać, przechodząc do Service -> Service Directory -> (wybierz usługę) -> Integrations -> Add integration. Tutaj możesz wyszukać \"Events API V2\". Więcej informacji {0}",
"Integration Key": "Klucz integracji",
"Integration URL": "Adres URL integracji",
"Auto resolve or acknowledged": "Automatycznie rozwiązany lub potwierdzony",
"do nothing": "nie rób nic",
"auto acknowledged": "auto potwierdzony",
"auto resolve": "automatycznie rozwiązany",
"Bark Group": "Grupa Bark",
"Bark Sound": "Dźwięk Bark",
"HTTP Headers": "Nagłówki HTTP",
"Trust Proxy": "Ufaj proxy",
HomeAssistant: "Home Assistant",
RadiusSecret: "Sekretny klucz Radius",
RadiusSecretDescription: "Współdzielony sekretny klucz pomiędzy klientem a serwerem",
RadiusCalledStationId: "Id stacji wywoływanej",
RadiusCalledStationIdDescription: "Identyfikator wywoływanego urządzenia",
RadiusCallingStationId: "Id stacji wywoławczej",
RadiusCallingStationIdDescription: "Identyfikator urządzenia wywołującego",
"Certificate Expiry Notification": "Powiadomienie o wygaśnięciu certyfikatu",
"API Username": "Nazwa użytkownika API",
"API Key": "Klucz API",
"Recipient Number": "Numer odbiorcy",
"From Name/Number": "Od nazwa/numer",
"Leave blank to use a shared sender number.": "Pozostaw puste, aby użyć wspólnego numeru nadawcy.",
"Octopush API Version": "Wersja API Octopush",
"Legacy Octopush-DM": "Starsze Octopush-DM",
endpoint: "punkt końcowy",
octopushAPIKey: "\"API key\" z poświadczeń HTTP API w panelu sterowania",
octopushLogin: "\"Login\" z poświadczeń HTTP API w panelu sterowania",
promosmsLogin: "Nazwa logowania API",
promosmsPassword: "Hasło API",
"pushoversounds pushover": "Pushover (domyślny)",
"pushoversounds bike": "Bike",
"pushoversounds bugle": "Bugle",
"pushoversounds cashregister": "Cash Register",
"pushoversounds classical": "Classical",
"pushoversounds cosmic": "Cosmic",
"pushoversounds falling": "Falling",
"pushoversounds gamelan": "Gamelan",
"pushoversounds incoming": "Incoming",
"pushoversounds intermission": "Intermission",
"pushoversounds magic": "Magic",
"pushoversounds mechanical": "Mechanical",
"pushoversounds pianobar": "Piano Bar",
"pushoversounds siren": "Siren",
"pushoversounds spacealarm": "Space Alarm",
"pushoversounds tugboat": "Tug Boat",
"pushoversounds alien": "Alien Alarm (długie)",
"pushoversounds climb": "Climb (długie)",
"pushoversounds persistent": "Persistent (długie)",
"pushoversounds echo": "Pushover Echo (długie)",
"pushoversounds updown": "Up Down (długie)",
"pushoversounds vibrate": "Tylko wibracje",
"pushoversounds none": "Brak (cisza)",
pushyAPIKey: "Tajny klucz API",
pushyToken: "Token urządzenia",
"Show update if available": "Pokaż aktualizację, jeśli jest dostępna",
"Also check beta release": "Sprawdź również wydanie beta",
"Using a Reverse Proxy?": "Używasz odwróconego proxy?",
"Check how to config it for WebSocket": "Sprawdź jak go skonfigurować dla WebSocket",
"Steam Game Server": "Serwer gry Steam",
"Most likely causes:": "Najbardziej prawdopodobne przyczyny:",
"The resource is no longer available.": "Zasób nie jest już dostępny.",
"There might be a typing error in the address.": "W adresie może być błąd w pisowni.",
"What you can try:": "Co możesz spróbować:",
"Retype the address.": "Ponownie wpisz adres.",
"Go back to the previous page.": "Wróć do poprzedniej strony.",
"Coming Soon": "Wkrótce",
wayToGetClickSendSMSToken: "Możesz uzyskać nazwę użytkownika API i klucz API z {0}.",
"Connection String": "Ciąg połączenia",
Query: "Zapytanie",
settingsCertificateExpiry: "Wygaśnięcie certyfikatu TLS",
certificationExpiryDescription: "Monitory HTTPS uruchamiają powiadomienia o wygaśnięciu certyfikatu TLS w:",
"Setup Docker Host": "Konfiguracja hosta Docker",
"Connection Type": "Typ połączenia",
"Docker Daemon": "Demon Dockera",
deleteDockerHostMsg: "Czy na pewno chcesz usunąć ten host Dockera dla wszystkich monitorów?",
socket: "Gniazdo",
tcp: "TCP / HTTP",
"Docker Container": "Kontener Dockera",
"Container Name / ID": "Nazwa kontenera / ID",
"Docker Host": "Host Dockera",
"Docker Hosts": "Hosty Dockera",
"ntfy Topic": "Temat ntfy",
Domain: "Domena",
Workstation: "Stacja robocza",
disableCloudflaredNoAuthMsg: "Jesteś w trybie No Auth, hasło nie jest wymagane.",
trustProxyDescription: "Zaufaj nagłówkom 'X-Forwarded-*'. Jeśli chcesz uzyskać poprawne IP klienta, a twój Uptime Kuma jest za Nginx lub Apache, powinieneś to włączyć.",
wayToGetLineNotifyToken: "Możesz uzyskać token dostępu z {0}",
Examples: "Przykłady",
"Home Assistant URL": "URL Home Assistant",
"Long-Lived Access Token": "Długotrwały token dostępu",
"Long-Lived Access Token can be created by clicking on your profile name (bottom left) and scrolling to the bottom then click Create Token. ": "Długotrwały token dostępu można utworzyć klikając na nazwę swojego profilu (na dole po lewej stronie) i przewijając do dołu, a następnie klikając Create Token. ",
"Notification Service": "Usługa powiadamiania",
"default: notify all devices": "domyślnie: powiadamiaj wszystkie urządzenia",
"A list of Notification Services can be found in Home Assistant under \"Developer Tools > Services\" search for \"notification\" to find your device/phone name.": "Listę usług powiadamiania można znaleźć w Home Assistant pod \"Developer Tools > Services\" wyszukaj \"notification\", aby znaleźć nazwę swojego urządzenia/telefonu.",
"Automations can optionally be triggered in Home Assistant:": "Automaty mogą być opcjonalnie uruchamiane w Home Assistant:",
"Trigger type:": "Typ wyzwalacza:",
"Event type:": "Typ zdarzenia:",
"Event data:": "Dane o zdarzeniu:",
"Then choose an action, for example switch the scene to where an RGB light is red.": "Następnie wybierz akcję, na przykład przełącz scenę na taką, w której światło RGB jest czerwone.",
"Frontend Version": "Wersja frontu",
"Frontend Version do not match backend version!": "Wersja frontu nie pasuje do wersji backendu!",
"Base URL": "Bazowy adres URL",
goAlertInfo: "GoAlert to aplikacja open source do planowania, automatycznych eskalacji i powiadomień (jak SMS lub połączenia głosowe). Automatycznie angażuj właściwą osobę, we właściwy sposób i we właściwym czasie! {0}",
goAlertIntegrationKeyInfo: "Pobierz generyczny klucz integracyjny API dla usługi, którego wartość skopiowanego tokena URL jest zwykle w formacie \"aaaaaaaa-bbb-cccc-dddd-eeeeee\".",
goAlert: "GoAlert",
backupOutdatedWarning: "Przestarzałe: ponieważ dodano wiele funkcji i funkcja tworzenia kopii zapasowych nie jest wystarczająco utrzymywana, nie może generować ani przywracać pełnej kopii zapasowej.",
backupRecommend: "Zamiast tego należy wykonać bezpośrednią kopię zapasową woluminu lub folderu danych (./data/).",
Optional: "Opcjonalne",
squadcast: "Squadcast",
SendKey: "SendKey",
"SMSManager API Docs": "Dokumentacja API SMSManager ",
"Gateway Type": "Typ bramy",
SMSManager: "SMSManager",
"You can divide numbers with": "Możesz dzielić liczby przez",
or: "lub",
recurringInterval: "odstęp czasu",
Recurring: "powtarzający się",
strategyManual: "Aktywowany/dezaktywowany ręcznie",
warningTimezone: "Używa strefy czasowej serwera",
weekdayShortMon: "pon",
weekdayShortTue: "wt",
weekdayShortWed: "śr",
weekdayShortThu: "czw",
weekdayShortFri: "pt",
weekdayShortSat: "sob",
weekdayShortSun: "niedz",
dayOfWeek: "Dzień tygodnia",
dayOfMonth: "Dzień miesiąca",
lastDay: "Ostatni dzień",
lastDay1: "Ostatni dzień miesiąca",
lastDay2: "2. ostatni dzień miesiąca",
lastDay3: "3. ostatni dzień miesiąca",
lastDay4: "4. ostatni dzień miesiąca",
"No Maintenance": "Brak konserwacji",
pauseMaintenanceMsg: "Jesteś pewien, że chcesz zatrzymać?",
"maintenanceStatus-under-maintenance": "Podczas konserwacji",
"maintenanceStatus-inactive": "Nieaktywny",
"maintenanceStatus-scheduled": "Zaplanowany",
"maintenanceStatus-ended": "Zakończony",
"maintenanceStatus-unknown": "Nieznany",
"Display Timezone": "Wyświetlana strefa czasowa",
"Server Timezone": "Strefa czasowa serwera",
statusPageMaintenanceEndDate: "Koniec",
};

View File

@@ -2,7 +2,7 @@ export default {
languageName: "简体中文",
checkEverySecond: "检测频率 {0} 秒",
retryCheckEverySecond: "重试间隔 {0} 秒",
retriesDescription: "服务被标记为故障并发送通知之前最大重试次数",
retriesDescription: "服务被标记为故障并发送通知之前最大重试次数",
ignoreTLSError: "忽略 HTTPS 站点的 TLS/SSL 错误",
upsideDownModeDescription: "反转状态监控,如果服务可访问,则认为是故障。",
maxRedirectDescription: "允许的最大重定向次数。设置为 0 禁用重定向。",

View File

@@ -9,11 +9,24 @@ export default {
upsideDownModeDescription: "反轉顯示狀態。若服務可以連線,將顯示離線。",
maxRedirectDescription: "最大重新導向跟隨次數。設為 0 將停用重新導向。",
acceptedStatusCodesDescription: "選擇視為成功回應的狀態碼。",
Maintenance: "維護",
statusMaintenance: "維護",
"Schedule maintenance": "排程維護",
"Affected Monitors": "受影響的監測器",
"Pick Affected Monitors...": "挑選受影響的監測器...",
"Start of maintenance": "維護起始",
"All Status Pages": "所有狀態頁",
"Select status pages...": "選擇狀態頁...",
recurringIntervalMessage: "每日執行 | 每 {0} 天執行",
affectedMonitorsDescription: "選擇受目前維護影響的監測器",
affectedStatusPages: "在已選取的狀態頁中顯示此維護訊息",
atLeastOneMonitor: "至少選擇一個受影響的監測器",
passwordNotMatchMsg: "密碼不相符。",
notificationDescription: "必須將通知指派給監測器才能運作。",
keywordDescription: "HTML 或 JSON 回應的搜尋關鍵字。區分大小寫。",
pauseDashboardHome: "暫停",
deleteMonitorMsg: "您確定要刪除此監測器嗎?",
deleteMaintenanceMsg: "您確定要刪除此維護嗎?",
deleteNotificationMsg: "您確定要為所有監測器刪除此通知嗎?",
dnsPortDescription: "DNS 伺服器連接埠。預設為 53。您可以隨時變更連接埠。",
resolverserverDescription: "Cloudflare 為預設伺服器。您可以隨時更換解析伺服器。",
@@ -305,7 +318,7 @@ export default {
Method: "方法",
Body: "主體",
Headers: "標頭",
PushUrl: "Push URL",
PushUrl: "Push 網址",
HeadersInvalidFormat: "要求標頭不是有效的 JSON",
BodyInvalidFormat: "請求主體不是有效的 JSON",
"Monitor History": "監測器歷史紀錄",
@@ -582,4 +595,40 @@ export default {
goAlert: "GoAlert",
backupOutdatedWarning: "過時:由於新功能的增加,且未妥善維護,故此備份功能無法產生或復原完整備份。",
backupRecommend: "請直接備份磁碟區或 ./data/ 資料夾。",
"Optional": "選填",
squadcast: "Squadcast",
SendKey: "SendKey",
"SMSManager API Docs": "SMSManager API 文件 ",
"Gateway Type": "閘道類型",
SMSManager: "SMSManager",
"You can divide numbers with": "若要除數,您可以使用",
"or": "或是",
recurringInterval: "間隔",
"Recurring": "週期性",
strategyManual: "手動切換使用中/非使用中",
warningTimezone: "正在使用伺服器的時區",
weekdayShortMon: "一",
weekdayShortTue: "二",
weekdayShortWed: "三",
weekdayShortThu: "四",
weekdayShortFri: "五",
weekdayShortSat: "六",
weekdayShortSun: "日",
dayOfWeek: "每周特定一天",
dayOfMonth: "每月特定一天",
lastDay: "最後一天",
lastDay1: "每月的最後一天",
lastDay2: "每月的倒數第二天",
lastDay3: "每月的倒數第三天",
lastDay4: "每月的倒數第四天",
"No Maintenance": "無維護",
pauseMaintenanceMsg: "您確定要暫停嗎?",
"maintenanceStatus-under-maintenance": "維護中",
"maintenanceStatus-inactive": "非使用中",
"maintenanceStatus-scheduled": "已排程",
"maintenanceStatus-ended": "已結束",
"maintenanceStatus-unknown": "未知",
"Display Timezone": "顯示時區",
"Server Timezone": "伺服器時區",
statusPageMaintenanceEndDate: "結束",
};

View File

@@ -58,7 +58,6 @@ export default {
},
created() {
window.addEventListener("resize", this.onResize);
this.initSocketIO();
},

View File

@@ -89,7 +89,7 @@
<label for="strategy" class="form-label">{{ $t("Strategy") }}</label>
<select id="strategy" v-model="maintenance.strategy" class="form-select">
<option value="manual">{{ $t("strategyManual") }}</option>
<option value="single">Single Maintenance Window</option>
<option value="single">{{ $t("Single Maintenance Window") }}</option>
<option value="recurring-interval">{{ $t("Recurring") }} - {{ $t("recurringInterval") }}</option>
<option value="recurring-weekday">{{ $t("Recurring") }} - {{ $t("dayOfWeek") }}</option>
<option value="recurring-day-of-month">{{ $t("Recurring") }} - {{ $t("dayOfMonth") }}</option>
@@ -284,7 +284,7 @@ export default {
},
{
id: "weekday4",
langKey: "weekdayShortTue",
langKey: "weekdayShortThu",
value: 4,
},
{

View File

@@ -24,6 +24,9 @@
<option value="keyword">
HTTP(s) - {{ $t("Keyword") }}
</option>
<option value="grpc-keyword">
gRPC(s) - {{ $t("Keyword") }}
</option>
<option value="dns">
DNS
</option>
@@ -46,11 +49,14 @@
MQTT
</option>
<option value="sqlserver">
SQL Server
Microsoft SQL Server
</option>
<option value="postgres">
PostgreSQL
</option>
<option value="mysql">
MySQL/MariaDB
</option>
<option value="radius">
Radius
</option>
@@ -70,6 +76,12 @@
<input id="url" v-model="monitor.url" type="url" class="form-control" pattern="https?://.+" required>
</div>
<!-- gRPC URL -->
<div v-if="monitor.type === 'grpc-keyword' " class="my-3">
<label for="grpc-url" class="form-label">{{ $t("URL") }}</label>
<input id="grpc-url" v-model="monitor.grpcUrl" type="url" class="form-control" pattern="[^\:]+:[0-9]{5}" required>
</div>
<!-- Push URL -->
<div v-if="monitor.type === 'push' " class="my-3">
<label for="push-url" class="form-label">{{ $t("PushUrl") }}</label>
@@ -81,7 +93,7 @@
</div>
<!-- Keyword -->
<div v-if="monitor.type === 'keyword' " class="my-3">
<div v-if="monitor.type === 'keyword' || monitor.type === 'grpc-keyword' " class="my-3">
<label for="keyword" class="form-label">{{ $t("Keyword") }}</label>
<input id="keyword" v-model="monitor.keyword" type="text" class="form-control" required>
<div class="form-text">
@@ -235,8 +247,8 @@
</div>
</template>
<!-- SQL Server and PostgreSQL -->
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres'">
<!-- SQL Server / PostgreSQL / MySQL -->
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres' || monitor.type === 'mysql'">
<div class="my-3">
<label for="sqlConnectionString" class="form-label">{{ $t("Connection String") }}</label>
@@ -246,6 +258,9 @@
<template v-if="monitor.type === 'postgres'">
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control" placeholder="postgres://username:password@host:port/database">
</template>
<template v-if="monitor.type === 'mysql'">
<input id="sqlConnectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control" placeholder="mysql://username:password@host:port/database">
</template>
</div>
<div class="my-3">
<label for="sqlQuery" class="form-label">{{ $t("Query") }}</label>
@@ -313,7 +328,7 @@
</div>
<!-- HTTP / Keyword only -->
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' ">
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'grpc-keyword' ">
<div class="my-3">
<label for="maxRedirects" class="form-label">{{ $t("Max. Redirects") }}</label>
<input id="maxRedirects" v-model="monitor.maxredirects" type="number" class="form-control" required min="0" step="1">
@@ -491,6 +506,55 @@
</template>
</template>
</template>
<!-- gRPC Options -->
<template v-if="monitor.type === 'grpc-keyword' ">
<!-- Proto service enable TLS -->
<h2 class="mt-5 mb-2">{{ $t("GRPC Options") }}</h2>
<div class="my-3 form-check">
<input id="grpc-enable-tls" v-model="monitor.grpcEnableTls" class="form-check-input" type="checkbox" value="">
<label class="form-check-label" for="grpc-enable-tls">
{{ $t("Enable TLS") }}
</label>
<div class="form-text">
{{ $t("enableGRPCTls") }}
</div>
</div>
<!-- Proto service name data -->
<div class="my-3">
<label for="protobuf" class="form-label">{{ $t("Proto Service Name") }}</label>
<input id="name" v-model="monitor.grpcServiceName" type="text" class="form-control" :placeholder="protoServicePlaceholder" required>
</div>
<!-- Proto method data -->
<div class="my-3">
<label for="protobuf" class="form-label">{{ $t("Proto Method") }}</label>
<input id="name" v-model="monitor.grpcMethod" type="text" class="form-control" :placeholder="protoMethodPlaceholder" required>
<div class="form-text">
{{ $t("grpcMethodDescription") }}
</div>
</div>
<!-- Proto data -->
<div class="my-3">
<label for="protobuf" class="form-label">{{ $t("Proto Content") }}</label>
<textarea id="protobuf" v-model="monitor.grpcProtobuf" class="form-control" :placeholder="protoBufDataPlaceholder"></textarea>
</div>
<!-- Body -->
<div class="my-3">
<label for="body" class="form-label">{{ $t("Body") }}</label>
<textarea id="body" v-model="monitor.grpcBody" class="form-control" :placeholder="bodyPlaceholder"></textarea>
</div>
<!-- Metadata: temporary disable waiting for next PR allow to send gRPC with metadata -->
<template v-if="false">
<div class="my-3">
<label for="metadata" class="form-label">{{ $t("Metadata") }}</label>
<textarea id="metadata" v-model="monitor.grpcMetadata" class="form-control" :placeholder="headersPlaceholder"></textarea>
</div>
</template>
</template>
</div>
</div>
</div>
@@ -569,6 +633,40 @@ export default {
return this.$root.baseURL + "/api/push/" + this.monitor.pushToken + "?status=up&msg=OK&ping=";
},
protoServicePlaceholder() {
return this.$t("Example:", [ "Health" ]);
},
protoMethodPlaceholder() {
return this.$t("Example:", [ "check" ]);
},
protoBufDataPlaceholder() {
return this.$t("Example:", [ `
syntax = "proto3";
package grpc.health.v1;
service Health {
rpc Check(HealthCheckRequest) returns (HealthCheckResponse);
rpc Watch(HealthCheckRequest) returns (stream HealthCheckResponse);
}
message HealthCheckRequest {
string service = 1;
}
message HealthCheckResponse {
enum ServingStatus {
UNKNOWN = 0;
SERVING = 1;
NOT_SERVING = 2;
SERVICE_UNKNOWN = 3; // Used only by the Watch method.
}
ServingStatus status = 1;
}
` ]);
},
bodyPlaceholder() {
return this.$t("Example:", [ `
{