feat(activity): search/filter on both Activity-tab panes
Recent failures gains a client-side search over the already-loaded 24h rows (task/queue/target/error), shown as a filtered/total count alongside the existing error-type chips. All recent activity gains a debounced server-side task-name search (new `task` ILIKE param on /runs) so it spans the full history, not just the loaded page. LIKE wildcards are escaped so task names' literal underscores match literally. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,7 +16,7 @@ export const useSystemActivityStore = defineStore('systemActivity', () => {
|
||||
const runs = ref([])
|
||||
const runsCursor = ref(null)
|
||||
const runsHasMore = ref(false)
|
||||
const runsFilter = ref({ queue: null, status: null, limit: 50 })
|
||||
const runsFilter = ref({ queue: null, status: null, task: null, limit: 50 })
|
||||
|
||||
const loading = ref({ queues: false, workers: false, runs: false, failures: false })
|
||||
const lastError = ref(null)
|
||||
@@ -65,6 +65,7 @@ export const useSystemActivityStore = defineStore('systemActivity', () => {
|
||||
const params = { limit: runsFilter.value.limit }
|
||||
if (runsFilter.value.queue) params.queue = runsFilter.value.queue
|
||||
if (runsFilter.value.status) params.status = runsFilter.value.status
|
||||
if (runsFilter.value.task) params.task = runsFilter.value.task
|
||||
if (!reset && runsCursor.value) params.before_id = runsCursor.value
|
||||
const body = await api.get('/api/system/activity/runs', { params })
|
||||
runs.value = reset ? body.runs : [...runs.value, ...body.runs]
|
||||
|
||||
Reference in New Issue
Block a user