From e5275311c2ca9c270dca7871add0f3ac22afe8ac Mon Sep 17 00:00:00 2001 From: Christoph Kluge Date: Tue, 24 Sep 2024 14:37:39 +0200 Subject: [PATCH] fix: fix crashing job view if roofline metrics missing --- web/frontend/src/Job.root.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/frontend/src/Job.root.svelte b/web/frontend/src/Job.root.svelte index 8cf8f87..38c7511 100644 --- a/web/frontend/src/Job.root.svelte +++ b/web/frontend/src/Job.root.svelte @@ -280,12 +280,12 @@ .find((c) => c.name == $initq.data.job.cluster) .subClusters.find((sc) => sc.name == $initq.data.job.subCluster)} data={transformDataForRoofline( - $jobMetrics.data.jobMetrics.find( + $jobMetrics.data?.jobMetrics?.find( (m) => m.name == "flops_any" && m.scope == "node", - ).metric, - $jobMetrics.data.jobMetrics.find( + )?.metric, + $jobMetrics.data?.jobMetrics?.find( (m) => m.name == "mem_bw" && m.scope == "node", - ).metric, + )?.metric, )} />