mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-26 19:21:58 -06:00
Adjusted Device List design and column widths
This commit is contained in:
@@ -782,7 +782,7 @@ export default function DeviceList({
|
|||||||
py: 0.35,
|
py: 0.35,
|
||||||
borderRadius: 999,
|
borderRadius: 999,
|
||||||
bgcolor: statusColor(status),
|
bgcolor: statusColor(status),
|
||||||
color: "#fff",
|
color: "#000",
|
||||||
fontWeight: 600,
|
fontWeight: 600,
|
||||||
fontSize: "13px",
|
fontSize: "13px",
|
||||||
lineHeight: 1,
|
lineHeight: 1,
|
||||||
@@ -822,71 +822,91 @@ export default function DeviceList({
|
|||||||
field: "status",
|
field: "status",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
cellRenderer: statusCellRenderer,
|
cellRenderer: statusCellRenderer,
|
||||||
width: 140,
|
width: 100,
|
||||||
minWidth: 140,
|
minWidth: 100,
|
||||||
flex: 0,
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "agentVersion":
|
case "agentVersion":
|
||||||
return {
|
return {
|
||||||
field: "agentVersion",
|
field: "agentVersion",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 160,
|
width: 140,
|
||||||
|
minWidth: 150,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "site":
|
case "site":
|
||||||
return {
|
return {
|
||||||
field: "site",
|
field: "site",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
valueGetter: (params) => params.data?.site || "Not Configured",
|
valueGetter: (params) => params.data?.site || "Not Configured",
|
||||||
minWidth: 180,
|
width: 170,
|
||||||
|
minWidth: 170,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "hostname":
|
case "hostname":
|
||||||
return {
|
return {
|
||||||
field: "hostname",
|
field: "hostname",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
cellRenderer: hostnameCellRenderer,
|
cellRenderer: hostnameCellRenderer,
|
||||||
minWidth: 220,
|
width: 210,
|
||||||
|
minWidth: 210,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "description":
|
case "description":
|
||||||
return {
|
return {
|
||||||
field: "description",
|
field: "description",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 220,
|
width: 280,
|
||||||
|
minWidth: 280,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "lastUser":
|
case "lastUser":
|
||||||
return {
|
return {
|
||||||
field: "lastUser",
|
field: "lastUser",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 160,
|
width: 220,
|
||||||
|
minWidth: 220,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "type":
|
case "type":
|
||||||
return {
|
return {
|
||||||
field: "type",
|
field: "type",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 140,
|
width: 170,
|
||||||
|
minWidth: 170,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "os":
|
case "os":
|
||||||
return {
|
return {
|
||||||
field: "os",
|
field: "os",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 200,
|
width: 410,
|
||||||
|
minWidth: 410,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "internalIp":
|
case "internalIp":
|
||||||
return {
|
return {
|
||||||
field: "internalIp",
|
field: "internalIp",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 160,
|
width: 140,
|
||||||
|
minWidth: 140,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "externalIp":
|
case "externalIp":
|
||||||
return {
|
return {
|
||||||
field: "externalIp",
|
field: "externalIp",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 160,
|
width: 140,
|
||||||
|
minWidth: 140,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "lastReboot":
|
case "lastReboot":
|
||||||
return {
|
return {
|
||||||
field: "lastReboot",
|
field: "lastReboot",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 200,
|
width: 180,
|
||||||
|
minWidth: 180,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "created":
|
case "created":
|
||||||
return {
|
return {
|
||||||
@@ -896,7 +916,9 @@ export default function DeviceList({
|
|||||||
formatCreated(params.data?.created, params.data?.createdTs),
|
formatCreated(params.data?.created, params.data?.createdTs),
|
||||||
comparator: (a, b, nodeA, nodeB) =>
|
comparator: (a, b, nodeA, nodeB) =>
|
||||||
(nodeA?.data?.createdTs || 0) - (nodeB?.data?.createdTs || 0),
|
(nodeA?.data?.createdTs || 0) - (nodeB?.data?.createdTs || 0),
|
||||||
minWidth: 220,
|
width: 200,
|
||||||
|
minWidth: 200,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "lastSeen":
|
case "lastSeen":
|
||||||
return {
|
return {
|
||||||
@@ -905,31 +927,41 @@ export default function DeviceList({
|
|||||||
valueGetter: (params) => formatLastSeen(params.data?.lastSeen),
|
valueGetter: (params) => formatLastSeen(params.data?.lastSeen),
|
||||||
comparator: (a, b, nodeA, nodeB) =>
|
comparator: (a, b, nodeA, nodeB) =>
|
||||||
(nodeA?.data?.lastSeen || 0) - (nodeB?.data?.lastSeen || 0),
|
(nodeA?.data?.lastSeen || 0) - (nodeB?.data?.lastSeen || 0),
|
||||||
minWidth: 220,
|
width: 200,
|
||||||
|
minWidth: 200,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "agentId":
|
case "agentId":
|
||||||
return {
|
return {
|
||||||
field: "agentId",
|
field: "agentId",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 200,
|
width: 290,
|
||||||
|
minWidth: 290,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "agentHash":
|
case "agentHash":
|
||||||
return {
|
return {
|
||||||
field: "agentHash",
|
field: "agentHash",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 220,
|
width: 365,
|
||||||
|
minWidth: 365,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "agentGuid":
|
case "agentGuid":
|
||||||
return {
|
return {
|
||||||
field: "agentGuid",
|
field: "agentGuid",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 240,
|
width: 345,
|
||||||
|
minWidth: 345,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "domain":
|
case "domain":
|
||||||
return {
|
return {
|
||||||
field: "domain",
|
field: "domain",
|
||||||
headerName: col.label,
|
headerName: col.label,
|
||||||
minWidth: 180,
|
width: 160,
|
||||||
|
minWidth: 160,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "uptime":
|
case "uptime":
|
||||||
return {
|
return {
|
||||||
@@ -940,7 +972,9 @@ export default function DeviceList({
|
|||||||
formatUptime(params.data?.uptime || 0),
|
formatUptime(params.data?.uptime || 0),
|
||||||
comparator: (a, b, nodeA, nodeB) =>
|
comparator: (a, b, nodeA, nodeB) =>
|
||||||
(nodeA?.data?.uptime || 0) - (nodeB?.data?.uptime || 0),
|
(nodeA?.data?.uptime || 0) - (nodeB?.data?.uptime || 0),
|
||||||
minWidth: 160,
|
width: 140,
|
||||||
|
minWidth: 140,
|
||||||
|
flex: 0,
|
||||||
};
|
};
|
||||||
case "memory":
|
case "memory":
|
||||||
case "network":
|
case "network":
|
||||||
@@ -1021,7 +1055,7 @@ export default function DeviceList({
|
|||||||
return (
|
return (
|
||||||
<Paper
|
<Paper
|
||||||
sx={{
|
sx={{
|
||||||
m: 0,
|
m: 2,
|
||||||
p: 0,
|
p: 0,
|
||||||
bgcolor: "#1e1e1e",
|
bgcolor: "#1e1e1e",
|
||||||
fontFamily: gridFontFamily,
|
fontFamily: gridFontFamily,
|
||||||
@@ -1171,7 +1205,8 @@ export default function DeviceList({
|
|||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ px: 2, pb: 2, flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }}>
|
{/* The Size of the Grid itself and its margins relative to the overall page */}
|
||||||
|
<Box sx={{ mt: '10px', px: 2, pb: 2, flexGrow: 1, minHeight: 0, display: "flex", flexDirection: "column" }}>
|
||||||
<Box
|
<Box
|
||||||
className={gridWrapperClass}
|
className={gridWrapperClass}
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
Reference in New Issue
Block a user