Skip to content

Commit b02dfce

Browse files
committed
handle different tma metric filter
Signed-off-by: Harper, Jason M <[email protected]>
1 parent d818bdf commit b02dfce

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

cmd/metrics/resources/base.html

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,17 @@
190190

191191
const hasOtherComparison = data.length > 0 && data[0].hasOwnProperty("other");
192192

193+
// If filtering results in no data, show a message
194+
if (filterPrefix && filteredData.length === 0) {
195+
return (
196+
<div style={containerStyle}>
197+
<Typography variant="body1" sx={{ fontStyle: 'italic', color: 'text.secondary' }}>
198+
No additional TMA metrics collected.
199+
</Typography>
200+
</div>
201+
);
202+
}
203+
// Create the table
193204
return (
194205
<div style={containerStyle}>
195206
{hasHighlightedMetrics && (
@@ -768,7 +779,7 @@
768779
<Grid item xs={7} sx={{ display: 'flex', justifyContent: 'center' }}>
769780
<MetricsTable
770781
data={current_metrics}
771-
filterPrefix="TMA"
782+
filterPrefix="<<.TMAPREFIX>>"
772783
containerStyle={{ height: "500px", overflow: "auto", width: "fit-content" }}
773784
/>
774785
</Grid>

cmd/metrics/summary.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,9 @@ func (mg *MetricGroup) loadHTMLTemplateValues(metadata Metadata, metricDefinitio
451451
}
452452
templateVals[tmpl.tmplVar] = fmt.Sprintf("%f", metricMean)
453453
}
454+
// TMA Tab's metrics table requires a filter string to limit the metrics displayed in the table
455+
templateVals["TMAPREFIX"] = []string{"TMA", "Pipeline Utilization", ""}[archIndex]
456+
454457
// these get the series data for the graphs
455458
templateReplace = []tmplReplace{
456459
// TMAM Tab

0 commit comments

Comments
 (0)