From 214e301cef20b5fa662fd2d09607d4f17dff2101 Mon Sep 17 00:00:00 2001 From: "joseph.marinier" Date: Wed, 7 Dec 2022 23:57:09 -0500 Subject: [PATCH 1/2] Fix webapp crash when no pipeline This inappropriate `!` was letting a `null` in, which was crashing `PipelineSelect`. --- CHANGELOG.md | 1 + webapp/src/components/Metrics/PerformanceAnalysisTable.tsx | 2 +- webapp/src/components/PageHeader.tsx | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f5ce2dec..010f9b81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,5 +20,6 @@ Released changes are shown in the ### Fixed - Showing long utterances fully on hover in similar and perturbed utterances tables. +- Webapp crash when no pipeline. ### Security diff --git a/webapp/src/components/Metrics/PerformanceAnalysisTable.tsx b/webapp/src/components/Metrics/PerformanceAnalysisTable.tsx index c2d896e9..f58d2436 100644 --- a/webapp/src/components/Metrics/PerformanceAnalysisTable.tsx +++ b/webapp/src/components/Metrics/PerformanceAnalysisTable.tsx @@ -563,7 +563,7 @@ const PerformanceAnalysisTable: React.FC = ({ } diff --git a/webapp/src/components/PageHeader.tsx b/webapp/src/components/PageHeader.tsx index 4f9a52b6..5a0bfd9f 100755 --- a/webapp/src/components/PageHeader.tsx +++ b/webapp/src/components/PageHeader.tsx @@ -162,11 +162,11 @@ const PageHeader = () => { Project: {datasetInfo.projectName} - {config && ( + {config?.pipelines && ( )} From dfdc5d6386648788b5e535dbc1b6c8477a5c67e9 Mon Sep 17 00:00:00 2001 From: "joseph.marinier" Date: Thu, 8 Dec 2022 11:08:03 -0500 Subject: [PATCH 2/2] Show _No pipeline_ if there is no pipeline instead of not rendering the select menu. --- webapp/src/components/PageHeader.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/webapp/src/components/PageHeader.tsx b/webapp/src/components/PageHeader.tsx index 5a0bfd9f..eb0509f8 100755 --- a/webapp/src/components/PageHeader.tsx +++ b/webapp/src/components/PageHeader.tsx @@ -162,13 +162,11 @@ const PageHeader = () => { Project: {datasetInfo.projectName} - {config?.pipelines && ( - - )} + )}