11import React , {
22 forwardRef , useEffect , useImperativeHandle , useState ,
33} from 'react' ;
4- import { Button , DatePicker , Dropdown , Form , Input , Row , Table , Tabs } from 'antd' ;
4+ import { Button , Col , DatePicker , Dropdown , Form , Input , Row , Select , Table , Tabs } from 'antd' ;
55import { useIntl } from 'react-intl' ;
66import { ColumnsType } from 'antd/es/table' ;
77import { $http } from '@/http' ;
@@ -206,66 +206,129 @@ const JobExecutionLogs = ({ datasourceId }: TJobExecutionLogs) => {
206206 < div className = "dv-flex-between" >
207207 < div className = "dv-datasource__search" >
208208 < Form form = { form } >
209- < Row style = { { width : '100%' } } >
210- < Form . Item style = { { width : '15%' } }
211- label = { intl . formatMessage ( { id : "jobs_task_name" } ) }
212- name = "searchVal"
213- >
214- < Input
215- style = { { width : '100%' } }
216- autoComplete = "off"
217- onPressEnter = { ( ) => {
218- getData ( ) ;
219- } }
220- />
221- </ Form . Item >
209+ < Row gutter = { [ 16 , 16 ] } style = { { width : '100%' } } >
210+ < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } xl = { 6 } >
211+ < Form . Item
212+ label = { intl . formatMessage ( { id : "jobs_task_name" } ) }
213+ name = "searchVal"
214+ >
215+ < Input
216+ autoComplete = "off"
217+ onPressEnter = { ( ) => {
218+ getData ( ) ;
219+ } }
220+ />
221+ </ Form . Item >
222+ </ Col >
222223
223- < Form . Item style = { { width : '15%' , marginLeft : '10px' } }
224- label = { intl . formatMessage ( { id : "job_database" } ) }
225- name = "schemaSearch"
226- >
227- < Input
228- style = { { width : '100%' } }
229- autoComplete = "off"
230- onPressEnter = { ( ) => {
231- getData ( ) ;
232- } }
233- />
234- </ Form . Item >
224+ < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } xl = { 4 } >
225+ < Form . Item
226+ label = { intl . formatMessage ( { id : "job_database" } ) }
227+ name = "schemaSearch"
228+ >
229+ < Input
230+ autoComplete = "off"
231+ onPressEnter = { ( ) => {
232+ getData ( ) ;
233+ } }
234+ />
235+ </ Form . Item >
236+ </ Col >
235237
236- < Form . Item style = { { width : '15%' , marginLeft : '10px' } }
237- label = { intl . formatMessage ( { id : "job_table" } ) }
238- name = "tableSearch"
239- >
240- < Input
241- style = { { width : '100%' } }
242- autoComplete = "off"
243- onPressEnter = { ( ) => {
244- getData ( ) ;
245- } }
246- />
247- </ Form . Item >
238+ < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } xl = { 4 } >
239+ < Form . Item
240+ label = { intl . formatMessage ( { id : "job_table" } ) }
241+ name = "tableSearch"
242+ >
243+ < Input
244+ autoComplete = "off"
245+ onPressEnter = { ( ) => {
246+ getData ( ) ;
247+ } }
248+ />
249+ </ Form . Item >
250+ </ Col >
248251
249- < Form . Item style = { { width : '15%' , marginLeft : '10px' } }
250- label = { intl . formatMessage ( { id : "job_column" } ) }
251- name = "columnSearch"
252- >
253- < Input
254- style = { { width : '100%' } }
255- autoComplete = "off"
256- onPressEnter = { ( ) => {
257- getData ( ) ;
258- } }
259- />
260- </ Form . Item >
252+ < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } xl = { 4 } >
253+ < Form . Item
254+ label = { intl . formatMessage ( { id : "job_column" } ) }
255+ name = "columnSearch"
256+ >
257+ < Input
258+ autoComplete = "off"
259+ onPressEnter = { ( ) => {
260+ getData ( ) ;
261+ } }
262+ />
263+ </ Form . Item >
264+ </ Col >
265+ < Col xs = { 24 } sm = { 12 } md = { 8 } lg = { 6 } xl = { 6 } >
266+ < Form . Item
267+ label = { intl . formatMessage ( { id : "jobs_task_status" } ) }
268+ name = "status"
269+ >
270+ < Select
271+ allowClear
272+ onSelect = { ( ) => {
273+ getData ( ) ;
274+ } }
275+ onClear = { ( ) => {
276+ form . setFieldsValue ( { status : undefined } ) ;
277+ getData ( ) ;
278+ } }
279+ >
280+ < Select . Option value = "0" >
281+ { intl . formatMessage ( { id : "jobs_task_status_submitted_success" } ) }
282+ </ Select . Option >
283+ < Select . Option value = "1" >
284+ { intl . formatMessage ( { id : "jobs_task_status_running_execution" } ) }
285+ </ Select . Option >
286+ < Select . Option value = "2" >
287+ { intl . formatMessage ( { id : "jobs_task_status_ready_pause" } ) }
288+ </ Select . Option >
289+ < Select . Option value = "3" >
290+ { intl . formatMessage ( { id : "jobs_task_status_pause" } ) }
291+ </ Select . Option >
292+ < Select . Option value = "4" >
293+ { intl . formatMessage ( { id : "jobs_task_status_ready_stop" } ) }
294+ </ Select . Option >
295+ < Select . Option value = "5" >
296+ { intl . formatMessage ( { id : "jobs_task_status_stop" } ) }
297+ </ Select . Option >
298+ < Select . Option value = "6" >
299+ { intl . formatMessage ( { id : "jobs_task_status_failure" } ) }
300+ </ Select . Option >
301+ < Select . Option value = "7" >
302+ { intl . formatMessage ( { id : "jobs_task_status_success" } ) }
303+ </ Select . Option >
304+ < Select . Option value = "8" >
305+ { intl . formatMessage ( { id : "jobs_task_status_need_fault_tolerance" } ) }
306+ </ Select . Option >
307+ < Select . Option value = "9" >
308+ { intl . formatMessage ( { id : "jobs_task_status_kill" } ) }
309+ </ Select . Option >
310+ < Select . Option value = "10" >
311+ { intl . formatMessage ( { id : "jobs_task_status_waiting_thread" } ) }
312+ </ Select . Option >
313+ < Select . Option value = "11" >
314+ { intl . formatMessage ( { id : "jobs_task_status_waiting_summit" } ) }
315+ </ Select . Option >
316+ </ Select >
317+ </ Form . Item >
318+ </ Col >
261319
262- < Form . Item style = { { width : '32%' , marginLeft : '10px' } }
263- label = { intl . formatMessage ( { id : 'jobs_update_time' } ) }
264- name = 'updateTime'
265- >
266- < DatePicker . RangePicker allowEmpty = { [ true , true ] }
267- style = { { width : '100%' } } showTime />
268- </ Form . Item >
320+ < Col xs = { 24 } sm = { 24 } md = { 16 } lg = { 12 } xl = { 8 } >
321+ < Form . Item
322+ label = { intl . formatMessage ( { id : 'jobs_update_time' } ) }
323+ name = 'updateTime'
324+ >
325+ < DatePicker . RangePicker
326+ allowEmpty = { [ true , true ] }
327+ style = { { width : '100%' } }
328+ showTime
329+ />
330+ </ Form . Item >
331+ </ Col >
269332 </ Row >
270333 </ Form >
271334 </ div >
@@ -302,4 +365,4 @@ const JobExecutionLogs = ({ datasourceId }: TJobExecutionLogs) => {
302365 </ div >
303366 ) ;
304367}
305- export default JobExecutionLogs ;
368+ export default JobExecutionLogs ;
0 commit comments