diff --git a/.dockerignore b/.dockerignore index 0bc56885..9a6cbc98 100644 --- a/.dockerignore +++ b/.dockerignore @@ -34,8 +34,9 @@ tsconfig.json /ecosystem.config.js /extra/healthcheck.exe /extra/healthcheck -extra/exe-builder - +/extra/exe-builder +/extra/push-examples +/extra/uptime-kuma-push ### .gitignore content (commented rules are duplicated) diff --git a/package.json b/package.json index 4814da6a..2f0348e0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uptime-kuma", - "version": "1.23.1", + "version": "1.23.2", "license": "MIT", "repository": { "type": "git", @@ -42,7 +42,7 @@ "build-docker-nightly-local": "npm run build && docker build -f docker/dockerfile -t louislam/uptime-kuma:nightly2 --target nightly .", "build-docker-pr-test": "docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64 -t louislam/uptime-kuma:pr-test2 --target pr-test2 . --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.23.1 && npm ci --production && npm run download-dist", + "setup": "git checkout 1.23.2 && 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", @@ -57,6 +57,7 @@ "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", "update-language-files": "cd extra/update-language-files && node index.js && cross-env-shell eslint ../../src/languages/$npm_config_language.js --fix", "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", "release-beta": "node ./extra/test-docker.js && node extra/beta/update-version.js && npm run build && node ./extra/env2arg.js docker buildx build -f docker/dockerfile --platform linux/amd64,linux/arm64,linux/arm/v7 -t louislam/uptime-kuma:$VERSION -t louislam/uptime-kuma:beta . --target release --push && node ./extra/press-any-key.js && npm run upload-artifacts", @@ -111,7 +112,7 @@ "knex": "^2.4.2", "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", @@ -163,7 +164,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", diff --git a/server/model/monitor.js b/server/model/monitor.js index 58c3f5eb..adeeab83 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -56,7 +56,7 @@ class Monitor extends BeanModel { obj.tags = await this.getTags(); } - if (certExpiry && this.type === "http") { + if (certExpiry && this.type === "http" && this.getURLProtocol() === "https:") { const { certExpiryDaysRemaining, validCert } = await this.getCertExpiry(this.id); obj.certExpiryDaysRemaining = certExpiryDaysRemaining; obj.validCert = validCert; @@ -1057,6 +1057,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 {object} checkCertificateResult Certificate to update diff --git a/server/server.js b/server/server.js index 5bded809..b4762ec6 100644 --- a/server/server.js +++ b/server/server.js @@ -761,11 +761,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; @@ -836,7 +836,7 @@ let needSetup = false; await updateMonitorNotification(bean.id, monitor.notificationIDList); - if (bean.isActive()) { + if (await bean.isActive()) { await restartMonitor(socket.userID, bean.id); } diff --git a/src/components/HeartbeatBar.vue b/src/components/HeartbeatBar.vue index d7069ffd..324641cd 100644 --- a/src/components/HeartbeatBar.vue +++ b/src/components/HeartbeatBar.vue @@ -11,7 +11,7 @@ />
{{ timeSinceFirstBeat }} ago
diff --git a/src/components/PublicGroupList.vue b/src/components/PublicGroupList.vue index ce0a645b..ec758682 100644 --- a/src/components/PublicGroupList.vue +++ b/src/components/PublicGroupList.vue @@ -62,7 +62,7 @@
-
+
diff --git a/src/pages/EditMonitor.vue b/src/pages/EditMonitor.vue index f59a2d57..46e82e7b 100644 --- a/src/pages/EditMonitor.vue +++ b/src/pages/EditMonitor.vue @@ -82,7 +82,7 @@ - @@ -401,7 +401,7 @@
-
+
@@ -460,7 +460,7 @@
-