Add batch run button to DeadTasksTable

This commit is contained in:
Ken Hibino
2020-12-15 06:46:23 -08:00
parent 706e80580d
commit 9bfd373f85
6 changed files with 132 additions and 5 deletions

View File

@@ -4,6 +4,7 @@ import {
} from "../actions/snackbarActions";
import {
BATCH_DELETE_DEAD_TASKS_SUCCESS,
BATCH_RUN_DEAD_TASKS_SUCCESS,
DELETE_DEAD_TASK_SUCCESS,
DELETE_RETRY_TASK_SUCCESS,
DELETE_SCHEDULED_TASK_SUCCESS,
@@ -62,6 +63,14 @@ function snackbarReducer(
message: `Dead task ${action.taskKey} deleted`,
};
case BATCH_RUN_DEAD_TASKS_SUCCESS: {
const n = action.payload.pending_keys.length;
return {
isOpen: true,
message: `${n} Dead ${n === 1 ? "task is" : "tasks are"} now pending`,
};
}
case BATCH_DELETE_DEAD_TASKS_SUCCESS: {
const n = action.payload.deleted_keys.length;
return {