Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a924227805 | ||
|
|
e4e75632c5 | ||
|
|
ddb7c24832 | ||
|
|
2144d3f8c0 | ||
|
|
4a824dec81 | ||
|
|
b35fee1be8 | ||
|
|
1b167af12b | ||
|
|
f2962e34ae | ||
|
|
386db5029a | ||
|
|
0e6e54a124 | ||
|
|
c666cb3879 | ||
|
|
4039517683 | ||
|
|
00fc7b8038 | ||
|
|
81d283ec8d | ||
|
|
105100e349 | ||
|
|
4598690dbf | ||
|
|
f68341c315 | ||
|
|
e8a8cea909 | ||
|
|
bf53f107e3 | ||
|
|
00de974528 | ||
|
|
0445398e94 | ||
|
|
272e2ba955 | ||
|
|
0a2adc2d92 | ||
|
|
7008fc1770 | ||
|
|
041a261540 | ||
|
|
1008d819f7 | ||
|
|
fb84a79a04 |
No files matched your search
@@ -7,7 +7,7 @@ import { URLSearchParams } from "url";
|
|||||||
const API_TOKEN = process.env.POEDITOR_API;
|
const API_TOKEN = process.env.POEDITOR_API;
|
||||||
const PROJECT_ID = process.env.POEDITOR_PROJECT_ID;
|
const PROJECT_ID = process.env.POEDITOR_PROJECT_ID;
|
||||||
const LANGUAGES = (
|
const LANGUAGES = (
|
||||||
process.env.LANGUAGES || "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn"
|
process.env.LANGUAGES || "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th"
|
||||||
).split(",");
|
).split(",");
|
||||||
const EXPORT_FORMAT = process.env.EXPORT_FORMAT || "key_value_json";
|
const EXPORT_FORMAT = process.env.EXPORT_FORMAT || "key_value_json";
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ on:
|
|||||||
languages:
|
languages:
|
||||||
description: "Languages to synchronize (comma separated, e.g.: tr,en,es)"
|
description: "Languages to synchronize (comma separated, e.g.: tr,en,es)"
|
||||||
required: false
|
required: false
|
||||||
default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn"
|
default: "ar,zh-tw,cs,en,fi,fr,de,pt-br,ru,es,tr,ja,zh-cn,th"
|
||||||
format:
|
format:
|
||||||
description: "Export format (key_value_json or json)"
|
description: "Export format (key_value_json or json)"
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1).
|
|||||||
|
|
||||||
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart).
|
||||||
|
|
||||||
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
Alternatively, you can also use [Coolify](https://coolify.io/), [Elestio](https://elest.io/open-source/checkmate), [K8s](./charts/helm/checkmate/INSTALLATION.md), [Sive Host](https://sive.host) (South Africa) or [Pikapods](https://www.pikapods.com/) to quickly spin off a Checkmate instance. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
|
||||||
|
|
||||||
### Using a Custom CA
|
### Using a Custom CA
|
||||||
|
|
||||||
|
|||||||
Generated
+22
-8
@@ -45,7 +45,7 @@
|
|||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.6",
|
"eslint-plugin-react-refresh": "^0.4.6",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"vite": "6.3.5"
|
"vite": "6.3.6"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
@@ -2422,13 +2422,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.9.0",
|
"version": "1.12.2",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.12.2.tgz",
|
||||||
"integrity": "sha512-re4CqKTJaURpzbLHtIi6XpDv20/CnpXOtjRY5/CU32L8gU8ek9UIivcfvSWvmKEngmVbrUtPpdDwWDWL7DNHvg==",
|
"integrity": "sha512-vMJzPewAlRyOgxV2dU0Cuz2O8zzzx9VYtbJOaBgXFeLc4IV/Eg50n4LowmehOOR61S8ZMpc2K5Sa7g6A4jfkUw==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.4",
|
||||||
"proxy-from-env": "^1.1.0"
|
"proxy-from-env": "^1.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3756,6 +3756,20 @@
|
|||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "ISC"
|
"license": "ISC"
|
||||||
},
|
},
|
||||||
|
"node_modules/fsevents": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/function-bind": {
|
"node_modules/function-bind": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
||||||
@@ -6375,9 +6389,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "6.3.5",
|
"version": "6.3.6",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-6.3.6.tgz",
|
||||||
"integrity": "sha512-cZn6NDFE7wdTpINgs++ZJ4N49W2vRp8LCKrn3Ob1kYNtOo21vfDoaV5GzBfLU4MovSAB8uNRm4jgzVQZ+mBzPQ==",
|
"integrity": "sha512-0msEVHJEScQbhkbVTb/4iHZdJ6SXp/AvxL2sjwYQFfBqleHtnCqv1J3sa9zbWz/6kW1m9Tfzn92vW+kZ1WV6QA==",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.25.0",
|
"esbuild": "^0.25.0",
|
||||||
|
|||||||
+1
-1
@@ -58,6 +58,6 @@
|
|||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-react-refresh": "^0.4.6",
|
"eslint-plugin-react-refresh": "^0.4.6",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"vite": "6.3.5"
|
"vite": "6.3.6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useState } from "react";
|
import { useState, useCallback } from "react";
|
||||||
const useInfrastructureMonitorForm = () => {
|
const useInfrastructureMonitorForm = () => {
|
||||||
const [infrastructureMonitor, setInfrastructureMonitor] = useState({
|
const [infrastructureMonitor, setInfrastructureMonitor] = useState({
|
||||||
url: "",
|
url: "",
|
||||||
@@ -6,6 +6,8 @@ const useInfrastructureMonitorForm = () => {
|
|||||||
notifications: [],
|
notifications: [],
|
||||||
notify_email: false,
|
notify_email: false,
|
||||||
interval: 0.25,
|
interval: 0.25,
|
||||||
|
statusWindowSize: 5,
|
||||||
|
statusWindowThreshold: 60,
|
||||||
cpu: false,
|
cpu: false,
|
||||||
usage_cpu: "",
|
usage_cpu: "",
|
||||||
memory: false,
|
memory: false,
|
||||||
@@ -29,9 +31,10 @@ const useInfrastructureMonitorForm = () => {
|
|||||||
[event.target.name]: event.target.checked,
|
[event.target.name]: event.target.checked,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const initializeInfrastructureMonitorForCreate = (globalSettings) => {
|
const initializeInfrastructureMonitorForCreate = useCallback((globalSettings) => {
|
||||||
const gt = globalSettings?.data?.settings?.globalThresholds || {};
|
const gt = globalSettings?.data?.settings?.globalThresholds || {};
|
||||||
setInfrastructureMonitor({
|
setInfrastructureMonitor((prev) => ({
|
||||||
|
...prev,
|
||||||
url: "",
|
url: "",
|
||||||
name: "",
|
name: "",
|
||||||
notifications: [],
|
notifications: [],
|
||||||
@@ -45,17 +48,20 @@ const useInfrastructureMonitorForm = () => {
|
|||||||
temperature: gt.temperature !== undefined,
|
temperature: gt.temperature !== undefined,
|
||||||
usage_temperature: gt.temperature !== undefined ? gt.temperature.toString() : "",
|
usage_temperature: gt.temperature !== undefined ? gt.temperature.toString() : "",
|
||||||
secret: "",
|
secret: "",
|
||||||
});
|
}));
|
||||||
};
|
}, []);
|
||||||
|
|
||||||
const initializeInfrastructureMonitorForUpdate = (monitor) => {
|
const initializeInfrastructureMonitorForUpdate = useCallback((monitor) => {
|
||||||
const MS_PER_MINUTE = 60000;
|
const MS_PER_MINUTE = 60000;
|
||||||
const { thresholds = {} } = monitor;
|
const { thresholds = {} } = monitor;
|
||||||
setInfrastructureMonitor({
|
setInfrastructureMonitor((prev) => ({
|
||||||
|
...prev,
|
||||||
url: monitor.url.replace(/^https?:\/\//, ""),
|
url: monitor.url.replace(/^https?:\/\//, ""),
|
||||||
name: monitor.name || "",
|
name: monitor.name || "",
|
||||||
notifications: monitor.notifications || [],
|
notifications: monitor.notifications || [],
|
||||||
interval: monitor.interval / MS_PER_MINUTE,
|
interval: monitor.interval / MS_PER_MINUTE,
|
||||||
|
statusWindowSize: monitor.statusWindowSize,
|
||||||
|
statusWindowThreshold: monitor.statusWindowThreshold,
|
||||||
cpu: thresholds.usage_cpu !== undefined,
|
cpu: thresholds.usage_cpu !== undefined,
|
||||||
usage_cpu:
|
usage_cpu:
|
||||||
thresholds.usage_cpu !== undefined ? (thresholds.usage_cpu * 100).toString() : "",
|
thresholds.usage_cpu !== undefined ? (thresholds.usage_cpu * 100).toString() : "",
|
||||||
@@ -75,8 +81,8 @@ const useInfrastructureMonitorForm = () => {
|
|||||||
? (thresholds.usage_temperature * 100).toString()
|
? (thresholds.usage_temperature * 100).toString()
|
||||||
: "",
|
: "",
|
||||||
secret: monitor.secret || "",
|
secret: monitor.secret || "",
|
||||||
});
|
}));
|
||||||
};
|
}, []);
|
||||||
return {
|
return {
|
||||||
infrastructureMonitor,
|
infrastructureMonitor,
|
||||||
setInfrastructureMonitor,
|
setInfrastructureMonitor,
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ const useInfrastructureSubmit = () => {
|
|||||||
? infrastructureMonitor.url
|
? infrastructureMonitor.url
|
||||||
: infrastructureMonitor.name,
|
: infrastructureMonitor.name,
|
||||||
interval: infrastructureMonitor.interval * MS_PER_MINUTE,
|
interval: infrastructureMonitor.interval * MS_PER_MINUTE,
|
||||||
|
statusWindowSize: infrastructureMonitor.statusWindowSize,
|
||||||
|
statusWindowThreshold: infrastructureMonitor.statusWindowThreshold,
|
||||||
cpu: infrastructureMonitor.cpu,
|
cpu: infrastructureMonitor.cpu,
|
||||||
...(infrastructureMonitor.cpu
|
...(infrastructureMonitor.cpu
|
||||||
? { usage_cpu: infrastructureMonitor.usage_cpu }
|
? { usage_cpu: infrastructureMonitor.usage_cpu }
|
||||||
|
|||||||
@@ -86,7 +86,14 @@ const CreateInfrastructureMonitor = () => {
|
|||||||
setHttps(monitor.url.startsWith("https"));
|
setHttps(monitor.url.startsWith("https"));
|
||||||
initializeInfrastructureMonitorForUpdate(monitor);
|
initializeInfrastructureMonitorForUpdate(monitor);
|
||||||
}
|
}
|
||||||
}, [isCreate, monitor, globalSettings, globalSettingsLoading]);
|
}, [
|
||||||
|
isCreate,
|
||||||
|
monitor,
|
||||||
|
globalSettings,
|
||||||
|
globalSettingsLoading,
|
||||||
|
initializeInfrastructureMonitorForCreate,
|
||||||
|
initializeInfrastructureMonitorForUpdate,
|
||||||
|
]);
|
||||||
|
|
||||||
// Handlers
|
// Handlers
|
||||||
const onSubmit = async (event) => {
|
const onSubmit = async (event) => {
|
||||||
@@ -281,6 +288,39 @@ const CreateInfrastructureMonitor = () => {
|
|||||||
setNotifications={infrastructureMonitor.notifications}
|
setNotifications={infrastructureMonitor.notifications}
|
||||||
/>
|
/>
|
||||||
</ConfigBox>
|
</ConfigBox>
|
||||||
|
<ConfigBox>
|
||||||
|
<Box>
|
||||||
|
<Typography
|
||||||
|
component="h2"
|
||||||
|
variant="h2"
|
||||||
|
>
|
||||||
|
{t("createMonitorPage.incidentConfigTitle")}
|
||||||
|
</Typography>
|
||||||
|
<Typography component="p">
|
||||||
|
{t("createMonitorPage.incidentConfigDescription")}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Stack gap={theme.spacing(20)}>
|
||||||
|
<TextInput
|
||||||
|
name="statusWindowSize"
|
||||||
|
label={t("createMonitorPage.incidentConfigStatusWindowLabel")}
|
||||||
|
type="number"
|
||||||
|
value={infrastructureMonitor.statusWindowSize}
|
||||||
|
onChange={onChange}
|
||||||
|
error={errors["statusWindowSize"] ? true : false}
|
||||||
|
helperText={errors["statusWindowSize"]}
|
||||||
|
/>
|
||||||
|
<TextInput
|
||||||
|
name="statusWindowThreshold"
|
||||||
|
label={t("createMonitorPage.incidentConfigStatusWindowThresholdLabel")}
|
||||||
|
type="number"
|
||||||
|
value={infrastructureMonitor.statusWindowThreshold}
|
||||||
|
onChange={onChange}
|
||||||
|
error={errors["statusWindowThreshold"] ? true : false}
|
||||||
|
helperText={errors["statusWindowThreshold"]}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</ConfigBox>
|
||||||
<CustomAlertsSection
|
<CustomAlertsSection
|
||||||
errors={errors}
|
errors={errors}
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
|
|||||||
@@ -437,6 +437,16 @@ const infrastructureMonitorValidation = joi.object({
|
|||||||
"number.base": "Frequency must be a number.",
|
"number.base": "Frequency must be a number.",
|
||||||
"any.required": "Frequency is required.",
|
"any.required": "Frequency is required.",
|
||||||
}),
|
}),
|
||||||
|
statusWindowSize: joi.number().min(1).max(20).messages({
|
||||||
|
"number.base": "Status window size must be a number.",
|
||||||
|
"number.min": "Status window size must be at least 1.",
|
||||||
|
"number.max": "Status window size cannot exceed 20.",
|
||||||
|
}),
|
||||||
|
statusWindowThreshold: joi.number().min(1).max(100).messages({
|
||||||
|
"number.base": "Status window threshold must be a number.",
|
||||||
|
"number.min": "Status window threshold must be at least 1%.",
|
||||||
|
"number.max": "Status window threshold cannot exceed 100%.",
|
||||||
|
}),
|
||||||
notifications: joi.array().items(joi.string()),
|
notifications: joi.array().items(joi.string()),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -376,7 +376,52 @@
|
|||||||
"email": "",
|
"email": "",
|
||||||
"role": "",
|
"role": "",
|
||||||
"created": ""
|
"created": ""
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "",
|
"paused": "",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
@@ -376,7 +376,52 @@
|
|||||||
"email": "",
|
"email": "",
|
||||||
"role": "",
|
"role": "",
|
||||||
"created": ""
|
"created": ""
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "",
|
"paused": "",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
@@ -380,7 +380,52 @@
|
|||||||
"email": "Email",
|
"email": "Email",
|
||||||
"role": "Rolle",
|
"role": "Rolle",
|
||||||
"created": "Angelegt"
|
"created": "Angelegt"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Pausiert",
|
"paused": "Pausiert",
|
||||||
@@ -746,7 +791,8 @@
|
|||||||
"failCountHeader": "Anzahl Fehler",
|
"failCountHeader": "Anzahl Fehler",
|
||||||
"lastRunHeader": "Letzter Lauf um",
|
"lastRunHeader": "Letzter Lauf um",
|
||||||
"lastFinishedAtHeader": "Zuletzt abgeschlossen um",
|
"lastFinishedAtHeader": "Zuletzt abgeschlossen um",
|
||||||
"lastRunTookHeader": "Letzter Lauf dauerte"
|
"lastRunTookHeader": "Letzter Lauf dauerte",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "Warteschlangenmetriken",
|
"title": "Warteschlangenmetriken",
|
||||||
|
|||||||
+15
-15
@@ -360,12 +360,6 @@
|
|||||||
"demoUser": "Demo user"
|
"demoUser": "Demo user"
|
||||||
},
|
},
|
||||||
"teamPanel": {
|
"teamPanel": {
|
||||||
"addTeamMember": {
|
|
||||||
"addMemberMenu": "Add Team Member",
|
|
||||||
"title": "Register new team member",
|
|
||||||
"description": "Create a new user and share the credentials with them. This method gives the member immediate access to all monitors.",
|
|
||||||
"addButton": "Add Member"
|
|
||||||
},
|
|
||||||
"teamMembers": "Team members",
|
"teamMembers": "Team members",
|
||||||
"filter": {
|
"filter": {
|
||||||
"all": "All",
|
"all": "All",
|
||||||
@@ -381,6 +375,18 @@
|
|||||||
"noMembers": "There are no team members with this role",
|
"noMembers": "There are no team members with this role",
|
||||||
"getToken": "Get token",
|
"getToken": "Get token",
|
||||||
"emailToken": "E-mail token",
|
"emailToken": "E-mail token",
|
||||||
|
"table": {
|
||||||
|
"name": "Name",
|
||||||
|
"email": "Email",
|
||||||
|
"role": "Role",
|
||||||
|
"created": "Created"
|
||||||
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "Add Team Member",
|
||||||
|
"title": "Register new team member",
|
||||||
|
"description": "Create a new user and share the credentials with them. This method gives the member immediate access to all monitors.",
|
||||||
|
"addButton": "Add Member"
|
||||||
|
},
|
||||||
"register": "Register a team member",
|
"register": "Register a team member",
|
||||||
"registerToast": {
|
"registerToast": {
|
||||||
"success": "User created, share credentials with the member securely.",
|
"success": "User created, share credentials with the member securely.",
|
||||||
@@ -419,13 +425,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"role": "Role",
|
"role": "Role"
|
||||||
"table": {
|
|
||||||
"name": "Name",
|
|
||||||
"email": "Email",
|
|
||||||
"role": "Role",
|
|
||||||
"created": "Created"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Paused",
|
"paused": "Paused",
|
||||||
@@ -785,14 +785,14 @@
|
|||||||
"idHeader": "Monitor ID",
|
"idHeader": "Monitor ID",
|
||||||
"urlHeader": "URL",
|
"urlHeader": "URL",
|
||||||
"typeHeader": "Type",
|
"typeHeader": "Type",
|
||||||
"intervalHeader": "Interval",
|
|
||||||
"activeHeader": "Active",
|
"activeHeader": "Active",
|
||||||
"lockedAtHeader": "Locked at",
|
"lockedAtHeader": "Locked at",
|
||||||
"runCountHeader": "Run count",
|
"runCountHeader": "Run count",
|
||||||
"failCountHeader": "Fail count",
|
"failCountHeader": "Fail count",
|
||||||
"lastRunHeader": "Last run at",
|
"lastRunHeader": "Last run at",
|
||||||
"lastFinishedAtHeader": "Last finished at",
|
"lastFinishedAtHeader": "Last finished at",
|
||||||
"lastRunTookHeader": "Last run took"
|
"lastRunTookHeader": "Last run took",
|
||||||
|
"intervalHeader": "Interval"
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "Queue metrics",
|
"title": "Queue metrics",
|
||||||
|
|||||||
@@ -376,7 +376,52 @@
|
|||||||
"email": "",
|
"email": "",
|
||||||
"role": "",
|
"role": "",
|
||||||
"created": ""
|
"created": ""
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "",
|
"paused": "",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
@@ -376,7 +376,52 @@
|
|||||||
"email": "Sähköposti",
|
"email": "Sähköposti",
|
||||||
"role": "Rooli",
|
"role": "Rooli",
|
||||||
"created": "Luotu"
|
"created": "Luotu"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Tauota",
|
"paused": "Tauota",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
@@ -380,7 +380,52 @@
|
|||||||
"email": "Email",
|
"email": "Email",
|
||||||
"role": "Rôle",
|
"role": "Rôle",
|
||||||
"created": "Créée"
|
"created": "Créée"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Pause",
|
"paused": "Pause",
|
||||||
@@ -746,7 +791,8 @@
|
|||||||
"failCountHeader": "Nombre d'échecs",
|
"failCountHeader": "Nombre d'échecs",
|
||||||
"lastRunHeader": "Dernière tentative le",
|
"lastRunHeader": "Dernière tentative le",
|
||||||
"lastFinishedAtHeader": "Dernière finalisation à",
|
"lastFinishedAtHeader": "Dernière finalisation à",
|
||||||
"lastRunTookHeader": "Dernière exécution effectuée"
|
"lastRunTookHeader": "Dernière exécution effectuée",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "Métriques des files",
|
"title": "Métriques des files",
|
||||||
|
|||||||
@@ -380,7 +380,52 @@
|
|||||||
"email": "メール",
|
"email": "メール",
|
||||||
"role": "役割",
|
"role": "役割",
|
||||||
"created": "作成日"
|
"created": "作成日"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "一時停止",
|
"paused": "一時停止",
|
||||||
@@ -746,7 +791,8 @@
|
|||||||
"failCountHeader": "失敗回数",
|
"failCountHeader": "失敗回数",
|
||||||
"lastRunHeader": "最終実行日時",
|
"lastRunHeader": "最終実行日時",
|
||||||
"lastFinishedAtHeader": "最終完了日時",
|
"lastFinishedAtHeader": "最終完了日時",
|
||||||
"lastRunTookHeader": "最終実行時間"
|
"lastRunTookHeader": "最終実行時間",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "キューメトリック",
|
"title": "キューメトリック",
|
||||||
|
|||||||
@@ -380,7 +380,52 @@
|
|||||||
"email": "E-mail",
|
"email": "E-mail",
|
||||||
"role": "Cargo",
|
"role": "Cargo",
|
||||||
"created": "Criado"
|
"created": "Criado"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Pausado",
|
"paused": "Pausado",
|
||||||
@@ -746,7 +791,8 @@
|
|||||||
"failCountHeader": "Contagem de falhas",
|
"failCountHeader": "Contagem de falhas",
|
||||||
"lastRunHeader": "Última corrida em",
|
"lastRunHeader": "Última corrida em",
|
||||||
"lastFinishedAtHeader": "Última conclusão em",
|
"lastFinishedAtHeader": "Última conclusão em",
|
||||||
"lastRunTookHeader": "A última corrida aconteceu"
|
"lastRunTookHeader": "A última corrida aconteceu",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "Métricas de fila",
|
"title": "Métricas de fila",
|
||||||
|
|||||||
+111
-65
@@ -376,7 +376,52 @@
|
|||||||
"email": "Email",
|
"email": "Email",
|
||||||
"role": "Роль",
|
"role": "Роль",
|
||||||
"created": "Создано"
|
"created": "Создано"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Остановлено",
|
"paused": "Остановлено",
|
||||||
@@ -421,23 +466,23 @@
|
|||||||
"passwordRequirements": "Новый пароль должен содержать не менее 8 символов и содержать как минимум одну заглавную букву, одну строчную букву, одну цифру и один специальный символ.",
|
"passwordRequirements": "Новый пароль должен содержать не менее 8 символов и содержать как минимум одну заглавную букву, одну строчную букву, одну цифру и один специальный символ.",
|
||||||
"saving": "Сохранение..."
|
"saving": "Сохранение..."
|
||||||
},
|
},
|
||||||
"emailSent": "",
|
"emailSent": "Письмо успешно отправлено",
|
||||||
"failedToSendEmail": "",
|
"failedToSendEmail": "Не удалось отправить письмо",
|
||||||
"settingsTestEmailSuccess": "",
|
"settingsTestEmailSuccess": "Тестовое письмо успешно отправлено",
|
||||||
"settingsTestEmailFailed": "",
|
"settingsTestEmailFailed": "Не удалось отправить тестовое письмо",
|
||||||
"settingsTestEmailFailedWithReason": "",
|
"settingsTestEmailFailedWithReason": "Не удалось отправить тестовое письмо: {{reason}}",
|
||||||
"settingsTestEmailUnknownError": "Неизвестная ошибка",
|
"settingsTestEmailUnknownError": "Неизвестная ошибка",
|
||||||
"statusMsg": {
|
"statusMsg": {
|
||||||
"paused": "",
|
"paused": "Мониторинг приостановлен",
|
||||||
"up": "",
|
"up": "",
|
||||||
"down": "",
|
"down": "",
|
||||||
"pending": ""
|
"pending": "Ожидание..."
|
||||||
},
|
},
|
||||||
"uptimeGeneralInstructions": {
|
"uptimeGeneralInstructions": {
|
||||||
"http": "",
|
"http": "Введите URL-адрес или IP-адрес для мониторинга (например, https://example.com/ или 192.168.1.100) и добавьте понятное имя, которое будет отображаться на панели инструментов.",
|
||||||
"ping": "",
|
"ping": "Ведите IP-адрес или имя хоста для пинга (например, 192.168.1.100 или example.com) и добавьте понятное имя, которое будет отображаться на панели инструментов.",
|
||||||
"docker": "",
|
"docker": "Введите Docker ID вашего контейнера. Docker ID должен быть полным 64-символьным Docker ID. Вы можете запустить docker inspect <short_id>, чтобы получить полный ID контейнера.",
|
||||||
"port": "",
|
"port": "Введите URL-адрес или IP-адрес сервера, номер порта и понятное имя, которое будет отображаться на панели инструментов.",
|
||||||
"game": ""
|
"game": ""
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
@@ -447,24 +492,24 @@
|
|||||||
"toggleTheme": ""
|
"toggleTheme": ""
|
||||||
},
|
},
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"networkError": "",
|
"networkError": "Ошибка сети",
|
||||||
"checkConnection": "",
|
"checkConnection": "Пожалуйста, проверьте свое сетевое соединение",
|
||||||
"unknownError": "Неизвестная ошибка"
|
"unknownError": "Неизвестная ошибка"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"auth": {
|
"auth": {
|
||||||
"common": {
|
"common": {
|
||||||
"navigation": {
|
"navigation": {
|
||||||
"continue": "",
|
"continue": "Продолжить",
|
||||||
"back": "Назад"
|
"back": "Назад"
|
||||||
},
|
},
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"email": {
|
"email": {
|
||||||
"label": "",
|
"label": "Электронная почта",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"errors": {
|
"errors": {
|
||||||
"empty": "Для продолжения введите свой адрес электронной почты",
|
"empty": "Для продолжения введите свой адрес электронной почты",
|
||||||
"invalid": ""
|
"invalid": "Пожалуйста, проверьте правильность введённого адреса электронной почты"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"password": {
|
"password": {
|
||||||
@@ -491,49 +536,49 @@
|
|||||||
"highlighted": "одну прописную букву"
|
"highlighted": "одну прописную букву"
|
||||||
},
|
},
|
||||||
"match": {
|
"match": {
|
||||||
"beginning": "",
|
"beginning": "Пароли",
|
||||||
"highlighted": ""
|
"highlighted": "должны совпадать"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"empty": "",
|
"empty": "Пожалуйста, введите пароль",
|
||||||
"length": "",
|
"length": "Пароль должен быть длиной не менее 8 символов",
|
||||||
"uppercase": "",
|
"uppercase": "Пароль должен содержать минимум 1 прописную букву",
|
||||||
"lowercase": "",
|
"lowercase": "Пароль должен содержать минимум 1 строчную букву",
|
||||||
"number": "",
|
"number": "Пароль должен содержать минимум 1 цифру",
|
||||||
"special": "",
|
"special": "Пароль должен содержать минимум 1 спецсимвол",
|
||||||
"incorrect": ""
|
"incorrect": "Предоставленный вами пароль не соответствует нашим записям"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"passwordConfirm": {
|
"passwordConfirm": {
|
||||||
"label": "",
|
"label": "Подтвердите пароль",
|
||||||
"placeholder": "",
|
"placeholder": "Введите пароль еще раз для подтверждения",
|
||||||
"errors": {
|
"errors": {
|
||||||
"empty": "",
|
"empty": "Пожалуйста, введите свой пароль еще раз для подтверждения (помогает избежать опечаток)",
|
||||||
"different": ""
|
"different": "Введённые пароли не совпадают, вероятно, один из них напечатан с ошибкой"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"firstName": {
|
"firstName": {
|
||||||
"label": "",
|
"label": "Имя",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"errors": {
|
"errors": {
|
||||||
"empty": "",
|
"empty": "Пожалуйста, введите свое имя",
|
||||||
"length": "",
|
"length": "Имя должно быть короче 50 символов",
|
||||||
"pattern": ""
|
"pattern": "Имя должно содержать только буквы, пробелы, апострофы или дефисы"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lastName": {
|
"lastName": {
|
||||||
"label": "",
|
"label": "Фамилия",
|
||||||
"placeholder": "",
|
"placeholder": "",
|
||||||
"errors": {
|
"errors": {
|
||||||
"empty": "",
|
"empty": "Пожалуйста, введите свою фамилию",
|
||||||
"length": "",
|
"length": "Фамилия должна быть короче 50 символов",
|
||||||
"pattern": ""
|
"pattern": "Фамилия должна содержать только буквы, пробелы, апострофы или дефисы"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"validation": ""
|
"validation": "Ошибка при проверке данных."
|
||||||
},
|
},
|
||||||
"fields": {
|
"fields": {
|
||||||
"password": {
|
"password": {
|
||||||
@@ -549,20 +594,20 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"heading": "",
|
"heading": "Войдите, чтобы продолжить",
|
||||||
"subheadings": {
|
"subheadings": {
|
||||||
"stepOne": "",
|
"stepOne": "Введите свою электронную почту",
|
||||||
"stepTwo": ""
|
"stepTwo": "Введите свой пароль"
|
||||||
},
|
},
|
||||||
"links": {
|
"links": {
|
||||||
"forgotPassword": "",
|
"forgotPassword": "Забыли пароль?",
|
||||||
"register": "",
|
"register": "У вас нет учетной записи?",
|
||||||
"forgotPasswordLink": "",
|
"forgotPasswordLink": "",
|
||||||
"registerLink": ""
|
"registerLink": ""
|
||||||
},
|
},
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"success": "",
|
"success": "С возвращением! Вы успешно вошли в систему.",
|
||||||
"incorrectPassword": ""
|
"incorrectPassword": "Неверный пароль"
|
||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"password": {
|
"password": {
|
||||||
@@ -573,42 +618,42 @@
|
|||||||
},
|
},
|
||||||
"registration": {
|
"registration": {
|
||||||
"heading": {
|
"heading": {
|
||||||
"superAdmin": "",
|
"superAdmin": "Создать супер-администратора",
|
||||||
"user": ""
|
"user": "Зарегистрироваться"
|
||||||
},
|
},
|
||||||
"subheadings": {
|
"subheadings": {
|
||||||
"stepOne": "",
|
"stepOne": "Введите свои личные данные",
|
||||||
"stepTwo": "",
|
"stepTwo": "Введите вашу электронную почту",
|
||||||
"stepThree": ""
|
"stepThree": "Создайте свой пароль"
|
||||||
},
|
},
|
||||||
"description": {
|
"description": {
|
||||||
"superAdmin": "",
|
"superAdmin": "Создайте свой аккаунт супер-администратора, чтобы начать",
|
||||||
"user": ""
|
"user": "Зарегистрируйтесь как пользователь и обратитесь к супер-администратору для доступа к вашим мониторам"
|
||||||
},
|
},
|
||||||
"gettingStartedButton": {
|
"gettingStartedButton": {
|
||||||
"superAdmin": "",
|
"superAdmin": "Создать учетную запись супер-администратора",
|
||||||
"user": ""
|
"user": "Зарегистрироваться как обычный пользователь"
|
||||||
},
|
},
|
||||||
"termsAndPolicies": "",
|
"termsAndPolicies": "Создавая учетную запись, вы соглашаетесь с нашими <a1>Условиями предоставления услуг</a1> и <a2>Политикой конфиденциальности</a2>.",
|
||||||
"links": {
|
"links": {
|
||||||
"login": ""
|
"login": "Уже есть учетная запись? <a>Войти</a>"
|
||||||
},
|
},
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"success": ""
|
"success": "Добро пожаловать! Ваша учетная запись была создана успешно."
|
||||||
},
|
},
|
||||||
"welcome": ""
|
"welcome": ""
|
||||||
},
|
},
|
||||||
"forgotPassword": {
|
"forgotPassword": {
|
||||||
"heading": "",
|
"heading": "Забыли пароль?",
|
||||||
"subheadings": {
|
"subheadings": {
|
||||||
"stepOne": "",
|
"stepOne": "Не волнуйтесь, мы вышлем вам инструкции для сброса.",
|
||||||
"stepTwo": "",
|
"stepTwo": "Мы выслали ссылку для сброса пароля на <email/>",
|
||||||
"stepThree": "",
|
"stepThree": "Ваш новый пароль должен отличаться от ваших предыдущих пароей.",
|
||||||
"stepFour": ""
|
"stepFour": "Ваш пароль был успешно сброшен. Нажмите ниже, чтобы волшебным образом войти в систему."
|
||||||
},
|
},
|
||||||
"buttons": {
|
"buttons": {
|
||||||
"openEmail": "",
|
"openEmail": "",
|
||||||
"resetPassword": ""
|
"resetPassword": "Сбросить пароль"
|
||||||
},
|
},
|
||||||
"imageAlts": {
|
"imageAlts": {
|
||||||
"passwordKey": "",
|
"passwordKey": "",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -376,7 +376,52 @@
|
|||||||
"email": "Eposta",
|
"email": "Eposta",
|
||||||
"role": "Rol",
|
"role": "Rol",
|
||||||
"created": "Oluşturulma"
|
"created": "Oluşturulma"
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "Durduruldu",
|
"paused": "Durduruldu",
|
||||||
@@ -742,7 +787,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "Son tamamlama",
|
"lastFinishedAtHeader": "Son tamamlama",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
File diff suppressed because it is too large.
Load diff
@@ -380,7 +380,52 @@
|
|||||||
"email": "",
|
"email": "",
|
||||||
"role": "",
|
"role": "",
|
||||||
"created": ""
|
"created": ""
|
||||||
}
|
},
|
||||||
|
"addTeamMember": {
|
||||||
|
"addMemberMenu": "",
|
||||||
|
"title": "",
|
||||||
|
"description": "",
|
||||||
|
"addButton": ""
|
||||||
|
},
|
||||||
|
"register": "",
|
||||||
|
"registerToast": {
|
||||||
|
"success": "",
|
||||||
|
"dbUserExists": "",
|
||||||
|
"unknownError": ""
|
||||||
|
},
|
||||||
|
"registerTeamMember": {
|
||||||
|
"title": "",
|
||||||
|
"auth": {
|
||||||
|
"common": {
|
||||||
|
"inputs": {
|
||||||
|
"firstName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lastName": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"pattern": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"errors": {
|
||||||
|
"empty": "",
|
||||||
|
"invalid": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": {
|
||||||
|
"errors": {
|
||||||
|
"empty": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"role": ""
|
||||||
},
|
},
|
||||||
"monitorState": {
|
"monitorState": {
|
||||||
"paused": "",
|
"paused": "",
|
||||||
@@ -746,7 +791,8 @@
|
|||||||
"failCountHeader": "",
|
"failCountHeader": "",
|
||||||
"lastRunHeader": "",
|
"lastRunHeader": "",
|
||||||
"lastFinishedAtHeader": "",
|
"lastFinishedAtHeader": "",
|
||||||
"lastRunTookHeader": ""
|
"lastRunTookHeader": "",
|
||||||
|
"intervalHeader": ""
|
||||||
},
|
},
|
||||||
"metricsTable": {
|
"metricsTable": {
|
||||||
"title": "",
|
"title": "",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { execSync } from "child_process";
|
|||||||
|
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
const env = loadEnv(mode, process.cwd(), "");
|
const env = loadEnv(mode, process.cwd(), "");
|
||||||
let version = "3.1.8";
|
let version = "3.2.0";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
base: "/",
|
base: "/",
|
||||||
|
|||||||
@@ -149,10 +149,12 @@
|
|||||||
"statusPageByTeamId": "Got status pages by team id successfully",
|
"statusPageByTeamId": "Got status pages by team id successfully",
|
||||||
"httpNetworkError": "Network error",
|
"httpNetworkError": "Network error",
|
||||||
"httpNotJson": "Response data is not json",
|
"httpNotJson": "Response data is not json",
|
||||||
|
"httpExpectedValueFail": "Expected value did not match",
|
||||||
"httpJsonPathError": "Failed to parse json data",
|
"httpJsonPathError": "Failed to parse json data",
|
||||||
"httpEmptyResult": "Result is empty",
|
"httpEmptyResult": "Result is empty",
|
||||||
"httpMatchSuccess": "Response data match successfully",
|
"httpMatchSuccess": "Response data match successfully",
|
||||||
"httpMatchFail": "Failed to match response data",
|
"httpMatchFail": "Failed to match response data",
|
||||||
|
"httpJsonPathFail": "JSONPath did not match expected value",
|
||||||
"webhookSendSuccess": "Webhook notification sent successfully",
|
"webhookSendSuccess": "Webhook notification sent successfully",
|
||||||
"telegramRequiresBotTokenAndChatId": "Telegram notifications require both botToken and chatId",
|
"telegramRequiresBotTokenAndChatId": "Telegram notifications require both botToken and chatId",
|
||||||
"webhookUrlRequired": "Webhook URL is required",
|
"webhookUrlRequired": "Webhook URL is required",
|
||||||
@@ -162,5 +164,18 @@
|
|||||||
"monitorDownAlert": "Downtime Alert: One of your monitors went offline.\n📌 Monitor: {monitorName}\n📅 Time: {time}\n⚠️ Status: DOWN\n📟 Status Code: {code}\n\u200B\n",
|
"monitorDownAlert": "Downtime Alert: One of your monitors went offline.\n📌 Monitor: {monitorName}\n📅 Time: {time}\n⚠️ Status: DOWN\n📟 Status Code: {code}\n\u200B\n",
|
||||||
"sendTestEmail": "Test email sent successfully",
|
"sendTestEmail": "Test email sent successfully",
|
||||||
"errorForValidEmailAddress": "A valid recipient email address is required.",
|
"errorForValidEmailAddress": "A valid recipient email address is required.",
|
||||||
"testEmailSubject": "Test E-mail from Checkmate"
|
"testEmailSubject": "Test E-mail from Checkmate",
|
||||||
|
"discordNotification": {
|
||||||
|
"monitor": "Monitor",
|
||||||
|
"status": "Status",
|
||||||
|
"statusCode": "Status Code",
|
||||||
|
"time": "Time",
|
||||||
|
"up": "UP",
|
||||||
|
"down": "DOWN",
|
||||||
|
"checkmate": "Checkmate",
|
||||||
|
"url": "URL",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"uptimeAlert": "Uptime Alert: One of your monitors is back online",
|
||||||
|
"downtimeAlert": "Downtime Alert: One of your monitors went offline"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -28,11 +28,12 @@ class SuperSimpleQueueHelper {
|
|||||||
return async (monitor) => {
|
return async (monitor) => {
|
||||||
try {
|
try {
|
||||||
const monitorId = monitor._id;
|
const monitorId = monitor._id;
|
||||||
|
const teamId = monitor.teamId;
|
||||||
if (!monitorId) {
|
if (!monitorId) {
|
||||||
throw new Error("No monitor id");
|
throw new Error("No monitor id");
|
||||||
}
|
}
|
||||||
|
|
||||||
const maintenanceWindowActive = await this.isInMaintenanceWindow(monitorId);
|
const maintenanceWindowActive = await this.isInMaintenanceWindow(monitorId, teamId);
|
||||||
if (maintenanceWindowActive) {
|
if (maintenanceWindowActive) {
|
||||||
this.logger.info({
|
this.logger.info({
|
||||||
message: `Monitor ${monitorId} is in maintenance window`,
|
message: `Monitor ${monitorId} is in maintenance window`,
|
||||||
@@ -77,8 +78,11 @@ class SuperSimpleQueueHelper {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
async isInMaintenanceWindow(monitorId) {
|
async isInMaintenanceWindow(monitorId, teamId) {
|
||||||
const maintenanceWindows = await this.db.maintenanceWindowModule.getMaintenanceWindowsByMonitorId(monitorId);
|
const maintenanceWindows = await this.db.maintenanceWindowModule.getMaintenanceWindowsByMonitorId({
|
||||||
|
monitorId: monitorId.toString(),
|
||||||
|
teamId: teamId.toString(),
|
||||||
|
});
|
||||||
// Check for active maintenance window:
|
// Check for active maintenance window:
|
||||||
const maintenanceWindowIsActive = maintenanceWindows.reduce((acc, window) => {
|
const maintenanceWindowIsActive = maintenanceWindows.reduce((acc, window) => {
|
||||||
if (window.active) {
|
if (window.active) {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
import { match } from "assert";
|
|
||||||
|
|
||||||
const SERVICE_NAME = "NetworkService";
|
const SERVICE_NAME = "NetworkService";
|
||||||
|
|
||||||
class NetworkService {
|
class NetworkService {
|
||||||
@@ -107,7 +105,7 @@ class NetworkService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async requestHttp(monitor) {
|
async requestHttp(monitor) {
|
||||||
const { url, secret, _id, name, teamId, type, ignoreTlsErrors, jsonPath, matchMethod, expectedValue } = monitor;
|
const { url, secret, _id, teamId, type, ignoreTlsErrors, jsonPath, matchMethod, expectedValue } = monitor;
|
||||||
const httpResponse = {
|
const httpResponse = {
|
||||||
monitorId: _id,
|
monitorId: _id,
|
||||||
teamId: teamId,
|
teamId: teamId,
|
||||||
@@ -156,33 +154,61 @@ class NetworkService {
|
|||||||
return httpResponse;
|
return httpResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (expectedValue) {
|
if (expectedValue && !jsonPath) {
|
||||||
let ok = false;
|
let ok = false;
|
||||||
if (matchMethod === "equal") ok = payload === expectedValue;
|
if (matchMethod === "equal") ok = payload === expectedValue;
|
||||||
if (matchMethod === "include") ok = payload.includes(expectedValue);
|
if (matchMethod === "include" && typeof payload === "string") ok = payload.includes(expectedValue);
|
||||||
if (matchMethod === "regex") ok = new RegExp(expectedValue).test(payload);
|
if (matchMethod === "regex" && typeof payload === "string") ok = new RegExp(expectedValue).test(payload);
|
||||||
|
|
||||||
if (ok === true) {
|
if (ok === true) {
|
||||||
return httpResponse;
|
return httpResponse;
|
||||||
} else {
|
} else {
|
||||||
httpResponse.code = 500;
|
httpResponse.code = 500;
|
||||||
httpResponse.status = false;
|
httpResponse.status = false;
|
||||||
|
httpResponse.message = this.stringService.httpExpectedValueFail;
|
||||||
return httpResponse;
|
return httpResponse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonPath) {
|
if (jsonPath) {
|
||||||
const contentType = response.headers["content-type"];
|
const contentType = response.headers["content-type"];
|
||||||
|
|
||||||
const isJson = contentType?.includes("application/json");
|
const isJson = contentType?.includes("application/json");
|
||||||
if (!isJson) {
|
if (!isJson) {
|
||||||
httpResponse.status = false;
|
httpResponse.status = false;
|
||||||
httpResponse.message = this.stringService.httpNotJson;
|
httpResponse.message = this.stringService.httpNotJson;
|
||||||
return httpResponse;
|
return httpResponse;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.jmespath.search(payload, jsonPath);
|
const extracted = this.jmespath.search(payload, jsonPath);
|
||||||
|
if (expectedValue) {
|
||||||
|
let ok = false;
|
||||||
|
if (matchMethod === "equal") ok = extracted === expectedValue;
|
||||||
|
if (matchMethod === "include" && typeof extracted === "string") ok = extracted.includes(expectedValue);
|
||||||
|
if (matchMethod === "regex" && typeof extracted === "string") ok = new RegExp(expectedValue).test(extracted);
|
||||||
|
|
||||||
|
if (ok) {
|
||||||
|
httpResponse.extracted = extracted;
|
||||||
|
return httpResponse;
|
||||||
|
} else {
|
||||||
|
httpResponse.status = false;
|
||||||
|
httpResponse.code = 500;
|
||||||
|
httpResponse.message = this.stringService.httpJsonPathFail;
|
||||||
|
httpResponse.extracted = extracted;
|
||||||
|
return httpResponse;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const isFalsey = extracted === false || extracted === "false" || extracted === undefined || extracted === null;
|
||||||
|
if (!isFalsey) {
|
||||||
|
httpResponse.extracted = extracted;
|
||||||
|
return httpResponse;
|
||||||
|
} else {
|
||||||
|
httpResponse.status = false;
|
||||||
|
httpResponse.code = 500;
|
||||||
|
httpResponse.message = this.stringService.httpJsonPathFail;
|
||||||
|
httpResponse.extracted = extracted;
|
||||||
|
return httpResponse;
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch {
|
} catch {
|
||||||
httpResponse.status = false;
|
httpResponse.status = false;
|
||||||
httpResponse.message = this.stringService.httpJsonPathError;
|
httpResponse.message = this.stringService.httpJsonPathError;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ class NotificationService {
|
|||||||
return NotificationService.SERVICE_NAME;
|
return NotificationService.SERVICE_NAME;
|
||||||
}
|
}
|
||||||
|
|
||||||
sendNotification = async ({ notification, subject, content, html }) => {
|
sendNotification = async ({ notification, subject, content, html, discordContent = null, webhookBody = null }) => {
|
||||||
const { type, address } = notification;
|
const { type, address } = notification;
|
||||||
|
|
||||||
if (type === "email") {
|
if (type === "email") {
|
||||||
@@ -28,9 +28,11 @@ class NotificationService {
|
|||||||
// Create a body for webhooks
|
// Create a body for webhooks
|
||||||
let body = { text: content };
|
let body = { text: content };
|
||||||
if (type === "discord") {
|
if (type === "discord") {
|
||||||
body = { content };
|
body = !discordContent ? { content } : discordContent;
|
||||||
|
}
|
||||||
|
if (type === "webhook") {
|
||||||
|
body = !webhookBody ? { content } : webhookBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type === "slack" || type === "discord" || type === "webhook") {
|
if (type === "slack" || type === "discord" || type === "webhook") {
|
||||||
const response = await this.networkService.requestWebhook(type, address, body);
|
const response = await this.networkService.requestWebhook(type, address, body);
|
||||||
return response.status;
|
return response.status;
|
||||||
@@ -55,7 +57,6 @@ class NotificationService {
|
|||||||
|
|
||||||
const notificationIDs = networkResponse.monitor?.notifications ?? [];
|
const notificationIDs = networkResponse.monitor?.notifications ?? [];
|
||||||
if (notificationIDs.length === 0) return false;
|
if (notificationIDs.length === 0) return false;
|
||||||
|
|
||||||
if (networkResponse.monitor.type === "hardware") {
|
if (networkResponse.monitor.type === "hardware") {
|
||||||
const thresholds = networkResponse?.monitor?.thresholds;
|
const thresholds = networkResponse?.monitor?.thresholds;
|
||||||
|
|
||||||
@@ -63,30 +64,29 @@ class NotificationService {
|
|||||||
const metrics = networkResponse?.payload?.data ?? null;
|
const metrics = networkResponse?.payload?.data ?? null;
|
||||||
if (metrics === null) return false; // No metrics, we're done
|
if (metrics === null) return false; // No metrics, we're done
|
||||||
|
|
||||||
const alerts = await this.notificationUtils.buildHardwareAlerts(networkResponse);
|
const [alerts, discordContent] = await this.notificationUtils.buildHardwareAlerts(networkResponse);
|
||||||
if (alerts.length === 0) return false;
|
if (alerts.length === 0) return false;
|
||||||
|
|
||||||
const { subject, html } = await this.notificationUtils.buildHardwareEmail(networkResponse, alerts);
|
const { subject, html } = await this.notificationUtils.buildHardwareEmail(networkResponse, alerts);
|
||||||
const content = await this.notificationUtils.buildHardwareNotificationMessage(alerts);
|
const content = await this.notificationUtils.buildHardwareNotificationMessage(alerts, monitor);
|
||||||
|
const webhookBody = await this.notificationUtils.buildHardwareWebhookBody(alerts, monitor);
|
||||||
const success = await this.notifyAll({ notificationIDs, subject, html, content });
|
const success = await this.notifyAll({ notificationIDs, subject, html, content, discordContent, webhookBody });
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Status monitors
|
// Status monitors
|
||||||
const { subject, html } = await this.notificationUtils.buildStatusEmail(networkResponse);
|
const { subject, html } = await this.notificationUtils.buildStatusEmail(networkResponse);
|
||||||
const content = await this.notificationUtils.buildWebhookMessage(networkResponse);
|
const [content, discordContent] = await this.notificationUtils.buildWebhookMessage(networkResponse);
|
||||||
const success = this.notifyAll({ notificationIDs, subject, html, content });
|
const success = this.notifyAll({ notificationIDs, subject, html, content, discordContent });
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
async notifyAll({ notificationIDs, subject, html, content }) {
|
async notifyAll({ notificationIDs, subject, html, content, discordContent = null, webhookBody = null }) {
|
||||||
const notifications = await this.db.notificationModule.getNotificationsByIds(notificationIDs);
|
const notifications = await this.db.notificationModule.getNotificationsByIds(notificationIDs);
|
||||||
|
|
||||||
// Map each notification to a test promise
|
// Map each notification to a test promise
|
||||||
const promises = notifications.map(async (notification) => {
|
const promises = notifications.map(async (notification) => {
|
||||||
try {
|
try {
|
||||||
await this.sendNotification({ notification, subject, content, html });
|
await this.sendNotification({ notification, subject, content, html, discordContent, webhookBody });
|
||||||
return true;
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -70,7 +70,25 @@ class NotificationUtils {
|
|||||||
.replace("{time}", formattedTime)
|
.replace("{time}", formattedTime)
|
||||||
.replace("{code}", code || "Unknown");
|
.replace("{code}", code || "Unknown");
|
||||||
}
|
}
|
||||||
return messageText;
|
const dn = this.stringService.discordNotification;
|
||||||
|
let discordMessageText = {
|
||||||
|
embeds: [
|
||||||
|
{
|
||||||
|
title: status ? dn.uptimeAlert : dn.downtimeAlert,
|
||||||
|
color: status ? 5763719 : 15548997,
|
||||||
|
|
||||||
|
fields: [
|
||||||
|
{ name: dn.monitor, value: monitor?.name ?? dn.unknown, inline: true },
|
||||||
|
{ name: dn.status, value: status ? dn.up : dn.down, inline: true },
|
||||||
|
{ name: dn.statusCode, value: String(code ?? dn.unknown), inline: true },
|
||||||
|
{ name: dn.time, value: formattedTime, inline: true },
|
||||||
|
{ name: dn.url, value: monitor?.url ?? dn.unknown, inline: false },
|
||||||
|
],
|
||||||
|
footer: { text: dn.checkmate },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
return [messageText, discordMessageText];
|
||||||
};
|
};
|
||||||
|
|
||||||
buildHardwareAlerts = async (networkResponse) => {
|
buildHardwareAlerts = async (networkResponse) => {
|
||||||
@@ -88,6 +106,43 @@ class NotificationUtils {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const alertsToSend = [];
|
const alertsToSend = [];
|
||||||
|
const discordEmbeds = [];
|
||||||
|
const monitorInfoFields = [
|
||||||
|
{ name: "Monitor", value: monitor.name, inline: true },
|
||||||
|
{ name: "URL", value: monitor.url, inline: false },
|
||||||
|
];
|
||||||
|
const formatDiscordAlert = {
|
||||||
|
cpu: () => ({
|
||||||
|
title: "CPU alert",
|
||||||
|
description: `Your current CPU usage (${(cpuUsage * 100).toFixed(0)}%) is above your threshold (${(cpuThreshold * 100).toFixed(0)}%)`,
|
||||||
|
color: 15548997,
|
||||||
|
fields: monitorInfoFields,
|
||||||
|
footer: { text: "Checkmate" },
|
||||||
|
}),
|
||||||
|
|
||||||
|
memory: () => ({
|
||||||
|
title: "Memory alert",
|
||||||
|
description: `Your current memory usage (${(memoryUsage * 100).toFixed(0)}%) is above your threshold (${(memoryThreshold * 100).toFixed(0)}%)`,
|
||||||
|
color: 15548997,
|
||||||
|
fields: monitorInfoFields,
|
||||||
|
footer: { text: "Checkmate" },
|
||||||
|
}),
|
||||||
|
|
||||||
|
disk: () => ({
|
||||||
|
title: "Disk alert",
|
||||||
|
description: `Your current disk usage is above your threshold (${(diskThreshold * 100).toFixed(0)}%)`,
|
||||||
|
color: 15548997,
|
||||||
|
footer: { text: "Checkmate" },
|
||||||
|
fields: [
|
||||||
|
...monitorInfoFields,
|
||||||
|
...(Array.isArray(disk) ? disk : []).map((d, idx) => ({
|
||||||
|
name: `Disk ${idx}`,
|
||||||
|
value: `${(d?.usage_percent * 100).toFixed(0)}%`,
|
||||||
|
inline: true,
|
||||||
|
})),
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
};
|
||||||
const alertTypes = ["cpu", "memory", "disk"];
|
const alertTypes = ["cpu", "memory", "disk"];
|
||||||
for (const type of alertTypes) {
|
for (const type of alertTypes) {
|
||||||
// Iterate over each alert type to see if any need to be decremented
|
// Iterate over each alert type to see if any need to be decremented
|
||||||
@@ -108,11 +163,13 @@ class NotificationUtils {
|
|||||||
.join(", ")} is above your threshold (${(diskThreshold * 100).toFixed(0)}%)`,
|
.join(", ")} is above your threshold (${(diskThreshold * 100).toFixed(0)}%)`,
|
||||||
};
|
};
|
||||||
alertsToSend.push(formatAlert[type]());
|
alertsToSend.push(formatAlert[type]());
|
||||||
|
discordEmbeds.push(formatDiscordAlert[type]());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
await monitor.save();
|
await monitor.save();
|
||||||
return alertsToSend;
|
const discordPayload = discordEmbeds.length ? { embeds: discordEmbeds } : null;
|
||||||
|
return [alertsToSend, discordPayload];
|
||||||
};
|
};
|
||||||
|
|
||||||
buildHardwareEmail = async (networkResponse, alerts) => {
|
buildHardwareEmail = async (networkResponse, alerts) => {
|
||||||
@@ -124,8 +181,15 @@ class NotificationUtils {
|
|||||||
return { subject, html };
|
return { subject, html };
|
||||||
};
|
};
|
||||||
|
|
||||||
buildHardwareNotificationMessage = (alerts) => {
|
buildHardwareNotificationMessage = (alerts, monitor) => {
|
||||||
return alerts.map((alert) => alert).join("\n");
|
const alertsHeader = [`Monitor: ${monitor.name}`, `URL: ${monitor.url}`];
|
||||||
|
const alertText = alerts.length > 0 ? [...alertsHeader, ...alerts] : [];
|
||||||
|
return alertText.map((alert) => alert).join("\n");
|
||||||
|
};
|
||||||
|
buildHardwareWebhookBody = (alerts, monitor) => {
|
||||||
|
const content = alerts.map((alert) => alert).join("\n");
|
||||||
|
const body = { text: content, name: monitor.name, url: monitor.url };
|
||||||
|
return body;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,6 +216,10 @@ class StringService {
|
|||||||
return this.translationService.getTranslation("monitorDownAlert");
|
return this.translationService.getTranslation("monitorDownAlert");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get discordNotification() {
|
||||||
|
return this.translationService.getTranslation("discordNotification");
|
||||||
|
}
|
||||||
|
|
||||||
getWebhookUnsupportedPlatform(platform) {
|
getWebhookUnsupportedPlatform(platform) {
|
||||||
return this.translationService.getTranslation("webhookUnsupportedPlatform").replace("{platform}", platform);
|
return this.translationService.getTranslation("webhookUnsupportedPlatform").replace("{platform}", platform);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user