diff --git a/src/pages/crontab/index.tsx b/src/pages/crontab/index.tsx index 976c0ffa..a9feda49 100644 --- a/src/pages/crontab/index.tsx +++ b/src/pages/crontab/index.tsx @@ -247,8 +247,8 @@ const Crontab = () => { > {record.last_execution_time ? dayjs(record.last_execution_time * 1000).format( - 'YYYY-MM-DD HH:mm:ss', - ) + 'YYYY-MM-DD HH:mm:ss', + ) : '-'} ); @@ -361,11 +361,10 @@ const Crontab = () => { const getCrons = () => { setLoading(true); const { page, size, sorter, filters } = pageConf; - let url = `${ - config.apiPrefix - }crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify( - filters, - )}`; + let url = `${config.apiPrefix + }crons?searchValue=${searchText}&page=${page}&size=${size}&filters=${JSON.stringify( + filters, + )}`; if (sorter && sorter.column && sorter.order) { url += `&sorter=${JSON.stringify({ field: sorter.column.key, @@ -523,9 +522,8 @@ const Crontab = () => { const enabledOrDisabledCron = (record: any, index: number) => { Modal.confirm({ - title: `确认${ - record.isDisabled === 1 ? intl.get('启用') : intl.get('禁用') - }`, + title: `确认${record.isDisabled === 1 ? intl.get('启用') : intl.get('禁用') + }`, content: ( <> {intl.get('确认')} @@ -540,8 +538,7 @@ const Crontab = () => { onOk() { request .put( - `${config.apiPrefix}crons/${ - record.isDisabled === 1 ? 'enable' : 'disable' + `${config.apiPrefix}crons/${record.isDisabled === 1 ? 'enable' : 'disable' }`, [record.id], ) @@ -565,9 +562,8 @@ const Crontab = () => { const pinOrUnPinCron = (record: any, index: number) => { Modal.confirm({ - title: `确认${ - record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶') - }`, + title: `确认${record.isPinned === 1 ? intl.get('取消置顶') : intl.get('置顶') + }`, content: ( <> {intl.get('确认')} @@ -582,8 +578,7 @@ const Crontab = () => { onOk() { request .put( - `${config.apiPrefix}crons/${ - record.isPinned === 1 ? 'unpin' : 'pin' + `${config.apiPrefix}crons/${record.isPinned === 1 ? 'unpin' : 'pin' }`, [record.id], ) @@ -1014,6 +1009,7 @@ const Crontab = () => { )}