Skip to content

Commit

Permalink
feat(analysis): remove build_status from analysis table and fix run s…
Browse files Browse the repository at this point in the history
…tatus
  • Loading branch information
brucetony committed Sep 4, 2024
1 parent a360e8e commit cd6a92b
Showing 1 changed file with 9 additions and 42 deletions.
51 changes: 9 additions & 42 deletions components/analysis/AnalysesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import {
getApprovalStatusSeverity,
getRunStatusSeverity,
} from "~/utils/status-tag-severity";
import { AnalysisRunStatus, ApprovalStatus } from "~/services/Api";
import { AnalysisNodeRunStatus, ApprovalStatus } from "~/services/Api";
const expandedRows = ref();
const analyses = ref();
const expandRowEntries = [];
const runStatuses = Object.values(AnalysisRunStatus);
const runStatuses = Object.values(AnalysisNodeRunStatus);
const approvalStatuses = Object.values(ApprovalStatus);
const { data: response, status, error } = await getAnalysisNodes();
Expand All @@ -39,8 +39,8 @@ function onToggleRowExpansion(rowIds) {
const defaultFilters = {
global: { value: null, matchMode: FilterMatchMode.CONTAINS },
approval_status: { value: null, matchMode: FilterMatchMode.IN },
"analysis.build_status": { value: null, matchMode: FilterMatchMode.IN },
"analysis.run_status": { value: null, matchMode: FilterMatchMode.IN },
// "analysis.build_status": { value: null, matchMode: FilterMatchMode.IN },
run_status: { value: null, matchMode: FilterMatchMode.IN },
// Below are more examples
// "analysis.name": { value: null, matchMode: FilterMatchMode.CONTAINS },
// status: { value: null, matchMode: FilterMatchMode.CONTAINS },
Expand Down Expand Up @@ -142,50 +142,17 @@ const updateFilters = (filterText: string) => {
</MultiSelect>
</template>
</Column>
<!-- <Column-->
<!-- header="Build Status"-->
<!-- field="analysis.build_status"-->
<!-- filterField="analysis.build_status"-->
<!-- :showFilterMatchModes="false"-->
<!-- >-->
<!-- <template #body="{ data }">-->
<!-- <Tag-->
<!-- v-if="data.analysis.build_status"-->
<!-- :value="data.analysis.build_status"-->
<!-- :severity="getBuildStatusSeverity(data.analysis.build_status)"-->
<!-- />-->
<!-- </template>-->
<!-- <template #filter="{ filterModel }">-->
<!-- <MultiSelect-->
<!-- v-model="filterModel.value"-->
<!-- :options="buildStatuses"-->
<!-- optionLabel=""-->
<!-- placeholder="Any"-->
<!-- class="p-column-filter"-->
<!-- >-->
<!-- <template #option="slotProps">-->
<!-- <div class="flex align-items-center gap-2">-->
<!-- <Tag-->
<!-- v-if="slotProps.option"-->
<!-- :value="slotProps.option"-->
<!-- :severity="getBuildStatusSeverity(slotProps.option)"-->
<!-- />-->
<!-- </div>-->
<!-- </template>-->
<!-- </MultiSelect>-->
<!-- </template>-->
<!-- </Column>-->
<Column
field="analysis.run_status"
field="run_status"
header="Run Status"
filterField="analysis.run_status"
filterField="run_status"
:showFilterMatchModes="false"
>
<template #body="{ data }">
<Tag
v-if="data.analysis.run_status"
:value="data.analysis.run_status"
:severity="getRunStatusSeverity(data.analysis.run_status)"
v-if="data.run_status"
:value="data.run_status"
:severity="getRunStatusSeverity(data.run_status)"
/>
</template>
<template #filter="{ filterModel }">
Expand Down

0 comments on commit cd6a92b

Please sign in to comment.