Commit Graph

460 Commits

Author SHA1 Message Date
Matthew Nickson
8a92054c2b
Added JSDoc to ESLint (#3529)
* Added JSDoc to eslint rules

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

* Fixed JSDoc eslint errors

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

* Update the check-linters workflow to Node.js 20

---------

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-08-11 15:46:41 +08:00
Louis Lam
3e0f5f4231 Merge branch 'master' into 2.0.X
# Conflicts:
#	package-lock.json
#	server/database.js
#	server/util-server.js
2023-08-09 20:09:56 +08:00
Matthew Nickson
71fca3f0c3
Fixed #3520 Validate accepted status codes type (#3530)
* Fixed #3520 Validate accepted status codes type

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

* Avoid crash on invalid status code

Instead of failing on an invalid status code, log the error and skip to
next.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>

---------

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2023-08-08 03:22:32 +08:00
Nelson Chan
2921f33c24
Feat: add givenPortOnly as gamedig option (#3532) 2023-08-08 03:14:21 +08:00
Louis Lam
4e0bb394db Minor 2023-08-08 03:10:21 +08:00
Jinhyeok Lee
439b6517d1
Feat: Add http/http keyword timeout option (#2142)
* feat: Add timeoutMs field

* chore: Update Languages (incl. ko-KR)

* Revert "chore: Update Languages (incl. ko-KR)"

This reverts commit 349331a00b.

* chore: Update ko-KR selectively

* chore: Update en selectively

* Merge manually

* Reorder and show only if http related monitors

* fix: Update Korean translation

* fix: Rename timeoutMs to timeout, rename label, make DOUBLE

* fix: Change minimum step to 0.1, matching DOUBLE type

* Put the sql patch at the end

* Update EditMonitor.vue

* Colocate timeout with retry, fix clampTimeout logic, show default on 0

* Update src/pages/EditMonitor.vue to remove a comment

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* Fix merge issue

* Update the timeout value while finished editing the interval value

---------

Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
2023-08-07 00:14:56 +08:00
Nelson Chan
a032e11a2e
Feat: Create Group in EditMonitor page (#3379)
* Feat: Create Group in EditMonitor page

* Fix: Start group mon. after child is added

* Chore: Swap confirm & cancel for ergonomics

* Fix rarely issue that group monitor can throw an error if lastBeat is null

* Resume the group monitor in the callback

---------

Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-08-04 14:48:21 +08:00
Henrik Gerdes
42b5d30a33
feat: Implement oauth2 monitors (#3119)
* [empty commit] pull request for implement oauth2 monitor

* feat: implement oauth2 client credentials flow

* fix: auth methods clarification & error handling

* docs: fix JSdocs types and clarifications
2023-08-02 15:40:19 +08:00
Louis Lam
a0bd4b248b Merge remote-tracking branch 'origin/master' into 2.0.X
# Conflicts:
#	docker/debian-base.dockerfile
#	package-lock.json
#	package.json
#	server/database.js
#	src/router.js
2023-07-30 19:15:09 +08:00
Louis Lam
a0203372ce
Built-in nscd into the docker image (a better dns caching service) (#3472) 2023-07-24 17:04:50 +08:00
Muhammed Hussein karimi
278b88a9d9
feat: added kafka producer (#3268)
*  feat: added kafka producer

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: eslint warn

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: typings and auth problems

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: better variable name to trrack disconnection

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: grouping Kafka Producer special settings into one template

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

*  feat: add kafka producer translations into `en.json`

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: disable close-on-select on kafka broker picker

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: `en.json` invalid json (conflict resolve)

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* Nostr dm notifications (#3051)

* Add nostr DM notification provider

* require crypto for node 18 compatibility

* remove whitespace

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* move closer to where it is used

* simplify success or failure logic

* don't clobber the non-alert msg

* Update server/notification-providers/nostr.js

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* polyfills required for node <= 18

* resolve linter warnings

* missing comma

---------

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* Drop nostr

* Minor

* Fix a bug of clone

---------

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-07-17 16:15:44 +08:00
Louis Lam
25c8196641
Support Node.js 20 again (#3431)
* Support >= Node.js 20.4.0

* Improve the Node.js warning, ban 20.0 to 20.3

* Update

* Minor
2023-07-17 13:17:00 +08:00
Louis Lam
be26bb75d9 Update version handling 2023-07-14 18:02:49 +08:00
Muhammed Hussein karimi
6bece8796e
feat: json-query monitor added (#3253)
*  feat: json-query monitor added

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: import warning error

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: br tag and remove comment

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: supporting compare string with other types

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: switch to a better lib for json query

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: better description on json query and using `v-html` in jsonQueryDescription element to fix `a` tags

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: result variable in error message

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: typos in json query description

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* 📝 docs: `HTTP(s) Json Query` added to monitor list in `README.md`

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>

* 🐛 fix: needed white space in `README.md`

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* Nostr dm notifications (#3051)

* Add nostr DM notification provider

* require crypto for node 18 compatibility

* remove whitespace

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* move closer to where it is used

* simplify success or failure logic

* don't clobber the non-alert msg

* Update server/notification-providers/nostr.js

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* polyfills required for node <= 18

* resolve linter warnings

* missing comma

---------

Co-authored-by: Frank Elsinga <frank@elsinga.de>

* Drop nostr

* Rebuild package-lock.json

* Lint

---------

Signed-off-by: Muhammed Hussein Karimi <info@karimi.dev>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: zappityzap <128872140+zappityzap@users.noreply.github.com>
Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
2023-07-13 23:37:26 +08:00
Louis Lam
293015ff35 Parse x-www-form-urlencoded for /test-webhook 2023-07-09 18:53:57 +08:00
Louis Lam
ed6b4e5ae5 Merge remote-tracking branch 'origin/master' into miles/invert-keyword
# Conflicts:
#	server/database.js
2023-07-08 16:19:44 +08:00
Louis Lam
13ae878ee8
Merge pull request #3347 from louislam/1.22.X
1.22.x merge to master
2023-07-05 11:35:36 +08:00
Louis Lam
df8fcffb19 Drop unused code 2023-07-03 14:50:30 +08:00
Louis Lam
d286c534bd Improve the setup database for embedded MariaDB 2023-06-30 22:17:07 +08:00
Louis Lam
16a1a66e09 Merge remote-tracking branch 'origin/master' into 2.0.X
# Conflicts:
#	docker/alpine-base.dockerfile
#	docker/debian-base.dockerfile
#	docker/dockerfile
#	package.json
#	server/database.js
#	server/jobs/util-worker.js
#	server/model/maintenance.js
#	server/model/monitor.js
#	server/routers/api-router.js
#	server/server.js
#	server/uptime-kuma-server.js
2023-06-30 13:38:56 +08:00
Louis Lam
9ee2780e9e
Merge pull request #2871 from pruekk/chore/missing-notificationList
chore: notification toggle missing when import from backup
2023-06-29 22:42:09 +08:00
Nelson Chan
a386f1fc9e
[Experiment] Use incremental vacuum to speed up delete? (#2800)
* DB: Use incremental vacuum

* Chore: Add log for delete monitor exec. time

* WIP: Test synchronous NORMAL
2023-06-29 22:41:01 +08:00
Louis Lam
2e2747fb52 Handling DATE_ADD 2023-06-27 20:57:34 +08:00
Louis Lam
5388a37a26 Fix port NaN not working in MariaDB 2023-06-27 20:57:34 +08:00
Louis Lam
4f6035899d
Real browser monitor type (#3308) 2023-06-27 15:54:33 +08:00
Tarun Singh
7a34103da6 Added fix to remove children when type changed 2023-06-25 22:44:15 -04:00
Peace
9bd76c2795
Merge branch 'master' into group-monitors 2023-05-31 20:51:33 +02:00
Louis Lam
c1efe0f26d Add a warning for Node.js >= 20 2023-05-26 18:09:05 +08:00
Nelson Chan
a27386bb92 Fix: Use croner for clear-old-data 2023-05-13 00:59:58 +08:00
Miles Steele
171aff1226 add invert keyword feature 2023-04-06 15:25:25 -05:00
Nelson Chan
38fab198bb Fix: Fix user count check 2023-04-03 19:36:07 +08:00
Louis Lam
491239415e Merge remote-tracking branch 'origin/master' into doubles-ss_master
# Conflicts:
#	server/database.js
2023-03-12 18:38:19 +08:00
Louis Lam
ce8eebc838 Fix #2880 2023-03-05 15:59:43 +08:00
Arniwatt Chonkiattipoom
bb7de6aa88 chore: notification toggle missing when import from backup 2023-03-02 16:23:27 +07:00
Louis Lam
38ab5e0f3e
Merge pull request #2558 from Computroniks/feature/1685-prometheus-api-key
Added #1685: Add API keys for API authentication
2023-02-28 16:55:50 +08:00
Louis Lam
7f9332c753 Merge remote-tracking branch 'origin/master' into feature/482-add-description-to-monitor
# Conflicts:
#	server/database.js
#	server/model/monitor.js
#	src/icon.js
#	src/languages/en.js
#	src/languages/es-ES.js
2023-02-25 19:14:44 +08:00
Louis Lam
f32d3af62c Merge remote-tracking branch 'origin/master' into doubles-ss_master
# Conflicts:
#	server/database.js
2023-02-25 17:57:25 +08:00
Louis Lam
ef64077980 Merge remote-tracking branch 'origin/master' into feature/1685-prometheus-api-key
# Conflicts:
#	src/lang/en.json
2023-02-25 00:06:25 +08:00
Louis Lam
cecb0b6425
Merge pull request #2610 from bayramberkay/feature/add-xml-support-to-http-monitors
Add xml support to HTTP monitors
2023-02-24 17:26:47 +08:00
Thomas Spalinger
7f88aacbe7 make monitor start() and stop() async 2023-02-23 16:16:49 +00:00
Louis Lam
4dfc1a0221
Merge pull request #2664 from spali/keep_prometheus_instance
remember prometheus instance and expose it
2023-02-23 20:43:05 +08:00
Matthew Nickson
e7feca1cd6
Added API key authentication handler
API key authentication is now possible by making use of the X-API-Key
header. API authentication will only be enabled when a user adds their
first API key, up until this point, they can still use their username
and password to authenticate with API endpoints. After the user adds
their first API key, they may only use API keys in future to
authenticate with the API.

In this commit, the prometheus /metrics endpoint has been changed over
to the new authentication system.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2023-02-15 00:39:29 +00:00
Matthew Nickson
d7f2fa982a
Merge branch 'master' into feature/1685-prometheus-api-key 2023-02-14 19:53:33 +00:00
Matthew Nickson
ee2eb5109b
Added basic web interface for API keys
Web interfaces for manging API keys have been added however translation
keys are still required.

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2023-02-14 19:49:04 +00:00
Louis Lam
4056951915 WIP: building database in knex.js 2023-02-11 22:21:06 +08:00
Louis Lam
e4183ee2b7
Database Setup Page (#2738)
* WIP

* WIP: Database setup process

* Add database setup page
2023-02-11 14:41:02 +08:00
Suriya Soutmun
43941fa2c6
feat: add mtls authen method in http/http keyword 2023-02-07 09:40:47 +07:00
Louis Lam
d4752b65de WIP 2023-02-05 18:01:54 +08:00
Faruk Genç
4287f7e885 Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors
# Conflicts:
#	src/lang/en.json
2023-02-02 19:43:17 +03:00
Peace
9446c2d102
fix: use active instead of isActive in uploadBackup 2023-02-01 23:39:42 +01:00
Peace
2c581ade90
Merge branch 'louislam:master' into group-monitors 2023-02-01 20:44:09 +01:00
Peace
9286dcb6ce
fix: add serverside check against endless loops 2023-02-01 20:16:56 +01:00
Louis Lam
683f446cf5 Add support for .env 2023-02-01 20:07:08 +08:00
Faruk Genç
35bd129d66 Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors 2023-01-28 15:47:42 +03:00
Peace
aba515e172
feat: disable childs if parent is disabled 2023-01-28 13:39:17 +01:00
Peace
97bd306a09
Merge branch 'louislam:master' into group-monitors 2023-01-28 03:07:42 +01:00
Peace
645fd94bba
feat: add ability to group monitors in dashboard 2023-01-28 02:58:03 +01:00
Louis Lam
e5ca67d062
HTTPS Monitor using Real Browsers + Limited plugin support (#1787) 2023-01-27 18:25:57 +08:00
Faruk Genç
9329ec9234 Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors
# Conflicts:
#	server/database.js
#	server/model/monitor.js
2023-01-25 20:20:11 +03:00
Louis Lam
5050ebc249 Merge remote-tracking branch 'origin/master' into feature/#1891-set-ping-packet-size
# Conflicts:
#	server/util-server.js
#	src/languages/en.js
2023-01-25 16:12:33 +08:00
Louis Lam
aab04f6644 Merge remote-tracking branch 'origin/master' into WhyKickAmooCow_master 2023-01-24 19:44:21 +08:00
Thomas Spalinger
f155ec9ba8 remember prometheus instance and expose it
in preperation for #2491,#680 and #898
2023-01-24 10:32:49 +00:00
Faruk Genç
be850dd596 Merge remote-tracking branch 'remote/master' into feature/add-xml-support-to-http-monitors
# Conflicts:
#	server/database.js
#	server/model/monitor.js
#	src/languages/en.js
2023-01-14 16:40:13 +03:00
Nelson Chan
e9564619f1 Feat: Implement tags manager in settings
Fix: Remove unused color options

Chore: Fix typo
2023-01-12 21:25:33 +08:00
Adam Spurgeon
774d754b21 Add GameDig monitor 2023-01-08 21:43:30 +13:00
Matthew Nickson
7a13b959a3
Updated to match changes in #2223
Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
2023-01-06 20:09:40 +00:00
minhhoang
4147a4c404 fix: #2480 2022-12-28 22:31:33 +07:00
Louis Lam
765d8e1297 Fix #2318 2022-12-15 13:39:48 +08:00
Louis Lam
39987ba9ac Init server timezone 2022-12-12 22:57:57 +08:00
Louis Lam
3b87209e26 Add configurable dns cache 2022-12-12 17:19:22 +08:00
Louis Lam
4cd5b5563f Fix #1145 2022-12-08 23:21:55 +08:00
Louis Lam
e478084ff9 Fix Uptime Kuma cannot be stopped 2022-12-08 19:13:47 +08:00
Louis Lam
ee1a56caae Update /test-webhook and reevaluate sensitive fields 2022-12-05 18:18:19 +08:00
minhhn3
b459408b10 fix: resolve conflict 2022-10-26 20:41:21 +07:00
Matthew Nickson
4339ca7eb5
Merge branch 'master' into feature/#1891-set-ping-packet-size 2022-10-22 16:22:28 +01:00
Louis Lam
0b8d4cdaac Generate Next Timeslot for recurring interval 2022-10-15 17:17:26 +08:00
Louis Lam
268cbdbf8d Merge remote-tracking branch 'origin/master' into maintenance
# Conflicts:
#	server/server.js
#	src/components/settings/General.vue
2022-10-15 15:57:39 +08:00
Louis Lam
2faf866e9e Implement generateTimeslot() for recurring interval type 2022-10-12 17:02:16 +08:00
Louis Lam
7b9766091e Revert testing 2022-10-11 22:18:09 +08:00
Louis Lam
a36f24d827 Add configurable server timezone 2022-10-09 20:59:58 +08:00
Louis Lam
ad1a7c255f Drop exports.entryPage fully 2022-10-08 23:56:58 +08:00
George Tsomlektsis
3e699f8ac3 Fix linting errors. 2022-10-03 18:01:52 +03:00
George Tsomlektsis
b0d6b5b13d Fixed entry route not redirecting correctly when the status entry page changes slug. 2022-10-03 17:48:34 +03:00
Louis Lam
b1465c0282 - Maintenance standardize datetime format to YYYY-MM-DD hh:mm:ss
- Import dayjs extensions one time only
- Maintenance activeCondition centralize
2022-09-28 00:20:17 +08:00
Justin Tisdale
0814d643c1 Merge branch 'master' into feature/expand-http-payload-support 2022-09-25 10:45:32 -04:00
Louis Lam
120e578398 Move maintenance code to maintenance-socket-handler.js 2022-09-17 16:58:08 +08:00
Louis Lam
7017c2e625 Move maintenance code to maintenance-socket-handler.js 2022-09-17 16:54:21 +08:00
Louis Lam
90761cf831 Merge remote-tracking branch 'origin/master' into karelkryda_master
# Conflicts:
#	server/database.js
#	server/model/monitor.js
#	server/routers/api-router.js
#	server/server.js
#	src/components/HeartbeatBar.vue
#	src/components/MonitorList.vue
#	src/icon.js
#	src/layouts/Layout.vue
#	src/mixins/datetime.js
#	src/mixins/socket.js
#	src/router.js
#	src/util.js
2022-09-17 16:12:57 +08:00
Matthew Nickson
742b1337be
Merge branch 'master' into feature/#1891-set-ping-packet-size 2022-09-10 21:20:03 +01:00
Louis Lam
197d44981f Merge remote-tracking branch 'origin/master' into test/add-cypress-tests
# Conflicts:
#	package.json
2022-09-09 16:32:23 +08:00
minhhn3
3a90d246a4 fix: wrong type 2022-08-20 22:45:11 +07:00
Justin Tisdale
6ec6410808 Merge branch 'master' into feature/expand-http-payload-support 2022-08-20 10:24:18 -04:00
Matthew Nickson
c3d655afb4
Merge branch 'master' into feature/#1891-set-ping-packet-size 2022-08-13 21:15:16 +02:00
minhhn3
6bb79597e8 fix: resolve merge conflict 2022-08-13 13:26:05 +07:00
Louis Lam
de6e1e7ddd Merge remote-tracking branch 'origin/master' into introduce-resend-interval
# Conflicts:
#	server/database.js
2022-08-13 13:24:00 +08:00
Justin Tisdale
0d58526f25 Merge branch 'master' into feature/expand-http-payload-support 2022-08-11 21:04:11 -04:00
Justin Tisdale
2b9bf095a6 Add non-json support for http body 2022-08-11 20:57:03 -04:00
Louis Lam
3b3763351b Merge remote-tracking branch 'origin/master' into radius-check
# Conflicts:
#	server/database.js
#	server/model/monitor.js
#	server/server.js
#	server/util-server.js
#	src/pages/EditMonitor.vue
2022-08-11 21:08:06 +08:00
Louis Lam
d0d1e0de28 Merge remote-tracking branch 'origin/master' into introduce-resend-interval
# Conflicts:
#	src/pages/EditMonitor.vue
2022-08-05 15:40:06 +08:00
Minh Hoàng
dcecd10c88
Feat/add gRPC protocol (#1)
* feat: added monitor with gRPC

Co-authored-by: minhhn3 <minhhn3@vng.com.vn>
2022-08-03 12:00:39 +07:00