From 8921bffcd9ac3e374ae6128425038192ca1c9697 Mon Sep 17 00:00:00 2001 From: MuhammadKhalilzadeh Date: Wed, 8 May 2024 13:35:16 +0330 Subject: [PATCH] charts user interface implementation completed --- .../Charts/Servers/ServerStatus.jsx | 13 ++++++ .../Charts/Servers/serverStatus.css | 46 +++++++++++++++++++ .../Charts/Statistics/statistic.css | 9 ++-- .../screens/PlayGround/PlayGround-Charts.jsx | 7 +++ Client/src/screens/PlayGround/playGround.css | 4 ++ 5 files changed, 75 insertions(+), 4 deletions(-) create mode 100644 Client/src/components/Charts/Servers/ServerStatus.jsx create mode 100644 Client/src/components/Charts/Servers/serverStatus.css diff --git a/Client/src/components/Charts/Servers/ServerStatus.jsx b/Client/src/components/Charts/Servers/ServerStatus.jsx new file mode 100644 index 000000000..5ca266d54 --- /dev/null +++ b/Client/src/components/Charts/Servers/ServerStatus.jsx @@ -0,0 +1,13 @@ +import React from "react"; +import "./serverStatus.css"; + +function ServerStatus({ title, value, state }) { + return ( +
+
{title}
+
{value}
+
+ ); +} + +export default ServerStatus; diff --git a/Client/src/components/Charts/Servers/serverStatus.css b/Client/src/components/Charts/Servers/serverStatus.css new file mode 100644 index 000000000..3fcb0780c --- /dev/null +++ b/Client/src/components/Charts/Servers/serverStatus.css @@ -0,0 +1,46 @@ +:root { + --spacing-general-0: 10px 25px; + --spacing-general-1: 20px; + --color-border-0: #eaecf0; + --border-radius-0: 4px; + --font-size-0: 1rem; + --font-size-2: 36px; + --font-family-0: "Roboto", "Helvetica", "Arial", sans-serif; + + --color-up: #17b26a; + --color-down: #f04438; + --color-pause: #fdb022; +} + +.server-status-tile { + width: 230px; + margin: var(--spacing-general-0); + padding: var(--spacing-general-1); + border: 1px solid var(--color-border-0); + border-radius: var(--border-radius-0); +} + +.server-status-tile-title { + font-size: var(--font-size-0); + font-family: var(--font-family-0); + font-weight: bold; + margin-bottom: 25px; +} + +.server-status-tile-value { + font-size: var(--font-size-2); + font-family: var(--font-family-0); + font-weight: bolder; +} + +.up { + color: var(--color-up); +} + +.down { + color: var(--color-down); +} + +.pause { + color: var(--color-pause); +} diff --git a/Client/src/components/Charts/Statistics/statistic.css b/Client/src/components/Charts/Statistics/statistic.css index ce1e4dc41..31b322d28 100644 --- a/Client/src/components/Charts/Statistics/statistic.css +++ b/Client/src/components/Charts/Statistics/statistic.css @@ -1,5 +1,5 @@ :root { - --spacing-general-0: 5px 10px; + --stats-spacing-general-0: 5px 10px; --color-border-0: #eaecf0; --border-radius-0: 4px; --font-size-0: 1rem; @@ -10,8 +10,8 @@ } .statistic-tile { - margin: var(--spacing-general-0); - padding: var(--spacing-general-0); + margin: var(--stats-spacing-general-0); + padding: var(--stats-spacing-general-0); border: 1px solid var(--color-border-0); border-radius: var(--border-radius-0); @@ -28,6 +28,7 @@ .statistic-tile-value { font-size: var(--font-size-1); font-family: var(--font-family-0); - font-weight: 500; + color: var(--font-color-0); + font-weight: 700; margin-bottom: var(--margin-bottom-0); } diff --git a/Client/src/screens/PlayGround/PlayGround-Charts.jsx b/Client/src/screens/PlayGround/PlayGround-Charts.jsx index 7c975829d..cf0b9dd7e 100644 --- a/Client/src/screens/PlayGround/PlayGround-Charts.jsx +++ b/Client/src/screens/PlayGround/PlayGround-Charts.jsx @@ -1,6 +1,7 @@ import React from "react"; import "./playGround.css"; import Statistic from "../../components/Charts/Statistics/Statistic"; +import ServerStatus from "../../components/Charts/Servers/ServerStatus"; function PlayGroundCharts() { return ( @@ -11,6 +12,12 @@ function PlayGroundCharts() { +
+
+ + + +
); } diff --git a/Client/src/screens/PlayGround/playGround.css b/Client/src/screens/PlayGround/playGround.css index 0dac2ae31..c5b86268c 100644 --- a/Client/src/screens/PlayGround/playGround.css +++ b/Client/src/screens/PlayGround/playGround.css @@ -1,3 +1,7 @@ .play-ground-charts { display: flex; } + +.play-ground-charts-spacing { + height: 110px; +}