Leo il y a 2 ans
Parent
commit
ce4093a45f

+ 2 - 0
src/module/datasource/component/DatasourceLog.jsx

@@ -128,6 +128,8 @@ const DatasourceLog = ({ onRef, logId }) => {
       })
       setLogList(list)
       refreshStatus(refreshLogs)
+    } else {
+      message.error(data.msg)
     }
     setDataLoading(false)
   }

+ 10 - 1
src/module/datasource/component/DatasourceSyncView.jsx

@@ -2,6 +2,7 @@ import { Table, Space, Switch, message, Popconfirm } from 'antd'
 import React, { useEffect, useState } from 'react'
 import { useNavigate } from 'react-router-dom'
 import { getJobList, updateJobStatus, delJob, executeOnce } from '../services'
+import moment from 'moment'
 
 export default function DatasourceSyncView({ selectLog }) {
   const navigate = useNavigate()
@@ -42,6 +43,9 @@ export default function DatasourceSyncView({ selectLog }) {
           job_cron: item.job_cron,
           jsb_desc: item.job_desc,
           trigger_status: item.trigger_status,
+          update_time: moment(item.update_time * 1000).format(
+            'YYYY.MM.DD HH:mm:ss'
+          ),
         }
       })
       setJobList(list)
@@ -95,10 +99,15 @@ export default function DatasourceSyncView({ selectLog }) {
       key: 'jsb_desc',
     },
     {
-      title: '频次',
+      title: '定时规则',
       dataIndex: 'job_cron',
       key: 'job_cron',
     },
+    {
+      title: '更新时间',
+      dataIndex: 'update_time',
+      key: 'update_time',
+    },
     {
       title: '状态',
       key: 'trigger_status',

+ 6 - 0
src/module/tasklog/component/TaskLogWatcher.jsx

@@ -60,6 +60,11 @@ const TaskLogWatcher = () => {
       dataIndex: 'index',
       key: 'index',
     },
+    {
+      title: '作业名称',
+      dataIndex: 'name',
+      key: 'name',
+    },
     {
       title: '执行时间',
       dataIndex: 'executeTime',
@@ -103,6 +108,7 @@ const TaskLogWatcher = () => {
       executeTime: moment(Math.round(item.execute_time) * 1000).format(
         'YYYY.MM.DD HH:mm:ss'
       ),
+      name: item.name,
       log: item.log,
       handleResult: item.execute_result,
       task_id: item.task_id,

+ 9 - 0
src/module/taskmgmt/page/TaskMgmtView.jsx

@@ -25,6 +25,7 @@ import {
   getApi,
 } from '../services'
 import copy from 'copy-to-clipboard'
+import moment from 'moment'
 
 const TaskMgmtWrapper = styled.div`
   padding: 20px;
@@ -135,6 +136,9 @@ const TaskMgmtView = () => {
             item.cron_type === 1 ? '执行一次' : item.cron_expression,
           historicalRuntime: item.history,
           taskState: item.status === 1,
+          update_time: item.update_time
+            ? moment(item.update_time * 1000).format('YYYY.MM.DD HH:mm:ss')
+            : '无',
         }
       })
       setJogList(list)
@@ -194,6 +198,11 @@ const TaskMgmtView = () => {
           </Popover>
         ),
     },
+    {
+      title: '更新时间',
+      dataIndex: 'update_time',
+      key: 'update_time',
+    },
     {
       title: '历史运行情况',
       dataIndex: 'historicalRuntime',