diff --git a/.github/workflows/auto-test.yml b/.github/workflows/auto-test.yml
index 83d887e4..b5240d77 100644
--- a/.github/workflows/auto-test.yml
+++ b/.github/workflows/auto-test.yml
@@ -10,11 +10,12 @@ on:
branches: [ master ]
jobs:
- build:
- runs-on: ubuntu-latest
+ auto-test:
+ runs-on: ${{ matrix.os }}
strategy:
matrix:
+ os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [14.x, 15.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
diff --git a/README.md b/README.md
index 4ad1c555..be5494b5 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,7 @@
It is a self-hosted monitoring tool like "Uptime Robot".
-
+
## 🥔 Live Demo
@@ -86,9 +86,13 @@ https://github.com/louislam/uptime-kuma/projects/1
## 🖼 More Screenshots
-Dark Mode:
+Light Mode:
-
+
+
+Status Page:
+
+
Settings Page:
diff --git a/SECURITY.md b/SECURITY.md
index 1271565a..d2f000ed 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -7,7 +7,8 @@ currently being supported with security updates.
| Version | Supported |
| ------- | ------------------ |
-| 1.x.x | :white_check_mark: |
+| 1.7.X | :white_check_mark: |
+| < 1.7 | ❌ |
## Reporting a Vulnerability
Please report security issues to uptime@kuma.pet.
diff --git a/dockerfile b/dockerfile
index 969d5ff3..b6c48b28 100644
--- a/dockerfile
+++ b/dockerfile
@@ -1,6 +1,8 @@
FROM louislam/uptime-kuma:base-debian AS build
WORKDIR /app
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
+
COPY . .
RUN npm install --legacy-peer-deps && \
npm run build && \
diff --git a/dockerfile-alpine b/dockerfile-alpine
index 178afcab..7604c40c 100644
--- a/dockerfile-alpine
+++ b/dockerfile-alpine
@@ -1,6 +1,8 @@
FROM louislam/uptime-kuma:base-alpine AS build
WORKDIR /app
+ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1
+
COPY . .
RUN npm install --legacy-peer-deps && \
npm run build && \
diff --git a/package-lock.json b/package-lock.json
index f18d58aa..762cfd98 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -59,7 +59,7 @@
"devDependencies": {
"@babel/eslint-parser": "~7.15.7",
"@types/bootstrap": "~5.1.6",
- "@vitejs/plugin-legacy": "~1.5.3",
+ "@vitejs/plugin-legacy": "~1.6.1",
"@vitejs/plugin-vue": "~1.9.2",
"@vue/compiler-sfc": "~3.2.19",
"core-js": "~3.18.1",
@@ -74,7 +74,7 @@
"stylelint": "~13.13.1",
"stylelint-config-standard": "~22.0.0",
"typescript": "~4.4.3",
- "vite": "~2.5.10"
+ "vite": "~2.6.4"
},
"engines": {
"node": "14.*"
@@ -1685,16 +1685,16 @@
}
},
"node_modules/@vitejs/plugin-legacy": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.5.3.tgz",
- "integrity": "sha512-/b2x6dU+BbdW7C7KWxh9kMrVzv1JlUi1ucPQpSzWUUUVJjihbG+GRlpqcvfQ0p/TnAKl2d/VecbTLByVJJHORg==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.6.1.tgz",
+ "integrity": "sha512-isBi2ti+AlCZUpfA1P6L8gseltBy/qi6Rsi92aDzeL2elpwXgN4Hv/xLS2UUSSj9F0mFmxXCYPWlBPaJnlYamQ==",
"dev": true,
"dependencies": {
- "@babel/standalone": "^7.14.9",
- "core-js": "^3.16.0",
+ "@babel/standalone": "^7.15.7",
+ "core-js": "^3.18.1",
"magic-string": "^0.25.7",
"regenerator-runtime": "^0.13.9",
- "systemjs": "^6.10.2"
+ "systemjs": "^6.10.3"
},
"engines": {
"node": ">=12.0.0"
@@ -3512,15 +3512,241 @@
}
},
"node_modules/esbuild": {
- "version": "0.12.29",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
- "integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.4.tgz",
+ "integrity": "sha512-wMA5eUwpavTBiNl+It6j8OQuKVh69l6z4DKDLzoTIqC+gChnPpcmqdA8WNHptUHRnfyML+mKEQPlW7Mybj8gHg==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
+ },
+ "optionalDependencies": {
+ "esbuild-android-arm64": "0.13.4",
+ "esbuild-darwin-64": "0.13.4",
+ "esbuild-darwin-arm64": "0.13.4",
+ "esbuild-freebsd-64": "0.13.4",
+ "esbuild-freebsd-arm64": "0.13.4",
+ "esbuild-linux-32": "0.13.4",
+ "esbuild-linux-64": "0.13.4",
+ "esbuild-linux-arm": "0.13.4",
+ "esbuild-linux-arm64": "0.13.4",
+ "esbuild-linux-mips64le": "0.13.4",
+ "esbuild-linux-ppc64le": "0.13.4",
+ "esbuild-openbsd-64": "0.13.4",
+ "esbuild-sunos-64": "0.13.4",
+ "esbuild-windows-32": "0.13.4",
+ "esbuild-windows-64": "0.13.4",
+ "esbuild-windows-arm64": "0.13.4"
}
},
+ "node_modules/esbuild-android-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.4.tgz",
+ "integrity": "sha512-elDJt+jNyoHFId0/dKsuVYUPke3EcquIyUwzJCH17a3ERglN3A9aMBI5zbz+xNZ+FbaDNdpn0RaJHCFLbZX+fA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ]
+ },
+ "node_modules/esbuild-darwin-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.13.4.tgz",
+ "integrity": "sha512-zJQGyHRAdZUXlRzbN7W+7ykmEiGC+bq3Gc4GxKYjjWTgDRSEly98ym+vRNkDjXwXYD3gGzSwvH35+MiHAtWvLA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/esbuild-darwin-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.4.tgz",
+ "integrity": "sha512-r8oYvAtqSGq8HNTZCAx4TdLE7jZiGhX9ooGi5AQAey37MA6XNaP8ZNlw9OCpcgpx3ryU2WctXwIqPzkHO7a8dg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ]
+ },
+ "node_modules/esbuild-freebsd-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.4.tgz",
+ "integrity": "sha512-u9DRGkn09EN8+lCh6z7FKle7awi17PJRBuAKdRNgSo5ZrH/3m+mYaJK2PR2URHMpAfXiwJX341z231tSdVe3Yw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/esbuild-freebsd-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.4.tgz",
+ "integrity": "sha512-q3B2k68Uf6gfjATjcK16DqxvjqRQkHL8aPoOfj4op+lSqegdXvBacB1d8jw8PxbWJ8JHpdTLdAVUYU80kotQXA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ]
+ },
+ "node_modules/esbuild-linux-32": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.4.tgz",
+ "integrity": "sha512-UUYJPHSiKAO8KoN3Ls/iZtgDLZvK5HarES96aolDPWZnq9FLx4dIHM/x2z4Rxv9IYqQ/DxlPoE2Co1UPBIYYeA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-linux-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.4.tgz",
+ "integrity": "sha512-+RnohAKiiUW4UHLGRkNR1AnENW1gCuDWuygEtd4jxTNPIoeC7lbXGor7rtgjj9AdUzFgOEvAXyNNX01kJ8NueQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-linux-arm": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.4.tgz",
+ "integrity": "sha512-BH5gKve4jglS7UPSsfwHSX79I5agC/lm4eKoRUEyo8lwQs89frQSRp2Xup+6SFQnxt3md5EsKcd2Dbkqeb3gPA==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-linux-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.4.tgz",
+ "integrity": "sha512-+A188cAdd6QuSRxMIwRrWLjgphQA0LDAQ/ECVlrPVJwnx+1i64NjDZivoqPYLOTkSPIKntiWwMhhf0U5/RrPHQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-linux-mips64le": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.4.tgz",
+ "integrity": "sha512-0xkwtPaUkG5xMTFGaQPe1AadSe5QAiQuD4Gix1O9k5Xo/U8xGIkw9UFUTvfEUeu71vFb6ZgsIacfP1NLoFjWNw==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-linux-ppc64le": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.4.tgz",
+ "integrity": "sha512-E1+oJPP7A+j23GPo3CEpBhGwG1bni4B8IbTA3/3rvzjURwUMZdcN3Fhrz24rnjzdLSHmULtOE4VsbT42h1Om4Q==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ]
+ },
+ "node_modules/esbuild-openbsd-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.4.tgz",
+ "integrity": "sha512-xEkI1o5HYxDzbv9jSox0EsDxpwraG09SRiKKv0W8pH6O3bt+zPSlnoK7+I7Q69tkvONkpIq5n2o+c55uq0X7cw==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ]
+ },
+ "node_modules/esbuild-sunos-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.4.tgz",
+ "integrity": "sha512-bjXUMcODMnB6hQicLBBmmnBl7OMDyVpFahKvHGXJfDChIi5udiIRKCmFUFIRn+AUAKVlfrofRKdyPC7kBsbvGQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "sunos"
+ ]
+ },
+ "node_modules/esbuild-windows-32": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.4.tgz",
+ "integrity": "sha512-z4CH07pfyVY0XF98TCsGmLxKCl0kyvshKDbdpTekW9f2d+dJqn5mmoUyWhpSVJ0SfYWJg86FoD9nMbbaMVyGdg==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/esbuild-windows-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.4.tgz",
+ "integrity": "sha512-uVL11vORRPjocGLYam67rwFLd0LvkrHEs+JG+1oJN4UD9MQmNGZPa4gBHo6hDpF+kqRJ9kXgQSeDqUyRy0tj/Q==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
+ "node_modules/esbuild-windows-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.4.tgz",
+ "integrity": "sha512-vA6GLvptgftRcDcWngD5cMlL4f4LbL8JjU2UMT9yJ0MT5ra6hdZNFWnOeOoEtY4GtJ6OjZ0i+81sTqhAB0fMkg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ]
+ },
"node_modules/escalade": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
@@ -10066,15 +10292,15 @@
}
},
"node_modules/vite": {
- "version": "2.5.10",
- "resolved": "https://registry.npmjs.org/vite/-/vite-2.5.10.tgz",
- "integrity": "sha512-0ObiHTi5AHyXdJcvZ67HMsDgVpjT5RehvVKv6+Q0jFZ7zDI28PF5zK9mYz2avxdA+4iJMdwCz6wnGNnn4WX5Gg==",
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-2.6.4.tgz",
+ "integrity": "sha512-zNGZgjKGprdLKJ1g1taAvNt51JbGAdrAUU9hpLzgtlks+cXBxTZUsEAGEtLbF3UvlYOVAPXS8r9E9gxYAv6z+A==",
"dev": true,
"dependencies": {
- "esbuild": "^0.12.17",
- "postcss": "^8.3.6",
+ "esbuild": "^0.13.2",
+ "postcss": "^8.3.8",
"resolve": "^1.20.0",
- "rollup": "^2.38.5"
+ "rollup": "^2.57.0"
},
"bin": {
"vite": "bin/vite.js"
@@ -10084,6 +10310,22 @@
},
"optionalDependencies": {
"fsevents": "~2.3.2"
+ },
+ "peerDependencies": {
+ "less": "*",
+ "sass": "*",
+ "stylus": "*"
+ },
+ "peerDependenciesMeta": {
+ "less": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ }
}
},
"node_modules/vue": {
@@ -11951,16 +12193,16 @@
}
},
"@vitejs/plugin-legacy": {
- "version": "1.5.3",
- "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.5.3.tgz",
- "integrity": "sha512-/b2x6dU+BbdW7C7KWxh9kMrVzv1JlUi1ucPQpSzWUUUVJjihbG+GRlpqcvfQ0p/TnAKl2d/VecbTLByVJJHORg==",
+ "version": "1.6.1",
+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-legacy/-/plugin-legacy-1.6.1.tgz",
+ "integrity": "sha512-isBi2ti+AlCZUpfA1P6L8gseltBy/qi6Rsi92aDzeL2elpwXgN4Hv/xLS2UUSSj9F0mFmxXCYPWlBPaJnlYamQ==",
"dev": true,
"requires": {
- "@babel/standalone": "^7.14.9",
- "core-js": "^3.16.0",
+ "@babel/standalone": "^7.15.7",
+ "core-js": "^3.18.1",
"magic-string": "^0.25.7",
"regenerator-runtime": "^0.13.9",
- "systemjs": "^6.10.2"
+ "systemjs": "^6.10.3"
}
},
"@vitejs/plugin-vue": {
@@ -13373,10 +13615,140 @@
}
},
"esbuild": {
- "version": "0.12.29",
- "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.29.tgz",
- "integrity": "sha512-w/XuoBCSwepyiZtIRsKsetiLDUVGPVw1E/R3VTFSecIy8UR7Cq3SOtwKHJMFoVqqVG36aGkzh4e8BvpO1Fdc7g==",
- "dev": true
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.13.4.tgz",
+ "integrity": "sha512-wMA5eUwpavTBiNl+It6j8OQuKVh69l6z4DKDLzoTIqC+gChnPpcmqdA8WNHptUHRnfyML+mKEQPlW7Mybj8gHg==",
+ "dev": true,
+ "requires": {
+ "esbuild-android-arm64": "0.13.4",
+ "esbuild-darwin-64": "0.13.4",
+ "esbuild-darwin-arm64": "0.13.4",
+ "esbuild-freebsd-64": "0.13.4",
+ "esbuild-freebsd-arm64": "0.13.4",
+ "esbuild-linux-32": "0.13.4",
+ "esbuild-linux-64": "0.13.4",
+ "esbuild-linux-arm": "0.13.4",
+ "esbuild-linux-arm64": "0.13.4",
+ "esbuild-linux-mips64le": "0.13.4",
+ "esbuild-linux-ppc64le": "0.13.4",
+ "esbuild-openbsd-64": "0.13.4",
+ "esbuild-sunos-64": "0.13.4",
+ "esbuild-windows-32": "0.13.4",
+ "esbuild-windows-64": "0.13.4",
+ "esbuild-windows-arm64": "0.13.4"
+ }
+ },
+ "esbuild-android-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-android-arm64/-/esbuild-android-arm64-0.13.4.tgz",
+ "integrity": "sha512-elDJt+jNyoHFId0/dKsuVYUPke3EcquIyUwzJCH17a3ERglN3A9aMBI5zbz+xNZ+FbaDNdpn0RaJHCFLbZX+fA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-64/-/esbuild-darwin-64-0.13.4.tgz",
+ "integrity": "sha512-zJQGyHRAdZUXlRzbN7W+7ykmEiGC+bq3Gc4GxKYjjWTgDRSEly98ym+vRNkDjXwXYD3gGzSwvH35+MiHAtWvLA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-darwin-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.13.4.tgz",
+ "integrity": "sha512-r8oYvAtqSGq8HNTZCAx4TdLE7jZiGhX9ooGi5AQAey37MA6XNaP8ZNlw9OCpcgpx3ryU2WctXwIqPzkHO7a8dg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-64/-/esbuild-freebsd-64-0.13.4.tgz",
+ "integrity": "sha512-u9DRGkn09EN8+lCh6z7FKle7awi17PJRBuAKdRNgSo5ZrH/3m+mYaJK2PR2URHMpAfXiwJX341z231tSdVe3Yw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-freebsd-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.13.4.tgz",
+ "integrity": "sha512-q3B2k68Uf6gfjATjcK16DqxvjqRQkHL8aPoOfj4op+lSqegdXvBacB1d8jw8PxbWJ8JHpdTLdAVUYU80kotQXA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-32": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-32/-/esbuild-linux-32-0.13.4.tgz",
+ "integrity": "sha512-UUYJPHSiKAO8KoN3Ls/iZtgDLZvK5HarES96aolDPWZnq9FLx4dIHM/x2z4Rxv9IYqQ/DxlPoE2Co1UPBIYYeA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.13.4.tgz",
+ "integrity": "sha512-+RnohAKiiUW4UHLGRkNR1AnENW1gCuDWuygEtd4jxTNPIoeC7lbXGor7rtgjj9AdUzFgOEvAXyNNX01kJ8NueQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm/-/esbuild-linux-arm-0.13.4.tgz",
+ "integrity": "sha512-BH5gKve4jglS7UPSsfwHSX79I5agC/lm4eKoRUEyo8lwQs89frQSRp2Xup+6SFQnxt3md5EsKcd2Dbkqeb3gPA==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-arm64/-/esbuild-linux-arm64-0.13.4.tgz",
+ "integrity": "sha512-+A188cAdd6QuSRxMIwRrWLjgphQA0LDAQ/ECVlrPVJwnx+1i64NjDZivoqPYLOTkSPIKntiWwMhhf0U5/RrPHQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-mips64le": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.13.4.tgz",
+ "integrity": "sha512-0xkwtPaUkG5xMTFGaQPe1AadSe5QAiQuD4Gix1O9k5Xo/U8xGIkw9UFUTvfEUeu71vFb6ZgsIacfP1NLoFjWNw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-linux-ppc64le": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.13.4.tgz",
+ "integrity": "sha512-E1+oJPP7A+j23GPo3CEpBhGwG1bni4B8IbTA3/3rvzjURwUMZdcN3Fhrz24rnjzdLSHmULtOE4VsbT42h1Om4Q==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-openbsd-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-openbsd-64/-/esbuild-openbsd-64-0.13.4.tgz",
+ "integrity": "sha512-xEkI1o5HYxDzbv9jSox0EsDxpwraG09SRiKKv0W8pH6O3bt+zPSlnoK7+I7Q69tkvONkpIq5n2o+c55uq0X7cw==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-sunos-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-sunos-64/-/esbuild-sunos-64-0.13.4.tgz",
+ "integrity": "sha512-bjXUMcODMnB6hQicLBBmmnBl7OMDyVpFahKvHGXJfDChIi5udiIRKCmFUFIRn+AUAKVlfrofRKdyPC7kBsbvGQ==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-32": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-32/-/esbuild-windows-32-0.13.4.tgz",
+ "integrity": "sha512-z4CH07pfyVY0XF98TCsGmLxKCl0kyvshKDbdpTekW9f2d+dJqn5mmoUyWhpSVJ0SfYWJg86FoD9nMbbaMVyGdg==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-64/-/esbuild-windows-64-0.13.4.tgz",
+ "integrity": "sha512-uVL11vORRPjocGLYam67rwFLd0LvkrHEs+JG+1oJN4UD9MQmNGZPa4gBHo6hDpF+kqRJ9kXgQSeDqUyRy0tj/Q==",
+ "dev": true,
+ "optional": true
+ },
+ "esbuild-windows-arm64": {
+ "version": "0.13.4",
+ "resolved": "https://registry.npmjs.org/esbuild-windows-arm64/-/esbuild-windows-arm64-0.13.4.tgz",
+ "integrity": "sha512-vA6GLvptgftRcDcWngD5cMlL4f4LbL8JjU2UMT9yJ0MT5ra6hdZNFWnOeOoEtY4GtJ6OjZ0i+81sTqhAB0fMkg==",
+ "dev": true,
+ "optional": true
},
"escalade": {
"version": "3.1.1",
@@ -18379,16 +18751,16 @@
}
},
"vite": {
- "version": "2.5.10",
- "resolved": "https://registry.npmjs.org/vite/-/vite-2.5.10.tgz",
- "integrity": "sha512-0ObiHTi5AHyXdJcvZ67HMsDgVpjT5RehvVKv6+Q0jFZ7zDI28PF5zK9mYz2avxdA+4iJMdwCz6wnGNnn4WX5Gg==",
+ "version": "2.6.4",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-2.6.4.tgz",
+ "integrity": "sha512-zNGZgjKGprdLKJ1g1taAvNt51JbGAdrAUU9hpLzgtlks+cXBxTZUsEAGEtLbF3UvlYOVAPXS8r9E9gxYAv6z+A==",
"dev": true,
"requires": {
- "esbuild": "^0.12.17",
+ "esbuild": "^0.13.2",
"fsevents": "~2.3.2",
- "postcss": "^8.3.6",
+ "postcss": "^8.3.8",
"resolve": "^1.20.0",
- "rollup": "^2.38.5"
+ "rollup": "^2.57.0"
}
},
"vue": {
diff --git a/package.json b/package.json
index 6698b522..7511e93d 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,7 @@
"start-server-dev": "cross-env NODE_ENV=development node server/server.js",
"build": "vite build",
"test": "node test/prepare-test-server.js && node server/server.js --port=3002 --data-dir=./data/test/ --test",
+ "test-with-build": "npm run build && npm test",
"jest": "node test/prepare-jest.js && jest",
"tsc": "tsc",
"vite-preview-dist": "vite preview --host",
@@ -98,7 +99,7 @@
"devDependencies": {
"@babel/eslint-parser": "~7.15.7",
"@types/bootstrap": "~5.1.6",
- "@vitejs/plugin-legacy": "~1.5.3",
+ "@vitejs/plugin-legacy": "~1.6.1",
"@vitejs/plugin-vue": "~1.9.2",
"@vue/compiler-sfc": "~3.2.19",
"core-js": "~3.18.1",
@@ -113,7 +114,7 @@
"stylelint": "~13.13.1",
"stylelint-config-standard": "~22.0.0",
"typescript": "~4.4.3",
- "vite": "~2.5.10"
+ "vite": "~2.6.4"
},
"jest": {
"verbose": true,
diff --git a/server/model/monitor.js b/server/model/monitor.js
index dc95753d..05114e92 100644
--- a/server/model/monitor.js
+++ b/server/model/monitor.js
@@ -199,7 +199,9 @@ class Monitor extends BeanModel {
}
}
- debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
+ if (process.env.TIMELOGGER === "1") {
+ debug("Cert Info Query Time: " + (dayjs().valueOf() - certInfoStartTime) + "ms");
+ }
if (this.type === "http") {
bean.status = UP;
@@ -563,6 +565,7 @@ class Monitor extends BeanModel {
const uptime = await this.calcUptime(duration, monitorID);
io.to(userID).emit("uptime", monitorID, duration, uptime);
}
+
}
module.exports = Monitor;
diff --git a/server/notification-providers/rocket-chat.js b/server/notification-providers/rocket-chat.js
index 14918965..a9bd4009 100644
--- a/server/notification-providers/rocket-chat.js
+++ b/server/notification-providers/rocket-chat.js
@@ -1,5 +1,8 @@
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
+const Slack = require("./slack");
+const { setting } = require("../util-server");
+const { getMonitorRelativeURL, UP, DOWN } = require("../../src/util");
class RocketChat extends NotificationProvider {
@@ -10,16 +13,17 @@ class RocketChat extends NotificationProvider {
try {
if (heartbeatJSON == null) {
let data = {
- "text": "Uptime Kuma Rocket.chat testing successful.",
+ "text": msg,
"channel": notification.rocketchannel,
"username": notification.rocketusername,
"icon_emoji": notification.rocketiconemo,
- }
- await axios.post(notification.rocketwebhookURL, data)
+ };
+ await axios.post(notification.rocketwebhookURL, data);
return okMsg;
}
const time = heartbeatJSON["time"];
+
let data = {
"text": "Uptime Kuma Alert",
"channel": notification.rocketchannel,
@@ -28,16 +32,32 @@ class RocketChat extends NotificationProvider {
"attachments": [
{
"title": "Uptime Kuma Alert *Time (UTC)*\n" + time,
- "title_link": notification.rocketbutton,
"text": "*Message*\n" + msg,
- "color": "#32cd32"
}
]
+ };
+
+ // Color
+ if (heartbeatJSON.status === DOWN) {
+ data.attachments[0].color = "#ff0000";
+ } else {
+ data.attachments[0].color = "#32cd32";
}
- await axios.post(notification.rocketwebhookURL, data)
+
+ if (notification.rocketbutton) {
+ await Slack.deprecateURL(notification.rocketbutton);
+ }
+
+ const baseURL = await setting("primaryBaseURL");
+
+ if (baseURL) {
+ data.attachments[0].title_link = baseURL + getMonitorRelativeURL(monitorJSON.id);
+ }
+
+ await axios.post(notification.rocketwebhookURL, data);
return okMsg;
} catch (error) {
- this.throwGeneralAxiosError(error)
+ this.throwGeneralAxiosError(error);
}
}
diff --git a/server/notification-providers/slack.js b/server/notification-providers/slack.js
index 661df5a0..271ee3dc 100644
--- a/server/notification-providers/slack.js
+++ b/server/notification-providers/slack.js
@@ -1,21 +1,40 @@
const NotificationProvider = require("./notification-provider");
const axios = require("axios");
+const { setSettings, setting } = require("../util-server");
+const { getMonitorRelativeURL } = require("../../src/util");
class Slack extends NotificationProvider {
name = "slack";
+ /**
+ * Deprecated property notification.slackbutton
+ * Set it as primary base url if this is not yet set.
+ */
+ static async deprecateURL(url) {
+ let currentPrimaryBaseURL = await setting("primaryBaseURL");
+
+ if (!currentPrimaryBaseURL) {
+ console.log("Move the url to be the primary base URL");
+ await setSettings("general", {
+ primaryBaseURL: url,
+ });
+ } else {
+ console.log("Already there, no need to move the primary base URL");
+ }
+ }
+
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully. ";
try {
if (heartbeatJSON == null) {
let data = {
- "text": "Uptime Kuma Slack testing successful.",
+ "text": msg,
"channel": notification.slackchannel,
"username": notification.slackusername,
"icon_emoji": notification.slackiconemo,
- }
- await axios.post(notification.slackwebhookURL, data)
+ };
+ await axios.post(notification.slackwebhookURL, data);
return okMsg;
}
@@ -42,26 +61,35 @@ class Slack extends NotificationProvider {
"type": "mrkdwn",
"text": "*Time (UTC)*\n" + time,
}],
- },
- {
- "type": "actions",
- "elements": [
- {
- "type": "button",
- "text": {
- "type": "plain_text",
- "text": "Visit Uptime Kuma",
- },
- "value": "Uptime-Kuma",
- "url": notification.slackbutton || "https://github.com/louislam/uptime-kuma",
- },
- ],
}],
+ };
+
+ if (notification.slackbutton) {
+ await Slack.deprecateURL(notification.slackbutton);
}
- await axios.post(notification.slackwebhookURL, data)
+
+ const baseURL = await setting("primaryBaseURL");
+
+ // Button
+ if (baseURL) {
+ data.blocks.push({
+ "type": "actions",
+ "elements": [{
+ "type": "button",
+ "text": {
+ "type": "plain_text",
+ "text": "Visit Uptime Kuma",
+ },
+ "value": "Uptime-Kuma",
+ "url": baseURL + getMonitorRelativeURL(monitorJSON.id),
+ }],
+ });
+ }
+
+ await axios.post(notification.slackwebhookURL, data);
return okMsg;
} catch (error) {
- this.throwGeneralAxiosError(error)
+ this.throwGeneralAxiosError(error);
}
}
diff --git a/src/assets/app.scss b/src/assets/app.scss
index f18ec292..fdb57b43 100644
--- a/src/assets/app.scss
+++ b/src/assets/app.scss
@@ -325,7 +325,7 @@ textarea.form-control {
.item {
display: block;
text-decoration: none;
- padding: 14px 15px;
+ padding: 13px 15px 10px 15px;
border-radius: 10px;
transition: all ease-in-out 0.15s;
diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue
index 8ab3ae9f..e62b95df 100644
--- a/src/components/HeartbeatBar.vue
+++ b/src/components/HeartbeatBar.vue
@@ -38,7 +38,7 @@ export default {
beatMargin: 4,
move: false,
maxBeat: -1,
- };
+ }
},
computed: {
@@ -69,12 +69,12 @@ export default {
if (start < 0) {
// Add empty placeholder
for (let i = start; i < 0; i++) {
- placeholders.push(0);
+ placeholders.push(0)
}
start = 0;
}
- return placeholders.concat(this.beatList.slice(start));
+ return placeholders.concat(this.beatList.slice(start))
},
wrapStyle() {
@@ -84,7 +84,7 @@ export default {
return {
padding: `${topBottom}px ${leftRight}px`,
width: "100%",
- };
+ }
},
barStyle() {
@@ -94,12 +94,12 @@ export default {
return {
transition: "all ease-in-out 0.25s",
transform: `translateX(${width}px)`,
- };
+ }
}
return {
transform: "translateX(0)",
- };
+ }
},
@@ -109,7 +109,7 @@ export default {
height: this.beatHeight + "px",
margin: this.beatMargin + "px",
"--hover-scale": this.hoverScale,
- };
+ }
},
},
@@ -120,7 +120,7 @@ export default {
setTimeout(() => {
this.move = false;
- }, 300);
+ }, 300)
},
deep: true,
},
@@ -162,7 +162,7 @@ export default {
methods: {
resize() {
if (this.$refs.wrap) {
- this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2));
+ this.maxBeat = Math.floor(this.$refs.wrap.clientWidth / (this.beatWidth + this.beatMargin * 2))
}
},
@@ -170,7 +170,7 @@ export default {
return `${this.$root.datetime(beat.time)} - ${beat.msg}`;
}
},
-};
+}