charts user interface implementation completed
This commit is contained in:
1 parent
c8deddd858
commit
8921bffcd9
5 files changed
+75
-4
No files matched your search
@@ -0,0 +1,13 @@
|
|||||||
|
import React from "react";
|
||||||
|
import "./serverStatus.css";
|
||||||
|
|
||||||
|
function ServerStatus({ title, value, state }) {
|
||||||
|
return (
|
||||||
|
<div className="server-status-tile">
|
||||||
|
<div className="server-status-tile-title">{title}</div>
|
||||||
|
<div className={`server-status-tile-value ` + " " + state}>{value}</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ServerStatus;
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
:root {
|
:root {
|
||||||
--spacing-general-0: 5px 10px;
|
--stats-spacing-general-0: 5px 10px;
|
||||||
--color-border-0: #eaecf0;
|
--color-border-0: #eaecf0;
|
||||||
--border-radius-0: 4px;
|
--border-radius-0: 4px;
|
||||||
--font-size-0: 1rem;
|
--font-size-0: 1rem;
|
||||||
@@ -10,8 +10,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.statistic-tile {
|
.statistic-tile {
|
||||||
margin: var(--spacing-general-0);
|
margin: var(--stats-spacing-general-0);
|
||||||
padding: var(--spacing-general-0);
|
padding: var(--stats-spacing-general-0);
|
||||||
border: 1px solid var(--color-border-0);
|
border: 1px solid var(--color-border-0);
|
||||||
border-radius: var(--border-radius-0);
|
border-radius: var(--border-radius-0);
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
.statistic-tile-value {
|
.statistic-tile-value {
|
||||||
font-size: var(--font-size-1);
|
font-size: var(--font-size-1);
|
||||||
font-family: var(--font-family-0);
|
font-family: var(--font-family-0);
|
||||||
font-weight: 500;
|
color: var(--font-color-0);
|
||||||
|
font-weight: 700;
|
||||||
margin-bottom: var(--margin-bottom-0);
|
margin-bottom: var(--margin-bottom-0);
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import "./playGround.css";
|
import "./playGround.css";
|
||||||
import Statistic from "../../components/Charts/Statistics/Statistic";
|
import Statistic from "../../components/Charts/Statistics/Statistic";
|
||||||
|
import ServerStatus from "../../components/Charts/Servers/ServerStatus";
|
||||||
|
|
||||||
function PlayGroundCharts() {
|
function PlayGroundCharts() {
|
||||||
return (
|
return (
|
||||||
@@ -11,6 +12,12 @@ function PlayGroundCharts() {
|
|||||||
<Statistic title="Incidents" value="2" />
|
<Statistic title="Incidents" value="2" />
|
||||||
<Statistic title="Certificate expiry" value="284 days" />
|
<Statistic title="Certificate expiry" value="284 days" />
|
||||||
</div>
|
</div>
|
||||||
|
<div className="play-ground-charts-spacing" />
|
||||||
|
<div className="play-ground-charts">
|
||||||
|
<ServerStatus title="Up" value="4" state="up" />
|
||||||
|
<ServerStatus title="Down" value="0" state="down" />
|
||||||
|
<ServerStatus title="Paused" value="0" state="pause" />
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
.play-ground-charts {
|
.play-ground-charts {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.play-ground-charts-spacing {
|
||||||
|
height: 110px;
|
||||||
|
}
|
||||||
Reference in new issue
Block a user