mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-09-11 22:06:59 +08:00
Compare commits
120 Commits
1.23.0-bet
...
1.23.10
Author | SHA1 | Date | |
---|---|---|---|
|
4245ea86e7 | ||
|
f861a48dfc | ||
|
fa1214ae5e | ||
|
621419e434 | ||
|
482049c72b | ||
|
2815cc73cf | ||
|
e1147c06aa | ||
|
abc8f2b131 | ||
|
777ef6bc7b | ||
|
b244e8fcbb | ||
|
031947319a | ||
|
74a908a069 | ||
|
9c56c9b346 | ||
|
37666bf35f | ||
|
90badfabee | ||
|
e3396251a8 | ||
|
9c9a086788 | ||
|
9fb95fe95e | ||
|
1e75d81bcf | ||
|
cb3a104dc0 | ||
|
57a18958d6 | ||
|
1708b67949 | ||
|
73239d441d | ||
|
4ceeb304f1 | ||
|
711380bbbe | ||
|
9536c6aa6a | ||
|
4255496b11 | ||
|
f28dccf4e1 | ||
|
b689733d59 | ||
|
afaa7bb2f0 | ||
|
121d1a11af | ||
|
8e61158758 | ||
|
bf58838b89 | ||
|
33ce0ef02c | ||
|
c1aaad0d85 | ||
|
954e05b72f | ||
|
6d4a45f18c | ||
|
f0975cd929 | ||
|
40d6a21453 | ||
|
b383392e8f | ||
|
9964b6c4d8 | ||
|
d56bf08cd7 | ||
|
291d5d7c55 | ||
|
8e3ff25f7b | ||
|
6e80c850f4 | ||
|
0608881954 | ||
|
38efd97b28 | ||
|
ce0ba6c0ca | ||
|
c43223a16d | ||
|
9f170a68d7 | ||
|
1a862e47ab | ||
|
e64bf0e3fe | ||
|
523d137e2b | ||
|
18169c59a1 | ||
|
4ccf263481 | ||
|
1c13a75970 | ||
|
c3e3f27457 | ||
|
794f1810bf | ||
|
168357d93c | ||
|
476deb9fec | ||
|
a36f2a75ca | ||
|
88afab6571 | ||
|
bd9c44cccf | ||
|
1b148786a5 | ||
|
66a10b8993 | ||
|
2ab21ccf8a | ||
|
90d0e8ccde | ||
|
16a396debb | ||
|
6b3d69e1d3 | ||
|
b3b8e9f3a0 | ||
|
e5345848a2 | ||
|
d8a8f6c08b | ||
|
f98a1ce077 | ||
|
86fa57449e | ||
|
ff51704cdf | ||
|
33804d8823 | ||
|
1e12ca4786 | ||
|
0af4ee6c34 | ||
|
1f29fabe64 | ||
|
c4e222d1e6 | ||
|
f2a1c26ef8 | ||
|
8772baad9a | ||
|
215c89e8d3 | ||
|
e6a055af19 | ||
|
88d71d2c7a | ||
|
cd2d5325df | ||
|
75a1245b70 | ||
|
f666eb6d83 | ||
|
cb10643f57 | ||
|
c9ba4e7e8b | ||
|
94187bca5d | ||
|
39b4aa5966 | ||
|
cd79df07e1 | ||
|
0c40f02584 | ||
|
db42c13e05 | ||
|
5f85d8f749 | ||
|
c0e273df5b | ||
|
4da1341aa5 | ||
|
e765e6a1b8 | ||
|
eee9a1f004 | ||
|
4d07b65bdd | ||
|
1772158d62 | ||
|
7bfdb82f5d | ||
|
8945316ce6 | ||
|
9564550d5f | ||
|
a78e7a423e | ||
|
9dddd0b657 | ||
|
d04d86d74e | ||
|
eb11c18203 | ||
|
3da2d78ad9 | ||
|
2b4ec765ff | ||
|
72dcefff76 | ||
|
3a894958eb | ||
|
fe431d6385 | ||
|
ce0289855d | ||
|
c0174dc1c4 | ||
|
e745bd69da | ||
|
72741ebb10 | ||
|
ff88018b0c | ||
|
921c8f8100 |
@@ -34,7 +34,12 @@ tsconfig.json
|
||||
/ecosystem.config.js
|
||||
/extra/healthcheck.exe
|
||||
/extra/healthcheck
|
||||
extra/exe-builder
|
||||
/extra/exe-builder
|
||||
/extra/push-examples
|
||||
/extra/uptime-kuma-push
|
||||
|
||||
# Comment the following line if you want to rebuild the healthcheck binary
|
||||
/extra/healthcheck-armv7
|
||||
|
||||
|
||||
### .gitignore content (commented rules are duplicated)
|
||||
|
@@ -78,7 +78,7 @@ module.exports = {
|
||||
"checkLoops": false,
|
||||
}],
|
||||
"space-before-blocks": "warn",
|
||||
//'no-console': 'warn',
|
||||
//"no-console": "warn",
|
||||
"no-extra-boolean-cast": "off",
|
||||
"no-multiple-empty-lines": [ "warn", {
|
||||
"max": 1,
|
||||
@@ -90,7 +90,8 @@ module.exports = {
|
||||
"no-unneeded-ternary": "error",
|
||||
"array-bracket-newline": [ "error", "consistent" ],
|
||||
"eol-last": [ "error", "always" ],
|
||||
//'prefer-template': 'error',
|
||||
//"prefer-template": "error",
|
||||
"template-curly-spacing": [ "warn", "never" ],
|
||||
"comma-dangle": [ "warn", "only-multiline" ],
|
||||
"no-empty": [ "error", {
|
||||
"allowEmptyCatch": true
|
||||
|
32
.github/workflows/auto-test.yml
vendored
32
.github/workflows/auto-test.yml
vendored
@@ -5,11 +5,11 @@ name: Auto Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ master, 1.23.X ]
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [ master, 1.23.X ]
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
|
||||
@@ -27,13 +27,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm install npm@latest -g
|
||||
- run: npm install npm@9 -g
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
@@ -50,18 +50,18 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ARMv7 ]
|
||||
node: [ 14.21.3, 20.5.0 ]
|
||||
node: [ 14, 20 ]
|
||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node }}
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
- run: npm install npm@latest -g
|
||||
- run: npm install npm@9 -g
|
||||
- run: npm ci --production
|
||||
|
||||
check-linters:
|
||||
@@ -69,24 +69,24 @@ jobs:
|
||||
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 14
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14
|
||||
- run: npm install
|
||||
- run: npm run lint
|
||||
- run: npm run lint:prod
|
||||
|
||||
e2e-tests:
|
||||
needs: [ check-linters ]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 14
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14
|
||||
- run: npm install
|
||||
@@ -98,10 +98,10 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: git config --global core.autocrlf false # Mainly for Windows
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js 14
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 14
|
||||
- run: npm install
|
||||
|
4
.github/workflows/close-incorrect-issue.yml
vendored
4
.github/workflows/close-incorrect-issue.yml
vendored
@@ -14,10 +14,10 @@ jobs:
|
||||
node-version: [16]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: 'npm'
|
||||
|
7
.github/workflows/json-yaml-validate.yml
vendored
7
.github/workflows/json-yaml-validate.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: json-yaml-validate
|
||||
name: json-yaml-validate
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
@@ -6,6 +6,7 @@ on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
- 1.23.X
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
@@ -16,11 +17,11 @@ jobs:
|
||||
json-yaml-validate:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: json-yaml-validate
|
||||
id: json-yaml-validate
|
||||
uses: GrantBirki/json-yaml-validate@v1.3.0
|
||||
uses: GrantBirki/json-yaml-validate@v2.4.0
|
||||
with:
|
||||
comment: "true" # enable comment mode
|
||||
exclude_file: ".github/config/exclude.txt" # gitignore style file for exclusions
|
||||
|
2
.github/workflows/stale-bot.yml
vendored
2
.github/workflows/stale-bot.yml
vendored
@@ -9,7 +9,7 @@ jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v7
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
stale-issue-message: 'We are clearing up our old issues and your ticket has been open for 3 months with no activity. Remove stale label or comment or this will be closed in 2 days.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 2 days with no activity.'
|
||||
|
@@ -2,13 +2,13 @@
|
||||
|
||||
First of all, I want to thank everyone who made pull requests for Uptime Kuma. I never thought the GitHub Community would be so nice! Because of this, I also never thought that other people would actually read and edit my code. It is not very well structured or commented, sorry about that.
|
||||
|
||||
The project was created with vite.js (vue3). Then I created a subdirectory called "server" for server part. Both frontend and backend share the same package.json.
|
||||
The project was created with vite.js (vue3). Then I created a subdirectory called "server" for the server part. Both frontend and backend share the same package.json.
|
||||
|
||||
The frontend code build into "dist" directory. The server (express.js) exposes the "dist" directory as root of the endpoint. This is how production is working.
|
||||
The frontend code builds into "dist" directory. The server (express.js) exposes the "dist" directory as the root of the endpoint. This is how production is working.
|
||||
|
||||
## Key Technical Skills
|
||||
|
||||
- Node.js (You should know what are promise, async/await and arrow function etc.)
|
||||
- Node.js (You should know about promise, async/await and arrow function etc.)
|
||||
- Socket.io
|
||||
- SCSS
|
||||
- Vue.js
|
||||
@@ -30,7 +30,7 @@ The frontend code build into "dist" directory. The server (express.js) exposes t
|
||||
|
||||
## Can I create a pull request for Uptime Kuma?
|
||||
|
||||
Yes or no, it depends on what you will try to do. Since I don't want to waste your time, be sure to **create an empty draft pull request or open an issue, so we can have a discussion first**. Especially for a large pull request or you don't know it will be merged or not.
|
||||
Yes or no, it depends on what you will try to do. Since I don't want to waste your time, be sure to **create an empty draft pull request or open an issue, so we can have a discussion first**. Especially for a large pull request or you don't know if it will be merged or not.
|
||||
|
||||
Here are some references:
|
||||
|
||||
@@ -46,8 +46,8 @@ Here are some references:
|
||||
- New features
|
||||
|
||||
### ❌ Won't be merged:
|
||||
- A dedicated pr for translating existing languages (see [these instructions](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md))
|
||||
- Do not pass the auto test
|
||||
- A dedicated PR for translating existing languages (see [these instructions](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md))
|
||||
- Do not pass the auto-test
|
||||
- Any breaking changes
|
||||
- Duplicated pull requests
|
||||
- Buggy
|
||||
@@ -61,9 +61,9 @@ The above cases may not cover all possible situations.
|
||||
|
||||
I (@louislam) have the final say. If your pull request does not meet my expectations, I will reject it, no matter how much time you spend on it. Therefore, it is essential to have a discussion beforehand.
|
||||
|
||||
I will mark your pull request in the [milestones](https://github.com/louislam/uptime-kuma/milestones), if I am plan to review and merge it.
|
||||
I will assign your pull request to a [milestone](https://github.com/louislam/uptime-kuma/milestones), if I plan to review and merge it.
|
||||
|
||||
Also, please don't rush or ask for ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.
|
||||
Also, please don't rush or ask for an ETA, because I have to understand the pull request, make sure it is no breaking changes and stick to my vision of this project, especially for large pull requests.
|
||||
|
||||
|
||||
### Recommended Pull Request Guideline
|
||||
@@ -83,11 +83,11 @@ Before deep into coding, discussion first is preferred. Creating an empty pull r
|
||||
|
||||
## Project Styles
|
||||
|
||||
I personally do not like something that requires so many configurations before you can finally start the app. I hope Uptime Kuma installation could be as easy as like installing a mobile app.
|
||||
I personally do not like something that requires so many configurations before you can finally start the app. I hope Uptime Kuma installation will be as easy as like installing a mobile app.
|
||||
|
||||
- Easy to install for non-Docker users, no native build dependency is needed (for x86_64/armv7/arm64), no extra config, no extra effort required to get it running
|
||||
- Easy to install for non-Docker users, no native build dependency is needed (for x86_64/armv7/arm64), no extra config, and no extra effort required to get it running
|
||||
- Single container for Docker users, no very complex docker-compose file. Just map the volume and expose the port, then good to go
|
||||
- Settings should be configurable in the frontend. Environment variable is not encouraged, unless it is related to startup such as `DATA_DIR`
|
||||
- Settings should be configurable in the frontend. Environment variables are discouraged, unless it is related to startup such as `DATA_DIR`
|
||||
- Easy to use
|
||||
- The web UI styling should be consistent and nice
|
||||
|
||||
@@ -130,7 +130,7 @@ Port `3000` and port `3001` will be used.
|
||||
npm run dev
|
||||
```
|
||||
|
||||
But sometimes, you would like to keep restart the server, but not the frontend, you can run these command in two terminals:
|
||||
But sometimes, you would like to restart the server, but not the frontend, you can run these commands in two terminals:
|
||||
```
|
||||
npm run start-frontend-dev
|
||||
npm run start-server-dev
|
||||
@@ -146,13 +146,13 @@ It is mainly a socket.io app + express.js.
|
||||
express.js is used for:
|
||||
- entry point such as redirecting to a status page or the dashboard
|
||||
- serving the frontend built files (index.html, .js and .css etc.)
|
||||
- serving internal APIs of status page
|
||||
- serving internal APIs of the status page
|
||||
|
||||
|
||||
### Structure in /server/
|
||||
|
||||
- jobs/ (Jobs that are running in another process)
|
||||
- model/ (Object model, auto mapping to the database table name)
|
||||
- model/ (Object model, auto-mapping to the database table name)
|
||||
- modules/ (Modified 3rd-party modules)
|
||||
- monitor_types (Monitor Types)
|
||||
- notification-providers/ (individual notification logic)
|
||||
@@ -163,7 +163,7 @@ express.js is used for:
|
||||
|
||||
## Frontend Dev Server
|
||||
|
||||
It binds to `0.0.0.0:3000` by default. Frontend dev server is used for development only.
|
||||
It binds to `0.0.0.0:3000` by default. The frontend dev server is used for development only.
|
||||
|
||||
For production, it is not used. It will be compiled to `dist` directory instead.
|
||||
|
||||
@@ -181,7 +181,7 @@ Uptime Kuma Frontend is a single page application (SPA). Most paths are handled
|
||||
|
||||
The router is in `src/router.js`
|
||||
|
||||
As you can see, most data in frontend is stored in root level, even though you changed the current router to any other pages.
|
||||
As you can see, most data in the frontend is stored at the root level, even though you changed the current router to any other pages.
|
||||
|
||||
The data and socket logic are in `src/mixins/socket.js`.
|
||||
|
||||
@@ -210,25 +210,25 @@ Both frontend and backend share the same package.json. However, the frontend dep
|
||||
|
||||
### Update Dependencies
|
||||
|
||||
Since previously updating Vite 2.5.10 to 2.6.0 broke the application completely, from now on, it should update patch release version only.
|
||||
Since previously updating Vite 2.5.10 to 2.6.0 broke the application completely, from now on, it should update the patch release version only.
|
||||
|
||||
Patch release = the third digit ([Semantic Versioning](https://semver.org/))
|
||||
|
||||
If for maybe security reasons, a library must be updated. Then you must need to check if there are any breaking changes.
|
||||
If for security / bug / other reasons, a library must be updated, breaking changes need to be checked by the person proposing the change.
|
||||
|
||||
## Translations
|
||||
|
||||
Please add **all** the strings which are translatable to `src/lang/en.json` (If translation keys are ommited, they can not be translated).
|
||||
Please add **all** the strings which are translatable to `src/lang/en.json` (If translation keys are omitted, they can not be translated).
|
||||
|
||||
**Don't include any other languages in your inital Pull-Request** (even if this is your mother tounge), to avoid merge-conflicts between weblate and `master`.
|
||||
The translations can then (after merging a PR into `master`) be translated by awesome people donating their language-skills.
|
||||
**Don't include any other languages in your initial Pull-Request** (even if this is your mother tongue), to avoid merge-conflicts between weblate and `master`.
|
||||
The translations can then (after merging a PR into `master`) be translated by awesome people donating their language skills.
|
||||
|
||||
If you want to help by translating Uptime Kuma into your language, please visit the [instructions on how to translate using weblate](https://github.com/louislam/uptime-kuma/blob/master/src/lang/README.md).
|
||||
|
||||
## Spelling & Grammar
|
||||
|
||||
Feel free to correct the grammar in the documentation or code.
|
||||
My mother language is not english and my grammar is not that great.
|
||||
My mother language is not English and my grammar is not that great.
|
||||
|
||||
## Wiki
|
||||
|
||||
|
@@ -26,7 +26,7 @@ It is a temporary live demo, all data will be deleted after 10 minutes. Use the
|
||||
* Monitoring uptime for HTTP(s) / TCP / HTTP(s) Keyword / HTTP(s) Json Query / Ping / DNS Record / Push / Steam Game Server / Docker Containers
|
||||
* Fancy, Reactive, Fast UI/UX
|
||||
* Notifications via Telegram, Discord, Gotify, Slack, Pushover, Email (SMTP), and [90+ notification services, click here for the full list](https://github.com/louislam/uptime-kuma/tree/master/src/components/notifications)
|
||||
* 20 second intervals
|
||||
* 20-second intervals
|
||||
* [Multi Languages](https://github.com/louislam/uptime-kuma/tree/master/src/lang)
|
||||
* Multiple status pages
|
||||
* Map status pages to specific domains
|
||||
@@ -70,7 +70,7 @@ npm run setup
|
||||
# Option 1. Try it
|
||||
node server/server.js
|
||||
|
||||
# (Recommended) Option 2. Run in background using PM2
|
||||
# (Recommended) Option 2. Run in the background using PM2
|
||||
# Install PM2 if you don't have it:
|
||||
npm install pm2 -g && pm2 install pm2-logrotate
|
||||
|
||||
@@ -93,7 +93,7 @@ pm2 save && pm2 startup
|
||||
|
||||
### Windows Portable (x64)
|
||||
|
||||
https://github.com/louislam/uptime-kuma/files/11886108/uptime-kuma-win64-portable-1.0.1.zip
|
||||
https://github.com/louislam/uptime-kuma/releases/download/1.23.1/uptime-kuma-windows-x64-portable-1.23.1.zip
|
||||
|
||||
### Advanced Installation
|
||||
|
||||
@@ -109,7 +109,7 @@ https://github.com/louislam/uptime-kuma/wiki/%F0%9F%86%99-How-to-Update
|
||||
|
||||
## 🆕 What's Next?
|
||||
|
||||
I will mark requests/issues to the next milestone.
|
||||
I will assign requests/issues to the next milestone.
|
||||
|
||||
https://github.com/louislam/uptime-kuma/milestones
|
||||
|
||||
|
@@ -3,19 +3,19 @@
|
||||
## Reporting a Vulnerability
|
||||
|
||||
1. Please report security issues to https://github.com/louislam/uptime-kuma/security/advisories/new.
|
||||
1. Please also create a empty security issues for alerting me, as GitHub Advisory do not send a notification, I probably will miss without this. https://github.com/louislam/uptime-kuma/issues/new?assignees=&labels=help&template=security.md
|
||||
1. Please also create an empty security issue to alert me, as GitHub Advisories do not send a notification, I probably will miss it without this. https://github.com/louislam/uptime-kuma/issues/new?assignees=&labels=help&template=security.md
|
||||
|
||||
Do not use the public issue tracker or discuss it in the public as it will cause more damage.
|
||||
Do not use the public issue tracker or discuss it in public as it will cause more damage.
|
||||
|
||||
## Do you accept other 3rd-party bug bounty platforms?
|
||||
|
||||
At this moment, I DO NOT accept other bug bounty platforms, because I am not familiar with these platforms and someone have tried to send a phishing link to me by this already. To minimize my own risk, please report through GitHub Advisories only. I will ignore all 3rd-party bug bounty platforms emails.
|
||||
At this moment, I DO NOT accept other bug bounty platforms, because I am not familiar with these platforms and someone has tried to send a phishing link to me by doing this already. To minimize my own risk, please report through GitHub Advisories only. I will ignore all 3rd-party bug bounty platforms emails.
|
||||
|
||||
## Supported Versions
|
||||
|
||||
### Uptime Kuma Versions
|
||||
|
||||
You should use or upgrade to the latest version of Uptime Kuma. All `1.X.X` versions are upgradable to the lastest version.
|
||||
You should use or upgrade to the latest version of Uptime Kuma. All `1.X.X` versions are upgradable to the latest version.
|
||||
|
||||
### Upgradable Docker Tags
|
||||
|
||||
|
@@ -3,7 +3,6 @@ import vue from "@vitejs/plugin-vue";
|
||||
import { defineConfig } from "vite";
|
||||
import visualizer from "rollup-plugin-visualizer";
|
||||
import viteCompression from "vite-plugin-compression";
|
||||
import commonjs from "vite-plugin-commonjs";
|
||||
|
||||
const postCssScss = require("postcss-scss");
|
||||
const postcssRTLCSS = require("postcss-rtlcss");
|
||||
@@ -22,7 +21,6 @@ export default defineConfig({
|
||||
"CODESPACE_NAME": JSON.stringify(process.env.CODESPACE_NAME),
|
||||
},
|
||||
plugins: [
|
||||
commonjs(),
|
||||
vue(),
|
||||
legacy({
|
||||
targets: [ "since 2015" ],
|
||||
|
34
db/patch-fix-kafka-producer-booleans.sql
Normal file
34
db/patch-fix-kafka-producer-booleans.sql
Normal file
@@ -0,0 +1,34 @@
|
||||
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
-- Rename COLUMNs to another one (suffixed by `_old`)
|
||||
ALTER TABLE monitor
|
||||
RENAME COLUMN kafka_producer_ssl TO kafka_producer_ssl_old;
|
||||
|
||||
ALTER TABLE monitor
|
||||
RENAME COLUMN kafka_producer_allow_auto_topic_creation TO kafka_producer_allow_auto_topic_creation_old;
|
||||
|
||||
-- Add correct COLUMNs
|
||||
ALTER TABLE monitor
|
||||
ADD COLUMN kafka_producer_ssl BOOLEAN default 0 NOT NULL;
|
||||
|
||||
ALTER TABLE monitor
|
||||
ADD COLUMN kafka_producer_allow_auto_topic_creation BOOLEAN default 0 NOT NULL;
|
||||
|
||||
-- These SQL is still not fully safe. See https://github.com/louislam/uptime-kuma/issues/4039.
|
||||
|
||||
-- Set bring old values from `_old` COLUMNs to correct ones
|
||||
-- UPDATE monitor SET kafka_producer_allow_auto_topic_creation = monitor.kafka_producer_allow_auto_topic_creation_old
|
||||
-- WHERE monitor.kafka_producer_allow_auto_topic_creation_old IS NOT NULL;
|
||||
|
||||
-- UPDATE monitor SET kafka_producer_ssl = monitor.kafka_producer_ssl_old
|
||||
-- WHERE monitor.kafka_producer_ssl_old IS NOT NULL;
|
||||
|
||||
-- Remove old COLUMNs
|
||||
ALTER TABLE monitor
|
||||
DROP COLUMN kafka_producer_allow_auto_topic_creation_old;
|
||||
|
||||
ALTER TABLE monitor
|
||||
DROP COLUMN kafka_producer_ssl_old;
|
||||
|
||||
COMMIT;
|
10
db/patch-notification-config.sql
Normal file
10
db/patch-notification-config.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
-- SQLite: Change the data type of the column "config" from VARCHAR to TEXT
|
||||
ALTER TABLE notification RENAME COLUMN config TO config_old;
|
||||
ALTER TABLE notification ADD COLUMN config TEXT;
|
||||
UPDATE notification SET config = config_old;
|
||||
ALTER TABLE notification DROP COLUMN config_old;
|
||||
|
||||
COMMIT;
|
7
db/patch-timeout.sql
Normal file
7
db/patch-timeout.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
-- You should not modify if this have pushed to Github, unless it does serious wrong with the db.
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
UPDATE monitor SET timeout = (interval * 0.8)
|
||||
WHERE timeout IS NULL OR timeout <= 0;
|
||||
|
||||
COMMIT;
|
@@ -1,6 +1,6 @@
|
||||
# DON'T UPDATE TO node:14-bullseye-slim, see #372.
|
||||
# If the image changed, the second stage image should be changed too
|
||||
FROM node:16-buster-slim
|
||||
# DON'T UPDATE TO bullseye-slim, see #372.
|
||||
# There is no 20-buster-slim for armv7 unfortunately, 18-buster-slim is the last one for Uptime Kuma v1.
|
||||
FROM node:18-buster-slim
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
WORKDIR /app
|
||||
@@ -27,7 +27,7 @@ RUN apt-get update && \
|
||||
ca-certificates \
|
||||
sudo \
|
||||
nscd && \
|
||||
pip3 --no-cache-dir install apprise==1.4.5 && \
|
||||
pip3 --no-cache-dir install apprise==1.6.0 && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
apt --yes autoremove
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
* ⚠️ Deprecated: Changed to healthcheck.go, it will be deleted in the future.
|
||||
* This script should be run after a period of time (180s), because the server may need some time to prepare.
|
||||
*/
|
||||
const { FBSD } = require("../server/util-server");
|
||||
const FBSD = /^freebsd/.test(process.platform);
|
||||
|
||||
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0";
|
||||
|
||||
|
@@ -189,13 +189,15 @@ if (type == "local") {
|
||||
bash("check=$(git --version)");
|
||||
if (check == "") {
|
||||
error = 1;
|
||||
println("Error: git is missing");
|
||||
println("Error: git is not found!");
|
||||
println("help: an installation guide is available at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git");
|
||||
}
|
||||
|
||||
bash("check=$(node -v)");
|
||||
if (check == "") {
|
||||
error = 1;
|
||||
println("Error: node is missing");
|
||||
println("Error: node is not found");
|
||||
println("help: an installation guide is available at https://nodejs.org/en/download");
|
||||
}
|
||||
|
||||
if (error > 0) {
|
||||
@@ -216,6 +218,7 @@ if (type == "local") {
|
||||
bash("check=$(pm2 --version)");
|
||||
if (check == "") {
|
||||
println("Error: pm2 is not found!");
|
||||
println("help: an installation guide is available at https://pm2.keymetrics.io/docs/usage/quick-start/");
|
||||
bash("exit 1");
|
||||
}
|
||||
|
||||
@@ -232,6 +235,7 @@ if (type == "local") {
|
||||
bash("check=$(docker -v)");
|
||||
if (check == "") {
|
||||
println("Error: docker is not found!");
|
||||
println("help: an installation guide is available at https://docs.docker.com/desktop/");
|
||||
bash("exit 1");
|
||||
}
|
||||
|
||||
@@ -239,6 +243,7 @@ if (type == "local") {
|
||||
|
||||
bash("if [[ \"$check\" == *\"Is the docker daemon running\"* ]]; then
|
||||
\"echo\" \"Error: docker is not running\"
|
||||
\"echo\" \"help: a troubleshooting guide is available at https://docs.docker.com/config/daemon/troubleshoot/\"
|
||||
\"exit\" \"1\"
|
||||
fi");
|
||||
|
||||
|
44
extra/reformat-changelog.js
Normal file
44
extra/reformat-changelog.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// Generate on GitHub
|
||||
const input = `
|
||||
* Add Korean translation by @Alanimdeo in https://github.com/louislam/dockge/pull/86
|
||||
`;
|
||||
|
||||
const template = `
|
||||
### 🆕 New Features
|
||||
|
||||
### 💇♀️ Improvements
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
### ⬆️ Security Fixes
|
||||
|
||||
### 🦎 Translation Contributions
|
||||
|
||||
### Others
|
||||
- Other small changes, code refactoring and comment/doc updates in this repo:
|
||||
`;
|
||||
|
||||
const lines = input.split("\n").filter((line) => line.trim() !== "");
|
||||
|
||||
for (const line of lines) {
|
||||
// Split the last " by "
|
||||
const usernamePullRequesURL = line.split(" by ").pop();
|
||||
|
||||
if (!usernamePullRequesURL) {
|
||||
console.log("Unable to parse", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
const [ username, pullRequestURL ] = usernamePullRequesURL.split(" in ");
|
||||
const pullRequestID = "#" + pullRequestURL.split("/").pop();
|
||||
let message = line.split(" by ").shift();
|
||||
|
||||
if (!message) {
|
||||
console.log("Unable to parse", line);
|
||||
continue;
|
||||
}
|
||||
|
||||
message = message.split("* ").pop();
|
||||
console.log("-", pullRequestID, message, `(Thanks ${username})`);
|
||||
}
|
||||
console.log(template);
|
@@ -5,6 +5,8 @@ const { R } = require("redbean-node");
|
||||
const readline = require("readline");
|
||||
const { initJWTSecret } = require("../server/util-server");
|
||||
const User = require("../server/model/user");
|
||||
const { io } = require("socket.io-client");
|
||||
const { localWebSocketURL } = require("../server/config");
|
||||
const args = require("args-parser")(process.argv);
|
||||
const rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
@@ -36,12 +38,16 @@ const main = async () => {
|
||||
// Reset all sessions by reset jwt secret
|
||||
await initJWTSecret();
|
||||
|
||||
// Disconnect all other socket clients of the user
|
||||
await disconnectAllSocketClients(user.username, password);
|
||||
|
||||
break;
|
||||
} else {
|
||||
console.log("Passwords do not match, please try again.");
|
||||
}
|
||||
}
|
||||
console.log("Password reset successfully.");
|
||||
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Error: " + e.message);
|
||||
@@ -66,6 +72,44 @@ function question(question) {
|
||||
});
|
||||
}
|
||||
|
||||
function disconnectAllSocketClients(username, password) {
|
||||
return new Promise((resolve) => {
|
||||
console.log("Connecting to " + localWebSocketURL + " to disconnect all other socket clients");
|
||||
|
||||
// Disconnect all socket connections
|
||||
const socket = io(localWebSocketURL, {
|
||||
reconnection: false,
|
||||
timeout: 5000,
|
||||
});
|
||||
socket.on("connect", () => {
|
||||
socket.emit("login", {
|
||||
username,
|
||||
password,
|
||||
}, (res) => {
|
||||
if (res.ok) {
|
||||
console.log("Logged in.");
|
||||
socket.emit("disconnectOtherSocketClients");
|
||||
} else {
|
||||
console.warn("Login failed.");
|
||||
console.warn("Please restart the server to disconnect all sessions.");
|
||||
}
|
||||
socket.close();
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("connect_error", function () {
|
||||
// The localWebSocketURL is not guaranteed to be working for some complicated Uptime Kuma setup
|
||||
// Ask the user to restart the server manually
|
||||
console.warn("Failed to connect to " + localWebSocketURL);
|
||||
console.warn("Please restart the server to disconnect all sessions manually.");
|
||||
resolve();
|
||||
});
|
||||
socket.on("disconnect", () => {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (!process.env.TEST_BACKEND) {
|
||||
main();
|
||||
}
|
||||
|
16
index.html
16
index.html
@@ -9,8 +9,24 @@
|
||||
<meta name="theme-color" id="theme-color" content="" />
|
||||
<meta name="description" content="Uptime Kuma monitoring tool" />
|
||||
<title>Uptime Kuma</title>
|
||||
<style>
|
||||
.noscript-message {
|
||||
font-size: 20px;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
max-width: 500px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<div class="noscript-message">
|
||||
Sorry, you don't seem to have JavaScript enabled or your browser
|
||||
doesn't support it.<br />This website requires JavaScript to function.
|
||||
Please enable JavaScript in your browser settings to continue.
|
||||
</div>
|
||||
</noscript>
|
||||
<div id="app"></div>
|
||||
<script type="module" src="/src/main.js"></script>
|
||||
</body>
|
||||
|
@@ -156,12 +156,14 @@ fi
|
||||
check=$(git --version)
|
||||
if [ "$check" == "" ]; then
|
||||
error=$((1))
|
||||
"echo" "-e" "Error: git is missing"
|
||||
"echo" "-e" "Error: git is not found!"
|
||||
"echo" "-e" "help: an installation guide is available at https://git-scm.com/book/en/v2/Getting-Started-Installing-Git"
|
||||
fi
|
||||
check=$(node -v)
|
||||
if [ "$check" == "" ]; then
|
||||
error=$((1))
|
||||
"echo" "-e" "Error: node is missing"
|
||||
"echo" "-e" "Error: node is not found"
|
||||
"echo" "-e" "help: an installation guide is available at https://nodejs.org/en/download"
|
||||
fi
|
||||
if [ $(($error > 0)) == 1 ]; then
|
||||
"echo" "-e" "Please install above missing software"
|
||||
@@ -180,6 +182,7 @@ fi
|
||||
check=$(pm2 --version)
|
||||
if [ "$check" == "" ]; then
|
||||
"echo" "-e" "Error: pm2 is not found!"
|
||||
"echo" "-e" "help: an installation guide is available at https://pm2.keymetrics.io/docs/usage/quick-start/"
|
||||
exit 1
|
||||
fi
|
||||
mkdir -p $installPath
|
||||
@@ -192,11 +195,13 @@ else
|
||||
check=$(docker -v)
|
||||
if [ "$check" == "" ]; then
|
||||
"echo" "-e" "Error: docker is not found!"
|
||||
"echo" "-e" "help: an installation guide is available at https://docs.docker.com/desktop/"
|
||||
exit 1
|
||||
fi
|
||||
check=$(docker info)
|
||||
if [[ "$check" == *"Is the docker daemon running"* ]]; then
|
||||
"echo" "Error: docker is not running"
|
||||
"echo" "help: a troubleshooting guide is available at https://docs.docker.com/config/daemon/troubleshoot/"
|
||||
"exit" "1"
|
||||
fi
|
||||
if [ "$3" != "" ]; then
|
||||
|
4179
package-lock.json
generated
4179
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
29
package.json
29
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "uptime-kuma",
|
||||
"version": "1.23.0-beta.1",
|
||||
"version": "1.23.10",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -13,10 +13,12 @@
|
||||
"install-legacy": "npm install",
|
||||
"update-legacy": "npm update",
|
||||
"lint:js": "eslint --ext \".js,.vue\" --ignore-path .gitignore .",
|
||||
"lint:js-prod": "npm run lint:js -- --max-warnings 0",
|
||||
"lint-fix:js": "eslint --ext \".js,.vue\" --fix --ignore-path .gitignore .",
|
||||
"lint:style": "stylelint \"**/*.{vue,css,scss}\" --ignore-path .gitignore",
|
||||
"lint-fix:style": "stylelint \"**/*.{vue,css,scss}\" --fix --ignore-path .gitignore",
|
||||
"lint": "npm run lint:js && npm run lint:style",
|
||||
"lint:prod": "npm run lint:js-prod && npm run lint:style",
|
||||
"dev": "concurrently -k -r \"wait-on tcp:3000 && npm run start-server-dev \" \"npm run start-frontend-dev\"",
|
||||
"start-frontend-dev": "cross-env NODE_ENV=development vite --host --config ./config/vite.config.js",
|
||||
"start-frontend-devcontainer": "cross-env NODE_ENV=development DEVCONTAINER=1 vite --host --config ./config/vite.config.js",
|
||||
@@ -40,7 +42,7 @@
|
||||
"build-docker-nightly-amd64": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:nightly-amd64 --target nightly . --push --progress plain",
|
||||
"build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test --target pr-test . --push",
|
||||
"upload-artifacts": "docker buildx build -f docker/dockerfile --platform linux/amd64 -t louislam/uptime-kuma:upload-artifact --build-arg VERSION --build-arg GITHUB_TOKEN --target upload-artifact . --progress plain",
|
||||
"setup": "git checkout 1.22.1 && npm ci --production && npm run download-dist",
|
||||
"setup": "git checkout 1.23.10 && npm ci --production && npm run download-dist",
|
||||
"download-dist": "node extra/download-dist.js",
|
||||
"mark-as-nightly": "node extra/mark-as-nightly.js",
|
||||
"reset-password": "node extra/reset-password.js",
|
||||
@@ -56,6 +58,9 @@
|
||||
"test-install-script-ubuntu1604": "npm run compile-install-script && docker build --progress plain -f test/test_install_script/ubuntu1604.dockerfile .",
|
||||
"simple-dns-server": "node extra/simple-dns-server.js",
|
||||
"simple-mqtt-server": "node extra/simple-mqtt-server.js",
|
||||
"simple-mongo": "docker run --rm -p 27017:27017 mongo",
|
||||
"simple-postgres": "docker run --rm -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgres",
|
||||
"simple-mariadb": "docker run --rm -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mariadb# mariadb",
|
||||
"update-language-files": "cd extra/update-language-files && node index.js && cross-env-shell eslint ../../src/languages/$npm_config_language.js --fix",
|
||||
"ncu-patch": "npm-check-updates -u -t patch",
|
||||
"release-final": "node ./extra/test-docker.js && node extra/update-version.js && npm run build-docker && node ./extra/press-any-key.js && npm run upload-artifacts && node ./extra/update-wiki-version.js",
|
||||
@@ -69,7 +74,8 @@
|
||||
"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\"",
|
||||
"build-healthcheck-armv7": "cross-env GOOS=linux GOARCH=arm GOARM=7 go build -x -o ./extra/healthcheck-armv7 ./extra/healthcheck.go",
|
||||
"deploy-demo-server": "node extra/deploy-demo-server.js",
|
||||
"sort-contributors": "node extra/sort-contributors.js"
|
||||
"sort-contributors": "node extra/sort-contributors.js",
|
||||
"start-server-node14-win": "private\\node14\\node.exe server/server.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@grpc/grpc-js": "~1.7.3",
|
||||
@@ -95,7 +101,8 @@
|
||||
"express-basic-auth": "~1.2.1",
|
||||
"express-static-gzip": "~2.1.7",
|
||||
"form-data": "~4.0.0",
|
||||
"gamedig": "~4.0.5",
|
||||
"gamedig": "^4.2.0",
|
||||
"html-escaper": "^3.0.3",
|
||||
"http-graceful-shutdown": "~3.1.7",
|
||||
"http-proxy-agent": "~5.0.0",
|
||||
"https-proxy-agent": "~5.0.1",
|
||||
@@ -108,10 +115,10 @@
|
||||
"kafkajs": "^2.2.4",
|
||||
"limiter": "~2.1.0",
|
||||
"liquidjs": "^10.7.0",
|
||||
"mongodb": "~4.14.0",
|
||||
"mongodb": "~4.17.1",
|
||||
"mqtt": "~4.3.7",
|
||||
"mssql": "~8.1.4",
|
||||
"mysql2": "~2.3.3",
|
||||
"mysql2": "~3.6.2",
|
||||
"nanoid": "~3.3.4",
|
||||
"node-cloudflared-tunnel": "~1.0.9",
|
||||
"node-radius-client": "~1.0.0",
|
||||
@@ -120,11 +127,12 @@
|
||||
"notp": "~2.0.3",
|
||||
"openid-client": "^5.4.2",
|
||||
"password-hash": "~1.2.2",
|
||||
"pg": "~8.8.0",
|
||||
"pg-connection-string": "~2.5.0",
|
||||
"pg": "~8.11.3",
|
||||
"pg-connection-string": "~2.6.2",
|
||||
"playwright-core": "~1.35.1",
|
||||
"prom-client": "~13.2.0",
|
||||
"prometheus-api-metrics": "~3.2.1",
|
||||
"promisify-child-process": "~4.1.2",
|
||||
"protobufjs": "~7.2.4",
|
||||
"qs": "~6.10.4",
|
||||
"redbean-node": "~0.3.0",
|
||||
@@ -160,7 +168,7 @@
|
||||
"core-js": "~3.26.1",
|
||||
"cronstrue": "~2.24.0",
|
||||
"cross-env": "~7.0.3",
|
||||
"cypress": "^12.17.0",
|
||||
"cypress": "^13.2.0",
|
||||
"delay": "^5.0.0",
|
||||
"dns2": "~2.0.1",
|
||||
"dompurify": "~2.4.3",
|
||||
@@ -184,7 +192,6 @@
|
||||
"typescript": "~4.4.4",
|
||||
"v-pagination-3": "~0.1.7",
|
||||
"vite": "~4.4.1",
|
||||
"vite-plugin-commonjs": "^0.8.0",
|
||||
"vite-plugin-compression": "^0.5.1",
|
||||
"vue": "~3.3.4",
|
||||
"vue-chartjs": "~5.2.0",
|
||||
@@ -198,7 +205,7 @@
|
||||
"vue-router": "~4.0.14",
|
||||
"vue-toastification": "~2.0.0-rc.5",
|
||||
"vuedraggable": "~4.1.0",
|
||||
"wait-on": "^6.0.1",
|
||||
"wait-on": "^7.2.0",
|
||||
"whatwg-url": "~12.0.1"
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,9 @@
|
||||
<svg width="640" height="640" viewBox="0 0 640 640" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M490.4 235.64C544.09 358.38 544.09 435.34 490.4 466.5C409.85 513.24 199.96 527.49 139.54 455.64C99.2601 407.74 99.2601 334.4 139.54 235.64C180.5 168.18 238.71 134.45 314.17 134.45C389.64 134.45 448.38 168.18 490.4 235.64Z" fill="url(#paint0_linear_381_799)"/>
|
||||
<path d="M490.4 235.64C544.09 358.38 544.09 435.34 490.4 466.5C409.85 513.24 199.96 527.49 139.54 455.64C99.2601 407.74 99.2601 334.4 139.54 235.64C180.5 168.18 238.71 134.45 314.17 134.45C389.64 134.45 448.38 168.18 490.4 235.64Z" stroke="#F2F2F2" stroke-opacity="0.51" stroke-width="200"/>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_381_799" x1="259.78" y1="261.15" x2="463.85" y2="456.49" gradientUnits="userSpaceOnUse">
|
||||
<svg width="640" height="640" viewBox="0 0 640 640" xml:space="preserve" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="matrix(1 0 0 1 320 320)">
|
||||
<linearGradient id="S3" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1 0 0 1 -319.99875 -320.0001577393)" x1="259.78" y1="261.15" x2="463.85" y2="456.49">
|
||||
<stop stop-color="#5CDD8B"/>
|
||||
<stop offset="1" stop-color="#86E6A9"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<path style="stroke: rgb(242,242,242); stroke-opacity: 0.51; stroke-width: 200; stroke-dasharray: none; stroke-linecap: butt; stroke-dashoffset: 0; stroke-linejoin: miter; stroke-miterlimit: 4; fill: url(#S3); fill-rule: nonzero; opacity: 1;" transform=" translate(0, 0)" d="M 170.40125 -84.36016 C 224.09125 38.37984 224.09125 115.33984 170.40125 146.49984 C 89.85125000000001 193.23984000000002 -120.03875 207.48984000000002 -180.45875 135.63984 C -220.73875 87.73983999999999 -220.73875 14.399839999999998 -180.45875 -84.36016000000001 C -139.49875 -151.82016 -81.28875000000001 -185.55016 -5.828750000000014 -185.55016 C 69.64124999999999 -185.55016 128.38125 -151.82016000000002 170.40124999999998 -84.36016000000001 z" stroke-linecap="round" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 893 B After Width: | Height: | Size: 1.1 KiB |
@@ -147,15 +147,18 @@ async function sendAPIKeyList(socket) {
|
||||
async function sendInfo(socket, hideVersion = false) {
|
||||
let version;
|
||||
let latestVersion;
|
||||
let isContainer;
|
||||
|
||||
if (!hideVersion) {
|
||||
version = checkVersion.version;
|
||||
latestVersion = checkVersion.latestVersion;
|
||||
isContainer = (process.env.UPTIME_KUMA_IS_CONTAINER === "1");
|
||||
}
|
||||
|
||||
socket.emit("info", {
|
||||
version,
|
||||
latestVersion,
|
||||
isContainer,
|
||||
primaryBaseURL: await setting("primaryBaseURL"),
|
||||
serverTimezone: await server.getTimezone(),
|
||||
serverTimezoneOffset: server.getTimezoneOffset(),
|
||||
|
@@ -1,29 +1,42 @@
|
||||
const isFreeBSD = /^freebsd/.test(process.platform);
|
||||
|
||||
// Interop with browser
|
||||
const args = (typeof process !== "undefined") ? require("args-parser")(process.argv) : {};
|
||||
const demoMode = args["demo"] || false;
|
||||
|
||||
const badgeConstants = {
|
||||
naColor: "#999",
|
||||
defaultUpColor: "#66c20a",
|
||||
defaultWarnColor: "#eed202",
|
||||
defaultDownColor: "#c2290a",
|
||||
defaultPendingColor: "#f8a306",
|
||||
defaultMaintenanceColor: "#1747f5",
|
||||
defaultPingColor: "blue", // as defined by badge-maker / shields.io
|
||||
defaultStyle: "flat",
|
||||
defaultPingValueSuffix: "ms",
|
||||
defaultPingLabelSuffix: "h",
|
||||
defaultUptimeValueSuffix: "%",
|
||||
defaultUptimeLabelSuffix: "h",
|
||||
defaultCertExpValueSuffix: " days",
|
||||
defaultCertExpLabelSuffix: "h",
|
||||
// Values Come From Default Notification Times
|
||||
defaultCertExpireWarnDays: "14",
|
||||
defaultCertExpireDownDays: "7"
|
||||
};
|
||||
// If host is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available and the unspecified IPv4 address (0.0.0.0) otherwise.
|
||||
// Dual-stack support for (::)
|
||||
// Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD
|
||||
let hostEnv = isFreeBSD ? null : process.env.HOST;
|
||||
const hostname = args.host || process.env.UPTIME_KUMA_HOST || hostEnv;
|
||||
|
||||
const port = [ args.port, process.env.UPTIME_KUMA_PORT, process.env.PORT, 3001 ]
|
||||
.map(portValue => parseInt(portValue))
|
||||
.find(portValue => !isNaN(portValue));
|
||||
|
||||
const sslKey = args["ssl-key"] || process.env.UPTIME_KUMA_SSL_KEY || process.env.SSL_KEY || undefined;
|
||||
const sslCert = args["ssl-cert"] || process.env.UPTIME_KUMA_SSL_CERT || process.env.SSL_CERT || undefined;
|
||||
const sslKeyPassphrase = args["ssl-key-passphrase"] || process.env.UPTIME_KUMA_SSL_KEY_PASSPHRASE || process.env.SSL_KEY_PASSPHRASE || undefined;
|
||||
|
||||
const isSSL = sslKey && sslCert;
|
||||
|
||||
function getLocalWebSocketURL() {
|
||||
const protocol = isSSL ? "wss" : "ws";
|
||||
const host = hostname || "localhost";
|
||||
return `${protocol}://${host}:${port}`;
|
||||
}
|
||||
|
||||
const localWebSocketURL = getLocalWebSocketURL();
|
||||
|
||||
const demoMode = args["demo"] || false;
|
||||
|
||||
module.exports = {
|
||||
args,
|
||||
hostname,
|
||||
port,
|
||||
sslKey,
|
||||
sslCert,
|
||||
sslKeyPassphrase,
|
||||
isSSL,
|
||||
localWebSocketURL,
|
||||
demoMode,
|
||||
badgeConstants,
|
||||
};
|
||||
|
@@ -81,6 +81,9 @@ class Database {
|
||||
"patch-monitor-oauth-cc.sql": true,
|
||||
"patch-add-timeout-monitor.sql": true,
|
||||
"patch-add-gamedig-given-port.sql": true,
|
||||
"patch-notification-config.sql": true,
|
||||
"patch-fix-kafka-producer-booleans.sql": true,
|
||||
"patch-timeout.sql": true,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@@ -80,8 +80,8 @@ class DockerHost {
|
||||
options.socketPath = dockerHost.dockerDaemon;
|
||||
} else if (dockerHost.dockerType === "tcp") {
|
||||
options.baseURL = DockerHost.patchDockerURL(dockerHost.dockerDaemon);
|
||||
options.httpsAgent = new https.Agent(DockerHost.getHttpsAgentOptions(dockerHost.dockerType, options.baseURL));
|
||||
}
|
||||
options.httpsAgent = new https.Agent(DockerHost.getHttpsAgentOptions(dockerHost.dockerType, options.baseURL));
|
||||
|
||||
let res = await axios.request(options);
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
const jsesc = require("jsesc");
|
||||
const { escape } = require("html-escaper");
|
||||
|
||||
/**
|
||||
* Returns a string that represents the javascript that is required to insert the Google Analytics scripts
|
||||
@@ -7,15 +8,18 @@ const jsesc = require("jsesc");
|
||||
* @returns {string}
|
||||
*/
|
||||
function getGoogleAnalyticsScript(tagId) {
|
||||
let escapedTagId = jsesc(tagId, { isScriptContext: true });
|
||||
let escapedTagIdJS = jsesc(tagId, { isScriptContext: true });
|
||||
|
||||
if (escapedTagId) {
|
||||
escapedTagId = escapedTagId.trim();
|
||||
if (escapedTagIdJS) {
|
||||
escapedTagIdJS = escapedTagIdJS.trim();
|
||||
}
|
||||
|
||||
// Escape the tag ID for use in an HTML attribute.
|
||||
let escapedTagIdHTMLAttribute = escape(tagId);
|
||||
|
||||
return `
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=${escapedTagId}"></script>
|
||||
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());gtag('config', '${escapedTagId}'); </script>
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=${escapedTagIdHTMLAttribute}"></script>
|
||||
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date());gtag('config', '${escapedTagIdJS}'); </script>
|
||||
`;
|
||||
}
|
||||
|
||||
|
@@ -6,7 +6,7 @@ const { log, UP, DOWN, PENDING, MAINTENANCE, flipStatus, TimeLogger, MAX_INTERVA
|
||||
SQL_DATETIME_FORMAT
|
||||
} = require("../../src/util");
|
||||
const { tcping, ping, dnsResolve, checkCertificate, checkStatusCode, getTotalClientInRoom, setting, mssqlQuery, postgresQuery, mysqlQuery, mqttAsync, setSetting, httpNtlm, radius, grpcQuery,
|
||||
redisPingAsync, mongodbPing, kafkaProducerAsync, getOidcTokenClientCredentials,
|
||||
redisPingAsync, mongodbPing, kafkaProducerAsync, getOidcTokenClientCredentials, rootCertificatesFingerprints, axiosAbortSignal
|
||||
} = require("../util-server");
|
||||
const { R } = require("redbean-node");
|
||||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||
@@ -22,6 +22,9 @@ const { UptimeCacheList } = require("../uptime-cache-list");
|
||||
const Gamedig = require("gamedig");
|
||||
const jsonata = require("jsonata");
|
||||
const jwt = require("jsonwebtoken");
|
||||
const crypto = require("crypto");
|
||||
|
||||
const rootCertificates = rootCertificatesFingerprints();
|
||||
|
||||
/**
|
||||
* status:
|
||||
@@ -53,7 +56,7 @@ class Monitor extends BeanModel {
|
||||
obj.tags = await this.getTags();
|
||||
}
|
||||
|
||||
if (certExpiry && this.type === "http") {
|
||||
if (certExpiry && (this.type === "http" || this.type === "keyword" || this.type === "json-query") && this.getURLProtocol() === "https:") {
|
||||
const { certExpiryDaysRemaining, validCert } = await this.getCertExpiry(this.id);
|
||||
obj.certExpiryDaysRemaining = certExpiryDaysRemaining;
|
||||
obj.validCert = validCert;
|
||||
@@ -141,8 +144,8 @@ class Monitor extends BeanModel {
|
||||
expectedValue: this.expectedValue,
|
||||
kafkaProducerTopic: this.kafkaProducerTopic,
|
||||
kafkaProducerBrokers: JSON.parse(this.kafkaProducerBrokers),
|
||||
kafkaProducerSsl: this.kafkaProducerSsl === "1" && true || false,
|
||||
kafkaProducerAllowAutoTopicCreation: this.kafkaProducerAllowAutoTopicCreation === "1" && true || false,
|
||||
kafkaProducerSsl: this.getKafkaProducerSsl(),
|
||||
kafkaProducerAllowAutoTopicCreation: this.getKafkaProducerAllowAutoTopicCreation(),
|
||||
kafkaProducerMessage: this.kafkaProducerMessage,
|
||||
screenshot,
|
||||
};
|
||||
@@ -285,6 +288,22 @@ class Monitor extends BeanModel {
|
||||
return Boolean(this.gamedigGivenPortOnly);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse to boolean
|
||||
* @returns {boolean} Kafka Producer Ssl enabled?
|
||||
*/
|
||||
getKafkaProducerSsl() {
|
||||
return Boolean(this.kafkaProducerSsl);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse to boolean
|
||||
* @returns {boolean} Kafka Producer Allow Auto Topic Creation Enabled?
|
||||
*/
|
||||
getKafkaProducerAllowAutoTopicCreation() {
|
||||
return Boolean(this.kafkaProducerAllowAutoTopicCreation);
|
||||
}
|
||||
|
||||
/**
|
||||
* Start monitor
|
||||
* @param {Server} io Socket server instance
|
||||
@@ -339,6 +358,12 @@ class Monitor extends BeanModel {
|
||||
bean.duration = 0;
|
||||
}
|
||||
|
||||
// Runtime patch timeout if it is 0
|
||||
// See https://github.com/louislam/uptime-kuma/pull/3961#issuecomment-1804149144
|
||||
if (!this.timeout || this.timeout <= 0) {
|
||||
this.timeout = this.interval * 1000 * 0.8;
|
||||
}
|
||||
|
||||
try {
|
||||
if (await Monitor.isUnderMaintenance(this.id)) {
|
||||
bean.msg = "Monitor under maintenance";
|
||||
@@ -409,6 +434,7 @@ class Monitor extends BeanModel {
|
||||
const httpsAgentOptions = {
|
||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||
rejectUnauthorized: !this.getIgnoreTls(),
|
||||
secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,
|
||||
};
|
||||
|
||||
log.debug("monitor", `[${this.name}] Prepare Options for axios`);
|
||||
@@ -447,6 +473,7 @@ class Monitor extends BeanModel {
|
||||
validateStatus: (status) => {
|
||||
return checkStatusCode(status, this.getAcceptedStatuscodes());
|
||||
},
|
||||
signal: axiosAbortSignal((this.timeout + 10) * 1000),
|
||||
};
|
||||
|
||||
if (bodyValue) {
|
||||
@@ -581,13 +608,13 @@ class Monitor extends BeanModel {
|
||||
let dnsRes = await dnsResolve(this.hostname, this.dns_resolve_server, this.port, this.dns_resolve_type);
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
|
||||
if (this.dns_resolve_type === "A" || this.dns_resolve_type === "AAAA" || this.dns_resolve_type === "TXT") {
|
||||
if (this.dns_resolve_type === "A" || this.dns_resolve_type === "AAAA" || this.dns_resolve_type === "TXT" || this.dns_resolve_type === "PTR") {
|
||||
dnsMessage += "Records: ";
|
||||
dnsMessage += dnsRes.join(" | ");
|
||||
} else if (this.dns_resolve_type === "CNAME" || this.dns_resolve_type === "PTR") {
|
||||
dnsMessage = dnsRes[0];
|
||||
} else if (this.dns_resolve_type === "CNAME") {
|
||||
dnsMessage += dnsRes[0];
|
||||
} else if (this.dns_resolve_type === "CAA") {
|
||||
dnsMessage = dnsRes[0].issue;
|
||||
dnsMessage += dnsRes[0].issue;
|
||||
} else if (this.dns_resolve_type === "MX") {
|
||||
dnsRes.forEach(record => {
|
||||
dnsMessage += `Hostname: ${record.exchange} - Priority: ${record.priority} | `;
|
||||
@@ -605,7 +632,7 @@ class Monitor extends BeanModel {
|
||||
dnsMessage = dnsMessage.slice(0, -2);
|
||||
}
|
||||
|
||||
if (this.dnsLastResult !== dnsMessage) {
|
||||
if (this.dnsLastResult !== dnsMessage && dnsMessage !== undefined) {
|
||||
R.exec("UPDATE `monitor` SET dns_last_result = ? WHERE id = ? ", [
|
||||
dnsMessage,
|
||||
this.id
|
||||
@@ -662,6 +689,7 @@ class Monitor extends BeanModel {
|
||||
httpsAgent: CacheableDnsHttpAgent.getHttpsAgent({
|
||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||
rejectUnauthorized: !this.getIgnoreTls(),
|
||||
secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,
|
||||
}),
|
||||
httpAgent: CacheableDnsHttpAgent.getHttpAgent({
|
||||
maxCachedSessions: 0,
|
||||
@@ -704,8 +732,6 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "docker") {
|
||||
log.debug("monitor", `[${this.name}] Prepare Options for Axios`);
|
||||
|
||||
const dockerHost = await R.load("docker_host", this.docker_host);
|
||||
|
||||
const options = {
|
||||
url: `/containers/${this.docker_container}/json`,
|
||||
timeout: this.interval * 1000 * 0.8,
|
||||
@@ -716,12 +742,19 @@ class Monitor extends BeanModel {
|
||||
httpsAgent: CacheableDnsHttpAgent.getHttpsAgent({
|
||||
maxCachedSessions: 0, // Use Custom agent to disable session reuse (https://github.com/nodejs/node/issues/3940)
|
||||
rejectUnauthorized: !this.getIgnoreTls(),
|
||||
secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT,
|
||||
}),
|
||||
httpAgent: CacheableDnsHttpAgent.getHttpAgent({
|
||||
maxCachedSessions: 0,
|
||||
}),
|
||||
};
|
||||
|
||||
const dockerHost = await R.load("docker_host", this.docker_host);
|
||||
|
||||
if (!dockerHost) {
|
||||
throw new Error("Failed to load docker host config");
|
||||
}
|
||||
|
||||
if (dockerHost._dockerType === "socket") {
|
||||
options.socketPath = dockerHost._dockerDaemon;
|
||||
} else if (dockerHost._dockerType === "tcp") {
|
||||
@@ -756,7 +789,7 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "sqlserver") {
|
||||
let startTime = dayjs().valueOf();
|
||||
|
||||
await mssqlQuery(this.databaseConnectionString, this.databaseQuery);
|
||||
await mssqlQuery(this.databaseConnectionString, this.databaseQuery || "SELECT 1");
|
||||
|
||||
bean.msg = "";
|
||||
bean.status = UP;
|
||||
@@ -795,7 +828,7 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "postgres") {
|
||||
let startTime = dayjs().valueOf();
|
||||
|
||||
await postgresQuery(this.databaseConnectionString, this.databaseQuery);
|
||||
await postgresQuery(this.databaseConnectionString, this.databaseQuery || "SELECT 1");
|
||||
|
||||
bean.msg = "";
|
||||
bean.status = UP;
|
||||
@@ -803,7 +836,11 @@ class Monitor extends BeanModel {
|
||||
} else if (this.type === "mysql") {
|
||||
let startTime = dayjs().valueOf();
|
||||
|
||||
bean.msg = await mysqlQuery(this.databaseConnectionString, this.databaseQuery);
|
||||
// Use `radius_password` as `password` field, since there are too many unnecessary fields
|
||||
// TODO: rename `radius_password` to `password` later for general use
|
||||
let mysqlPassword = this.radiusPassword;
|
||||
|
||||
bean.msg = await mysqlQuery(this.databaseConnectionString, this.databaseQuery || "SELECT 1", mysqlPassword);
|
||||
bean.status = UP;
|
||||
bean.ping = dayjs().valueOf() - startTime;
|
||||
} else if (this.type === "mongodb") {
|
||||
@@ -891,7 +928,11 @@ class Monitor extends BeanModel {
|
||||
|
||||
} catch (error) {
|
||||
|
||||
bean.msg = error.message;
|
||||
if (error?.name === "CanceledError") {
|
||||
bean.msg = `timeout by AbortSignal (${this.timeout}s)`;
|
||||
} else {
|
||||
bean.msg = error.message;
|
||||
}
|
||||
|
||||
// If UP come in here, it must be upside down mode
|
||||
// Just reset the retries
|
||||
@@ -1075,6 +1116,19 @@ class Monitor extends BeanModel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Example: http: or https:
|
||||
* @returns {(null|string)}
|
||||
*/
|
||||
getURLProtocol() {
|
||||
const url = this.getUrl();
|
||||
if (url) {
|
||||
return this.getUrl().protocol;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Store TLS info to database
|
||||
* @param checkCertificateResult
|
||||
@@ -1411,7 +1465,10 @@ class Monitor extends BeanModel {
|
||||
let certInfo = tlsInfoObject.certInfo;
|
||||
while (certInfo) {
|
||||
let subjectCN = certInfo.subject["CN"];
|
||||
if (certInfo.daysRemaining > targetDays) {
|
||||
if (rootCertificates.has(certInfo.fingerprint256)) {
|
||||
log.debug("monitor", `Known root cert: ${certInfo.certType} certificate "${subjectCN}" (${certInfo.daysRemaining} days valid) on ${targetDays} deadline.`);
|
||||
break;
|
||||
} else if (certInfo.daysRemaining > targetDays) {
|
||||
log.debug("monitor", `No need to send cert notification for ${certInfo.certType} certificate "${subjectCN}" (${certInfo.daysRemaining} days valid) on ${targetDays} deadline.`);
|
||||
} else {
|
||||
log.debug("monitor", `call sendCertNotificationByTargetDays for ${targetDays} deadline on certificate ${subjectCN}.`);
|
||||
|
@@ -1,6 +1,8 @@
|
||||
const { BeanModel } = require("redbean-node/dist/bean-model");
|
||||
const passwordHash = require("../password-hash");
|
||||
const { R } = require("redbean-node");
|
||||
const jwt = require("jsonwebtoken");
|
||||
const { shake256, SHAKE256_LENGTH } = require("../util-server");
|
||||
|
||||
class User extends BeanModel {
|
||||
/**
|
||||
@@ -27,6 +29,19 @@ class User extends BeanModel {
|
||||
this.password = newPassword;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new JWT for a user
|
||||
* @param {User} user
|
||||
* @param {string} jwtSecret
|
||||
* @return {string}
|
||||
*/
|
||||
static createJWT(user, jwtSecret) {
|
||||
return jwt.sign({
|
||||
username: user.username,
|
||||
h: shake256(user.password, SHAKE256_LENGTH),
|
||||
}, jwtSecret);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = User;
|
||||
|
@@ -40,6 +40,7 @@ if (process.platform === "win32") {
|
||||
"/usr/bin/chromium",
|
||||
"/usr/bin/chromium-browser",
|
||||
"/usr/bin/google-chrome",
|
||||
"/snap/bin/chromium", // Ubuntu
|
||||
];
|
||||
} else if (process.platform === "darwin") {
|
||||
// TODO: Generated by GitHub Copilot, but not sure if it's correct
|
||||
|
@@ -1,6 +1,6 @@
|
||||
const { MonitorType } = require("./monitor-type");
|
||||
const { UP, log } = require("../../src/util");
|
||||
const exec = require("child_process").exec;
|
||||
const { UP } = require("../../src/util");
|
||||
const childProcessAsync = require("promisify-child-process");
|
||||
|
||||
/**
|
||||
* A TailscalePing class extends the MonitorType.
|
||||
@@ -23,7 +23,6 @@ class TailscalePing extends MonitorType {
|
||||
let tailscaleOutput = await this.runTailscalePing(monitor.hostname, monitor.interval);
|
||||
this.parseTailscaleOutput(tailscaleOutput, heartbeat);
|
||||
} catch (err) {
|
||||
log.debug("Tailscale", err);
|
||||
// trigger log function somewhere to display a notification or alert to the user (but how?)
|
||||
throw new Error(`Error checking Tailscale ping: ${err}`);
|
||||
}
|
||||
@@ -33,30 +32,23 @@ class TailscalePing extends MonitorType {
|
||||
* Runs the Tailscale ping command to the given URL.
|
||||
*
|
||||
* @param {string} hostname - The hostname to ping.
|
||||
* @param {number} interval
|
||||
* @returns {Promise<string>} - A Promise that resolves to the output of the Tailscale ping command
|
||||
* @throws Will throw an error if the command execution encounters any error.
|
||||
*/
|
||||
async runTailscalePing(hostname, interval) {
|
||||
let cmd = `tailscale ping ${hostname}`;
|
||||
|
||||
log.debug("Tailscale", cmd);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
let timeout = interval * 1000 * 0.8;
|
||||
exec(cmd, { timeout: timeout }, (error, stdout, stderr) => {
|
||||
// we may need to handle more cases if tailscale reports an error that isn't necessarily an error (such as not-logged in or DERP health-related issues)
|
||||
if (error) {
|
||||
reject(`Execution error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
if (stderr) {
|
||||
reject(`Error in output: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
|
||||
resolve(stdout);
|
||||
});
|
||||
let timeout = interval * 1000 * 0.8;
|
||||
let res = await childProcessAsync.spawn("tailscale", [ "ping", "--c", "1", hostname ], {
|
||||
timeout: timeout
|
||||
});
|
||||
if (res.stderr && res.stderr.toString()) {
|
||||
throw new Error(`Error in output: ${res.stderr.toString()}`);
|
||||
}
|
||||
if (res.stdout && res.stdout.toString()) {
|
||||
return res.stdout.toString();
|
||||
} else {
|
||||
throw new Error("No output from Tailscale ping");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,7 +66,7 @@ class TailscalePing extends MonitorType {
|
||||
heartbeat.status = UP;
|
||||
let time = line.split(" in ")[1].split(" ")[0];
|
||||
heartbeat.ping = parseInt(time);
|
||||
heartbeat.msg = line;
|
||||
heartbeat.msg = "OK";
|
||||
break;
|
||||
} else if (line.includes("timed out")) {
|
||||
throw new Error(`Ping timed out: "${line}"`);
|
||||
|
@@ -18,7 +18,7 @@ class AliyunSMS extends NotificationProvider {
|
||||
status: this.statusToString(heartbeatJSON["status"]),
|
||||
msg: heartbeatJSON["msg"],
|
||||
});
|
||||
if (this.sendSms(notification, msgBody)) {
|
||||
if (await this.sendSms(notification, msgBody)) {
|
||||
return okMsg;
|
||||
}
|
||||
} else {
|
||||
@@ -28,7 +28,7 @@ class AliyunSMS extends NotificationProvider {
|
||||
status: "",
|
||||
msg: msg,
|
||||
});
|
||||
if (this.sendSms(notification, msgBody)) {
|
||||
if (await this.sendSms(notification, msgBody)) {
|
||||
return okMsg;
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,8 @@ class AliyunSMS extends NotificationProvider {
|
||||
if (result.data.Message === "OK") {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
throw new Error(result.data.Message);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,5 +1,5 @@
|
||||
const NotificationProvider = require("./notification-provider");
|
||||
const childProcess = require("child_process");
|
||||
const childProcessAsync = require("promisify-child-process");
|
||||
|
||||
class Apprise extends NotificationProvider {
|
||||
|
||||
@@ -11,7 +11,7 @@ class Apprise extends NotificationProvider {
|
||||
args.push("-t");
|
||||
args.push(notification.title);
|
||||
}
|
||||
const s = childProcess.spawnSync("apprise", args);
|
||||
const s = await childProcessAsync.spawn("apprise", args);
|
||||
|
||||
const output = (s.stdout) ? s.stdout.toString() : "ERROR: maybe apprise not found";
|
||||
|
||||
|
@@ -30,6 +30,7 @@ class Discord extends NotificationProvider {
|
||||
break;
|
||||
case "port":
|
||||
case "dns":
|
||||
case "gamedig":
|
||||
case "steam":
|
||||
address = monitorJSON["hostname"];
|
||||
if (monitorJSON["port"]) {
|
||||
|
@@ -20,10 +20,10 @@ class Opsgenie extends NotificationProvider {
|
||||
|
||||
try {
|
||||
switch (notification.opsgenieRegion) {
|
||||
case "US":
|
||||
case "us":
|
||||
opsgenieAlertsUrl = opsgenieAlertsUrlUS;
|
||||
break;
|
||||
case "EU":
|
||||
case "eu":
|
||||
opsgenieAlertsUrl = opsgenieAlertsUrlEU;
|
||||
break;
|
||||
default:
|
||||
|
@@ -1,15 +1,21 @@
|
||||
let express = require("express");
|
||||
const { allowDevAllOrigin, allowAllOrigin, percentageToColor, filterAndJoin, sendHttpError } = require("../util-server");
|
||||
const {
|
||||
setting,
|
||||
allowDevAllOrigin,
|
||||
allowAllOrigin,
|
||||
percentageToColor,
|
||||
filterAndJoin,
|
||||
sendHttpError,
|
||||
} = require("../util-server");
|
||||
const { R } = require("redbean-node");
|
||||
const apicache = require("../modules/apicache");
|
||||
const Monitor = require("../model/monitor");
|
||||
const dayjs = require("dayjs");
|
||||
const { UP, MAINTENANCE, DOWN, PENDING, flipStatus, log } = require("../../src/util");
|
||||
const { UP, MAINTENANCE, DOWN, PENDING, flipStatus, log, badgeConstants } = require("../../src/util");
|
||||
const StatusPage = require("../model/status_page");
|
||||
const { UptimeKumaServer } = require("../uptime-kuma-server");
|
||||
const { UptimeCacheList } = require("../uptime-cache-list");
|
||||
const { makeBadge } = require("badge-maker");
|
||||
const { badgeConstants } = require("../config");
|
||||
const { Prometheus } = require("../prometheus");
|
||||
|
||||
let router = express.Router();
|
||||
@@ -22,10 +28,14 @@ router.get("/api/entry-page", async (request, response) => {
|
||||
allowDevAllOrigin(response);
|
||||
|
||||
let result = { };
|
||||
let hostname = request.hostname;
|
||||
if ((await setting("trustProxy")) && request.headers["x-forwarded-host"]) {
|
||||
hostname = request.headers["x-forwarded-host"];
|
||||
}
|
||||
|
||||
if (request.hostname in StatusPage.domainMappingList) {
|
||||
if (hostname in StatusPage.domainMappingList) {
|
||||
result.type = "statusPageMatchedDomain";
|
||||
result.statusPageSlug = StatusPage.domainMappingList[request.hostname];
|
||||
result.statusPageSlug = StatusPage.domainMappingList[hostname];
|
||||
} else {
|
||||
result.type = "entryPage";
|
||||
result.entryPage = server.entryPage;
|
||||
@@ -38,7 +48,7 @@ router.get("/api/push/:pushToken", async (request, response) => {
|
||||
|
||||
let pushToken = request.params.pushToken;
|
||||
let msg = request.query.msg || "OK";
|
||||
let ping = parseInt(request.query.ping) || null;
|
||||
let ping = parseFloat(request.query.ping) || null;
|
||||
let statusString = request.query.status || "up";
|
||||
let status = (statusString === "up") ? UP : DOWN;
|
||||
|
||||
|
@@ -5,7 +5,7 @@ const StatusPage = require("../model/status_page");
|
||||
const { allowDevAllOrigin, sendHttpError } = require("../util-server");
|
||||
const { R } = require("redbean-node");
|
||||
const Monitor = require("../model/monitor");
|
||||
const { badgeConstants } = require("../config");
|
||||
const { badgeConstants } = require("../../src/util");
|
||||
const { makeBadge } = require("badge-maker");
|
||||
|
||||
let router = express.Router();
|
||||
|
@@ -48,9 +48,17 @@ if (! process.env.NODE_ENV) {
|
||||
process.env.NODE_ENV = "production";
|
||||
}
|
||||
|
||||
if (!process.env.UPTIME_KUMA_WS_ORIGIN_CHECK) {
|
||||
process.env.UPTIME_KUMA_WS_ORIGIN_CHECK = "cors-like";
|
||||
}
|
||||
|
||||
log.info("server", "Node Env: " + process.env.NODE_ENV);
|
||||
log.info("server", "Inside Container: " + (process.env.UPTIME_KUMA_IS_CONTAINER === "1"));
|
||||
|
||||
if (process.env.UPTIME_KUMA_WS_ORIGIN_CHECK === "bypass") {
|
||||
log.warn("server", "WebSocket Origin Check: " + process.env.UPTIME_KUMA_WS_ORIGIN_CHECK);
|
||||
}
|
||||
|
||||
log.info("server", "Importing Node libraries");
|
||||
const fs = require("fs");
|
||||
|
||||
@@ -76,15 +84,18 @@ const notp = require("notp");
|
||||
const base32 = require("thirty-two");
|
||||
|
||||
const { UptimeKumaServer } = require("./uptime-kuma-server");
|
||||
const server = UptimeKumaServer.getInstance(args);
|
||||
const server = UptimeKumaServer.getInstance();
|
||||
const io = module.exports.io = server.io;
|
||||
const app = server.app;
|
||||
|
||||
log.info("server", "Importing this project modules");
|
||||
log.debug("server", "Importing Monitor");
|
||||
const Monitor = require("./model/monitor");
|
||||
const User = require("./model/user");
|
||||
|
||||
log.debug("server", "Importing Settings");
|
||||
const { getSettings, setSettings, setting, initJWTSecret, checkLogin, startUnitTest, FBSD, doubleCheckPassword, startE2eTests } = require("./util-server");
|
||||
const { getSettings, setSettings, setting, initJWTSecret, checkLogin, startUnitTest, doubleCheckPassword, startE2eTests, shake256, SHAKE256_LENGTH
|
||||
} = require("./util-server");
|
||||
|
||||
log.debug("server", "Importing Notification");
|
||||
const { Notification } = require("./notification");
|
||||
@@ -107,19 +118,13 @@ const passwordHash = require("./password-hash");
|
||||
const checkVersion = require("./check-version");
|
||||
log.info("server", "Version: " + checkVersion.version);
|
||||
|
||||
// If host is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available and the unspecified IPv4 address (0.0.0.0) otherwise.
|
||||
// Dual-stack support for (::)
|
||||
// Also read HOST if not FreeBSD, as HOST is a system environment variable in FreeBSD
|
||||
let hostEnv = FBSD ? null : process.env.HOST;
|
||||
let hostname = args.host || process.env.UPTIME_KUMA_HOST || hostEnv;
|
||||
const hostname = config.hostname;
|
||||
|
||||
if (hostname) {
|
||||
log.info("server", "Custom hostname: " + hostname);
|
||||
}
|
||||
|
||||
const port = [ args.port, process.env.UPTIME_KUMA_PORT, process.env.PORT, 3001 ]
|
||||
.map(portValue => parseInt(portValue))
|
||||
.find(portValue => !isNaN(portValue));
|
||||
const port = config.port;
|
||||
|
||||
const disableFrameSameOrigin = !!process.env.UPTIME_KUMA_DISABLE_FRAME_SAMEORIGIN || args["disable-frame-sameorigin"] || false;
|
||||
const cloudflaredToken = args["cloudflared-token"] || process.env.UPTIME_KUMA_CLOUDFLARED_TOKEN || undefined;
|
||||
@@ -297,6 +302,11 @@ let needSetup = false;
|
||||
]);
|
||||
|
||||
if (user) {
|
||||
// Check if the password changed
|
||||
if (decoded.h !== shake256(user.password, SHAKE256_LENGTH)) {
|
||||
throw new Error("The token is invalid due to password change or old token");
|
||||
}
|
||||
|
||||
log.debug("auth", "afterLogin");
|
||||
afterLogin(socket, user);
|
||||
log.debug("auth", "afterLogin ok");
|
||||
@@ -316,9 +326,10 @@ let needSetup = false;
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
log.error("auth", `Invalid token. IP=${clientIP}`);
|
||||
|
||||
if (error.message) {
|
||||
log.error("auth", error.message, `IP=${clientIP}`);
|
||||
}
|
||||
callback({
|
||||
ok: false,
|
||||
msg: "Invalid token.",
|
||||
@@ -357,9 +368,7 @@ let needSetup = false;
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
token: jwt.sign({
|
||||
username: data.username,
|
||||
}, server.jwtSecret),
|
||||
token: User.createJWT(user, server.jwtSecret),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -387,9 +396,7 @@ let needSetup = false;
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
token: jwt.sign({
|
||||
username: data.username,
|
||||
}, server.jwtSecret),
|
||||
token: User.createJWT(user, server.jwtSecret),
|
||||
});
|
||||
} else {
|
||||
|
||||
@@ -726,11 +733,11 @@ let needSetup = false;
|
||||
bean.basic_auth_user = monitor.basic_auth_user;
|
||||
bean.basic_auth_pass = monitor.basic_auth_pass;
|
||||
bean.timeout = monitor.timeout;
|
||||
bean.oauth_client_id = monitor.oauth_client_id,
|
||||
bean.oauth_client_secret = monitor.oauth_client_secret,
|
||||
bean.oauth_auth_method = this.oauth_auth_method,
|
||||
bean.oauth_token_url = monitor.oauth_token_url,
|
||||
bean.oauth_scopes = monitor.oauth_scopes,
|
||||
bean.oauth_client_id = monitor.oauth_client_id;
|
||||
bean.oauth_client_secret = monitor.oauth_client_secret;
|
||||
bean.oauth_auth_method = monitor.oauth_auth_method;
|
||||
bean.oauth_token_url = monitor.oauth_token_url;
|
||||
bean.oauth_scopes = monitor.oauth_scopes;
|
||||
bean.tlsCa = monitor.tlsCa;
|
||||
bean.tlsCert = monitor.tlsCert;
|
||||
bean.tlsKey = monitor.tlsKey;
|
||||
@@ -784,6 +791,9 @@ let needSetup = false;
|
||||
bean.kafkaProducerAllowAutoTopicCreation = monitor.kafkaProducerAllowAutoTopicCreation;
|
||||
bean.kafkaProducerSaslOptions = JSON.stringify(monitor.kafkaProducerSaslOptions);
|
||||
bean.kafkaProducerMessage = monitor.kafkaProducerMessage;
|
||||
bean.kafkaProducerSsl = monitor.kafkaProducerSsl;
|
||||
bean.kafkaProducerAllowAutoTopicCreation =
|
||||
monitor.kafkaProducerAllowAutoTopicCreation;
|
||||
bean.gamedigGivenPortOnly = monitor.gamedigGivenPortOnly;
|
||||
|
||||
bean.validate();
|
||||
@@ -796,7 +806,7 @@ let needSetup = false;
|
||||
|
||||
await updateMonitorNotification(bean.id, monitor.notificationIDList);
|
||||
|
||||
if (bean.isActive()) {
|
||||
if (await bean.isActive()) {
|
||||
await restartMonitor(socket.userID, bean.id);
|
||||
}
|
||||
|
||||
@@ -1116,9 +1126,6 @@ let needSetup = false;
|
||||
value,
|
||||
]);
|
||||
|
||||
// Cleanup unused Tags
|
||||
await R.exec("delete from tag where ( select count(*) from monitor_tag mt where tag.id = mt.tag_id ) = 0");
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Deleted Successfully.",
|
||||
@@ -1147,6 +1154,8 @@ let needSetup = false;
|
||||
let user = await doubleCheckPassword(socket, password.currentPassword);
|
||||
await user.resetPassword(password.newPassword);
|
||||
|
||||
server.disconnectAllSocketClients(user.id, socket.id);
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Password has been updated successfully.",
|
||||
@@ -1197,6 +1206,7 @@ let needSetup = false;
|
||||
}
|
||||
|
||||
const previousChromeExecutable = await Settings.get("chromeExecutable");
|
||||
const previousNSCDStatus = await Settings.get("nscd");
|
||||
|
||||
await setSettings("general", data);
|
||||
server.entryPage = data.entryPage;
|
||||
@@ -1214,6 +1224,15 @@ let needSetup = false;
|
||||
await resetChrome();
|
||||
}
|
||||
|
||||
// Update nscd status
|
||||
if (previousNSCDStatus !== data.nscd) {
|
||||
if (data.nscd) {
|
||||
await server.startNSCDServices();
|
||||
} else {
|
||||
await server.stopNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Saved"
|
||||
@@ -1817,6 +1836,7 @@ async function pauseMonitor(userID, monitorID) {
|
||||
|
||||
if (monitorID in server.monitorList) {
|
||||
server.monitorList[monitorID].stop();
|
||||
server.monitorList[monitorID].active = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1875,8 +1895,10 @@ gracefulShutdown(server.httpServer, {
|
||||
});
|
||||
|
||||
// Catch unexpected errors here
|
||||
process.addListener("unhandledRejection", (error, promise) => {
|
||||
let unexpectedErrorHandler = (error, promise) => {
|
||||
console.trace(error);
|
||||
UptimeKumaServer.errorLog(error, false);
|
||||
console.error("If you keep encountering errors, please report to https://github.com/louislam/uptime-kuma/issues");
|
||||
});
|
||||
};
|
||||
process.addListener("unhandledRejection", unexpectedErrorHandler);
|
||||
process.addListener("uncaughtException", unexpectedErrorHandler);
|
||||
|
@@ -42,24 +42,50 @@ module.exports.generalSocketHandler = (socket, server) => {
|
||||
});
|
||||
|
||||
socket.on("getGameList", async (callback) => {
|
||||
callback({
|
||||
ok: true,
|
||||
gameList: getGameList(),
|
||||
});
|
||||
});
|
||||
|
||||
socket.on("testChrome", (executable, callback) => {
|
||||
// Just noticed that await call could block the whole socket.io server!!! Use pure promise instead.
|
||||
testChrome(executable).then((version) => {
|
||||
try {
|
||||
checkLogin(socket);
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Found Chromium/Chrome. Version: " + version,
|
||||
gameList: getGameList(),
|
||||
});
|
||||
}).catch((e) => {
|
||||
} catch (e) {
|
||||
callback({
|
||||
ok: false,
|
||||
msg: e.message,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
socket.on("testChrome", (executable, callback) => {
|
||||
try {
|
||||
checkLogin(socket);
|
||||
// Just noticed that await call could block the whole socket.io server!!! Use pure promise instead.
|
||||
testChrome(executable).then((version) => {
|
||||
callback({
|
||||
ok: true,
|
||||
msg: "Found Chromium/Chrome. Version: " + version,
|
||||
});
|
||||
}).catch((e) => {
|
||||
callback({
|
||||
ok: false,
|
||||
msg: e.message,
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
callback({
|
||||
ok: false,
|
||||
msg: e.message,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Disconnect all other socket clients of the user
|
||||
socket.on("disconnectOtherSocketClients", async () => {
|
||||
try {
|
||||
checkLogin(socket);
|
||||
server.disconnectAllSocketClients(socket.userID, socket.id);
|
||||
} catch (e) {
|
||||
log.warn("disconnectAllSocketClients", e.message);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
@@ -4,14 +4,15 @@ const fs = require("fs");
|
||||
const http = require("http");
|
||||
const { Server } = require("socket.io");
|
||||
const { R } = require("redbean-node");
|
||||
const { log } = require("../src/util");
|
||||
const { log, isDev } = require("../src/util");
|
||||
const Database = require("./database");
|
||||
const util = require("util");
|
||||
const { CacheableDnsHttpAgent } = require("./cacheable-dns-http-agent");
|
||||
const { Settings } = require("./settings");
|
||||
const dayjs = require("dayjs");
|
||||
const childProcess = require("child_process");
|
||||
const childProcessAsync = require("promisify-child-process");
|
||||
const path = require("path");
|
||||
const { isSSL, sslKey, sslCert, sslKeyPassphrase } = require("./config");
|
||||
// DO NOT IMPORT HERE IF THE MODULES USED `UptimeKumaServer.getInstance()`, put at the bottom of this file instead.
|
||||
|
||||
/**
|
||||
@@ -62,22 +63,17 @@ class UptimeKumaServer {
|
||||
*/
|
||||
jwtSecret = null;
|
||||
|
||||
static getInstance(args) {
|
||||
static getInstance() {
|
||||
if (UptimeKumaServer.instance == null) {
|
||||
UptimeKumaServer.instance = new UptimeKumaServer(args);
|
||||
UptimeKumaServer.instance = new UptimeKumaServer();
|
||||
}
|
||||
return UptimeKumaServer.instance;
|
||||
}
|
||||
|
||||
constructor(args) {
|
||||
// SSL
|
||||
const sslKey = args["ssl-key"] || process.env.UPTIME_KUMA_SSL_KEY || process.env.SSL_KEY || undefined;
|
||||
const sslCert = args["ssl-cert"] || process.env.UPTIME_KUMA_SSL_CERT || process.env.SSL_CERT || undefined;
|
||||
const sslKeyPassphrase = args["ssl-key-passphrase"] || process.env.UPTIME_KUMA_SSL_KEY_PASSPHRASE || process.env.SSL_KEY_PASSPHRASE || undefined;
|
||||
|
||||
constructor() {
|
||||
log.info("server", "Creating express and socket.io instance");
|
||||
this.app = express();
|
||||
if (sslKey && sslCert) {
|
||||
if (isSSL) {
|
||||
log.info("server", "Server Type: HTTPS");
|
||||
this.httpServer = https.createServer({
|
||||
key: fs.readFileSync(sslKey),
|
||||
@@ -103,7 +99,65 @@ class UptimeKumaServer {
|
||||
UptimeKumaServer.monitorTypeList["real-browser"] = new RealBrowserMonitorType();
|
||||
UptimeKumaServer.monitorTypeList["tailscale-ping"] = new TailscalePing();
|
||||
|
||||
this.io = new Server(this.httpServer);
|
||||
// Allow all CORS origins (polling) in development
|
||||
let cors = undefined;
|
||||
if (isDev) {
|
||||
cors = {
|
||||
origin: "*",
|
||||
};
|
||||
}
|
||||
|
||||
this.io = new Server(this.httpServer, {
|
||||
cors,
|
||||
allowRequest: async (req, callback) => {
|
||||
let transport;
|
||||
// It should be always true, but just in case, because this property is not documented
|
||||
if (req._query) {
|
||||
transport = req._query.transport;
|
||||
} else {
|
||||
log.error("socket", "Ops!!! Cannot get transport type, assume that it is polling");
|
||||
transport = "polling";
|
||||
}
|
||||
|
||||
const clientIP = await this.getClientIPwithProxy(req.connection.remoteAddress, req.headers);
|
||||
log.info("socket", `New ${transport} connection, IP = ${clientIP}`);
|
||||
|
||||
// The following check is only for websocket connections, polling connections are already protected by CORS
|
||||
if (transport === "polling") {
|
||||
callback(null, true);
|
||||
} else if (transport === "websocket") {
|
||||
const bypass = process.env.UPTIME_KUMA_WS_ORIGIN_CHECK === "bypass";
|
||||
if (bypass) {
|
||||
log.info("auth", "WebSocket origin check is bypassed");
|
||||
callback(null, true);
|
||||
} else if (!req.headers.origin) {
|
||||
log.info("auth", "WebSocket with no origin is allowed");
|
||||
callback(null, true);
|
||||
} else {
|
||||
try {
|
||||
let host = req.headers.host;
|
||||
let origin = req.headers.origin;
|
||||
let originURL = new URL(origin);
|
||||
let xForwardedFor;
|
||||
if (await Settings.get("trustProxy")) {
|
||||
xForwardedFor = req.headers["x-forwarded-for"];
|
||||
}
|
||||
|
||||
if (host !== originURL.host && xForwardedFor !== originURL.host) {
|
||||
callback(null, false);
|
||||
log.error("auth", `Origin (${origin}) does not match host (${host}), IP: ${clientIP}`);
|
||||
} else {
|
||||
callback(null, true);
|
||||
}
|
||||
} catch (e) {
|
||||
// Invalid origin url, probably not from browser
|
||||
callback(null, false);
|
||||
log.error("auth", `Invalid origin url (${origin}), IP: ${clientIP}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/** Initialise app after the database has been set up */
|
||||
@@ -238,20 +292,28 @@ class UptimeKumaServer {
|
||||
/**
|
||||
* Get the IP of the client connected to the socket
|
||||
* @param {Socket} socket
|
||||
* @returns {string}
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
async getClientIP(socket) {
|
||||
let clientIP = socket.client.conn.remoteAddress;
|
||||
getClientIP(socket) {
|
||||
return this.getClientIPwithProxy(socket.client.conn.remoteAddress, socket.client.conn.request.headers);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} clientIP
|
||||
* @param {IncomingHttpHeaders} headers
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
async getClientIPwithProxy(clientIP, headers) {
|
||||
if (clientIP === undefined) {
|
||||
clientIP = "";
|
||||
}
|
||||
|
||||
if (await Settings.get("trustProxy")) {
|
||||
const forwardedFor = socket.client.conn.request.headers["x-forwarded-for"];
|
||||
const forwardedFor = headers["x-forwarded-for"];
|
||||
|
||||
return (typeof forwardedFor === "string" ? forwardedFor.split(",")[0].trim() : null)
|
||||
|| socket.client.conn.request.headers["x-real-ip"]
|
||||
|| headers["x-real-ip"]
|
||||
|| clientIP.replace(/^::ffff:/, "");
|
||||
} else {
|
||||
return clientIP.replace(/^::ffff:/, "");
|
||||
@@ -341,7 +403,11 @@ class UptimeKumaServer {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async start() {
|
||||
this.startServices();
|
||||
let enable = await Settings.get("nscd");
|
||||
|
||||
if (enable || enable === null) {
|
||||
await this.startNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -349,18 +415,22 @@ class UptimeKumaServer {
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
async stop() {
|
||||
this.stopServices();
|
||||
let enable = await Settings.get("nscd");
|
||||
|
||||
if (enable || enable === null) {
|
||||
await this.stopNSCDServices();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start all system services (e.g. nscd)
|
||||
* For now, only used in Docker
|
||||
*/
|
||||
startServices() {
|
||||
async startNSCDServices() {
|
||||
if (process.env.UPTIME_KUMA_IS_CONTAINER) {
|
||||
try {
|
||||
log.info("services", "Starting nscd");
|
||||
childProcess.execSync("sudo service nscd start", { stdio: "pipe" });
|
||||
await childProcessAsync.exec("sudo service nscd start");
|
||||
} catch (e) {
|
||||
log.info("services", "Failed to start nscd");
|
||||
}
|
||||
@@ -370,16 +440,35 @@ class UptimeKumaServer {
|
||||
/**
|
||||
* Stop all system services
|
||||
*/
|
||||
stopServices() {
|
||||
async stopNSCDServices() {
|
||||
if (process.env.UPTIME_KUMA_IS_CONTAINER) {
|
||||
try {
|
||||
log.info("services", "Stopping nscd");
|
||||
childProcess.execSync("sudo service nscd stop");
|
||||
await childProcessAsync.exec("sudo service nscd stop");
|
||||
} catch (e) {
|
||||
log.info("services", "Failed to stop nscd");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Force connected sockets of a user to refresh and disconnect.
|
||||
* Used for resetting password.
|
||||
* @param {string} userID
|
||||
* @param {string?} currentSocketID
|
||||
*/
|
||||
disconnectAllSocketClients(userID, currentSocketID = undefined) {
|
||||
for (const socket of this.io.sockets.sockets.values()) {
|
||||
if (socket.userID === userID && socket.id !== currentSocketID) {
|
||||
try {
|
||||
socket.emit("refresh");
|
||||
socket.disconnect();
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
const tcpp = require("tcp-ping");
|
||||
const ping = require("@louislam/ping");
|
||||
const { R } = require("redbean-node");
|
||||
const { log, genSecret } = require("../src/util");
|
||||
const { log, genSecret, badgeConstants } = require("../src/util");
|
||||
const passwordHash = require("./password-hash");
|
||||
const { Resolver } = require("dns");
|
||||
const childProcess = require("child_process");
|
||||
@@ -9,7 +9,6 @@ const iconv = require("iconv-lite");
|
||||
const chardet = require("chardet");
|
||||
const mqtt = require("mqtt");
|
||||
const chroma = require("chroma-js");
|
||||
const { badgeConstants } = require("./config");
|
||||
const mssql = require("mssql");
|
||||
const { Client } = require("pg");
|
||||
const postgresConParse = require("pg-connection-string").parse;
|
||||
@@ -22,6 +21,7 @@ const protojs = require("protobufjs");
|
||||
const radiusClient = require("node-radius-client");
|
||||
const redis = require("redis");
|
||||
const oidc = require("openid-client");
|
||||
const tls = require("tls");
|
||||
|
||||
const {
|
||||
dictionaries: {
|
||||
@@ -33,6 +33,7 @@ const dayjs = require("dayjs");
|
||||
// SASLOptions used in JSDoc
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { Kafka, SASLOptions } = require("kafkajs");
|
||||
const crypto = require("crypto");
|
||||
|
||||
const isWindows = process.platform === /^win/.test(process.platform);
|
||||
/**
|
||||
@@ -286,22 +287,22 @@ exports.kafkaProducerAsync = function (brokers, topic, message, options = {}, sa
|
||||
|
||||
producer.connect().then(
|
||||
() => {
|
||||
try {
|
||||
producer.send({
|
||||
topic: topic,
|
||||
messages: [{
|
||||
value: message,
|
||||
}],
|
||||
});
|
||||
connectedToKafka = true;
|
||||
clearTimeout(timeoutID);
|
||||
producer.send({
|
||||
topic: topic,
|
||||
messages: [{
|
||||
value: message,
|
||||
}],
|
||||
}).then((_) => {
|
||||
resolve("Message sent successfully");
|
||||
} catch (e) {
|
||||
}).catch((e) => {
|
||||
connectedToKafka = true;
|
||||
producer.disconnect();
|
||||
clearTimeout(timeoutID);
|
||||
reject(new Error("Error sending message: " + e.message));
|
||||
}
|
||||
}).finally(() => {
|
||||
connectedToKafka = true;
|
||||
clearTimeout(timeoutID);
|
||||
});
|
||||
}
|
||||
).catch(
|
||||
(e) => {
|
||||
@@ -313,8 +314,10 @@ exports.kafkaProducerAsync = function (brokers, topic, message, options = {}, sa
|
||||
);
|
||||
|
||||
producer.on("producer.network.request_timeout", (_) => {
|
||||
clearTimeout(timeoutID);
|
||||
reject(new Error("producer.network.request_timeout"));
|
||||
if (!connectedToKafka) {
|
||||
clearTimeout(timeoutID);
|
||||
reject(new Error("producer.network.request_timeout"));
|
||||
}
|
||||
});
|
||||
|
||||
producer.on("producer.disconnect", (_) => {
|
||||
@@ -392,6 +395,9 @@ exports.mssqlQuery = async function (connectionString, query) {
|
||||
try {
|
||||
pool = new mssql.ConnectionPool(connectionString);
|
||||
await pool.connect();
|
||||
if (!query) {
|
||||
query = "SELECT 1";
|
||||
}
|
||||
await pool.request().query(query);
|
||||
pool.close();
|
||||
} catch (e) {
|
||||
@@ -412,12 +418,22 @@ exports.postgresQuery = function (connectionString, query) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const config = postgresConParse(connectionString);
|
||||
|
||||
if (config.password === "") {
|
||||
// See https://github.com/brianc/node-postgres/issues/1927
|
||||
return reject(new Error("Password is undefined."));
|
||||
// Fix #3868, which true/false is not parsed to boolean
|
||||
if (typeof config.ssl === "string") {
|
||||
config.ssl = config.ssl === "true";
|
||||
}
|
||||
|
||||
const client = new Client({ connectionString });
|
||||
if (config.password === "") {
|
||||
// See https://github.com/brianc/node-postgres/issues/1927
|
||||
reject(new Error("Password is undefined."));
|
||||
return;
|
||||
}
|
||||
const client = new Client(config);
|
||||
|
||||
client.on("error", (error) => {
|
||||
log.debug("postgres", "Error caught in the error event handler.");
|
||||
reject(error);
|
||||
});
|
||||
|
||||
client.connect((err) => {
|
||||
if (err) {
|
||||
@@ -441,6 +457,7 @@ exports.postgresQuery = function (connectionString, query) {
|
||||
});
|
||||
} catch (e) {
|
||||
reject(e);
|
||||
client.end();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -452,11 +469,15 @@ 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
|
||||
* @param {?string} password The password to use
|
||||
* @returns {Promise<(string)>}
|
||||
*/
|
||||
exports.mysqlQuery = function (connectionString, query) {
|
||||
exports.mysqlQuery = function (connectionString, query, password = undefined) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const connection = mysql.createConnection(connectionString);
|
||||
const connection = mysql.createConnection({
|
||||
uri: connectionString,
|
||||
password
|
||||
});
|
||||
|
||||
connection.on("error", (err) => {
|
||||
reject(err);
|
||||
@@ -1053,6 +1074,47 @@ module.exports.grpcQuery = async (options) => {
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns an array of SHA256 fingerprints for all known root certificates.
|
||||
* @returns {Set} A set of SHA256 fingerprints.
|
||||
*/
|
||||
module.exports.rootCertificatesFingerprints = () => {
|
||||
let fingerprints = tls.rootCertificates.map(cert => {
|
||||
let certLines = cert.split("\n");
|
||||
certLines.shift();
|
||||
certLines.pop();
|
||||
let certBody = certLines.join("");
|
||||
let buf = Buffer.from(certBody, "base64");
|
||||
|
||||
const shasum = crypto.createHash("sha256");
|
||||
shasum.update(buf);
|
||||
|
||||
return shasum.digest("hex").toUpperCase().replace(/(.{2})(?!$)/g, "$1:");
|
||||
});
|
||||
|
||||
fingerprints.push("6D:99:FB:26:5E:B1:C5:B3:74:47:65:FC:BC:64:8F:3C:D8:E1:BF:FA:FD:C4:C2:F9:9B:9D:47:CF:7F:F1:C2:4F"); // ISRG X1 cross-signed with DST X3
|
||||
fingerprints.push("8B:05:B6:8C:C6:59:E5:ED:0F:CB:38:F2:C9:42:FB:FD:20:0E:6F:2F:F9:F8:5D:63:C6:99:4E:F5:E0:B0:27:01"); // ISRG X2 cross-signed with ISRG X1
|
||||
|
||||
return new Set(fingerprints);
|
||||
};
|
||||
|
||||
module.exports.SHAKE256_LENGTH = 16;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {string} data
|
||||
* @param {number} len
|
||||
* @return {string}
|
||||
*/
|
||||
module.exports.shake256 = (data, len) => {
|
||||
if (!data) {
|
||||
return "";
|
||||
}
|
||||
return crypto.createHash("shake256", { outputLength: len })
|
||||
.update(data)
|
||||
.digest("hex");
|
||||
};
|
||||
|
||||
// For unit test, export functions
|
||||
if (process.env.TEST_BACKEND) {
|
||||
module.exports.__test = {
|
||||
@@ -1062,3 +1124,29 @@ if (process.env.TEST_BACKEND) {
|
||||
return module.exports.__test[functionName];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates an abort signal with the specified timeout.
|
||||
* @param {number} timeoutMs - The timeout in milliseconds.
|
||||
* @returns {AbortSignal | null} - The generated abort signal, or null if not supported.
|
||||
*/
|
||||
module.exports.axiosAbortSignal = (timeoutMs) => {
|
||||
try {
|
||||
// Just in case, as 0 timeout here will cause the request to be aborted immediately
|
||||
if (!timeoutMs || timeoutMs <= 0) {
|
||||
timeoutMs = 5000;
|
||||
}
|
||||
return AbortSignal.timeout(timeoutMs);
|
||||
} catch (_) {
|
||||
// v16-: AbortSignal.timeout is not supported
|
||||
try {
|
||||
const abortController = new AbortController();
|
||||
setTimeout(() => abortController.abort(), timeoutMs);
|
||||
|
||||
return abortController.signal;
|
||||
} catch (_) {
|
||||
// v15-: AbortController is not supported
|
||||
return null;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@@ -8,9 +8,9 @@
|
||||
:placeholder="placeholder"
|
||||
:disabled="!enabled"
|
||||
>
|
||||
<a class="btn btn-outline-primary" @click="action()">
|
||||
<button type="button" class="btn btn-outline-primary" :aria-label="actionAriaLabel" @click="action()">
|
||||
<font-awesome-icon :icon="icon" />
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -66,6 +66,13 @@ export default {
|
||||
action: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
/**
|
||||
* The aria-label of the action button
|
||||
*/
|
||||
actionAriaLabel: {
|
||||
type: String,
|
||||
required: true,
|
||||
}
|
||||
},
|
||||
emits: [ "update:modelValue" ],
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="input-group mb-3">
|
||||
<select ref="select" v-model="model" class="form-select" :disabled="disabled">
|
||||
<option v-for="option in options" :key="option" :value="option.value">{{ option.label }}</option>
|
||||
<select :id="id" ref="select" v-model="model" class="form-select" :disabled="disabled" :required="required">
|
||||
<option v-for="option in options" :key="option" :value="option.value" :disabled="option.disabled">{{ option.label }}</option>
|
||||
</select>
|
||||
<a class="btn btn-outline-primary" @click="action()">
|
||||
<font-awesome-icon :icon="icon" />
|
||||
</a>
|
||||
<button type="button" class="btn btn-outline-primary" :class="{ disabled: actionDisabled }" :aria-label="actionAriaLabel" @click="action()">
|
||||
<font-awesome-icon :icon="icon" aria-hidden="true" />
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -20,6 +20,13 @@ export default {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
/**
|
||||
* The id of the form which will be targeted by a <label for=..
|
||||
*/
|
||||
id: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**
|
||||
* The value of the select field.
|
||||
*/
|
||||
@@ -50,6 +57,29 @@ export default {
|
||||
action: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
},
|
||||
/**
|
||||
* The aria-label of the action button
|
||||
*/
|
||||
actionAriaLabel: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
/**
|
||||
* Whether the action button is disabled.
|
||||
* @example true
|
||||
*/
|
||||
actionDisabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/**
|
||||
* Whether the select field is required.
|
||||
* @example true
|
||||
*/
|
||||
required: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
emits: [ "update:modelValue" ],
|
||||
|
@@ -135,7 +135,7 @@
|
||||
<script lang="ts">
|
||||
import { Modal } from "bootstrap";
|
||||
import CopyableInput from "./CopyableInput.vue";
|
||||
import { default as serverConfig } from "../../server/config.js";
|
||||
import { badgeConstants } from "../util.ts";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
"labelColor",
|
||||
],
|
||||
},
|
||||
badgeConstants: serverConfig.badgeConstants,
|
||||
badgeConstants,
|
||||
};
|
||||
},
|
||||
|
||||
|
@@ -70,7 +70,7 @@ export default {
|
||||
Confirm,
|
||||
},
|
||||
props: {},
|
||||
emits: [ "added" ],
|
||||
emits: [ "added", "deleted" ],
|
||||
data() {
|
||||
return {
|
||||
modal: null,
|
||||
@@ -167,6 +167,7 @@ export default {
|
||||
this.processing = false;
|
||||
|
||||
if (res.ok) {
|
||||
this.$emit("deleted", this.id);
|
||||
this.modal.hide();
|
||||
}
|
||||
});
|
||||
|
@@ -11,7 +11,7 @@
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
v-if="size !== 'small' && beatList.length > 4 && $root.styleElapsedTime !== 'none'"
|
||||
v-if="!$root.isMobile && size !== 'small' && beatList.length > 4 && $root.styleElapsedTime !== 'none'"
|
||||
class="d-flex justify-content-between align-items-center word" :style="timeStyle"
|
||||
>
|
||||
<div>{{ timeSinceFirstBeat }} ago</div>
|
||||
|
@@ -5,18 +5,18 @@
|
||||
<h1 class="h3 mb-3 fw-normal" />
|
||||
|
||||
<div v-if="!tokenRequired" class="form-floating">
|
||||
<input id="floatingInput" v-model="username" type="text" class="form-control" placeholder="Username">
|
||||
<input id="floatingInput" v-model="username" type="text" class="form-control" placeholder="Username" autocomplete="username" required>
|
||||
<label for="floatingInput">{{ $t("Username") }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="!tokenRequired" class="form-floating mt-3">
|
||||
<input id="floatingPassword" v-model="password" type="password" class="form-control" placeholder="Password">
|
||||
<input id="floatingPassword" v-model="password" type="password" class="form-control" placeholder="Password" autocomplete="current-password" required>
|
||||
<label for="floatingPassword">{{ $t("Password") }}</label>
|
||||
</div>
|
||||
|
||||
<div v-if="tokenRequired">
|
||||
<div class="form-floating mt-3">
|
||||
<input id="otp" v-model="token" type="text" maxlength="6" class="form-control" placeholder="123456">
|
||||
<input id="otp" v-model="token" type="text" maxlength="6" class="form-control" placeholder="123456" autocomplete="one-time-code" required>
|
||||
<label for="otp">{{ $t("Token") }}</label>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -29,10 +29,10 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
startDateTime() {
|
||||
return dayjs(this.maintenance.timeslotList[0].startDate).tz(this.maintenance.timezone).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
|
||||
return dayjs(this.maintenance.timeslotList[0].startDate).tz(this.maintenance.timezone, true).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
|
||||
},
|
||||
endDateTime() {
|
||||
return dayjs(this.maintenance.timeslotList[0].endDate).tz(this.maintenance.timezone).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
|
||||
return dayjs(this.maintenance.timeslotList[0].endDate).tz(this.maintenance.timezone, true).format(SQL_DATETIME_FORMAT_WITHOUT_SECOND);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@@ -16,7 +16,10 @@
|
||||
</a>
|
||||
<form>
|
||||
<input
|
||||
v-model="searchText" class="form-control search-input" :placeholder="$t('Search...')"
|
||||
v-model="searchText"
|
||||
class="form-control search-input"
|
||||
:placeholder="$t('Search...')"
|
||||
:aria-label="$t('Search monitored sites')"
|
||||
autocomplete="off"
|
||||
/>
|
||||
</form>
|
||||
|
@@ -258,6 +258,10 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import "../assets/vars.scss";
|
||||
|
||||
.dropdown-item {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clear-filters-btn {
|
||||
font-size: 0.8em;
|
||||
margin-right: 5px;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="dropdown" @focusin="open = true" @focusout="handleFocusOut">
|
||||
<div tabindex="-1" class="dropdown" @focusin="open = true" @focusout="handleFocusOut">
|
||||
<button type="button" class="filter-dropdown-status" :class="{ 'active': filterActive }" tabindex="0">
|
||||
<div class="px-1 d-flex align-items-center">
|
||||
<slot name="status"></slot>
|
||||
@@ -107,6 +107,19 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-left: 5px;
|
||||
color: $link-color;
|
||||
|
||||
.dark & {
|
||||
color: $dark-font-color;
|
||||
}
|
||||
|
||||
&:focus {
|
||||
background-color: $highlight-white;
|
||||
|
||||
.dark & {
|
||||
background-color: $dark-font-color2;
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
border: 1px solid $highlight;
|
||||
|
@@ -62,7 +62,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="extra-info">
|
||||
<div v-if="showCertificateExpiry && monitor.element.type === 'http'">
|
||||
<div v-if="showCertificateExpiry && monitor.element.certExpiryDaysRemaining">
|
||||
<Tag :item="{name: $t('Cert Exp.'), value: formattedCertExpiryMessage(monitor), color: certExpiryColor(monitor)}" :size="'sm'" />
|
||||
</div>
|
||||
<div v-if="showTags">
|
||||
|
@@ -28,6 +28,7 @@
|
||||
v-model="currentPassword"
|
||||
type="password"
|
||||
class="form-control"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
@@ -43,7 +44,7 @@
|
||||
<div v-if="uri && twoFAStatus == false" class="mt-3">
|
||||
<label for="basic-url" class="form-label">{{ $t("twoFAVerifyLabel") }}</label>
|
||||
<div class="input-group">
|
||||
<input v-model="token" type="text" maxlength="6" class="form-control">
|
||||
<input v-model="token" type="text" maxlength="6" class="form-control" autocomplete="one-time-code" required>
|
||||
<button class="btn btn-outline-primary" type="button" @click="verifyToken()">{{ $t("Verify Token") }}</button>
|
||||
</div>
|
||||
<p v-show="tokenValid" class="mt-2" style="color: green;">{{ $t("tokenValidSettingsMsg") }}</p>
|
||||
|
@@ -13,6 +13,15 @@
|
||||
<div class="mb-3">
|
||||
<label for="ntfy-priority" class="form-label">{{ $t("Priority") }}</label>
|
||||
<input id="ntfy-priority" v-model="$parent.notification.ntfyPriority" type="number" class="form-control" required min="1" max="5" step="1">
|
||||
<div class="form-text">
|
||||
<p v-if="$parent.notification.ntfyPriority >= 5">
|
||||
{{ $t("ntfyPriorityHelptextAllEvents") }}
|
||||
</p>
|
||||
<i18n-t v-else tag="p" keypath="ntfyPriorityHelptextAllExceptDown">
|
||||
<code>DOWN</code>
|
||||
<code>{{ $parent.notification.ntfyPriority + 1 }}</code>
|
||||
</i18n-t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label for="authentication-method" class="form-label">{{ $t("ntfyAuthenticationMethod") }}</label>
|
||||
|
@@ -150,6 +150,43 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DNS Cache (nscd) -->
|
||||
<div v-if="$root.info.isContainer" class="mb-4">
|
||||
<label class="form-label">
|
||||
{{ $t("enableNSCD") }}
|
||||
</label>
|
||||
|
||||
<div class="form-check">
|
||||
<input
|
||||
id="nscdEnable"
|
||||
v-model="settings.nscd"
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="nscd"
|
||||
:value="true"
|
||||
required
|
||||
/>
|
||||
<label class="form-check-label" for="nscdEnable">
|
||||
{{ $t("Enable") }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-check">
|
||||
<input
|
||||
id="nscdDisable"
|
||||
v-model="settings.nscd"
|
||||
class="form-check-input"
|
||||
type="radio"
|
||||
name="nscd"
|
||||
:value="false"
|
||||
required
|
||||
/>
|
||||
<label class="form-check-label" for="nscdDisable">
|
||||
{{ $t("Disable") }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DNS Cache -->
|
||||
<div class="mb-4">
|
||||
<label class="form-label">
|
||||
|
@@ -27,13 +27,13 @@
|
||||
<div class="mt-1 mb-3 ps-2 cert-exp-days col-12 col-xl-6">
|
||||
<div v-for="day in settings.tlsExpiryNotifyDays" :key="day" class="d-flex align-items-center justify-content-between cert-exp-day-row py-2">
|
||||
<span>{{ day }} {{ $tc("day", day) }}</span>
|
||||
<button type="button" class="btn-rm-expiry btn btn-outline-danger ms-2 py-1" @click="removeExpiryNotifDay(day)">
|
||||
<font-awesome-icon class="" icon="times" />
|
||||
<button type="button" class="btn-rm-expiry btn btn-outline-danger ms-2 py-1" :aria-label="$t('Remove the expiry notification')" @click="removeExpiryNotifDay(day)">
|
||||
<font-awesome-icon icon="times" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-xl-6">
|
||||
<ActionInput v-model="expiryNotifInput" :type="'number'" :placeholder="$t('day')" :icon="'plus'" :action="() => addExpiryNotifDay(expiryNotifInput)" />
|
||||
<ActionInput v-model="expiryNotifInput" :type="'number'" :placeholder="$t('day')" :icon="'plus'" :action="() => addExpiryNotifDay(expiryNotifInput)" :action-aria-label="$t('Add a new expiry notification day')" />
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-primary" type="button" @click="saveSettings()">
|
||||
|
@@ -19,6 +19,7 @@
|
||||
v-model="password.currentPassword"
|
||||
type="password"
|
||||
class="form-control"
|
||||
autocomplete="current-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
@@ -32,6 +33,7 @@
|
||||
v-model="password.newPassword"
|
||||
type="password"
|
||||
class="form-control"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
@@ -46,6 +48,7 @@
|
||||
type="password"
|
||||
class="form-control"
|
||||
:class="{ 'is-invalid': invalidPassword }"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
/>
|
||||
<div class="invalid-feedback">
|
||||
|
@@ -683,5 +683,6 @@
|
||||
"languageName": "العربية",
|
||||
"Game": "الألعاب",
|
||||
"List": "القائمة",
|
||||
"statusMaintenance": "الصيانة"
|
||||
"statusMaintenance": "الصيانة",
|
||||
"Home": "الرئيسة"
|
||||
}
|
||||
|
@@ -834,8 +834,9 @@
|
||||
"wayToGetFlashDutyKey": "Můžete přejít na stránku Kanál -> (Vyberte kanál) -> Integrace -> Přidat novou integraci, přidat \"Vlastní událost\" a získat adresu pro odeslání, zkopírovat klíč integrace do adresy. Další informace naleznete na adrese",
|
||||
"Request Timeout": "Časový limit požadavku",
|
||||
"timeoutAfter": "Vypršení časového limitu po {0} sekundách",
|
||||
"styleElapsedTime": "Čas uplynulý pod pruhem poslední odpovědi",
|
||||
"styleElapsedTime": "Čas uplynulý pod heartbeat ukazatelem",
|
||||
"styleElapsedTimeShowWithLine": "Zobrazit (s linkou)",
|
||||
"gamedigGuessPortDescription": "Port používaný protokolem Valve Server Query Protocol se může lišit od portu klienta. Pokud se monitor nemůže připojit k serveru, zkuste to.",
|
||||
"styleElapsedTimeShowNoLine": "Zobrazit (bez linky)"
|
||||
"styleElapsedTimeShowNoLine": "Zobrazit (bez linky)",
|
||||
"gamedigGuessPort": "Gamedig: Guess Port"
|
||||
}
|
||||
|
@@ -109,10 +109,10 @@
|
||||
"Last Result": "Letztes Ergebnis",
|
||||
"pauseMonitorMsg": "Bist du sicher, dass du den Monitor pausieren möchtest?",
|
||||
"clearEventsMsg": "Bist du sicher, dass du alle Ereignisse für diesen Monitor löschen möchtest?",
|
||||
"clearHeartbeatsMsg": "Bist du sicher, dass du alle Statistiken für diesen Monitor löschen möchtest?",
|
||||
"clearHeartbeatsMsg": "Bist du sicher, dass du alle Prüfintervalle für diesen Monitor löschen möchtest?",
|
||||
"Clear Data": "Lösche Daten",
|
||||
"Events": "Ereignisse",
|
||||
"Heartbeats": "Statistiken",
|
||||
"Heartbeats": "Prüfintervalle",
|
||||
"confirmClearStatisticsMsg": "Bist du dir sicher, dass du ALLE Statistiken löschen möchtest?",
|
||||
"Create your admin account": "Erstelle dein Admin-Konto",
|
||||
"Repeat Password": "Passwort erneut eingeben",
|
||||
@@ -380,12 +380,12 @@
|
||||
"alertaAlertState": "Alarmstatus",
|
||||
"alertaRecoverState": "Wiederherstellungsstatus",
|
||||
"deleteStatusPageMsg": "Bist du sicher, dass du diese Status-Seite löschen willst?",
|
||||
"Proxies": "Proxies",
|
||||
"Proxies": "Proxys",
|
||||
"default": "Standard",
|
||||
"enabled": "Aktiviert",
|
||||
"setAsDefault": "Als Standard setzen",
|
||||
"deleteProxyMsg": "Bist du sicher, dass du diesen Proxy für alle Monitore löschen willst?",
|
||||
"proxyDescription": "Proxies müssen einem Monitor zugewiesen werden, um zu funktionieren.",
|
||||
"proxyDescription": "Proxys müssen einem Monitor zugewiesen werden, um zu funktionieren.",
|
||||
"enableProxyDescription": "Dieser Proxy wird keinen Effekt auf Monitor-Anfragen haben, bis er aktiviert ist. Du kannst ihn temporär von allen Monitoren nach Aktivierungsstatus deaktivieren.",
|
||||
"setAsDefaultProxyDescription": "Dieser Proxy wird standardmässig für alle neuen Monitore aktiviert sein. Du kannst den Proxy immer noch für jeden Monitor einzeln deaktivieren.",
|
||||
"Certificate Chain": "Zertifikatskette",
|
||||
@@ -815,5 +815,25 @@
|
||||
"Badge Preview": "Badge Vorschau",
|
||||
"tailscalePingWarning": "Um den Tailscale Ping Monitor nutzen zu können, musst du Uptime Kuma ohne Docker installieren und den Tailscale Client auf dem Server installieren.",
|
||||
"Server URL should not contain the nfty topic": "Die Server-URL sollte das nfty-Thema nicht enthalten",
|
||||
"pushDeerServerDescription": "Leer lassen, um den offiziellen Server zu verwenden"
|
||||
"pushDeerServerDescription": "Leer lassen um den offiziellen Server zu verwenden",
|
||||
"FlashDuty Severity": "Schweregrad",
|
||||
"nostrSender": "Privater Schlüssel des Absenders (nsec)",
|
||||
"nostrRecipientsHelp": "npub-Format, eine pro Zeile",
|
||||
"noOrBadCertificate": "Kein/schlechtes Zertifikat",
|
||||
"wayToGetFlashDutyKey": "Gehe zu Channel -> (Wähle einen Channel) -> Integrationen -> Neue Integration hinzufügen', füge ein 'Custom Event' hinzu, um eine Push-Adresse zu erhalten, und kopiere den Integrationsschlüssel in die Adresse. Für weitere Informationen besuche bitte",
|
||||
"nostrRelays": "Nostr relays",
|
||||
"nostrRelaysHelp": "Eine Relay-URL pro Zeile",
|
||||
"nostrRecipients": "Öffentliche Schlüssel des Empfängers (npub)",
|
||||
"gamedigGuessPort": "Gamedig: Guess Port",
|
||||
"Request Timeout": "Zeitüberschreitung der Anfrage",
|
||||
"styleElapsedTimeShowNoLine": "Anzeigen (keine Zeile)",
|
||||
"styleElapsedTimeShowWithLine": "Anzeigen (mit Zeile)",
|
||||
"Select": "Auswählen",
|
||||
"selectedMonitorCount": "Ausgewählt: {0}",
|
||||
"PushDeer Server": "PushDeer Server",
|
||||
"showCertificateExpiry": "Ablauf des Zertifikats anzeigen",
|
||||
"gamedigGuessPortDescription": "Der vom Valve Server Query Protocol verwendete Port kann sich vom Port des Clients unterscheiden. Versuche dies, wenn der Monitor keine Verbindung zum Server herstellen kann.",
|
||||
"timeoutAfter": "Zeitüberschreitung nach {0} Sekunden",
|
||||
"styleElapsedTime": "Verstrichene Zeit unter der Prüfintervallleiste",
|
||||
"Check/Uncheck": "Aktivieren/Deaktivieren"
|
||||
}
|
||||
|
@@ -109,10 +109,10 @@
|
||||
"Last Result": "Letztes Ergebnis",
|
||||
"pauseMonitorMsg": "Bist du sicher, dass du den Monitor pausieren möchtest?",
|
||||
"clearEventsMsg": "Bist du sicher, dass du alle Ereignisse für diesen Monitor löschen möchtest?",
|
||||
"clearHeartbeatsMsg": "Bist du sicher, dass du alle Statistiken für diesen Monitor löschen möchtest?",
|
||||
"clearHeartbeatsMsg": "Bist du sicher, dass du alle Prüfintervalle für diesen Monitor löschen möchtest?",
|
||||
"Clear Data": "Lösche Daten",
|
||||
"Events": "Ereignisse",
|
||||
"Heartbeats": "Statistiken",
|
||||
"Heartbeats": "Prüfintervalle",
|
||||
"confirmClearStatisticsMsg": "Bist du dir sicher, dass du ALLE Statistiken löschen möchtest?",
|
||||
"Create your admin account": "Erstelle dein Admin-Konto",
|
||||
"Repeat Password": "Passwort erneut eingeben",
|
||||
@@ -385,7 +385,7 @@
|
||||
"enabled": "Aktiviert",
|
||||
"setAsDefault": "Als Standard setzen",
|
||||
"deleteProxyMsg": "Bist du sicher, dass du diesen Proxy für alle Monitore löschen willst?",
|
||||
"proxyDescription": "Proxies müssen einem Monitor zugewiesen werden, um zu funktionieren.",
|
||||
"proxyDescription": "Proxys müssen einem Monitor zugewiesen werden, um zu funktionieren.",
|
||||
"enableProxyDescription": "Dieser Proxy wird keinen Effekt auf Monitor-Anfragen haben, bis er aktiviert ist. Du kannst ihn temporär von allen Monitoren nach Aktivierungsstatus deaktivieren.",
|
||||
"setAsDefaultProxyDescription": "Dieser Proxy wird standardmäßig für alle neuen Monitore aktiviert sein. Du kannst den Proxy immer noch für jeden Monitor einzeln deaktivieren.",
|
||||
"Certificate Chain": "Zertifikatskette",
|
||||
@@ -818,5 +818,25 @@
|
||||
"jsonQueryDescription": "Führe eine JSON-Abfrage gegen die Antwort durch und prüfe den erwarteten Wert (der Rückgabewert wird zum Vergleich in eine Zeichenkette umgewandelt). Auf <a href='https://jsonata.org/'>jsonata.org</a> findest du die Dokumentation zur Abfragesprache. <a href='https://try.jsonata.org/'>Hier</a> kannst du Abfragen üben.",
|
||||
"tailscalePingWarning": "Um den Tailscale Ping Monitor nutzen zu können, musst du Uptime Kuma ohne Docker installieren und den Tailscale Client auf dem Server installieren.",
|
||||
"Server URL should not contain the nfty topic": "Die Server-URL sollte das nfty-Thema nicht enthalten",
|
||||
"pushDeerServerDescription": "Leer lassen, um den offiziellen Server zu verwenden"
|
||||
"pushDeerServerDescription": "Leer lassen um den offiziellen Server zu verwenden",
|
||||
"FlashDuty Severity": "Schweregrad",
|
||||
"nostrRelays": "Nostr relays",
|
||||
"gamedigGuessPort": "Gamedig: Guess Port",
|
||||
"Request Timeout": "Zeitüberschreitung der Anfrage",
|
||||
"styleElapsedTimeShowNoLine": "Anzeigen (keine Zeile)",
|
||||
"Select": "Auswählen",
|
||||
"selectedMonitorCount": "Ausgewählt: {0}",
|
||||
"PushDeer Server": "PushDeer Server",
|
||||
"nostrRelaysHelp": "Eine Relay-URL pro Zeile",
|
||||
"nostrSender": "Privater Schlüssel des Absenders (nsec)",
|
||||
"gamedigGuessPortDescription": "Der vom Valve Server Query Protocol verwendete Port kann sich vom Port des Clients unterscheiden. Versuche dies, wenn der Monitor keine Verbindung zum Server herstellen kann.",
|
||||
"wayToGetFlashDutyKey": "Gehe zu Channel -> (Wähle einen Channel) -> Integrationen -> Neue Integration hinzufügen', füge ein 'Custom Event' hinzu, um eine Push-Adresse zu erhalten, und kopiere den Integrationsschlüssel in die Adresse. Für weitere Informationen besuche bitte",
|
||||
"timeoutAfter": "Zeitüberschreitung nach {0} Sekunden",
|
||||
"styleElapsedTimeShowWithLine": "Anzeigen (mit Zeile)",
|
||||
"styleElapsedTime": "Verstrichene Zeit unter der Prüfintervallleiste",
|
||||
"Check/Uncheck": "Aktivieren/Deaktivieren",
|
||||
"nostrRecipients": "Öffentliche Schlüssel des Empfängers (npub)",
|
||||
"nostrRecipientsHelp": "npub-Format, eine pro Zeile",
|
||||
"showCertificateExpiry": "Ablauf des Zertifikats anzeigen",
|
||||
"noOrBadCertificate": "Kein/schlechtes Zertifikat"
|
||||
}
|
||||
|
@@ -183,6 +183,7 @@
|
||||
"Pink": "Pink",
|
||||
"Custom": "Custom",
|
||||
"Search...": "Search…",
|
||||
"Search monitored sites": "Search monitored sites",
|
||||
"Avg. Ping": "Avg. Ping",
|
||||
"Avg. Response": "Avg. Response",
|
||||
"Entry Page": "Entry Page",
|
||||
@@ -334,6 +335,8 @@
|
||||
"Fingerprint:": "Fingerprint:",
|
||||
"No status pages": "No status pages",
|
||||
"Domain Name Expiry Notification": "Domain Name Expiry Notification",
|
||||
"Add a new expiry notification day": "Add a new expiry notification day",
|
||||
"Remove the expiry notification": "Remove the expiry notification day",
|
||||
"Proxy": "Proxy",
|
||||
"Date Created": "Date Created",
|
||||
"Footer Text": "Footer Text",
|
||||
@@ -369,6 +372,8 @@
|
||||
"Setup Docker Host": "Setup Docker Host",
|
||||
"Connection Type": "Connection Type",
|
||||
"Docker Daemon": "Docker Daemon",
|
||||
"noDockerHostMsg": "Not Available. Setup a Docker Host First.",
|
||||
"DockerHostRequired": "Please set the Docker Host for this monitor.",
|
||||
"deleteDockerHostMsg": "Are you sure want to delete this docker host for all monitors?",
|
||||
"socket": "Socket",
|
||||
"tcp": "TCP / HTTP",
|
||||
@@ -449,9 +454,10 @@
|
||||
"Server Timezone": "Server Timezone",
|
||||
"statusPageMaintenanceEndDate": "End",
|
||||
"IconUrl": "Icon URL",
|
||||
"Enable DNS Cache": "Enable DNS Cache for HTTP(s) monitors",
|
||||
"Enable DNS Cache": "(Deprecated) Enable DNS Cache for HTTP(s) monitors",
|
||||
"Enable": "Enable",
|
||||
"Disable": "Disable",
|
||||
"enableNSCD": "Enable NSCD (Name Service Cache Daemon) for caching all DNS requests",
|
||||
"chromeExecutable": "Chrome/Chromium Executable",
|
||||
"chromeExecutableAutoDetect": "Auto Detect",
|
||||
"chromeExecutableDescription": "For Docker users, if Chromium is not yet installed, it may take a few minutes to install and display the test result. It takes 1GB of disk space.",
|
||||
@@ -653,6 +659,10 @@
|
||||
"Notify Channel": "Notify Channel",
|
||||
"aboutNotifyChannel": "Notify channel will trigger a desktop or mobile notification for all members of the channel, whether their availability is set to active or away.",
|
||||
"Uptime Kuma URL": "Uptime Kuma URL",
|
||||
"setup a new monitor group": "setup a new monitor group",
|
||||
"openModalTo": "open modal to {0}",
|
||||
"Add a domain": "Add a domain",
|
||||
"Remove domain": "Remove domain '{0}'",
|
||||
"Icon Emoji": "Icon Emoji",
|
||||
"signalImportant": "IMPORTANT: You cannot mix groups and numbers in recipients!",
|
||||
"aboutWebhooks": "More info about Webhooks on: {0}",
|
||||
@@ -746,6 +756,8 @@
|
||||
"lunaseaDeviceID": "Device ID",
|
||||
"lunaseaUserID": "User ID",
|
||||
"ntfyAuthenticationMethod": "Authentication Method",
|
||||
"ntfyPriorityHelptextAllEvents": "All events are send with the maximum priority",
|
||||
"ntfyPriorityHelptextAllExceptDown": "All events are send with this priority, except {0}-events, which have a priority of {1}",
|
||||
"ntfyUsernameAndPassword": "Username and Password",
|
||||
"twilioAccountSID": "Account SID",
|
||||
"twilioApiKey": "Api Key (optional)",
|
||||
|
@@ -569,5 +569,18 @@
|
||||
"dayOfMonth": "Hilabeteko eguna",
|
||||
"lastDay": "Azken eguna",
|
||||
"lastDay1": "Hilabeteko azken eguna",
|
||||
"Resend Notification if Down X times consecutively": "Bidali jakinarazpena X aldiz jarraian erortzen bada"
|
||||
"Resend Notification if Down X times consecutively": "Bidali jakinarazpena X aldiz jarraian erortzen bada",
|
||||
"Add New Tag": "Gehitu etiketa berria",
|
||||
"Schedule maintenance": "Programatu mantenua",
|
||||
"Start of maintenance": "Mantenuaren hasiera",
|
||||
"All Status Pages": "Egoera orrialde guztiak",
|
||||
"Custom": "Pertsonalizatua",
|
||||
"showCertificateExpiry": "Erakutsi ziurtagiriaren iraungitzea",
|
||||
"Close": "Itxi",
|
||||
"Request Body": "Eskaera gorputza",
|
||||
"Mechanism": "Mekanismoa",
|
||||
"Home": "Hasiera",
|
||||
"filterActive": "Aktibo",
|
||||
"filterActivePaused": "Geldituta",
|
||||
"Expected Value": "Esperotako balioa"
|
||||
}
|
||||
|
@@ -36,7 +36,7 @@
|
||||
"Version": "نسخه",
|
||||
"Check Update On GitHub": "بررسی بروزرسانی بر روی گیتهاب",
|
||||
"List": "لیست",
|
||||
"Add": "اضافه",
|
||||
"Add": "اضافه کردن",
|
||||
"Add New Monitor": "اضافه کردن مانیتور جدید",
|
||||
"Quick Stats": "خلاصه وضعیت",
|
||||
"Up": "فعال",
|
||||
@@ -241,7 +241,7 @@
|
||||
"apiKeyAddedMsg": "کلید API شما اضافه شده است. لطفاً آن را یادداشت کنید زیرا دیگر نمایش داده نخواهد شد.",
|
||||
"deleteAPIKeyMsg": "آیا مطمئن هستید که می خواهید این کلید API را غیرفعال کنید؟",
|
||||
"twilioAccountSID": "SID حساب",
|
||||
"twilioAuthToken": "توکن اعتبارسنجی",
|
||||
"twilioAuthToken": "توکن اعتبارسنجی / کلید مخفی API",
|
||||
"appriseNotInstalled": "Apprise نصب نشده است. {0}",
|
||||
"trustProxyDescription": "به هدرهای «X-Forwarded-*» اعتماد کن. اگر میخواهید IP مشتری صحیح را دریافت کنید و آپتایم کومای شما پشت پروکسی مانند Nginx یا Apache قرار دارد، باید این گزینه را فعال کنید.",
|
||||
"matrixDesc2": "اکیداً توصیه میشود که یک کاربر جدید ایجاد کنید و از رمز دسترسی کاربر Matrix خود استفاده نکنید زیرا امکان دسترسی کامل به حساب شما و تمام اتاقهایی را که به آنها ملحق شدهاید میدهد. در عوض، یک کاربر جدید ایجاد کنید و فقط او را به اتاقی دعوت کنید که میخواهید اعلان را دریافت کنید. میتوانید با اجرای {0} توکن دسترسی را دریافت کنید",
|
||||
@@ -642,7 +642,7 @@
|
||||
"Schedule maintenance": "زمانبندی نگهداری (غیرفعال سازی دستی)",
|
||||
"webhookFormDataDesc": "{multipart} برای PHP مناسب است. آرایه JSON نیاز است تا به این شکل باز شود {decodeFunction}",
|
||||
"webhookAdditionalHeadersTitle": "هدر اضافی",
|
||||
"webhookAdditionalHeadersDesc": "تنظیم هدر های اضافی که نیاز است با وب هوک ارسال شود.",
|
||||
"webhookAdditionalHeadersDesc": "تنظیم هدر های اضافی که نیاز است با وب هوک ارسال شود. هر هدر باید به کیلد/مقدار JSON تعریف شده باشد.",
|
||||
"Webhook URL": "آدرس وب هوک",
|
||||
"Application Token": "توکن اپلیکیشن",
|
||||
"Style": "حالت ها",
|
||||
@@ -672,7 +672,7 @@
|
||||
"Server Timezone": "منطقه زمانی در سرور",
|
||||
"statusPageMaintenanceEndDate": "پایان",
|
||||
"IconUrl": "URL آیکون",
|
||||
"Enable DNS Cache": "فعال سازی کش DNS",
|
||||
"Enable DNS Cache": "فعال سازی کش DNS برای مانیتور های HTTP",
|
||||
"Access Token": "توکن دسترسی",
|
||||
"smtp": "ایمیل (SMTP)",
|
||||
"Device": "دستگاه",
|
||||
@@ -727,8 +727,8 @@
|
||||
"Badge Type": "نوع نشان",
|
||||
"Badge Duration": "مدت نشان",
|
||||
"Badge Label": "برچسب نشان",
|
||||
"Badge Prefix": "پیشوند نشان",
|
||||
"Badge Suffix": "پسوند نشان",
|
||||
"Badge Prefix": "مقدار پیشوند نشان",
|
||||
"Badge Suffix": "مقدار پسوند نشان",
|
||||
"Badge Label Color": "رنگ برچسب نشان",
|
||||
"Badge Color": "رنگ نشان",
|
||||
"Badge Label Prefix": "پیشوند برچسب نشان",
|
||||
@@ -752,5 +752,61 @@
|
||||
"Reconnecting...": "ارتباط مجدد...",
|
||||
"Monitor Group": "گروه مانیتور",
|
||||
"Group": "گروه",
|
||||
"Close": "بستن"
|
||||
"Close": "بستن",
|
||||
"Request Timeout": "زمان تایم اوت ریکوئست",
|
||||
"filterActive": "فعال",
|
||||
"webhookCustomBodyDesc": "یک بدنه HTTP سفارشی برای ریکوئست تعریف کنید. متغیر های قابل استفاده: {msg}, {heartbeat}, {monitor}.",
|
||||
"tailscalePingWarning": "برای استفاده از Tailscale Ping monitor، شما باید آپتایم کوما را بدون استفاده از داکر و همچنین Tailscale client را نیز بر روی سرور خود نصب داشته باشید.",
|
||||
"jsonQueryDescription": "یک کوئری json در برابر پاسخ انجام دهید و مقدار مورد انتظار را (مقدار برگشتی برای مقایسه به رشته تبدیل می شود). برای مستندات درباره زبان کوئری، <a href='https://jsonata.org/'>jsonata.org</a> مشاهده کنید. همچنین محیط تست را میتوانید در <a href='https://try.jsonata.org/'>اینجا</a> پیدا کنید.",
|
||||
"Enter the list of brokers": "لیست بروکر هارا وارد کنید",
|
||||
"Enable Kafka Producer Auto Topic Creation": "فعال سازی ایجاپ موضوع اتوماتیک تهیه کننده",
|
||||
"Secret AccessKey": "کلید محرمانه AccessKey",
|
||||
"wayToGetFlashDutyKey": "می توانید به کانال -> (انتخاب یک کانال) -> یکپارچه سازی -> صفحه یکپارچه سازی جدید بروید، یک \"رویداد سفارشی\" را برای دریافت یک آدرس فشار اضافه کنید، کلید یکپارچه سازی را در آدرس کپی کنید. برای اطلاعات بیشتر لطفا مراجعه کنید به",
|
||||
"showCertificateExpiry": "نمایش زمان به پایان رسیدن اعتبار سرتیفیکیت",
|
||||
"gamedigGuessPortDescription": "پورت مورد استفاده توسط پروتکل Query Valve Server ممکن است با پورت مشتری متفاوت باشد. اگر مانیتور نمی تواند به سرور شما متصل شود، این را امتحان کنید.",
|
||||
"invertKeywordDescription": "دنبال کلمات کلیدی ناموجود باشید تا آنهایی که موجود است.",
|
||||
"Notify Channel": "آگاه کردن کانال",
|
||||
"timeoutAfter": "تایم اوت بعد از {0} ثانیه",
|
||||
"FlashDuty Severity": "شدت",
|
||||
"nostrRelays": "ریلی Nostr",
|
||||
"nostrRelaysHelp": "یک آدرس ریلی به ازای هر خط",
|
||||
"nostrSender": "کلید محرمانه فرسته (nsec)",
|
||||
"gamedigGuessPort": "Gamedig: پورت پرسش",
|
||||
"styleElapsedTime": "زمان سپری شده زیر heartbeat bar",
|
||||
"styleElapsedTimeShowNoLine": "نمایش (بدون خط)",
|
||||
"styleElapsedTimeShowWithLine": "نمایش (با خط)",
|
||||
"filterActivePaused": "متوقف شده",
|
||||
"webhookBodyPresetOption": "از پیش تعیین شده - {0}",
|
||||
"webhookBodyCustomOption": "بدنه سفارشی",
|
||||
"selectedMonitorCount": "انتخاب شده: {0}",
|
||||
"Check/Uncheck": "انتخاب/ عدم انتخاب",
|
||||
"chromeExecutable": "فایل اجرایی کروم/کرومیوم",
|
||||
"chromeExecutableAutoDetect": "تشخیص خودکار",
|
||||
"chromeExecutableDescription": "برای کاربران داکر، اگر کرومیوم را هنوز نصب نکردید، ممکن است چند دقیقه زمان ببرد تا کرومیوم نصب و نتایج نشان داده شود. همچنین ممکن است تا 1 گیگابایت فضا بر روی سرور نیاز باشد.",
|
||||
"Select": "انتخاب",
|
||||
"aboutNotifyChannel": "آگاه کردن کانال یک نوتیفیکیشن دسکتاپ یا تلفن همراه را برای همه اعضای کانال راهاندازی میکند، خواه در دسترس بودن آنها فعال باشد یا غیرفعال.",
|
||||
"Server URL should not contain the nfty topic": "URL سرور نباید حاوی موضوع nfty باشد",
|
||||
"PushDeer Server": "سرور PushDeer",
|
||||
"pushDeerServerDescription": "برای استفاده از سرور رسمی خالی بگذارید",
|
||||
"twilioApiKey": "کلید API (اختیاری)",
|
||||
"Badge Duration (in hours)": "مدت نشان (در ساعت)",
|
||||
"Badge Preview": "پیش نمایش نشان",
|
||||
"Kafka Brokers": "بروکر Kafka",
|
||||
"Press Enter to add broker": "Enter را برای افزودن بروکر جدید فشار دهید",
|
||||
"Kafka Topic Name": "عنوان موضوع",
|
||||
"Kafka Producer Message": "پیام تهیه کننده",
|
||||
"Enable Kafka SSL": "فعال سازی SSL",
|
||||
"Kafka SASL Options": "گزینه های SASL",
|
||||
"Mechanism": "مکانیزم",
|
||||
"Pick a SASL Mechanism...": "یک مکانیزم SASL انتخاب کنید...",
|
||||
"Authorization Identity": "اطلاعات اعتبارسنجی",
|
||||
"AccessKey Id": "آیدی AccessKey",
|
||||
"Session Token": "توکن سشن",
|
||||
"Request Body": "بدنه پیام",
|
||||
"nostrRecipients": "کلید عمومی گیرنده (npub)",
|
||||
"nostrRecipientsHelp": "فرمت npub، یکی به ازای هر خط",
|
||||
"noOrBadCertificate": "بدون سرتیفیکت یا بد",
|
||||
"Invert Keyword": "کلمه کلیدی معکوس",
|
||||
"Expected Value": "مقدار مورد انتظار",
|
||||
"Json Query": "کوئری جیسون"
|
||||
}
|
||||
|
@@ -739,5 +739,6 @@
|
||||
"pagertreeHigh": "גבוהה",
|
||||
"pagertreeCritical": "קריטי",
|
||||
"pagertreeResolve": "הגדרה אוטומטית",
|
||||
"ntfyUsernameAndPassword": "שם משתמש וסיסמא"
|
||||
"ntfyUsernameAndPassword": "שם משתמש וסיסמא",
|
||||
"Cannot connect to the socket server": "לא ניתן להתחבר לשקע השרת"
|
||||
}
|
||||
|
@@ -786,5 +786,7 @@
|
||||
"install": "Pasang",
|
||||
"promosmsAllowLongSMS": "Izinkan SMS panjang",
|
||||
"Badge Pending Color": "Warna Lencana Tertunda",
|
||||
"Monitor Group": "Monitor Grup"
|
||||
"Monitor Group": "Monitor Grup",
|
||||
"Expected Value": "Value yang diharapkan",
|
||||
"Json Query": "Json Query"
|
||||
}
|
||||
|
@@ -159,7 +159,7 @@
|
||||
"Show URI": "Mostra URI",
|
||||
"Tags": "Etichette",
|
||||
"Add New below or Select...": "Aggiungi oppure scegli…",
|
||||
"Tag with this name already exist.": "Un'etichetta con questo nome già esiste.",
|
||||
"Tag with this name already exist.": "Un'etichetta con questo nome esiste già.",
|
||||
"Tag with this value already exist.": "Un'etichetta con questo valore già esiste.",
|
||||
"color": "colore",
|
||||
"value (optional)": "descrizione (opzionale)",
|
||||
@@ -177,7 +177,7 @@
|
||||
"Entry Page": "Pagina Principale",
|
||||
"statusPageNothing": "Non c'è nulla qui, aggiungi un gruppo oppure un monitor.",
|
||||
"No Services": "Nessun servizio",
|
||||
"All Systems Operational": "Tutti i sistemi sono funzionali",
|
||||
"All Systems Operational": "Tutti i sistemi sono funzionanti",
|
||||
"Partially Degraded Service": "Servizio parzialmente degradato",
|
||||
"Degraded Service": "Servizio degradato",
|
||||
"Add Group": "Aggiungi gruppo",
|
||||
@@ -213,7 +213,7 @@
|
||||
"smtpBCC": "CCn",
|
||||
"discord": "Discord",
|
||||
"Discord Webhook URL": "URL Webhook di Discord",
|
||||
"wayToGetDiscordURL": "È possibile recuperarlo da Impostazioni server -> Integrazioni -> Creare Webhook",
|
||||
"wayToGetDiscordURL": "Puoi ottenerlo andando su Impostazioni server -> Integrazioni -> Visualizza webhook -> Nuovo webhook",
|
||||
"Bot Display Name": "Nome del Bot",
|
||||
"Prefix Custom Message": "Prefisso per il messaggio personalizzato",
|
||||
"Hello @everyone is...": "Ciao a {'@'}everyone …",
|
||||
@@ -384,7 +384,7 @@
|
||||
"resendDisabled": "Reinvio disabilitato",
|
||||
"Resend Notification if Down X times consequently": "Reinvia la notifica se Down X volte di seguito",
|
||||
"Add New Status Page": "Aggiungi nuova pagina di stato",
|
||||
"webhookAdditionalHeadersDesc": "Imposta gli header aggiuntivi inviati nel webhook.",
|
||||
"webhookAdditionalHeadersDesc": "Imposta intestazioni aggiuntive inviate con il webhook. Ogni intestazione deve essere definita come chiave/valore JSON.",
|
||||
"topicExplanation": "MQTT topic da controllare",
|
||||
"successMessage": "Messaggio con successo",
|
||||
"successMessageExplanation": "Messaggio MQTT considerato come successo",
|
||||
@@ -417,5 +417,198 @@
|
||||
"Affected Monitors": "Monitoraggi interessati",
|
||||
"Pick Affected Monitors...": "Seleziona i monitoraggi interessati…",
|
||||
"Valid": "Valido",
|
||||
"Certificate Expiry Notification": "Notifica scadenza certificato"
|
||||
"Certificate Expiry Notification": "Notifica scadenza certificato",
|
||||
"styleElapsedTimeShowWithLine": "Mostra (con linea)",
|
||||
"webhookBodyPresetOption": "Predefinito - {0}",
|
||||
"webhookBodyCustomOption": "Corpo personalizzato",
|
||||
"topic": "Topic",
|
||||
"selectedMonitorCount": "Selezionato: {0}",
|
||||
"Check/Uncheck": "Seleziona/Deseleziona",
|
||||
"Proxies": "Proxy",
|
||||
"Stop": "Fermare",
|
||||
"startOrEndWithOnly": "Inizia o termina solo con {0}",
|
||||
"No consecutive dashes": "Nessun trattino consecutivo",
|
||||
"HTTP Basic Auth": "Autenticazione di base HTTP",
|
||||
"Reverse Proxy": "Proxy inverso",
|
||||
"Backup": "Backup",
|
||||
"About": "Di",
|
||||
"wayToGetCloudflaredURL": "(Scarica cloudflared da {0})",
|
||||
"cloudflareWebsite": "Sito web di Cloudflare",
|
||||
"Message:": "Messaggio:",
|
||||
"Don't know how to get the token? Please read the guide:": "Non sai come ottenere il token? Si prega di leggere la guida:",
|
||||
"Trust Proxy": "Proxy di fiducia",
|
||||
"Other Software": "Altro Software",
|
||||
"For example: nginx, Apache and Traefik.": "Ad esempio: nginx, Apache e Traefik.",
|
||||
"Please read": "Si prega di leggere",
|
||||
"Subject:": "Soggetto:",
|
||||
"Valid To:": "Valido per:",
|
||||
"Days Remaining:": "Giorni rimanenti:",
|
||||
"Issuer:": "Emittente",
|
||||
"Fingerprint:": "Impronta digitale:",
|
||||
"No status pages": "Nessuna pagina di stato",
|
||||
"Domain Name Expiry Notification": "Notifica di scadenza del nome di dominio",
|
||||
"Date Created": "Data di creazione",
|
||||
"Slug": "Slug",
|
||||
"Show Powered By": "Mostra Alimentato da",
|
||||
"Domain Names": "Nomi di dominio",
|
||||
"signedInDispDisabled": "Autenticazione disabilitata.",
|
||||
"RadiusSecret": "Radius Segreto",
|
||||
"RadiusCalledStationId": "Identificativo della stazione chiamata",
|
||||
"RadiusCallingStationId": "Id stazione chiamante",
|
||||
"RadiusCallingStationIdDescription": "Identificativo del dispositivo chiamante",
|
||||
"API Username": "Nome utente dell'API",
|
||||
"API Key": "Chiave dell'API",
|
||||
"Show update if available": "Mostra aggiornamento se disponibile",
|
||||
"RadiusSecretDescription": "Segreto condiviso tra client e server",
|
||||
"Also check beta release": "Controlla anche la versione beta",
|
||||
"Check how to config it for WebSocket": "Controlla come configurarlo per WebSocket",
|
||||
"Steam Game Server": "Server di gioco Steam",
|
||||
"Most likely causes:": "Cause più probabili:",
|
||||
"The resource is no longer available.": "La risorsa non è più disponibile.",
|
||||
"What you can try:": "Cosa puoi provare:",
|
||||
"Retype the address.": "Ridigita l'indirizzo.",
|
||||
"Go back to the previous page.": "Torna alla pagina precedente.",
|
||||
"Coming Soon": "Prossimamente",
|
||||
"Connection String": "Stringa di connessione",
|
||||
"Query": "Richiesta",
|
||||
"settingsCertificateExpiry": "Scadenza certificato TLS",
|
||||
"deleteDockerHostMsg": "Sei sicuro di voler eliminare questo host docker per tutti i monitor?",
|
||||
"tcp": "TCP / HTTP",
|
||||
"Docker Container": "Contenitore Docker",
|
||||
"Container Name / ID": "Nome/ID contenitore",
|
||||
"Docker Host": "Host Docker",
|
||||
"Docker Hosts": "Host Docker",
|
||||
"Domain": "Dominio",
|
||||
"Workstation": "Postazione di lavoro",
|
||||
"Packet Size": "Dimensione del pacchetto",
|
||||
"Setup Docker Host": "Configurare l'host Docker",
|
||||
"telegramSendSilently": "Invia silenziosamente",
|
||||
"telegramSendSilentlyDescription": "Invia il messaggio in silenzio. Gli utenti riceveranno una notifica senza audio.",
|
||||
"telegramProtectContent": "Proteggi inoltro/salvataggio",
|
||||
"disableCloudflaredNoAuthMsg": "Sei in modalità No Auth, non è richiesta una password.",
|
||||
"wayToGetLineNotifyToken": "Puoi ottenere un token di accesso da {0}",
|
||||
"Examples": "Esempi",
|
||||
"Long-Lived Access Token": "Token di accesso di lunga durata",
|
||||
"Long-Lived Access Token can be created by clicking on your profile name (bottom left) and scrolling to the bottom then click Create Token. ": "Il token di accesso di lunga durata può essere creato facendo clic sul nome del tuo profilo (in basso a sinistra) e scorrendo verso il basso, quindi fai clic su Crea token. ",
|
||||
"Notification Service": "Servizio di notifica",
|
||||
"default: notify all devices": "default: notifica a tutti i dispositivi",
|
||||
"Automations can optionally be triggered in Home Assistant:": "Le automazioni possono essere facoltativamente attivate in Home Assistant:",
|
||||
"Trigger type:": "Tipo di attivazione:",
|
||||
"Event type:": "Tipo di evento:",
|
||||
"Event data:": "Dati dell'evento:",
|
||||
"Then choose an action, for example switch the scene to where an RGB light is red.": "Quindi scegli un'azione, ad esempio cambia la scena in cui una luce RGB è rossa.",
|
||||
"Frontend Version": "Versione front-end",
|
||||
"Frontend Version do not match backend version!": "La versione del frontend non corrisponde alla versione del backend!",
|
||||
"backupOutdatedWarning": "Deprecato: poiché sono state aggiunte molte funzionalità e questa funzionalità di backup è un po' trascurata, non può generare o ripristinare un backup completo.",
|
||||
"backupRecommend": "Eseguire invece il backup diretto del volume o della cartella dei dati (./data/).",
|
||||
"Optional": "Opzionale",
|
||||
"sameAsServerTimezone": "Uguale al fuso orario del server",
|
||||
"startDateTime": "Data/ora di inizio",
|
||||
"endDateTime": "Data/ora di fine",
|
||||
"cronExpression": "Espressione Cron",
|
||||
"cronSchedule": "Programma: ",
|
||||
"recurringInterval": "Intervallo",
|
||||
"Recurring": "Ricorrente",
|
||||
"strategyManual": "Attivo/Inattivo manualmente",
|
||||
"warningTimezone": "Sta usando il fuso orario del server",
|
||||
"weekdayShortMon": "Lun",
|
||||
"weekdayShortTue": "Mar",
|
||||
"weekdayShortWed": "Mer",
|
||||
"weekdayShortThu": "Gio",
|
||||
"weekdayShortSat": "Sab",
|
||||
"weekdayShortSun": "Dom",
|
||||
"dayOfWeek": "Giorno della settimana",
|
||||
"dayOfMonth": "Giorno del mese",
|
||||
"lastDay": "Ultimo giorno",
|
||||
"lastDay1": "Ultimo giorno del mese",
|
||||
"lastDay3": "3° ultimo giorno del mese",
|
||||
"lastDay4": "4° ultimo giorno del mese",
|
||||
"No Maintenance": "Nessuna manutenzione",
|
||||
"pauseMaintenanceMsg": "Sei sicuro di voler mettere in pausa?",
|
||||
"maintenanceStatus-inactive": "Inattivo",
|
||||
"maintenanceStatus-scheduled": "Programmato",
|
||||
"maintenanceStatus-ended": "Conclusa",
|
||||
"maintenanceStatus-unknown": "Sconosciuto",
|
||||
"Display Timezone": "Mostra fuso orario",
|
||||
"Server Timezone": "Fuso orario del server",
|
||||
"statusPageMaintenanceEndDate": "Fine",
|
||||
"IconUrl": "URL dell'icona",
|
||||
"Enable DNS Cache": "Abilita la cache DNS per i monitor HTTP(s).",
|
||||
"Enable": "Abilitare",
|
||||
"Disable": "Disattivare",
|
||||
"chromeExecutableAutoDetect": "Trovato automaticamente",
|
||||
"dnsCacheDescription": "Potrebbe non funzionare in alcuni ambienti IPv6, disabilitalo in caso di problemi.",
|
||||
"Single Maintenance Window": "Singola finestra di manutenzione",
|
||||
"Maintenance Time Window of a Day": "Finestra temporale di manutenzione di un giorno",
|
||||
"Effective Date Range": "Intervallo di date effettivo (facoltativo)",
|
||||
"Schedule Maintenance": "Pianificare la manutenzione",
|
||||
"Edit Maintenance": "Modifica Manutenzione",
|
||||
"Date and Time": "Data e ora",
|
||||
"DateTime Range": "Intervallo DataOra",
|
||||
"loadingError": "Impossibile recuperare i dati, riprova più tardi.",
|
||||
"plugin": "Plug-in | Plugin",
|
||||
"install": "Installare",
|
||||
"installing": "Installazione",
|
||||
"uninstall": "Disinstalla",
|
||||
"confirmUninstallPlugin": "Sei sicuro di voler disinstallare questo plugin?",
|
||||
"notificationRegional": "Regionale",
|
||||
"Clone": "Clone",
|
||||
"cloneOf": "Clone di {0}",
|
||||
"wayToGetZohoCliqURL": "Puoi scoprire come creare un URL webhook {0}.",
|
||||
"dataRetentionTimeError": "Il periodo di conservazione deve essere pari o superiore a 0",
|
||||
"infiniteRetention": "Impostare su 0 per la conservazione infinita.",
|
||||
"enableGRPCTls": "Consenti l'invio di richieste gRPC con connessione TLS",
|
||||
"grpcMethodDescription": "Il nome del metodo viene convertito nel formato cammelCase come sayHello, check, ecc.",
|
||||
"styleElapsedTimeShowNoLine": "Mostra (nessuna riga)",
|
||||
"Add New Tag": "Aggiungi nuova etichetta",
|
||||
"webhookCustomBodyDesc": "Definire un corpo HTTP personalizzato per la richiesta. Le variabili modello {msg}, {heartbeat}, {monitor} sono accettate.",
|
||||
"Select": "Selezionare",
|
||||
"Accept characters:": "Accetta caratteri:",
|
||||
"The slug is already taken. Please choose another slug.": "La lumaca è già slug. Scegli un'altra slug.",
|
||||
"The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.": "La connessione corrente potrebbe andare persa se ti stai connettendo tramite Cloudflare Tunnel. Sei sicuro di volerlo fermare? Digita la tua password attuale per confermarla.",
|
||||
"Footer Text": "Testo piè di pagina",
|
||||
"signedInDisp": "Accesso eseguito come {0}",
|
||||
"RadiusCalledStationIdDescription": "Identificativo del dispositivo chiamato",
|
||||
"Clone Monitor": "Monitoraggio clonazione",
|
||||
"styleElapsedTime": "Tempo trascorso sotto la barra del battito cardiaco",
|
||||
"enableProxyDescription": "Questo proxy non avrà effetto sulle richieste di monitoraggio fino a quando non viene attivato. È possibile controllare la disabilitazione temporanea del proxy da tutti i monitor in base allo stato di attivazione.",
|
||||
"Using a Reverse Proxy?": "Utilizzo di un proxy inverso?",
|
||||
"There might be a typing error in the address.": "Potrebbe esserci un errore di battitura nell'indirizzo.",
|
||||
"certificationExpiryDescription": "HTTPS monitora la notifica di attivazione quando il certificato TLS scade tra:",
|
||||
"tailscalePingWarning": "Per utilizzare il monitor Tailscale Ping, è necessario installare Uptime Kuma senza Docker e installare anche il client Tailscale sul server.",
|
||||
"telegramMessageThreadID": "(Facoltativo) ID thread messaggio",
|
||||
"telegramMessageThreadIDDescription": "Facoltativo Identificatore univoco per il thread del messaggio di destinazione (argomento) del forum; solo per i supergruppi del forum",
|
||||
"telegramProtectContentDescription": "Se abilitato, i messaggi del bot in Telegram saranno protetti dall'inoltro e dal salvataggio.",
|
||||
"trustProxyDescription": "Fidati delle intestazioni 'X-Forwarded-*'. Se vuoi ottenere l'IP client corretto e il tuo Uptime Kuma è dietro un proxy come Nginx o Apache, dovresti abilitarlo.",
|
||||
"A list of Notification Services can be found in Home Assistant under \"Developer Tools > Services\" search for \"notification\" to find your device/phone name.": "Un elenco di servizi di notifica è disponibile in Home Assistant in \"Strumenti per sviluppatori> Servizi\" cerca \"notifica\" per trovare il nome del tuo dispositivo/telefono.",
|
||||
"invalidCronExpression": "Espressione Cron non valida: {0}",
|
||||
"lastDay2": "2° ultimo giorno del mese",
|
||||
"maintenanceStatus-under-maintenance": "In manutenzione",
|
||||
"chromeExecutable": "Cromo/cromo eseguibile",
|
||||
"chromeExecutableDescription": "Per gli utenti Docker, se Chromium non è ancora installato, potrebbero essere necessari alcuni minuti per l'installazione e la visualizzazione del risultato del test. Richiede 1 GB di spazio su disco.",
|
||||
"uninstalling": "Disinstallazione",
|
||||
"confirmDeleteTagMsg": "Sei sicuro di voler eliminare questo tag? I monitor associati a questo tag non verranno eliminati.",
|
||||
"Request Timeout": "Richiedi timeout",
|
||||
"timeoutAfter": "Timeout dopo {0} secondi",
|
||||
"Resend Notification if Down X times consecutively": "Invia di nuovo la notifica se giù X volte consecutivamente",
|
||||
"Proxy": "Proxy",
|
||||
"or": "o",
|
||||
"statusPageRefreshIn": "Aggiorna tra: {0}",
|
||||
"HTTP Headers": "Intestazioni HTTP",
|
||||
"Custom": "Personalizzato",
|
||||
"Connection Type": "Tipo di connessione",
|
||||
"Docker Daemon": "Deamon Docker",
|
||||
"socket": "Socket",
|
||||
"Home Assistant URL": "URL dell'assistente domestico",
|
||||
"weekdayShortFri": "Ven",
|
||||
"Home": "Accoglienza",
|
||||
"Invert Keyword": "Inverti parola chiave",
|
||||
"filterActive": "Attiva",
|
||||
"filterActivePaused": "In pausa",
|
||||
"Cannot connect to the socket server": "Impossibile connettersi al server socket",
|
||||
"Reconnecting...": "Riconnessione...",
|
||||
"Expected Value": "Valore atteso",
|
||||
"Json Query": "Query Json",
|
||||
"deleteMaintenanceMsg": "Sei sicuro di voler cancellare questa attività di manutenzione?",
|
||||
"dnsPortDescription": "Porta server DNS. Default 53. Puoi cambiare questa porta in ogni momento."
|
||||
}
|
||||
|
@@ -31,5 +31,9 @@
|
||||
"day": "dia | dias",
|
||||
"languageName": "Português",
|
||||
"Primary Base URL": "URL base primário",
|
||||
"No important events": "Nenhum evento importante"
|
||||
"No important events": "Nenhum evento importante",
|
||||
"Dashboard": "Dashboard",
|
||||
"Add New Monitor": "Adicionar Novo Monitor",
|
||||
"Home": "Home",
|
||||
"Check Update On GitHub": "Verificar por Actualizações no GitHub"
|
||||
}
|
||||
|
@@ -43,7 +43,7 @@
|
||||
"Delete": "Удалить",
|
||||
"Current": "Текущий",
|
||||
"Uptime": "Аптайм",
|
||||
"Cert Exp.": "Сертификат истекает",
|
||||
"Cert Exp.": "Сертификат ист.",
|
||||
"day": "день | дней",
|
||||
"-day": "-дней",
|
||||
"hour": "час",
|
||||
@@ -542,7 +542,7 @@
|
||||
"Container Name / ID": "Название контейнера / ID",
|
||||
"Docker Host": "Хост Docker",
|
||||
"Docker Hosts": "Хосты Docker",
|
||||
"ntfy Topic": "тема ntfy",
|
||||
"ntfy Topic": "Тема ntfy",
|
||||
"Domain": "Домен",
|
||||
"Workstation": "Рабочая станция",
|
||||
"disableCloudflaredNoAuthMsg": "Вы находитесь в режиме без авторизации, пароль не требуется.",
|
||||
@@ -639,7 +639,7 @@
|
||||
"Server Timezone": "Часовой пояс сервера",
|
||||
"statusPageMaintenanceEndDate": "Конец",
|
||||
"IconUrl": "URL иконки",
|
||||
"Enable DNS Cache": "Включить DNS кэш",
|
||||
"Enable DNS Cache": "Включить DNS кэш для мониторов HTTP(S)",
|
||||
"Enable": "Включить",
|
||||
"Disable": "Отключить",
|
||||
"Single Maintenance Window": "Единое окно техбслуживания",
|
||||
@@ -746,7 +746,7 @@
|
||||
"Proto Method": "Метод Proto",
|
||||
"Proto Content": "Содержание Proto",
|
||||
"telegramMessageThreadID": "(Необязательно) ID цепочки сообщений",
|
||||
"statusPageRefreshIn": "Обновлять каждые: {0}",
|
||||
"statusPageRefreshIn": "Обновление через: {0}",
|
||||
"twilioAccountSID": "SID учетной записи",
|
||||
"twilioAuthToken": "Токен авторизации / Секретный API ключ",
|
||||
"twilioFromNumber": "С номера",
|
||||
@@ -825,5 +825,27 @@
|
||||
"filterActive": "Активный",
|
||||
"filterActivePaused": "На паузе",
|
||||
"Invert Keyword": "Инвертировать ключевое слово",
|
||||
"tailscalePingWarning": "Для того чтобы использовать монитор Tailscale Ping, необходимо установить Uptime Kuma без Docker, а также установить на сервер клиент Tailscale."
|
||||
"tailscalePingWarning": "Для того чтобы использовать монитор Tailscale Ping, необходимо установить Uptime Kuma без Docker, а также установить на сервер клиент Tailscale.",
|
||||
"PushDeer Server": "Сервер PushDeer",
|
||||
"pushDeerServerDescription": "Оставьте пустым для использования официального сервера",
|
||||
"showCertificateExpiry": "Показывать истекающий сертификат",
|
||||
"Request Timeout": "Тайм-Аут запроса",
|
||||
"timeoutAfter": "Тайм-Аут через {0} секунд",
|
||||
"Select": "Выбрать",
|
||||
"selectedMonitorCount": "Выбрано: {0}",
|
||||
"Check/Uncheck": "Отметить/Снять",
|
||||
"gamedigGuessPort": "Gamedig: Угадай порт",
|
||||
"styleElapsedTime": "Прошедшее время под полосой частоты опроса",
|
||||
"noOrBadCertificate": "Отсутствие сертификата",
|
||||
"gamedigGuessPortDescription": "Порт, используемый протоколом Valve Server Query Protocol, может отличаться от порта клиента. Попробуйте это сделать, если монитор не может подключиться к серверу.",
|
||||
"nostrSender": "Закрытый ключ отправителя (nsec)",
|
||||
"wayToGetFlashDutyKey": "Вы можете перейти на страницу \"Канал\" -> (Выберите канал) -> \"Интеграции\" -> \"Добавить новую страницу интеграции\", добавить \"Пользовательское событие\", чтобы получить push-адрес, скопировать ключ интеграции в адрес. Для получения дополнительной информации, пожалуйста, посетите",
|
||||
"styleElapsedTimeShowNoLine": "Показать (Без линии)",
|
||||
"styleElapsedTimeShowWithLine": "Показать (С линией)",
|
||||
"Server URL should not contain the nfty topic": "URL сервера не должен содержать тему nfty",
|
||||
"nostrRecipients": "Открытые ключи получателей (npub)",
|
||||
"nostrRecipientsHelp": "формат npub, по одному в строке",
|
||||
"FlashDuty Severity": "Серьёзность",
|
||||
"nostrRelays": "Реле Nostr",
|
||||
"nostrRelaysHelp": "Один URL-адрес ретрансляции в каждой строке"
|
||||
}
|
||||
|
@@ -201,5 +201,20 @@
|
||||
"statusPageRefreshIn": "Obnovenie za: {0}",
|
||||
"emojiCheatSheet": "Emotikony: {0}",
|
||||
"Read more": "Prečítajte si viac",
|
||||
"appriseInstalled": "Apprise je nainštalovaný."
|
||||
"appriseInstalled": "Apprise je nainštalovaný.",
|
||||
"Reconnecting...": "Prepájanie...",
|
||||
"Request Timeout": "Platnosť požiadavky vypršala",
|
||||
"styleElapsedTimeShowWithLine": "Zobraziť (S Riadkom)",
|
||||
"webhookCustomBodyDesc": "Zadajte vlastné HTTP Body pre request. Šablónové premenné {msg}, {heartbeat}, {monitor} sú akceptované.",
|
||||
"timeoutAfter": "Platnosť požiadavky vypršala po {0} sekundách",
|
||||
"styleElapsedTime": "Uplynulý čas pod lištou srdcového tepu",
|
||||
"styleElapsedTimeShowNoLine": "Zobraziť (Žiadny riadok)",
|
||||
"filterActive": "Aktívne",
|
||||
"filterActivePaused": "Pozastavené",
|
||||
"Home": "Domov",
|
||||
"Cannot connect to the socket server": "Nemožno sa pripojiť k socket serveru",
|
||||
"Invert Keyword": "Prevrátiť kľúčové slovo",
|
||||
"Expected Value": "Očakávaná hodnota",
|
||||
"Json Query": "Json Query",
|
||||
"Method": "Metoda"
|
||||
}
|
||||
|
191
src/lang/te.json
Normal file
191
src/lang/te.json
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"languageName": "తెలుగు",
|
||||
"Settings": "సెట్టింగ్లు",
|
||||
"Dashboard": "డాష్బోర్డ్",
|
||||
"Help": "సహాయం",
|
||||
"Language": "భాష",
|
||||
"Appearance": "ప్రదర్శన",
|
||||
"Theme": "నేపథ్యం",
|
||||
"General": "సాధారణ",
|
||||
"Game": "ఆట",
|
||||
"Version": "సంస్కరణ",
|
||||
"Check Update On GitHub": "GitHubలో నవీకరణను తనిఖీ చేయండి",
|
||||
"List": "జాబితా",
|
||||
"Home": "స్వస్థల o",
|
||||
"Add": "జోడించు",
|
||||
"Quick Stats": "త్వరిత గణాంకాలు",
|
||||
"Up": "పనిచేస్తుంది",
|
||||
"Down": "ఆగిపోయింది",
|
||||
"Pending": "అనిశ్చిత",
|
||||
"Maintenance": "నిర్వహణ",
|
||||
"Unknown": "తెలియని స్థితి",
|
||||
"Reconnecting...": "మళ్లీ కనెక్ట్ అవుతోంది...",
|
||||
"General Monitor Type": "సాధారణ మానిటర్ రకం",
|
||||
"Passive Monitor Type": "నిష్క్రియాత్మక మానిటర్ రకం",
|
||||
"markdownSupported": "మార్క్డౌన్ సింటాక్స్కు మద్దతు ఉంది",
|
||||
"Pause": "విరామం",
|
||||
"Name": "పేరు",
|
||||
"Status": "స్థితి",
|
||||
"DateTime": "తేదీ సమయం",
|
||||
"Message": "సందేశం",
|
||||
"No important events": "ముఖ్యమైన సంఘటనలు లేవు",
|
||||
"Resume": "పునఃప్రారంభం",
|
||||
"Edit": "సవరించు",
|
||||
"Current": "ప్రస్తుత",
|
||||
"Uptime": "సమయ వ్యవధి",
|
||||
"Monitor": "మానిటర్ | మానిటర్లు",
|
||||
"day": "రోజు | రోజులు",
|
||||
"-day": "-రోజు",
|
||||
"hour": "గంట",
|
||||
"-hour": "-గంట",
|
||||
"Response": "ప్రతిస్పందన",
|
||||
"Ping": "పింగ్",
|
||||
"Keyword": "కీవర్డ్",
|
||||
"Invert Keyword": "విలోమ కీవర్డ్",
|
||||
"Expected Value": "అంచనా విలువ",
|
||||
"Json Query": "Json ప్రశ్న",
|
||||
"URL": "URL",
|
||||
"Hostname": "హోస్ట్ పేరు",
|
||||
"Port": "పోర్ట్",
|
||||
"Heartbeat Interval": "హృదయ స్పందన విరామం",
|
||||
"Request Timeout": "అభ్యర్థన ముగిసె గడువు",
|
||||
"timeoutAfter": "{0} సెకన్ల తర్వాత గడువు ముగిసింది",
|
||||
"Heartbeat Retry Interval": "హృదయ స్పందన పునఃప్రయత్న విరామం",
|
||||
"Advanced": "ఆధునిక",
|
||||
"checkEverySecond": "ప్రతి {0} సెకన్లకు తనిఖీ చేయండి",
|
||||
"retryCheckEverySecond": "ప్రతి {0} సెకన్లకు మళ్లీ ప్రయత్నించండి",
|
||||
"resendDisabled": "మల్లిపంపడము అచేతనము చేయబడ్డది",
|
||||
"ignoreTLSError": "HTTPS వెబ్సైట్ల కోసం TLS/SSL లోపాన్ని విస్మరించండి",
|
||||
"maxRedirectDescription": "అనుసరించాల్సిన దారి మళ్లింపుల గరిష్ట సంఖ్య. దారి మళ్లింపులను నిలిపివేయడానికి 0కి సెట్ చేయండి.",
|
||||
"Upside Down Mode": "అప్సైడ్ డౌన్ మోడ్",
|
||||
"Max. Redirects": "గరిష్టంగా దారి మళ్లింపులు",
|
||||
"Push URL": "పుష్ URL",
|
||||
"needPushEvery": "మీరు ప్రతి {0} సెకన్లకు ఈ URLకి కాల్ చేయాలి.",
|
||||
"Save": "సేవ్ చేయండి",
|
||||
"Notifications": "నోటిఫికేషన్లు",
|
||||
"Setup Notification": "నోటిఫికేషన్ సెటప్ చేయండి",
|
||||
"Light": "కాంతి",
|
||||
"Dark": "వెలుతురు లేని",
|
||||
"Auto": "ఆటో",
|
||||
"Theme - Heartbeat Bar": "థీమ్ - హార్ట్బీట్ బార్",
|
||||
"styleElapsedTimeShowNoLine": "చూపించు (పంక్తి లేదు)",
|
||||
"styleElapsedTimeShowWithLine": "చూపించు (పంక్తితో)",
|
||||
"Normal": "సాధారణ",
|
||||
"Bottom": "దిగువన",
|
||||
"None": "ఏదీ లేదు",
|
||||
"Timezone": "సమయమండలం",
|
||||
"Allow indexing": "ఇండెక్సింగ్ని అనుమతించండి",
|
||||
"Change Password": "పాస్వర్డ్ మార్చండి",
|
||||
"Current Password": "ప్రస్తుత పాస్వర్డ్",
|
||||
"New Password": "కొత్త పాస్వర్డ్",
|
||||
"Repeat New Password": "కొత్త పాస్వర్డ్ని మళ్లీ నమోదు చేయండి",
|
||||
"Disable Auth": "ప్రామాణీకరణను నిలిపివేయండి",
|
||||
"Enable Auth": "ప్రామాణీకరణను ప్రారంభించండి",
|
||||
"Please use this option carefully!": "దయచేసి ఈ ఎంపికను జాగ్రత్తగా ఉపయోగించండి!",
|
||||
"Logout": "లాగ్అవుట్",
|
||||
"Leave": "వదిలేయండి",
|
||||
"Confirm": "నిర్ధారించండి",
|
||||
"Yes": "అవును",
|
||||
"No": "లేదు",
|
||||
"Username": "వినియోగదారు పేరు",
|
||||
"Password": "పాస్వర్డ్",
|
||||
"Remember me": "నన్ను గుర్తు పెట్టుకో",
|
||||
"Login": "లాగిన్",
|
||||
"add one": "ఒకటి జోడించండి",
|
||||
"Notification Type": "నోటిఫికేషన్ రకం",
|
||||
"Email": "ఇమెయిల్",
|
||||
"Test": "పరీక్షించండి",
|
||||
"Resolver Server": "రిసోల్వర్ సర్వర్",
|
||||
"Resource Record Type": "రిసోర్స్ రికార్డ్ రకం",
|
||||
"Last Result": "చివరి ఫలితం",
|
||||
"Repeat Password": "పాస్వర్డ్ని మళ్లీ నమోదు చేయండి",
|
||||
"Import Backup": "బ్యాకప్ని దిగుమతి చేయండి",
|
||||
"Export": "ఎగుమతి",
|
||||
"Import": "దిగుమతి",
|
||||
"respTime": "ప్రతిస్పందన. సమయం (మిసె)",
|
||||
"Default enabled": "డిఫాల్ట్ ప్రారంభించబడింది",
|
||||
"Create": "సృష్టించు",
|
||||
"Clear Data": "డేటాను క్లియర్ చేయండి",
|
||||
"Events": "ఈవెంట్స్",
|
||||
"Heartbeats": "హృదయ స్పందన",
|
||||
"Auto Get": "స్వయంచాలక పొందండి",
|
||||
"Affected Monitors": "ప్రభావిత మానిటర్లు",
|
||||
"Pick Affected Monitors...": "ప్రభావిత మానిటర్లను ఎంచుకోండి…",
|
||||
"All Status Pages": "అన్ని స్థితి పేజీలు",
|
||||
"Select status pages...": "స్థితి పేజీలను ఎంచుకోండి…",
|
||||
"alertWrongFileType": "దయచేసి JSON ఫైల్ని ఎంచుకోండి.",
|
||||
"Clear all statistics": "అన్ని గణాంకాలను క్లియర్ చేయండి",
|
||||
"Skip existing": "ఉనికిని దాటవేయి",
|
||||
"Options": "ఎంపికలు",
|
||||
"Keep both": "రెండు ఉంచండి",
|
||||
"Verify Token": "టోకెన్ని ధృవీకరించండి",
|
||||
"Setup 2FA": "సెటప్ 2FA",
|
||||
"Disable 2FA": "2FAని నిలిపివేయండి",
|
||||
"2FA Settings": "2FA సెట్టింగ్లు",
|
||||
"filterActive": "చురుకుగా",
|
||||
"filterActivePaused": "ఆగిపోయింది",
|
||||
"Active": "చురుకుగా",
|
||||
"Inactive": "నిష్క్రియ",
|
||||
"Token": "టోకెన్",
|
||||
"Tags": "టాగ్లు",
|
||||
"Add New Tag": "కొత్త ట్యాగ్ని జోడించండి",
|
||||
"Tag with this name already exist.": "ఈ పేరుతో ట్యాగ్ ఇప్పటికే ఉంది.",
|
||||
"color": "రంగు",
|
||||
"value (optional)": "విలువ (ఐచ్ఛికం)",
|
||||
"Gray": "బూడిద రంగు",
|
||||
"Red": "ఎరుపు",
|
||||
"Orange": "నారింజ రంగు",
|
||||
"Green": "ఆకుపచ్చ",
|
||||
"Blue": "నీలం",
|
||||
"Indigo": "నీలిమందు రంగు",
|
||||
"Purple": "ఊదా రంగు",
|
||||
"Pink": "పింక్ కలర్",
|
||||
"Search...": "వెతకండి…",
|
||||
"Avg. Ping": "సగటు పింగ్",
|
||||
"Avg. Response": "సగటు ప్రతిస్పందన",
|
||||
"statusPageRefreshIn": "సెకన్లలో రిఫ్రెష్ చేయండి: {0}",
|
||||
"New Update": "కొత్త నవీకరణ",
|
||||
"Primary Base URL": "ప్రాథమిక URL",
|
||||
"Add New Monitor": "కొత్త మానిటర్ని జోడించండి",
|
||||
"statusMaintenance": "స్థితి నిర్వహణ",
|
||||
"Cannot connect to the socket server": "సాకెట్ సర్వర్కి కనెక్ట్ చేయడం సాధ్యపడదు",
|
||||
"Specific Monitor Type": "నిర్దిష్ట మానిటర్ రకం",
|
||||
"pauseDashboardHome": "డాష్బోర్డ్ హోమ్నకు విరామం",
|
||||
"Delete": "తొలగించు",
|
||||
"Cert Exp.": "సర్టిఫికేట్ గడువు.",
|
||||
"Monitor Type": "మానిటర్ రకం",
|
||||
"Friendly Name": "స్నేహపూర్వక పేరు",
|
||||
"Retries": "పునఃప్రయత్నాలు",
|
||||
"Resend Notification if Down X times consecutively": "వరుసగా X సార్లు డౌన్ అయితే నోటిఫికేషన్ని మళ్లీ పంపండి",
|
||||
"resendEveryXTimes": "ప్రతి {0} సార్లు మళ్లీ పంపండి",
|
||||
"retriesDescription": "సేవ డౌన్గా గుర్తించబడి నోటిఫికేషన్ పంపబడటానికి ముందు గరిష్ట సంఖ్యలో పునఃప్రయత్నాలు",
|
||||
"upsideDownModeDescription": "స్థితిని తలక్రిందులుగా తిప్పండి. సేవ చేరుకోగలిగితే, అది పని చేయనట్లు పరిగణించబడుతుంది.",
|
||||
"Accepted Status Codes": "ఆమోదించబడిన HTTP స్థితి కోడ్లు",
|
||||
"pushOptionalParams": "ఐచ్ఛిక పారామితులు: {0}",
|
||||
"Not available, please setup.": "అందుబాటులో లేదు, దయచేసి సెటప్ చేయండి.",
|
||||
"styleElapsedTime": "హృదయ స్పందన పట్టీ కింద గడిచిన సమయం",
|
||||
"Search Engine Visibility": "శోధన ఇంజిన్ దృశ్యమానత",
|
||||
"Discourage search engines from indexing site": "ఇండెక్సింగ్ సైట్ నుండి శోధన ఇంజిన్లను నిరుత్సాహపరచండి",
|
||||
"Update Password": "పాస్వర్డ్ని నవీకరించండి",
|
||||
"disableauth.message1": "మీరు ఖచ్చితంగా <strong>ప్రామాణీకరణను నిలిపివేయాలనుకుంటున్నారా</strong>?",
|
||||
"disableauth.message2": "ఇది Cloudflare యాక్సెస్, Authelia లేదా ఇతర ప్రమాణీకరణ మెకానిజమ్ల వంటి Uptime Kuma ముందు <strong>థర్డ్-పార్టీ ప్రామాణీకరణను అమలు చేయాలనుకుంటున్న</strong> దృశ్యాల కోసం రూపొందించబడింది.",
|
||||
"I understand, please disable": "నాకు అర్థమైంది, దయచేసి నిలిపివేయండి",
|
||||
"No Monitors, please": "దయచేసి మానిటర్లు వద్దు",
|
||||
"Certificate Info": "సర్టిఫికేట్ సమాచారం",
|
||||
"Create your admin account": "మీ నిర్వాహక ఖాతాను సృష్టించండి",
|
||||
"Export Backup": "బ్యాకప్ ఎగుమతి",
|
||||
"notAvailableShort": "లేదు/అందుబాటులో లేదు",
|
||||
"Apply on all existing monitors": "ఇప్పటికే ఉన్న అన్ని మానిటర్లపై వర్తించండి",
|
||||
"Schedule maintenance": "షెడ్యూల్ నిర్వహణ",
|
||||
"Start of maintenance": "నిర్వహణ ప్రారంభం",
|
||||
"alertNoFile": "దయచేసి దిగుమతి చేయడానికి ఫైల్ను ఎంచుకోండి.",
|
||||
"Overwrite": "ఓవర్రైట్",
|
||||
"Enable 2FA": "2FAని ప్రారంభించండి",
|
||||
"Two Factor Authentication": "రెండు కారకాల ప్రమాణీకరణ",
|
||||
"Show URI": "URIని చూపు",
|
||||
"Add New below or Select...": "దిగువన కొత్తది జోడించండి లేదా ఎంచుకోండి…",
|
||||
"Tag with this value already exist.": "ఈ విలువతో ట్యాగ్ ఇప్పటికే ఉంది.",
|
||||
"Custom": "కస్టమ్",
|
||||
"Entry Page": "ఎంట్రీ పేజీ",
|
||||
"statusPageNothing": "ఇక్కడ ఏమీ లేదు, దయచేసి సమూహాన్ని లేదా మానిటర్ని జోడించండి."
|
||||
}
|
@@ -672,5 +672,8 @@
|
||||
"recurringIntervalMessage": "ดำเนินการทุกวัน | ดำเนินการทุก {0} วัน",
|
||||
"chromeExecutableAutoDetect": "ตรวจจับอัตโนมัติ",
|
||||
"chromeExecutableDescription": "สำหรับผู้ใช้งาน Docker, ถ้ายังไม่ได้ติดตั่ง Chromium, อาจจะเสียเวลาในการติดตั่งและแสดงผลการทดสอบเพิ่มเติม, ใช้พื้นที่ประมาณ 1GB",
|
||||
"notificationRegional": "ภูมิภาค"
|
||||
"notificationRegional": "ภูมิภาค",
|
||||
"timeoutAfter": "หมดเวลาหลังจาก {0} วินาที",
|
||||
"Select": "เลือก",
|
||||
"Expected Value": "ค่าที่คาดหวัง"
|
||||
}
|
||||
|
@@ -833,5 +833,10 @@
|
||||
"Check/Uncheck": "İşaretle/İşareti Kaldır",
|
||||
"pushDeerServerDescription": "Resmi sunucuyu kullanmak için boş bırakın",
|
||||
"Request Timeout": "İstek zaman aşımına uğradı",
|
||||
"timeoutAfter": "{0} saniye sonra zaman aşımı"
|
||||
"timeoutAfter": "{0} saniye sonra zaman aşımı",
|
||||
"gamedigGuessPort": "Gamedig: Ziyaretçi Portu",
|
||||
"gamedigGuessPortDescription": "Valve Server Sorgu Protokolü tarafından kullanılan bağlantı noktası, istemci bağlantı noktasından farklı olabilir. Monitör sunucunuza bağlanamıyorsa bunu deneyin.",
|
||||
"styleElapsedTimeShowNoLine": "Göster (Satır Yok)",
|
||||
"styleElapsedTime": "Kalp atışı çubuğunun altında geçen süre",
|
||||
"styleElapsedTimeShowWithLine": "Göster (Satır ile birlikte)"
|
||||
}
|
||||
|
@@ -64,7 +64,7 @@
|
||||
"Accepted Status Codes": "Припустимі коди статусу",
|
||||
"Save": "Зберегти",
|
||||
"Notifications": "Сповіщення",
|
||||
"Not available, please setup.": "Доступних сповіщень немає, необхідно створити.",
|
||||
"Not available, please setup.": "Недоступно, будь ласка, налаштуйте.",
|
||||
"Setup Notification": "Створити сповіщення",
|
||||
"Light": "Світла",
|
||||
"Dark": "Темна",
|
||||
@@ -445,7 +445,7 @@
|
||||
"Don't know how to get the token? Please read the guide:": "Не знаєте, як отримати токен? Прочитайте посібник:",
|
||||
"The current connection may be lost if you are currently connecting via Cloudflare Tunnel. Are you sure want to stop it? Type your current password to confirm it.": "Поточне з’єднання може бути втрачено, якщо ви зараз під’єднуєтеся через Cloudflare Tunnel. Ви дійсно хочете зробити це? Для підтвердження введіть поточний пароль.",
|
||||
"Other Software": "Інше програмне забезпечення",
|
||||
"For example: nginx, Apache and Traefik.": "Наприклад: nginx, Apache and Traefik.",
|
||||
"For example: nginx, Apache and Traefik.": "Наприклад: nginx, Apache і Traefik.",
|
||||
"Please read": "Будь ласка, прочитайте",
|
||||
"Subject:": "Тема:",
|
||||
"Valid To:": "Дійсний до:",
|
||||
|
@@ -204,7 +204,7 @@
|
||||
"webhookJsonDesc": "{0} کسی بھی جدید HTTP سرورز جیسے Express.js کے لیے اچھا ہے",
|
||||
"webhookFormDataDesc": "{multipart} پی ایچ پی کے لیے اچھا ہے۔ JSON کو {decodeFunction} کے ساتھ پارس کرنے کی ضرورت ہوگی",
|
||||
"webhookAdditionalHeadersTitle": "اضافی ہیڈرز",
|
||||
"webhookAdditionalHeadersDesc": "ویب ہک کے ساتھ بھیجے گئے اضافی ہیڈر سیٹ کرتا ہے۔",
|
||||
"webhookAdditionalHeadersDesc": "ویب ہک کے ساتھ بھیجے گئے اضافی ہیڈر سیٹ کرتا ہے۔ ہر ہیڈر کو JSON کلید/قدر کے طور پر بیان کیا جانا چاہیے۔",
|
||||
"Webhook URL": "ابھوک دیہی",
|
||||
"Application Token": "ایپلیکیشن ٹوکن",
|
||||
"Server URL": "سرور URL",
|
||||
@@ -429,7 +429,7 @@
|
||||
"No Maintenance": "کوئی دیکھ بھال نہیں",
|
||||
"weekdayShortTue": "منگل",
|
||||
"Add New Tag": "نیا ٹیگ شامل کریں",
|
||||
"Enable DNS Cache": "ڈی این ایس کیشے کو فعال کریں",
|
||||
"Enable DNS Cache": "HTTP(s) مانیٹرز کے لیے DNS کیش کو فعال کریں",
|
||||
"Effective Date Range": "مؤثر تاریخ کی حد (اختیاری)",
|
||||
"Schedule Maintenance": "شیڈول کی بحالی",
|
||||
"Date and Time": "تاریخ اور وقت",
|
||||
@@ -461,5 +461,23 @@
|
||||
"installing": "تنصیب",
|
||||
"chromeExecutableAutoDetect": "آٹو کھوج",
|
||||
"Edit Maintenance": "دیکھ بھال میں ترمیم کریں",
|
||||
"Reconnecting...": "دوبارہ رابطہ قائم کرنا..."
|
||||
"Reconnecting...": "دوبارہ رابطہ قائم کرنا...",
|
||||
"Request Timeout": "ٹائم آؤٹ کی درخواست کریں",
|
||||
"timeoutAfter": "{0} سیکنڈ کے بعد ٹائم آؤٹ",
|
||||
"styleElapsedTime": "دل کی دھڑکن بار کے نیچے گزرا ہوا وقت",
|
||||
"webhookCustomBodyDesc": "درخواست کے لیے حسب ضرورت HTTP باڈی کی وضاحت کریں۔ ٹیمپلیٹ متغیرات {msg}، {heartbeat}، {monitor} قبول کیے گئے ہیں۔",
|
||||
"filterActive": "فعال",
|
||||
"Check/Uncheck": "چیک/ان چیک کریں",
|
||||
"styleElapsedTimeShowNoLine": "دکھائیں (کوئی لائن نہیں)",
|
||||
"styleElapsedTimeShowWithLine": "دکھائیں (لائن کے ساتھ)",
|
||||
"filterActivePaused": "روک دیا گیا",
|
||||
"webhookBodyPresetOption": "پیش سیٹ - {0}",
|
||||
"webhookBodyCustomOption": "حسب ضرورت باڈی",
|
||||
"Select": "منتخب کریں",
|
||||
"selectedMonitorCount": "منتخب کردہ: {0}",
|
||||
"tailscalePingWarning": "Tailscale Ping مانیٹر استعمال کرنے کے لیے، آپ کو Docker کے بغیر Uptime Kuma انسٹال کرنا ہوگا اور اپنے سرور پر Tailscale کلائنٹ بھی انسٹال کرنا ہوگا۔",
|
||||
"uninstall": "ان انسٹال کریں",
|
||||
"Invert Keyword": "مطلوبہ الفاظ کو الٹ دیں",
|
||||
"Expected Value": "متوقع قدر",
|
||||
"Json Query": "Json استفسار"
|
||||
}
|
||||
|
@@ -835,5 +835,10 @@
|
||||
"pushDeerServerDescription": "留空则使用官方服务器",
|
||||
"PushDeer Server": "PushDeer 服务器",
|
||||
"timeoutAfter": "{0} 秒后超时",
|
||||
"Request Timeout": "请求超时"
|
||||
"Request Timeout": "请求超时",
|
||||
"gamedigGuessPortDescription": "Valve 服务器查询协议使用的端口可能与客户端端口不同。如果监控器无法连接到服务器,请尝试此方法。",
|
||||
"gamedigGuessPort": "Gamedig: 自动检测端口号",
|
||||
"styleElapsedTimeShowWithLine": "显示(带连接线)",
|
||||
"styleElapsedTimeShowNoLine": "显示(不带连接线)",
|
||||
"styleElapsedTime": "在监控项详情的心跳栏下显示起止时间"
|
||||
}
|
||||
|
@@ -440,7 +440,7 @@
|
||||
"uninstall": "解除安裝",
|
||||
"wayToGetZohoCliqURL": "您可以前往此頁面以了解如何建立 Webhook 網址 {0}。",
|
||||
"Select status pages...": "選擇 Status Page…",
|
||||
"webhookAdditionalHeadersDesc": "設定傳送 Webhook 時使用的額外 Header。",
|
||||
"webhookAdditionalHeadersDesc": "設定傳送 Webhook 時使用的額外 Header。請使用 JSON key/value 格式。",
|
||||
"topic": "Topic",
|
||||
"topicExplanation": "監測 MQTT 中的一個 Topic",
|
||||
"successMessageExplanation": "MQTT 中收到視為成功的訊息",
|
||||
|
@@ -91,21 +91,20 @@ export default {
|
||||
|
||||
this.socket.initedSocketIO = true;
|
||||
|
||||
let protocol = (location.protocol === "https:") ? "wss://" : "ws://";
|
||||
let protocol = location.protocol + "//";
|
||||
|
||||
let wsHost;
|
||||
let url;
|
||||
const env = process.env.NODE_ENV || "production";
|
||||
if (env === "development" && isDevContainer()) {
|
||||
wsHost = protocol + getDevContainerServerHostname();
|
||||
url = protocol + getDevContainerServerHostname();
|
||||
} else if (env === "development" || localStorage.dev === "dev") {
|
||||
wsHost = protocol + location.hostname + ":3001";
|
||||
url = protocol + location.hostname + ":3001";
|
||||
} else {
|
||||
wsHost = protocol + location.host;
|
||||
// Connect to the current url
|
||||
url = undefined;
|
||||
}
|
||||
|
||||
socket = io(wsHost, {
|
||||
transports: [ "websocket" ],
|
||||
});
|
||||
socket = io(url);
|
||||
|
||||
socket.on("info", (info) => {
|
||||
this.info = info;
|
||||
@@ -288,6 +287,10 @@ export default {
|
||||
socket.on("initServerTimezone", () => {
|
||||
socket.emit("initServerTimezone", dayjs.tz.guess());
|
||||
});
|
||||
|
||||
socket.on("refresh", () => {
|
||||
location.reload();
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
|
@@ -82,7 +82,7 @@
|
||||
<option value="redis">
|
||||
Redis
|
||||
</option>
|
||||
<option value="tailscale-ping">
|
||||
<option v-if="!$root.info.isContainer" value="tailscale-ping">
|
||||
Tailscale Ping
|
||||
</option>
|
||||
</optgroup>
|
||||
@@ -99,18 +99,6 @@
|
||||
<input id="name" v-model="monitor.name" type="text" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<!-- Parent Monitor -->
|
||||
<div class="my-3">
|
||||
<label for="parent" class="form-label">{{ $t("Monitor Group") }}</label>
|
||||
<ActionSelect
|
||||
v-model="monitor.parent"
|
||||
:options="parentMonitorOptionsList"
|
||||
:disabled="sortedGroupMonitorList.length === 0 && draftGroupName == null"
|
||||
:icon="'plus'"
|
||||
:action="() => $refs.createGroupDialog.show()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- URL -->
|
||||
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || monitor.type === 'real-browser' " class="my-3">
|
||||
<label for="url" class="form-label">{{ $t("URL") }}</label>
|
||||
@@ -297,22 +285,19 @@
|
||||
<!-- Docker Host -->
|
||||
<!-- For Docker Type -->
|
||||
<div v-if="monitor.type === 'docker'" class="my-3">
|
||||
<h2 class="mb-2">{{ $t("Docker Host") }}</h2>
|
||||
<p v-if="$root.dockerHostList.length === 0">
|
||||
{{ $t("Not available, please setup.") }}
|
||||
</p>
|
||||
|
||||
<div v-else class="mb-3">
|
||||
<div class="mb-3">
|
||||
<label for="docker-host" class="form-label">{{ $t("Docker Host") }}</label>
|
||||
<select id="docket-host" v-model="monitor.docker_host" class="form-select">
|
||||
<option v-for="host in $root.dockerHostList" :key="host.id" :value="host.id">{{ host.name }}</option>
|
||||
</select>
|
||||
<a href="#" @click="$refs.dockerHostDialog.show(monitor.docker_host)">{{ $t("Edit") }}</a>
|
||||
<ActionSelect
|
||||
id="docker-host"
|
||||
v-model="monitor.docker_host"
|
||||
:action-aria-label="$t('openModalTo', $t('Setup Docker Host'))"
|
||||
:options="dockerHostOptionsList"
|
||||
:disabled="$root.dockerHostList == null || $root.dockerHostList.length === 0"
|
||||
:icon="'plus'"
|
||||
:action="() => $refs.dockerHostDialog.show()"
|
||||
:required="true"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary me-2" type="button" @click="$refs.dockerHostDialog.show()">
|
||||
{{ $t("Setup Docker Host") }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- MQTT -->
|
||||
@@ -382,11 +367,20 @@
|
||||
<input id="connectionString" v-model="monitor.databaseConnectionString" type="text" class="form-control" required>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="monitor.type === 'mysql'">
|
||||
<div class="my-3">
|
||||
<label for="mysql-password" class="form-label">{{ $t("Password") }}</label>
|
||||
<!-- TODO: Rename monitor.radiusPassword to monitor.password for general use -->
|
||||
<HiddenInput id="mysql-password" v-model="monitor.radiusPassword" autocomplete="false"></HiddenInput>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- SQL Server / PostgreSQL / MySQL -->
|
||||
<template v-if="monitor.type === 'sqlserver' || monitor.type === 'postgres' || monitor.type === 'mysql'">
|
||||
<div class="my-3">
|
||||
<label for="sqlQuery" class="form-label">{{ $t("Query") }}</label>
|
||||
<textarea id="sqlQuery" v-model="monitor.databaseQuery" class="form-control" :placeholder="$t('Example:', [ 'select getdate()' ])" required></textarea>
|
||||
<textarea id="sqlQuery" v-model="monitor.databaseQuery" class="form-control" :placeholder="$t('Example:', [ 'SELECT 1' ])"></textarea>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -413,7 +407,7 @@
|
||||
</div>
|
||||
|
||||
<!-- Timeout: HTTP / Keyword only -->
|
||||
<div v-if="monitor.type === 'http' || monitor.type === 'keyword'" class="my-3">
|
||||
<div v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query'" class="my-3">
|
||||
<label for="timeout" class="form-label">{{ $t("Request Timeout") }} ({{ $t("timeoutAfter", [ monitor.timeout || clampTimeout(monitor.interval) ]) }})</label>
|
||||
<input id="timeout" v-model="monitor.timeout" type="number" class="form-control" required min="0" step="0.1">
|
||||
</div>
|
||||
@@ -472,7 +466,7 @@
|
||||
</div>
|
||||
|
||||
<!-- HTTP / Keyword only -->
|
||||
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'grpc-keyword' ">
|
||||
<template v-if="monitor.type === 'http' || monitor.type === 'keyword' || monitor.type === 'json-query' || 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">
|
||||
@@ -504,6 +498,20 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- Parent Monitor -->
|
||||
<div class="my-3">
|
||||
<label for="monitorGroupSelector" class="form-label">{{ $t("Monitor Group") }}</label>
|
||||
<ActionSelect
|
||||
id="monitorGroupSelector"
|
||||
v-model="monitor.parent"
|
||||
:action-aria-label="$t('openModalTo', 'setup a new monitor group')"
|
||||
:options="parentMonitorOptionsList"
|
||||
:disabled="sortedGroupMonitorList.length === 0 && draftGroupName == null"
|
||||
:icon="'plus'"
|
||||
:action="() => $refs.createGroupDialog.show()"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div class="my-3">
|
||||
<label for="description" class="form-label">{{ $t("Description") }}</label>
|
||||
@@ -840,9 +848,9 @@ import NotificationDialog from "../components/NotificationDialog.vue";
|
||||
import DockerHostDialog from "../components/DockerHostDialog.vue";
|
||||
import ProxyDialog from "../components/ProxyDialog.vue";
|
||||
import TagsManager from "../components/TagsManager.vue";
|
||||
import { genSecret, isDev, MAX_INTERVAL_SECOND, MIN_INTERVAL_SECOND } from "../util.ts";
|
||||
import { genSecret, isDev, MAX_INTERVAL_SECOND, MIN_INTERVAL_SECOND, sleep } from "../util.ts";
|
||||
import { hostNameRegexPattern } from "../util-frontend";
|
||||
import { sleep } from "../util";
|
||||
import HiddenInput from "../components/HiddenInput.vue";
|
||||
|
||||
const toast = useToast();
|
||||
|
||||
@@ -855,7 +863,7 @@ const monitorDefaults = {
|
||||
interval: 60,
|
||||
retryInterval: 60,
|
||||
resendInterval: 0,
|
||||
maxretries: 1,
|
||||
maxretries: 0,
|
||||
timeout: 48,
|
||||
notificationIDList: {},
|
||||
ignoreTls: false,
|
||||
@@ -880,11 +888,14 @@ const monitorDefaults = {
|
||||
kafkaProducerSaslOptions: {
|
||||
mechanism: "None",
|
||||
},
|
||||
kafkaProducerSsl: false,
|
||||
kafkaProducerAllowAutoTopicCreation: false,
|
||||
gamedigGivenPortOnly: true,
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
HiddenInput,
|
||||
ActionSelect,
|
||||
ProxyDialog,
|
||||
CopyableInput,
|
||||
@@ -1106,6 +1117,21 @@ message HealthCheckResponse {
|
||||
return list;
|
||||
},
|
||||
|
||||
dockerHostOptionsList() {
|
||||
if (this.$root.dockerHostList && this.$root.dockerHostList.length > 0) {
|
||||
return this.$root.dockerHostList.map((host) => {
|
||||
return {
|
||||
label: host.name,
|
||||
value: host.id
|
||||
};
|
||||
});
|
||||
} else {
|
||||
return [{
|
||||
label: this.$t("noDockerHostMsg"),
|
||||
value: null,
|
||||
}];
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
"$root.proxyList"() {
|
||||
@@ -1338,6 +1364,12 @@ message HealthCheckResponse {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (this.monitor.type === "docker") {
|
||||
if (this.monitor.docker_host == null) {
|
||||
toast.error(this.$t("DockerHostRequired"));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
},
|
||||
|
||||
|
@@ -163,6 +163,10 @@ export default {
|
||||
this.settings.entryPage = "dashboard";
|
||||
}
|
||||
|
||||
if (this.settings.nscd === undefined) {
|
||||
this.settings.nscd = true;
|
||||
}
|
||||
|
||||
if (this.settings.dnsCache === undefined) {
|
||||
this.settings.dnsCache = false;
|
||||
}
|
||||
|
@@ -23,17 +23,17 @@
|
||||
</div>
|
||||
|
||||
<div class="form-floating mt-3">
|
||||
<input id="floatingInput" v-model="username" type="text" class="form-control" placeholder="Username" required data-cy="username-input">
|
||||
<input id="floatingInput" v-model="username" type="text" class="form-control" :placeholder="$t('Username')" required data-cy="username-input">
|
||||
<label for="floatingInput">{{ $t("Username") }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mt-3">
|
||||
<input id="floatingPassword" v-model="password" type="password" class="form-control" placeholder="Password" required data-cy="password-input">
|
||||
<input id="floatingPassword" v-model="password" type="password" class="form-control" :placeholder="$t('Password')" required data-cy="password-input">
|
||||
<label for="floatingPassword">{{ $t("Password") }}</label>
|
||||
</div>
|
||||
|
||||
<div class="form-floating mt-3">
|
||||
<input id="repeat" v-model="repeatPassword" type="password" class="form-control" placeholder="Repeat Password" required data-cy="password-repeat-input">
|
||||
<input id="repeat" v-model="repeatPassword" type="password" class="form-control" :placeholder="$t('Repeat Password')" required data-cy="password-repeat-input">
|
||||
<label for="repeat">{{ $t("Repeat Password") }}</label>
|
||||
</div>
|
||||
|
||||
|
@@ -69,13 +69,17 @@
|
||||
<div class="my-3">
|
||||
<label class="form-label">
|
||||
{{ $t("Domain Names") }}
|
||||
<font-awesome-icon icon="plus-circle" class="btn-add-domain action text-primary" @click="addDomainField" />
|
||||
<button class="p-0 bg-transparent border-0" :aria-label="$t('Add a domain')" @click="addDomainField">
|
||||
<font-awesome-icon icon="plus-circle" class="action text-primary" />
|
||||
</button>
|
||||
</label>
|
||||
|
||||
<ul class="list-group domain-name-list">
|
||||
<li v-for="(domain, index) in config.domainNameList" :key="index" class="list-group-item">
|
||||
<input v-model="config.domainNameList[index]" type="text" class="no-bg domain-input" placeholder="example.com" />
|
||||
<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" @click="removeDomain(index)" />
|
||||
<button class="p-0 bg-transparent border-0" :aria-label="$t('Remove domain', [ domain ])" @click="removeDomain(index)">
|
||||
<font-awesome-icon icon="times" class="action remove ms-2 me-3 text-danger" />
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -102,7 +106,7 @@
|
||||
|
||||
<!-- Sidebar Footer -->
|
||||
<div class="sidebar-footer">
|
||||
<button class="btn btn-success me-2" @click="save">
|
||||
<button class="btn btn-success me-2" :disabled="loading" @click="save">
|
||||
<font-awesome-icon icon="save" />
|
||||
{{ $t("Save") }}
|
||||
</button>
|
||||
@@ -438,6 +442,7 @@ export default {
|
||||
lastUpdateTime: dayjs(),
|
||||
updateCountdown: null,
|
||||
updateCountdownText: null,
|
||||
loading: true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -697,6 +702,8 @@ export default {
|
||||
this.incident = res.data.incident;
|
||||
this.maintenanceList = res.data.maintenanceList;
|
||||
this.$root.publicGroupList = res.data.publicGroupList;
|
||||
|
||||
this.loading = false;
|
||||
}).catch( function (error) {
|
||||
if (error.response.status === 404) {
|
||||
location.href = "/page-not-found";
|
||||
@@ -806,6 +813,7 @@ export default {
|
||||
|
||||
/** Save the status page */
|
||||
save() {
|
||||
this.loading = true;
|
||||
let startTime = new Date();
|
||||
this.config.slug = this.config.slug.trim().toLowerCase();
|
||||
|
||||
@@ -823,10 +831,12 @@ export default {
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
location.href = "/status/" + this.config.slug;
|
||||
}, time);
|
||||
|
||||
} else {
|
||||
this.loading = false;
|
||||
toast.error(res.msg);
|
||||
}
|
||||
});
|
||||
|
24
src/util.js
24
src/util.js
@@ -7,7 +7,7 @@
|
||||
// Backend uses the compiled file util.js
|
||||
// Frontend uses util.ts
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.localToUTC = exports.utcToLocal = exports.utcToISODateTime = exports.isoToUTCDateTime = exports.parseTimeFromTimeObject = exports.parseTimeObject = exports.getMaintenanceRelativeURL = exports.getMonitorRelativeURL = exports.genSecret = exports.getCryptoRandomInt = exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.log = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.MIN_INTERVAL_SECOND = exports.MAX_INTERVAL_SECOND = exports.SQL_DATETIME_FORMAT_WITHOUT_SECOND = exports.SQL_DATETIME_FORMAT = exports.SQL_DATE_FORMAT = exports.STATUS_PAGE_MAINTENANCE = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.MAINTENANCE = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
|
||||
exports.localToUTC = exports.utcToLocal = exports.utcToISODateTime = exports.isoToUTCDateTime = exports.parseTimeFromTimeObject = exports.parseTimeObject = exports.getMaintenanceRelativeURL = exports.getMonitorRelativeURL = exports.genSecret = exports.getCryptoRandomInt = exports.getRandomInt = exports.getRandomArbitrary = exports.TimeLogger = exports.polyfill = exports.log = exports.debug = exports.ucfirst = exports.sleep = exports.flipStatus = exports.badgeConstants = exports.MIN_INTERVAL_SECOND = exports.MAX_INTERVAL_SECOND = exports.SQL_DATETIME_FORMAT_WITHOUT_SECOND = exports.SQL_DATETIME_FORMAT = exports.SQL_DATE_FORMAT = exports.STATUS_PAGE_MAINTENANCE = exports.STATUS_PAGE_PARTIAL_DOWN = exports.STATUS_PAGE_ALL_UP = exports.STATUS_PAGE_ALL_DOWN = exports.MAINTENANCE = exports.PENDING = exports.UP = exports.DOWN = exports.appName = exports.isDev = void 0;
|
||||
const dayjs = require("dayjs");
|
||||
exports.isDev = process.env.NODE_ENV === "development";
|
||||
exports.appName = "Uptime Kuma";
|
||||
@@ -24,6 +24,25 @@ exports.SQL_DATETIME_FORMAT = "YYYY-MM-DD HH:mm:ss";
|
||||
exports.SQL_DATETIME_FORMAT_WITHOUT_SECOND = "YYYY-MM-DD HH:mm";
|
||||
exports.MAX_INTERVAL_SECOND = 2073600; // 24 days
|
||||
exports.MIN_INTERVAL_SECOND = 20; // 20 seconds
|
||||
exports.badgeConstants = {
|
||||
naColor: "#999",
|
||||
defaultUpColor: "#66c20a",
|
||||
defaultWarnColor: "#eed202",
|
||||
defaultDownColor: "#c2290a",
|
||||
defaultPendingColor: "#f8a306",
|
||||
defaultMaintenanceColor: "#1747f5",
|
||||
defaultPingColor: "blue",
|
||||
defaultStyle: "flat",
|
||||
defaultPingValueSuffix: "ms",
|
||||
defaultPingLabelSuffix: "h",
|
||||
defaultUptimeValueSuffix: "%",
|
||||
defaultUptimeLabelSuffix: "h",
|
||||
defaultCertExpValueSuffix: " days",
|
||||
defaultCertExpLabelSuffix: "h",
|
||||
// Values Come From Default Notification Times
|
||||
defaultCertExpireWarnDays: "14",
|
||||
defaultCertExpireDownDays: "7"
|
||||
};
|
||||
/** Flip the status of s */
|
||||
function flipStatus(s) {
|
||||
if (s === exports.UP) {
|
||||
@@ -101,6 +120,9 @@ class Logger {
|
||||
* @param level Log level. One of INFO, WARN, ERROR, DEBUG or can be customized.
|
||||
*/
|
||||
log(module, msg, level) {
|
||||
if (level === "DEBUG" && !exports.isDev) {
|
||||
return;
|
||||
}
|
||||
if (this.hideLog[level] && this.hideLog[level].includes(module.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
24
src/util.ts
24
src/util.ts
@@ -29,6 +29,26 @@ export const SQL_DATETIME_FORMAT_WITHOUT_SECOND = "YYYY-MM-DD HH:mm";
|
||||
export const MAX_INTERVAL_SECOND = 2073600; // 24 days
|
||||
export const MIN_INTERVAL_SECOND = 20; // 20 seconds
|
||||
|
||||
export const badgeConstants = {
|
||||
naColor: "#999",
|
||||
defaultUpColor: "#66c20a",
|
||||
defaultWarnColor: "#eed202",
|
||||
defaultDownColor: "#c2290a",
|
||||
defaultPendingColor: "#f8a306",
|
||||
defaultMaintenanceColor: "#1747f5",
|
||||
defaultPingColor: "blue", // as defined by badge-maker / shields.io
|
||||
defaultStyle: "flat",
|
||||
defaultPingValueSuffix: "ms",
|
||||
defaultPingLabelSuffix: "h",
|
||||
defaultUptimeValueSuffix: "%",
|
||||
defaultUptimeLabelSuffix: "h",
|
||||
defaultCertExpValueSuffix: " days",
|
||||
defaultCertExpLabelSuffix: "h",
|
||||
// Values Come From Default Notification Times
|
||||
defaultCertExpireWarnDays: "14",
|
||||
defaultCertExpireDownDays: "7"
|
||||
};
|
||||
|
||||
/** Flip the status of s */
|
||||
export function flipStatus(s: number) {
|
||||
if (s === UP) {
|
||||
@@ -115,6 +135,10 @@ class Logger {
|
||||
* @param level Log level. One of INFO, WARN, ERROR, DEBUG or can be customized.
|
||||
*/
|
||||
log(module: string, msg: any, level: string) {
|
||||
if (level === "DEBUG" && !isDev) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.hideLog[level] && this.hideLog[level].includes(module.toLowerCase())) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user