fixed datadog logs formatting

This commit is contained in:
Carter 2025-04-23 12:14:09 -06:00
parent eb7efada69
commit 9cc0f78636
5 changed files with 18 additions and 18 deletions

View file

@ -55,20 +55,22 @@ export default function LogCard(props: Props) {
const lineSummary = () => { const lineSummary = () => {
return ( return (
<Grid container direction="row" justifyContent="space-around" alignContent="center"> <Grid container direction="row" alignItems="left" spacing={1}>
<Grid size={2}> <Grid size={{ xs: 2.2 }} >
{moment(log.timestamp).format("MMM Do, h:mm:ss a")} {moment(log.timestamp).format("MMM Do, h:mm:ss a")}
</Grid> </Grid>
<Grid size={1}> <Grid size={{ xs: 1 }}>
{log.service} {log.service}
</Grid> </Grid>
<Grid size={1}> <Grid size={{ xs: 1 }}>
{log.device} {log.device}
</Grid> </Grid>
<Grid size={2}> <Grid size={{ xs: 2 }}>
{log.message} <Typography noWrap variant="body2">
{log.message}
</Typography>
</Grid> </Grid>
<Grid> <Grid size={{ xs: 5.8 }}>
<Typography noWrap variant="body2"> <Typography noWrap variant="body2">
{log.attributes} {log.attributes}
</Typography> </Typography>

View file

@ -566,7 +566,7 @@ export default function LogsDisplay(props: Props) {
</Grid> </Grid>
<Grid item xs={10} style={{ height: "100%", overflow: "hidden" }}> <Grid item xs={10} style={{ height: "100%", overflow: "hidden" }}>
<Grid container direction="row" justifyContent="space-around" alignItems="center"> <Grid container direction="row" justifyContent="space-around" alignItems="center">
<Grid item xs={2}> <Grid item xs={2.2}>
Timestamp Timestamp
</Grid> </Grid>
<Grid item xs={1}> <Grid item xs={1}>

View file

@ -89,19 +89,22 @@ const useStyles = makeStyles((theme: Theme) => ({
paddingLeft: theme.spacing(3), paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3) paddingRight: theme.spacing(3)
}, },
"&:hover": {
background: theme.palette.mode === "light" ? darken(theme.palette.background.default, 0.1) : lighten(theme.palette.background.default, 0.1)
}
}, },
activeItem: activeItem:
theme.palette.mode === "light" theme.palette.mode === "light"
? { ? {
background: darken(theme.palette.background.default, 0.25), background: darken(theme.palette.background.default, 0.25),
"&:hover": { "&:hover": {
background: darken(theme.palette.background.default, 0.25) background: darken(theme.palette.background.default, 0.15)
} }
} }
: { : {
background: lighten(theme.palette.background.default, 0.25), background: lighten(theme.palette.background.default, 0.25),
"&:hover": { "&:hover": {
background: lighten(theme.palette.background.default, 0.25) background: lighten(theme.palette.background.default, 0.15)
} }
} }
})) }))

View file

@ -285,7 +285,7 @@ export default function Devices() {
<Chip <Chip
variant="outlined" variant="outlined"
label={device.settings?.name ? device.settings.name : "Device " + device.settings?.deviceId} label={device.settings?.name ? device.settings.name : "Device " + device.settings?.deviceId}
sx={{ maxWidth: 120}} sx={{ maxWidth: 160}}
/> />
</Box> </Box>
) )

View file

@ -4,8 +4,6 @@ import { createTheme, ThemeOptions } from '@mui/material/styles';
import { import {
getPrimaryColour, getPrimaryColour,
getSecondaryColour, getSecondaryColour,
getSignatureAccentColour,
getSignatureColour
} from "../services/whiteLabel"; } from "../services/whiteLabel";
const baseTheme: ThemeOptions = { const baseTheme: ThemeOptions = {
@ -27,9 +25,6 @@ function makePaletteColor(name: keyof typeof Colours) {
return { main: name }; return { main: name };
} }
const ramp = Colours[name] as Record<number, string>; // e.g., blue[500], blue[300], etc. const ramp = Colours[name] as Record<number, string>; // e.g., blue[500], blue[300], etc.
// if (!ramp) {
// }
return { return {
main: ramp[500], main: ramp[500],
light: ramp[300], light: ramp[300],
@ -54,8 +49,8 @@ export const getTheme = (mode: 'light' | 'dark') =>
} }
: { : {
background: { background: {
default: "#e9e9e9", default: "#e5e5e5",
paper: "#fafafa", paper: "#f0f0f0",
}, },
}), }),
}, },