diff --git a/frontend/components/analysis/ContextualListView.vue b/frontend/components/analysis/ContextualListView.vue index 50ff7d2..37351c0 100644 --- a/frontend/components/analysis/ContextualListView.vue +++ b/frontend/components/analysis/ContextualListView.vue @@ -22,29 +22,8 @@ interface Emits { } const emit = defineEmits() -const items = computed(() => props.analyses.map((a) => { - let status = tt('Running') - let statusBg = 'bg-yellow-200' - if (a.completedAt !== undefined) { - if (a.failureMessage !== undefined) { - status = tt('Failed') - statusBg = 'bg-red-400' - } else { - status = tt('Completed') - statusBg = 'bg-green-200' - } - } else if (new Date().getTime() - new Date(a.createdAt).getTime() > 1000 * 60 * 10) { - status = tt('PotentialTimeout') - statusBg = 'bg-red-200' - } - return { - ...a, - status, - statusBg, - } -})) -const hasAnyAudits = computed(() => items.value.some((a) => a.analysisType === AnalysisType.ANALYSIS_TYPE_AUDIT)) -const hasAnyReports = computed(() => items.value.some((a) => a.analysisType === AnalysisType.ANALYSIS_TYPE_REPORT)) +const hasAnyAudits = computed(() => props.analyses.some((a) => a.analysisType === AnalysisType.ANALYSIS_TYPE_AUDIT)) +const hasAnyReports = computed(() => props.analyses.some((a) => a.analysisType === AnalysisType.ANALYSIS_TYPE_REPORT)) const showPromptToRunAudit = computed(() => { return !hasAnyAudits.value && !hasAnyReports.value @@ -63,7 +42,7 @@ const reportButtonClasses = computed(() => {