From 2818ce89affefd3c8db6cd36094de8b705bc354c Mon Sep 17 00:00:00 2001
From: YinDongfang <1136005348@qq.com>
Date: Sun, 26 Jan 2025 22:32:04 +0800
Subject: [PATCH 1/5] Adjust count box style
---
Client/src/Pages/Infrastructure/index.jsx | 2 +-
Client/src/Pages/PageSpeed/index.jsx | 10 ++++++++--
Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx | 2 +-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/Client/src/Pages/Infrastructure/index.jsx b/Client/src/Pages/Infrastructure/index.jsx
index fbfae6a3c..e39d92347 100644
--- a/Client/src/Pages/Infrastructure/index.jsx
+++ b/Client/src/Pages/Infrastructure/index.jsx
@@ -243,7 +243,7 @@ function Infrastructure() {
backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
- borderRadius: "50%",
+ borderRadius: "calc(infinity * 1px)",
fontSize: "12px",
fontWeight: 500,
}}
diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx
index c15ed5296..7fb45d479 100644
--- a/Client/src/Pages/PageSpeed/index.jsx
+++ b/Client/src/Pages/PageSpeed/index.jsx
@@ -106,9 +106,15 @@ const PageSpeed = () => {
component="span"
className="current-monitors-counter"
color={theme.palette.primary.contrastText}
- border={1}
- borderColor={theme.palette.primary.lowContrast}
+ border={2}
+ borderColor={theme.palette.accent.main}
backgroundColor={theme.palette.tertiary.main}
+ sx={{
+ padding: ".25em .75em",
+ borderRadius: "calc(infinity * 1px)",
+ fontSize: "12px",
+ fontWeight: 500,
+ }}
>
{summary?.totalMonitors ?? 0}
diff --git a/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx b/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
index 6961c6d5c..e108f6904 100644
--- a/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
+++ b/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
@@ -234,7 +234,7 @@ const UptimeDataTable = ({
backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
- borderRadius: "50%",
+ borderRadius: "calc(infinity * 1px)",
fontSize: "12px",
fontWeight: 500,
}}
From 086a900613b838fb9bec5bde35b5ac9fe6bf9a25 Mon Sep 17 00:00:00 2001
From: YinDongfang <1136005348@qq.com>
Date: Sun, 26 Jan 2025 22:48:45 +0800
Subject: [PATCH 2/5] Fix Error Component Stack
---
Client/src/Pages/Infrastructure/index.jsx | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/Client/src/Pages/Infrastructure/index.jsx b/Client/src/Pages/Infrastructure/index.jsx
index e39d92347..0246537df 100644
--- a/Client/src/Pages/Infrastructure/index.jsx
+++ b/Client/src/Pages/Infrastructure/index.jsx
@@ -137,13 +137,11 @@ function Infrastructure() {
id: "actions",
content: "Actions",
render: (row) => (
-
-
-
+
),
},
];
From 000bb9929cfce4da1c366931e053d11185b04fb7 Mon Sep 17 00:00:00 2001
From: YinDongfang <1136005348@qq.com>
Date: Sun, 26 Jan 2025 23:05:18 +0800
Subject: [PATCH 3/5] Fix sidebar sticky error
---
Client/src/Pages/Infrastructure/Details/index.jsx | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Client/src/Pages/Infrastructure/Details/index.jsx b/Client/src/Pages/Infrastructure/Details/index.jsx
index acd1bafb1..a4270297d 100644
--- a/Client/src/Pages/Infrastructure/Details/index.jsx
+++ b/Client/src/Pages/Infrastructure/Details/index.jsx
@@ -625,8 +625,7 @@ const InfrastructureDetails = () => {
Date: Mon, 27 Jan 2025 08:21:46 +0800
Subject: [PATCH 4/5] Use 10000px instead of infinity
---
Client/src/Pages/Infrastructure/index.jsx | 2 +-
Client/src/Pages/PageSpeed/index.jsx | 2 +-
Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Client/src/Pages/Infrastructure/index.jsx b/Client/src/Pages/Infrastructure/index.jsx
index 0246537df..f9abb16f3 100644
--- a/Client/src/Pages/Infrastructure/index.jsx
+++ b/Client/src/Pages/Infrastructure/index.jsx
@@ -241,7 +241,7 @@ function Infrastructure() {
backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
- borderRadius: "calc(infinity * 1px)",
+ borderRadius: "10000px",
fontSize: "12px",
fontWeight: 500,
}}
diff --git a/Client/src/Pages/PageSpeed/index.jsx b/Client/src/Pages/PageSpeed/index.jsx
index 7fb45d479..c3d37e2c0 100644
--- a/Client/src/Pages/PageSpeed/index.jsx
+++ b/Client/src/Pages/PageSpeed/index.jsx
@@ -111,7 +111,7 @@ const PageSpeed = () => {
backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
- borderRadius: "calc(infinity * 1px)",
+ borderRadius: "10000px",
fontSize: "12px",
fontWeight: 500,
}}
diff --git a/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx b/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
index e108f6904..29d276159 100644
--- a/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
+++ b/Client/src/Pages/Uptime/Home/UptimeDataTable/index.jsx
@@ -234,7 +234,7 @@ const UptimeDataTable = ({
backgroundColor={theme.palette.tertiary.main}
sx={{
padding: ".25em .75em",
- borderRadius: "calc(infinity * 1px)",
+ borderRadius: "10000px",
fontSize: "12px",
fontWeight: 500,
}}
From e19dffb186d61594732a1ed56687275cb4003d3c Mon Sep 17 00:00:00 2001
From: YinDongfang <1136005348@qq.com>
Date: Mon, 27 Jan 2025 12:50:53 +0800
Subject: [PATCH 5/5] Fix infrastructure white page error cause by theme color
---
Client/src/Pages/Infrastructure/index.jsx | 14 ++++++--------
Client/src/Pages/Uptime/Home/index.jsx | 4 +---
2 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/Client/src/Pages/Infrastructure/index.jsx b/Client/src/Pages/Infrastructure/index.jsx
index f9abb16f3..869d0d13c 100644
--- a/Client/src/Pages/Infrastructure/index.jsx
+++ b/Client/src/Pages/Infrastructure/index.jsx
@@ -156,14 +156,12 @@ function Infrastructure() {
const uptimePercentage = ((monitor?.uptimePercentage ?? 0) * 100)
.toFixed(2)
.toString();
- const percentageColor =
- monitor.uptimePercentage < 0.25
- ? theme.palette.error.main
- : monitor.uptimePercentage < 0.5
- ? theme.palette.percentage.uptimeFair
- : monitor.uptimePercentage < 0.75
- ? theme.palette.percentage.uptimeGood
- : theme.palette.success.lowContrast;
+ const percentageColor = monitor.uptimePercentage < 0.25
+ ? theme.palette.error.main
+ : monitor.uptimePercentage < 0.5
+ ? theme.palette.warning.main
+ : theme.palette.success.main;
+
return {
id: monitor._id,
name: monitor.name,
diff --git a/Client/src/Pages/Uptime/Home/index.jsx b/Client/src/Pages/Uptime/Home/index.jsx
index 446702ebb..ae4213a7f 100644
--- a/Client/src/Pages/Uptime/Home/index.jsx
+++ b/Client/src/Pages/Uptime/Home/index.jsx
@@ -71,9 +71,7 @@ const UptimeMonitors = () => {
? theme.palette.error.main
: monitor.uptimePercentage < 0.5
? theme.palette.warning.main
- : monitor.uptimePercentage < 0.75
- ? theme.palette.success.main
- : theme.palette.success.main;
+ : theme.palette.success.main;
}
return {