mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-10-23 06:46:11 +08:00
Add batch delete button to DeadTasksTable
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
SnackbarActionTypes,
|
||||
} from "../actions/snackbarActions";
|
||||
import {
|
||||
BATCH_DELETE_DEAD_TASKS_SUCCESS,
|
||||
DELETE_DEAD_TASK_SUCCESS,
|
||||
DELETE_RETRY_TASK_SUCCESS,
|
||||
DELETE_SCHEDULED_TASK_SUCCESS,
|
||||
@@ -53,6 +54,14 @@ function snackbarReducer(
|
||||
message: `Dead task ${action.taskKey} deleted`,
|
||||
};
|
||||
|
||||
case BATCH_DELETE_DEAD_TASKS_SUCCESS: {
|
||||
const n = action.payload.deleted_keys.length;
|
||||
return {
|
||||
isOpen: true,
|
||||
message: `${n} Dead ${n === 1 ? "task" : "tasks"} deleted`,
|
||||
};
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
|
Reference in New Issue
Block a user