Harden V1 demo workflow smoke
This commit is contained in:
+10
-2
@@ -339,7 +339,9 @@ function App(): JSX.Element {
|
||||
])
|
||||
setAreas(areaResponse.items)
|
||||
setDatasets(datasetResponse.items)
|
||||
if (!selectedClipAreaId && areaResponse.items.length > 0) {
|
||||
if (areaResponse.items.length === 0) {
|
||||
setSelectedClipAreaId('')
|
||||
} else if (!selectedClipAreaId || !areaResponse.items.some((area) => area.id === selectedClipAreaId)) {
|
||||
setSelectedClipAreaId(areaResponse.items[0].id)
|
||||
}
|
||||
if (areaResponse.items.length === 0) {
|
||||
@@ -347,8 +349,10 @@ function App(): JSX.Element {
|
||||
} else if (!selectedMapAreaId || !areaResponse.items.some((area) => area.id === selectedMapAreaId)) {
|
||||
setSelectedMapAreaId(areaResponse.items[0].id)
|
||||
}
|
||||
return { areas: areaResponse.items, datasets: datasetResponse.items }
|
||||
} catch (error) {
|
||||
setErrorMessage(error instanceof Error ? error.message : 'Failed to load project data')
|
||||
return null
|
||||
} finally {
|
||||
setLoadingAreas(false)
|
||||
setLoadingDatasets(false)
|
||||
@@ -759,13 +763,17 @@ function App(): JSX.Element {
|
||||
setSegmentationReferenceDatasetId(result.reference_dataset_id)
|
||||
setDemoWorkflowMessage(result.message)
|
||||
await loadProjects()
|
||||
await Promise.all([
|
||||
const [projectData] = await Promise.all([
|
||||
loadProjectData(result.project_id),
|
||||
loadDetectionRuns(result.project_id),
|
||||
loadSegmentationRuns(result.project_id),
|
||||
loadQualityChecks(result.project_id),
|
||||
loadExports(result.project_id),
|
||||
])
|
||||
const candidateDataset = projectData?.datasets.find((dataset) => dataset.id === result.candidate_dataset_id)
|
||||
if (candidateDataset) {
|
||||
await loadDatasetDetails(result.project_id, candidateDataset)
|
||||
}
|
||||
} catch (error) {
|
||||
setErrorMessage(formatError(error, 'Failed to load demo workflow'))
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user