diff --git a/src/components/DeleteFlowRunsButton.vue b/src/components/DeleteFlowRunsButton.vue
new file mode 100644
index 000000000..b52ddf412
--- /dev/null
+++ b/src/components/DeleteFlowRunsButton.vue
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/FlowRunFilteredList.vue b/src/components/FlowRunFilteredList.vue
index 0f1872c2f..208dc38d7 100644
--- a/src/components/FlowRunFilteredList.vue
+++ b/src/components/FlowRunFilteredList.vue
@@ -1,13 +1,12 @@
-
-
+
+
-
-
+
+
+
-
-
-
+
No runs from the last 7 days
@@ -25,6 +24,8 @@
import { useSubscription } from '@prefecthq/vue-compositions'
import { computed, onMounted, ref } from 'vue'
import { ResultsCount, StateSelect, FlowRunsSort, FlowRunList } from '@/components'
+ import DeleteFlowRunsButton from '@/components/DeleteFlowRunsButton.vue'
+ import { useCan } from '@/compositions/useCan'
import { usePaginatedSubscription } from '@/compositions/usePaginatedSubscription'
import { StateType } from '@/models'
import { flowRunsApiKey, mapper } from '@/services'
@@ -36,12 +37,15 @@
const props = defineProps<{
flowRunFilter: UnionFilters,
states?: StateType[],
+ disabled?: boolean,
}>()
const emit = defineEmits<{
(event: 'update:states', value: StateType[]): void,
}>()
+ const can = useCan()
+ const selectedFlowRuns = ref([])
const state = ref(props.states ?? [])
const updateState = (newValue: string | string[] | null): void => {
@@ -85,6 +89,12 @@
state.value = []
}
+ const deleteFlowRuns = (): void => {
+ selectedFlowRuns.value = []
+ flowRunsSubscription.refresh()
+ flowRunCountSubscription.refresh()
+ }
+
onMounted(() => {
if (props.states) {
state.value = props.states
@@ -93,12 +103,12 @@