MCPcopy Create free account
hub / github.com/VirtualHotBar/NetMount / Task_page

Function Task_page

src/page/task/task.tsx:25–185  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23const Col = Grid.Col
24
25function Task_page() {
26 const { t } = useTranslation()
27 const navigate = useNavigate()
28 const [, forceUpdate] = useReducer(x => x + 1, 0) //刷新组件
29 const [modal, contextHolder] = Modal.useModal()
30
31 const columns: TableColumnProps[] = [
32 {
33 title: t('task_name'),
34 dataIndex: 'name',
35 width: '20%',
36 ellipsis: true,
37 },
38 {
39 title: t('state'),
40 dataIndex: 'state',
41 width: '5rem',
42 },
43 {
44 title: t('cycle'),
45 dataIndex: 'cycle',
46 width: '5rem',
47 },
48 {
49 title: t('run_info'),
50 dataIndex: 'runInfo',
51 ellipsis: true,
52 },
53 {
54 title: t('actions'),
55 dataIndex: 'actions',
56 align: 'right',
57 width: '14rem',
58 },
59 ]
60 console.log(nmConfig.task)
61
62 return (
63 <div style={{ width: '100%', height: '100%' }}>
64 {contextHolder}
65 <Row style={{ width: '100%', height: '2rem' }}>
66 <Col flex={'auto'}>
67 <Space>
68 <Button
69 type="primary"
70 onClick={() => {
71 navigate('/task/add')
72 }}
73 >
74 {t('add')}
75 </Button>
76 <Button
77 onClick={() => {
78 forceUpdate()
79 }}
80 >
81 {t('refresh')}
82 </Button>

Callers

nothing calls this directly

Calls 6

openUrlInBrowserFunction · 0.90
showLogFunction · 0.90
delTaskFunction · 0.90
cancelTaskMethod · 0.80
executeTaskMethod · 0.80
addTaskMethod · 0.80

Tested by

no test coverage detected