fix: remove scrollbar from table and remove greeting from infratructure page

This commit is contained in:
Caio Cabral committed 2024-11-29 10:38:31 -05:00
1 parent 5ad2df1d84
commit a04d81d6a6
1 file changed
+7 -22
+7 -22
View File
@@ -4,7 +4,6 @@ import { /* useDispatch, */ useSelector } from "react-redux";
import { useTheme } from "@emotion/react"; import { useTheme } from "@emotion/react";
import useUtils from "../Monitors/utils"; import useUtils from "../Monitors/utils";
import { jwtDecode } from "jwt-decode"; import { jwtDecode } from "jwt-decode";
import Greeting from "../../Utils/greeting";
import GearIcon from "../../Assets/icons/settings-bold.svg?react"; import GearIcon from "../../Assets/icons/settings-bold.svg?react";
import CPUChipIcon from "../../Assets/icons/cpu-chip.svg?react"; import CPUChipIcon from "../../Assets/icons/cpu-chip.svg?react";
import { import {
@@ -133,8 +132,7 @@ function Infrastructure(/* {isAdmin} */) {
mem: monitor?.checks[0]?.memory.usage_percent * 100, mem: monitor?.checks[0]?.memory.usage_percent * 100,
disk: monitor?.checks[0]?.disk[0]?.usage_percent * 100, disk: monitor?.checks[0]?.disk[0]?.usage_percent * 100,
})); }));
/* TODO when friendyly name i added, it shoul display frindly name + url */
/* TODO remove table scrollbar */
/* Fix search in monitors page */ /* Fix search in monitors page */
/* Adding actions to the table */ /* Adding actions to the table */
/* Adding click on row action */ /* Adding click on row action */
@@ -148,16 +146,18 @@ function Infrastructure(/* {isAdmin} */) {
<Stack <Stack
direction="row" direction="row"
sx={{ sx={{
justifyContent: "space-between", justifyContent: "end",
alignItems: "center", alignItems: "center",
gap: "1rem", gap: "1rem",
flexWrap: "wrap", flexWrap: "wrap",
marginBottom: "3rem", marginBottom: "2rem",
}} }}
> >
{/*
This will be removed from here, but keeping the commented code to remind me to add a max width to the greeting component
<Box style={{ maxWidth: "65ch" }}> <Box style={{ maxWidth: "65ch" }}>
<Greeting type="uptime" /> <Greeting type="uptime" />
</Box> </Box> */}
<Button <Button
variant="contained" variant="contained"
color="primary" color="primary"
@@ -193,22 +193,7 @@ function Infrastructure(/* {isAdmin} */) {
{totalMonitors} {totalMonitors}
</Box> </Box>
</Stack> </Stack>
<TableContainer <TableContainer component={Paper}>
component={Paper}
sx={{
maxHeight: "55vh",
"&::-webkit-scrollbar": {
width: ".75rem",
},
"&::-webkit-scrollbar-track": {
backgroundColor: theme.palette.secondary.light,
},
"&::-webkit-scrollbar-thumb": {
backgroundColor: theme.palette.secondary.contrastText,
outline: `1px solid ${theme.palette.secondary.contrastText}`,
},
}}
>
<Table stickyHeader> <Table stickyHeader>
<TableHead sx={{ backgroundColor: theme.palette.background.accent }}> <TableHead sx={{ backgroundColor: theme.palette.background.accent }}>
<TableRow> <TableRow>