diff --git a/frontend/src/pages/Home.vue b/frontend/src/pages/Home.vue index 245c752..82ec381 100644 --- a/frontend/src/pages/Home.vue +++ b/frontend/src/pages/Home.vue @@ -28,6 +28,11 @@ const active_tab = computed({ // const severity_filter = ref(null) // NOTE: Null here means show all severities. const status_filter = ref(null) +const displayed_incidents = computed(() => { + if (status_filter.value === null) return filtered_incidents.value + return filtered_incidents.value.filter(i => i.status === status_filter.value) +}) + const fetch_all = async (before?: number) => { const was_live = store.is_live const alarm_url = before ? `${ALARMS_ENDPOINT}?before=${before}` : `${ALARMS_ENDPOINT}` @@ -141,7 +146,7 @@ onMounted(async () => {
- +