Removed AdminLTE, some minor improvements

This commit is contained in:
2024-05-02 14:16:04 +02:00
parent 163ef9fbfe
commit fb353d1bc8
36 changed files with 916 additions and 873 deletions

View File

@@ -425,4 +425,9 @@ export default class API {
since: since, severity: severity, query: query
});
}
/** Redis **/
async testRedis() {
return this.apiCall("testRedis");
}
};

View File

@@ -6,6 +6,7 @@ import {Box, Button, Select, TextField, Table, TableBody, TableCell, TableHead,
import {formatDate, formatDateTime} from "../util";
import {isNumber} from "chart.js/helpers";
import {ArrowUpward, ArrowDownward, Refresh} from "@mui/icons-material";
import TableBodyStriped from "./table-body-striped";
export function DataTable(props) {
@@ -135,9 +136,9 @@ export function DataTable(props) {
{ headerRow }
</TableRow>
</TableHead>
<TableBody>
<TableBodyStriped>
{ rows }
</TableBody>
</TableBodyStriped>
</Table>
{pagination && pagination.renderPagination(L, numRows)}
</Box>

View File

@@ -1,24 +0,0 @@
import React from 'react';
export default function Icon(props) {
let classes = props.className || [];
classes = Array.isArray(classes) ? classes : classes.toString().split(" ");
let type = props.type || "fas";
let icon = props.icon;
classes.push(type);
classes.push("fa-" + icon);
if (icon === "spinner" || icon === "circle-notch") {
classes.push("fa-spin");
}
let newProps = {...props, className: classes.join(" ") };
delete newProps["type"];
delete newProps["icon"];
return (
<i {...newProps} />
);
}

View File

@@ -0,0 +1,12 @@
import {styled, TableBody} from "@mui/material";
const TableBodyStriped = styled(TableBody)(({ theme }) => ({
'& tr:nth-of-type(odd)': {
backgroundColor: theme.palette.grey[0],
},
'& tr:nth-of-type(even)': {
backgroundColor: theme.palette.grey[100],
},
}));
export default TableBodyStriped;