Merge pull request #719 from bluewave-labs/feat/dashboard-monitors
Monitors dashboard
This commit is contained in:
15 files changed
+348
-132
No files matched your search
@@ -5,8 +5,7 @@
|
||||
white-space: nowrap;
|
||||
}
|
||||
.MuiTable-root .host span {
|
||||
font-size: var(--env-var-font-size-small);
|
||||
margin-left: 8px;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.MuiTable-root .label {
|
||||
@@ -180,3 +179,16 @@ body:has(.pagination-dropdown) p:has(+ .MuiTablePagination-root) {
|
||||
body:has(.pagination-dropdown) p:has(+ .MuiTablePagination-root) {
|
||||
font-size: var(--env-var-font-size-small-plus);
|
||||
}
|
||||
|
||||
.monitors .MuiTable-root .MuiTableHead-root .MuiTableCell-root {
|
||||
text-transform: uppercase;
|
||||
color: var(--env-var-color-5);
|
||||
opacity: 0.8;
|
||||
font-size: var(--env-var-font-size-small-plus);
|
||||
font-weight: 400;
|
||||
}
|
||||
.monitors .MuiTableCell-root:not(:first-of-type):not(:last-of-type),
|
||||
.monitors .MuiTableCell-root:not(:first-of-type):not(:last-of-type) {
|
||||
padding-left: var(--env-var-spacing-1);
|
||||
padding-right: var(--env-var-spacing-1);
|
||||
}
|
||||
@@ -233,6 +233,7 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
|
||||
direction="row"
|
||||
alignItems="center"
|
||||
justifyContent="space-between"
|
||||
px={theme.gap.small}
|
||||
>
|
||||
<Typography sx={{ opacity: 0.7 }}>
|
||||
Showing {getRange()} of {data.rows.length} monitor(s)
|
||||
@@ -277,7 +278,10 @@ const BasicTable = ({ data, paginated, reversed, table }) => {
|
||||
},
|
||||
},
|
||||
}}
|
||||
sx={{ mt: theme.gap.medium }}
|
||||
sx={{
|
||||
mt: theme.gap.medium,
|
||||
color: theme.palette.otherColors.bluishGray,
|
||||
}}
|
||||
/>
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
import React from "react";
|
||||
import "./serverStatus.css";
|
||||
import PropTypes from "prop-types";
|
||||
|
||||
/**
|
||||
* @component
|
||||
* @param {Object} props
|
||||
* @param {string} props.title - The title text for the server status (required)
|
||||
* @param {number} props.value - The value text to be displayed (required)
|
||||
* @param {string} props.state - The state of the server (e.g., "online", "offline", "warning") (required)
|
||||
* @returns {JSX.Element} - Renders the server status component
|
||||
*/
|
||||
const 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>
|
||||
);
|
||||
};
|
||||
|
||||
ServerStatus.propTypes = {
|
||||
title: PropTypes.string.isRequired,
|
||||
value: PropTypes.number.isRequired,
|
||||
state: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
export default ServerStatus;
|
||||
@@ -1,46 +0,0 @@
|
||||
:root {
|
||||
--spacing-general-0: 12px 18px;
|
||||
--spacing-general-1: 20px;
|
||||
--color-border-0: #eaecf0;
|
||||
--border-radius-0: 4px;
|
||||
--font-size-0: 1rem;
|
||||
--font-size-2: 36px;
|
||||
|
||||
--color-up: #17b26a;
|
||||
--color-down: #f04438;
|
||||
--color-pause: #fdb022;
|
||||
}
|
||||
|
||||
.server-status-tile {
|
||||
min-width: 100px;
|
||||
width: calc(100% - 310px);
|
||||
padding: var(--spacing-general-0);
|
||||
border: 1px solid var(--color-border-0);
|
||||
border-radius: var(--border-radius-0);
|
||||
background-color: var(--env-var-color-8);
|
||||
}
|
||||
|
||||
.server-status-tile-title {
|
||||
font-size: var(--font-size-0);
|
||||
font-weight: 500;
|
||||
margin-bottom: calc(var(--spacing-general-1) / 2);
|
||||
color: var(--env-var-color-5);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.server-status-tile-value {
|
||||
font-size: var(--font-size-2);
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.up {
|
||||
color: var(--color-up);
|
||||
}
|
||||
|
||||
.down {
|
||||
color: var(--color-down);
|
||||
}
|
||||
|
||||
.pause {
|
||||
color: var(--color-pause);
|
||||
}
|
||||
@@ -15,6 +15,9 @@ aside span.MuiTypography-root {
|
||||
font-size: var(--env-var-font-size-medium);
|
||||
line-height: 1;
|
||||
}
|
||||
aside .MuiStack-root + span.MuiTypography-root {
|
||||
font-size: var(--env-var-font-size-medium-plus);
|
||||
}
|
||||
aside .MuiListSubheader-root {
|
||||
font-size: var(--env-var-font-size-small);
|
||||
font-weight: 500;
|
||||
|
||||
@@ -194,6 +194,7 @@ function Sidebar() {
|
||||
sx={{
|
||||
pt: theme.gap.small,
|
||||
px: collapsed ? theme.gap.xs : theme.gap.small,
|
||||
backgroundColor: "transparent"
|
||||
}}
|
||||
>
|
||||
Menu
|
||||
@@ -394,6 +395,7 @@ function Sidebar() {
|
||||
sx={{
|
||||
pt: theme.gap.small,
|
||||
px: collapsed ? 0 : theme.gap.small,
|
||||
backgroundColor: "transparent"
|
||||
}}
|
||||
>
|
||||
Other
|
||||
|
||||
Reference in new issue
Block a user