component page graphs now render

This commit is contained in:
Carter 2025-02-24 11:46:16 -06:00
parent e5bc90e00e
commit c62bfbf916
10 changed files with 908 additions and 38 deletions

View file

@ -1,4 +1,10 @@
import { Box, Grid, Typography, makeStyles, createStyles, Theme } from "@material-ui/core";
import {
Box,
Grid,
Typography,
Theme
} from "@mui/material";
import { makeStyles } from "@mui/styles";
import { Component } from "models";
import moment from "moment";
import { getMeasurementSummary, Summary } from "pbHelpers/ComponentType";
@ -16,8 +22,8 @@ interface Props {
omitTime?: boolean;
}
const useStyles = makeStyles((theme: Theme) =>
createStyles({
const useStyles = makeStyles((theme: Theme) => {
return ({
"@keyframes ripple": {
from: {
transform: "scale(.8)",
@ -39,7 +45,7 @@ const useStyles = makeStyles((theme: Theme) =>
backgroundColor: "transparent"
}
})
);
});
//TODO: deprecated as unit measurements use a new measurement summary file
export default function MeasurementSummary(props: Props) {
@ -148,7 +154,7 @@ export default function MeasurementSummary(props: Props) {
const blacklist: Array<any> = [];
const filteredSummaries = summaries.filter((item: any) => !blacklist.includes(item.label));
return (
<Grid container direction="row" justify={centered ? "center" : "flex-start"} spacing={1}>
<Grid container direction="row" justifyContent={centered ? "center" : "flex-start"} spacing={1}>
{filteredSummaries.map((summary: Summary, i: number) => {
let sumVal = summary.value;
if (component.settings.type === quack.ComponentType.COMPONENT_TYPE_EDGE_TRIGGERED) {