Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 28 additions & 18 deletions cmd/metrics/resources/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,17 @@

const all_metrics = <<.ALLMETRICS>>
const [current_metrics, setCurrent_metrics] = React.useState(JSON.parse(JSON.stringify(all_metrics)));
const [hasHighlightedMetrics, setHasHighlightedMetrics] = React.useState(false);
const description = <<.DESCRIPTION>>
const metadata = <<.METADATA>>
const system_info = <<.SYSTEMINFO>>

// Check for highlighted metrics whenever current_metrics changes
React.useEffect(() => {
// Look for any metrics that exceed their thresholds
const hasHighlighted = current_metrics.some(row => row[5] === "Yes");
setHasHighlightedMetrics(hasHighlighted);
}, [current_metrics]);
// Define consistent colors for TMA categories with child variations
const tmaColors = {
// Blue family for Frontend
Expand Down Expand Up @@ -704,7 +712,7 @@
</TableHead>
<TableBody>
{current_metrics.map((row) => {
// Check if this metric has exceed its threshold
// Check if this metric has exceeded its threshold
const exceedsThreshold = row[5] == "Yes";
return (
<TableRow
Expand Down Expand Up @@ -823,23 +831,25 @@
</TableBody>
</Table>
</TableContainer>
<Box sx={{ marginTop: "16px" }}>
<Alert
severity="warning"
sx={{
marginBottom: "24px",
backgroundColor: 'rgba(255, 255, 0, 0.2)',
'& .MuiAlert-icon': {
color: 'rgba(0, 0, 0, 0.7)'
},
'& .MuiAlert-message': {
color: 'rgba(0, 0, 0, 0.7)'
}
}}
>
Metrics with a mean value exceeding their threshold formula are highlighted in yellow, indicating potential performance issues or anomalies that may require further investigation. Hover over the warning icon next to the mean value for more information.
</Alert>
</Box>
{hasHighlightedMetrics && (
<Box sx={{ marginTop: "16px" }}>
<Alert
severity="warning"
sx={{
marginBottom: "24px",
backgroundColor: 'rgba(255, 255, 0, 0.2)',
'& .MuiAlert-icon': {
color: 'rgba(0, 0, 0, 0.7)'
},
'& .MuiAlert-message': {
color: 'rgba(0, 0, 0, 0.7)'
}
}}
>
Metrics with a mean value exceeding their threshold formula are highlighted in yellow, indicating potential performance issues or anomalies that may require further investigation. Hover over the warning icon next to the mean value for more information.
</Alert>
</Box>
)}
</TabPanel>
<TabPanel
value={systemTabs}
Expand Down