Skip to content

Commit

Permalink
Make metricAliasData optional in MetricView component for improved sa…
Browse files Browse the repository at this point in the history
…fety and handling
  • Loading branch information
simlarsen committed Nov 28, 2024
1 parent 70da661 commit eaa9a5f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dashboard/src/Components/Metrics/MetricView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const MetricView: FunctionComponent<ComponentProps> = (
} else {
chartSeries.push({
seriesName:
queryConfig.metricAliasData.title ||
queryConfig.metricAliasData?.title ||
queryConfig.metricQueryData.filterData.metricName?.toString() ||
"",
data: metricResults[index]!.data.map((result: AggregatedModel) => {
Expand All @@ -264,10 +264,10 @@ const MetricView: FunctionComponent<ComponentProps> = (
id: index.toString(),
type: ChartType.LINE,
title:
queryConfig.metricAliasData.title ||
queryConfig.metricAliasData?.title ||
queryConfig.metricQueryData.filterData.metricName?.toString() ||
"",
description: queryConfig.metricAliasData.description,
description: queryConfig.metricAliasData?.description || "",
props: {
data: chartSeries,
xAxis: {
Expand Down

0 comments on commit eaa9a5f

Please sign in to comment.