diff --git a/package-lock.json b/package-lock.json index 100cdcd88..328b1d287 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "uptime-kuma", - "version": "2.0.0-dev", + "version": "2.0.0-beta.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "uptime-kuma", - "version": "2.0.0-dev", + "version": "2.0.0-beta.0", "license": "MIT", "dependencies": { "@grpc/grpc-js": "~1.8.22", diff --git a/server/database.js b/server/database.js index 3b7646de8..0e6a7405d 100644 --- a/server/database.js +++ b/server/database.js @@ -892,11 +892,13 @@ class Database { AND important = 0 AND time < ${sqlHourOffset} AND id NOT IN ( - SELECT id - FROM heartbeat - WHERE monitor_id = ? - ORDER BY time DESC - LIMIT ? + SELECT id FROM ( -- written this way for Maria's support + SELECT id + FROM heartbeat + WHERE monitor_id = ? + ORDER BY time DESC + LIMIT ? + ) AS limited_ids ) `, [ monitor.id, diff --git a/server/routers/status-page-router.js b/server/routers/status-page-router.js index b209d33d1..893f57564 100644 --- a/server/routers/status-page-router.js +++ b/server/routers/status-page-router.js @@ -15,11 +15,13 @@ const server = UptimeKumaServer.getInstance(); router.get("/status/:slug", cache("5 minutes"), async (request, response) => { let slug = request.params.slug; + slug = slug.toLowerCase(); await StatusPage.handleStatusPageResponse(response, server.indexHTML, slug); }); router.get("/status/:slug/rss", cache("5 minutes"), async (request, response) => { let slug = request.params.slug; + slug = slug.toLowerCase(); await StatusPage.handleStatusPageRSSResponse(response, slug); }); @@ -37,6 +39,7 @@ router.get("/status-page", cache("5 minutes"), async (request, response) => { router.get("/api/status-page/:slug", cache("5 minutes"), async (request, response) => { allowDevAllOrigin(response); let slug = request.params.slug; + slug = slug.toLowerCase(); try { // Get Status Page @@ -69,6 +72,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques let uptimeList = {}; let slug = request.params.slug; + slug = slug.toLowerCase(); let statusPageID = await StatusPage.slugToID(slug); let monitorIDList = await R.getCol(` @@ -111,6 +115,7 @@ router.get("/api/status-page/heartbeat/:slug", cache("1 minutes"), async (reques router.get("/api/status-page/:slug/manifest.json", cache("1440 minutes"), async (request, response) => { allowDevAllOrigin(response); let slug = request.params.slug; + slug = slug.toLowerCase(); try { // Get Status Page @@ -145,7 +150,8 @@ router.get("/api/status-page/:slug/manifest.json", cache("1440 minutes"), async // overall status-page status badge router.get("/api/status-page/:slug/badge", cache("5 minutes"), async (request, response) => { allowDevAllOrigin(response); - const slug = request.params.slug; + let slug = request.params.slug; + slug = slug.toLowerCase(); const statusPageID = await StatusPage.slugToID(slug); const { label, diff --git a/server/socket-handlers/status-page-socket-handler.js b/server/socket-handlers/status-page-socket-handler.js index cbcc52b8f..1114d81fd 100644 --- a/server/socket-handlers/status-page-socket-handler.js +++ b/server/socket-handlers/status-page-socket-handler.js @@ -292,6 +292,7 @@ module.exports.statusPageSocketHandler = (socket) => { ok: true, msg: "successAdded", msgi18n: true, + slug: slug }); } catch (error) { diff --git a/src/assets/app.scss b/src/assets/app.scss index 28eeca87c..6ddc99dec 100644 --- a/src/assets/app.scss +++ b/src/assets/app.scss @@ -619,7 +619,7 @@ $shadow-box-padding: 20px; bottom: 0; margin-left: -$shadow-box-padding; margin-right: -$shadow-box-padding; - z-index: 100; + z-index: 10; background-color: rgba(white, 0.2); backdrop-filter: blur(2px); border-radius: 0 0 10px 10px; diff --git a/src/pages/AddStatusPage.vue b/src/pages/AddStatusPage.vue index bae61449c..b35091cc2 100644 --- a/src/pages/AddStatusPage.vue +++ b/src/pages/AddStatusPage.vue @@ -16,14 +16,11 @@
/status/ - +