feat(ui): add exclude superseded failures filter toggle to Downloads
Adds a new filter toggle to the Downloads view that allows users to hide superseded failed downloads. The filter is enabled by default and passes exclude_superseded=true to the API when active. Changes: - Add filterExcludeSuperseded ref initialized to true - Add filterExcludeSuperseded to watch dependencies - Include exclude_superseded param in loadDownloads() when true - Add v-switch toggle UI control below date filters Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -112,6 +112,19 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
|
||||||
|
<!-- Superseded filter -->
|
||||||
|
<v-row class="mb-4">
|
||||||
|
<v-col cols="12">
|
||||||
|
<v-switch
|
||||||
|
v-model="filterExcludeSuperseded"
|
||||||
|
label="Hide superseded failures"
|
||||||
|
density="compact"
|
||||||
|
hide-details
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
|
||||||
<!-- Downloads Table -->
|
<!-- Downloads Table -->
|
||||||
<v-card>
|
<v-card>
|
||||||
<v-data-table
|
<v-data-table
|
||||||
@@ -300,6 +313,7 @@ const filterStatus = ref(null)
|
|||||||
const filterSourceId = ref(null)
|
const filterSourceId = ref(null)
|
||||||
const filterFromDate = ref(null)
|
const filterFromDate = ref(null)
|
||||||
const filterToDate = ref(null)
|
const filterToDate = ref(null)
|
||||||
|
const filterExcludeSuperseded = ref(true)
|
||||||
const detailsDialog = ref(false)
|
const detailsDialog = ref(false)
|
||||||
const selectedDownload = ref(null)
|
const selectedDownload = ref(null)
|
||||||
const retryingIds = ref([])
|
const retryingIds = ref([])
|
||||||
@@ -350,7 +364,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
watch([filterStatus, filterSourceId, filterFromDate, filterToDate], () => {
|
watch([filterStatus, filterSourceId, filterFromDate, filterToDate, filterExcludeSuperseded], () => {
|
||||||
loadDownloads()
|
loadDownloads()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -367,6 +381,7 @@ async function loadDownloads() {
|
|||||||
if (filterSourceId.value) params.source_id = filterSourceId.value
|
if (filterSourceId.value) params.source_id = filterSourceId.value
|
||||||
if (filterFromDate.value) params.from_date = filterFromDate.value
|
if (filterFromDate.value) params.from_date = filterFromDate.value
|
||||||
if (filterToDate.value) params.to_date = filterToDate.value
|
if (filterToDate.value) params.to_date = filterToDate.value
|
||||||
|
if (filterExcludeSuperseded.value) params.exclude_superseded = true
|
||||||
await downloadsStore.fetchDownloads(params)
|
await downloadsStore.fetchDownloads(params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user