mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-08-24 14:48:42 +08:00
Add batch run button to DeadTasksTable
This commit is contained in:
@@ -26,10 +26,11 @@ import SyntaxHighlighter from "react-syntax-highlighter";
|
||||
import syntaxHighlightStyle from "react-syntax-highlighter/dist/esm/styles/hljs/github";
|
||||
import { AppState } from "../store";
|
||||
import {
|
||||
batchDeleteDeadTasksAsync,
|
||||
batchRunDeadTasksAsync,
|
||||
deleteDeadTaskAsync,
|
||||
listDeadTasksAsync,
|
||||
runDeadTaskAsync,
|
||||
deleteDeadTaskAsync,
|
||||
batchDeleteDeadTasksAsync,
|
||||
} from "../actions/tasksActions";
|
||||
import TablePaginationActions, {
|
||||
defaultPageSize,
|
||||
@@ -72,6 +73,7 @@ const mapDispatchToProps = {
|
||||
listDeadTasksAsync,
|
||||
runDeadTaskAsync,
|
||||
deleteDeadTaskAsync,
|
||||
batchRunDeadTasksAsync,
|
||||
batchDeleteDeadTasksAsync,
|
||||
};
|
||||
|
||||
@@ -153,7 +155,16 @@ function DeadTasksTable(props: Props & ReduxProps) {
|
||||
color="primary"
|
||||
aria-label="text primary button group"
|
||||
>
|
||||
<Button>Run</Button>
|
||||
<Button
|
||||
disabled={props.batchActionPending}
|
||||
onClick={() =>
|
||||
props
|
||||
.batchRunDeadTasksAsync(queue, selectedKeys)
|
||||
.then(() => setSelectedKeys([]))
|
||||
}
|
||||
>
|
||||
Run
|
||||
</Button>
|
||||
<Button>Kill</Button>
|
||||
<Button
|
||||
disabled={props.batchActionPending}
|
||||
|
Reference in New Issue
Block a user