diff --git a/src/i18n/langs/en.json b/src/i18n/langs/en.json index 4c36f4846..acb090810 100644 --- a/src/i18n/langs/en.json +++ b/src/i18n/langs/en.json @@ -738,7 +738,8 @@ "SessionsAudit": "Sessions audit", "SessionList": "Session list", "BatchCommand": "Batch Command", - "BatchCommandLog": "Batch Command Logs", + "BatchScript": "Batch Script", + "tasksLog": "Batch Command Logs", "CeleryTaskLog": "Celery task log", "CommandExecutions": "CommandExecutions ", "CommandFilterCreate": "Command filter create", @@ -787,7 +788,8 @@ "FtpLog": "FTP Logs", "GatewayCreate": "Gateway create", "GatewayUpdate": "Gateway update", - "JobCenter": "Devops", + "TaskCenter": "Task", + "JobCenter": "Job", "LabelCreate": "Label create", "LabelList": "Labels", "LabelUpdate": "Label update", diff --git a/src/i18n/langs/ja.json b/src/i18n/langs/ja.json index 55e7338d8..2e2e08223 100644 --- a/src/i18n/langs/ja.json +++ b/src/i18n/langs/ja.json @@ -751,7 +751,7 @@ "TicketsTodo": "To-doオーダー", "TicketsDone": "すでに勤務単", "TicketsNew": "ワークオーダーを提出する", - "BatchCommandLog": "一括コマンド", + "tasksLog": "一括コマンド", "CeleryTaskLog": "Celeryタスクログ", "CommandExecutions": "コマンド実行", "CommandFilterCreate": "コマンドフィルタの作成", diff --git a/src/i18n/langs/zh.json b/src/i18n/langs/zh.json index 2efbd0103..58447e15f 100644 --- a/src/i18n/langs/zh.json +++ b/src/i18n/langs/zh.json @@ -766,10 +766,11 @@ "LogsAudit": "日志审计", "SessionList": "会话记录", "BatchCommand": "批量命令", + "BatchScript": "批量脚本", "TicketsTodo": "待办工单", "TicketsDone": "已办工单", "TicketsNew": "提交工单", - "BatchCommandLog": "批量命令", + "tasksLog": "批量命令", "CeleryTaskLog": "Celery任务日志", "CommandExecutions": "命令执行", "CommandFilterCreate": "创建命令过滤器", @@ -820,6 +821,7 @@ "FtpLog": "FTP日志", "GatewayCreate": "创建网关", "GatewayUpdate": "更新网关", + "TaskCenter": "任务中心", "JobCenter": "作业中心", "LabelCreate": "创建标签", "LabelList": "标签管理", diff --git a/src/router/audit/logs.js b/src/router/audit/logs.js index d4ae0c2ee..aa127c6a5 100644 --- a/src/router/audit/logs.js +++ b/src/router/audit/logs.js @@ -30,10 +30,10 @@ export default [ }, { path: 'command-execution-log', - name: 'BatchCommandLog', + name: 'tasksLog', component: () => import('@/views/audits/CommandExecutionList'), meta: { - title: i18n.t('route.BatchCommandLog'), + title: i18n.t('route.tasksLog'), permissions: ['ops.view_commandexecution'] } } diff --git a/src/router/common.js b/src/router/common.js index 208bc277d..1e781f366 100644 --- a/src/router/common.js +++ b/src/router/common.js @@ -7,7 +7,7 @@ import i18n from '@/i18n/i18n' export default [ { path: '/ops/celery/task/:id/log/', - component: () => import('@/views/ops/CeleryTaskLog'), + component: () => import('@/views/tasks/CeleryTaskLog'), name: 'CeleryTaskLog', hidden: true, meta: { @@ -17,7 +17,7 @@ export default [ }, { path: '/ops/task/task/:id/log/', - component: () => import('@/views/ops/CeleryTaskLog'), + component: () => import('@/views/tasks/CeleryTaskLog'), name: 'TaskLog', hidden: true, meta: { diff --git a/src/router/console/index.js b/src/router/console/index.js index fe143b9d2..823c01eb1 100644 --- a/src/router/console/index.js +++ b/src/router/console/index.js @@ -6,7 +6,7 @@ import store from '@/store' import UsersRoute from './users' import AssetsRoute from './assets' import PermsRoute from './perms' -import OpsRoutes from './ops' +import TaskRoutes from './tasks' import AclRoutes from './acls' import AccountRoutes from './accounts' @@ -88,14 +88,14 @@ export default { children: AclRoutes }, { - path: '/console/ops', + path: '/console/tasks', component: empty, - name: 'JobCenter', + name: 'TaskCenter', meta: { - title: i18n.t('route.JobCenter'), - icon: 'coffee' + title: i18n.t('route.TaskCenter'), + icon: 'tasks' }, - children: OpsRoutes + children: TaskRoutes } ] } diff --git a/src/router/console/ops.js b/src/router/console/ops.js deleted file mode 100644 index c6cbab122..000000000 --- a/src/router/console/ops.js +++ /dev/null @@ -1,64 +0,0 @@ -import i18n from '@/i18n/i18n' -import { BASE_URL } from '@/utils/common' -import empty from '@/layout/empty' - -export default [ - { - path: 'tasks', - component: empty, - meta: { title: i18n.t('route.TaskList') }, - children: [ - { - path: '', - name: 'TaskList', - component: () => import('@/views/ops/TaskList'), - meta: { title: i18n.t('route.TaskList'), permissions: [] } - }, - { - path: ':id', - component: () => import('@/views/ops/TaskDetail'), - name: 'TaskDetail', - hidden: true, - meta: { title: i18n.t('route.TaskDetail'), permissions: [] } - } - ] - }, - { - path: 'adhoc/:id', - component: () => import('@/views/ops/TaskDetail/AdhocDetail'), - name: 'AdhocDetail', - hidden: true, - meta: { - title: i18n.t('route.TaskDetail'), - permissions: ['ops.view_adhoc'], - activeMenu: '/ops/tasks' - } - }, - { - path: 'executions/:id', - component: () => import('@/views/ops/TaskDetail/HistoryExecutionDetail'), - name: 'HistoryExecutionDetail', - hidden: true, - meta: { - title: i18n.t('route.TaskDetail'), - permissions: ['ops.view_adhocexecution'], - activeMenu: '/console/ops/tasks' - } - }, - { - path: 'command-executions/create', - name: 'BatchCommand', - component: () => import('@/views/ops/CommandExecution'), - meta: { - title: i18n.t('route.BatchCommand'), - permissions: ['ops.add_adhocexecution'], - hidden: ({ settings }) => !settings['SECURITY_COMMAND_EXECUTION'] - } - }, - { - path: `${BASE_URL}/core/flower/?_=${Date.now()}`, - name: 'TaskMonitor', - // component: () => window.open(`/core/flower?_=${Date.now()}`), - meta: { title: i18n.t('route.TaskMonitor'), permissions: ['ops.view_taskmonitor'] } - } -] diff --git a/src/router/console/tasks.js b/src/router/console/tasks.js new file mode 100644 index 000000000..a2bf48290 --- /dev/null +++ b/src/router/console/tasks.js @@ -0,0 +1,32 @@ +import i18n from '@/i18n/i18n' +import { BASE_URL } from '@/utils/common' +import empty from '@/layout/empty' + +export default [ + { + path: 'tasks', + component: empty, + meta: { title: i18n.t('route.TaskList') }, + children: [ + { + path: '', + name: 'TaskList', + component: () => import('@/views/tasks/TaskList'), + meta: { title: i18n.t('route.TaskList'), permissions: [] } + }, + { + path: ':id', + component: () => import('@/views/tasks/TaskDetail'), + name: 'TaskDetail', + hidden: true, + meta: { title: i18n.t('route.TaskDetail'), permissions: [] } + } + ] + }, + { + path: `${BASE_URL}/core/flower/?_=${Date.now()}`, + name: 'TaskMonitor', + // component: () => window.open(`/core/flower?_=${Date.now()}`), + meta: { title: i18n.t('route.TaskMonitor'), permissions: ['ops.view_taskmonitor'] } + } +] diff --git a/src/router/workbench/index.js b/src/router/workbench/index.js index e4d64545d..a7f0741aa 100644 --- a/src/router/workbench/index.js +++ b/src/router/workbench/index.js @@ -42,26 +42,7 @@ export default { permissions: ['perms.view_myassets'] } }, - { - path: '/workbench/ops', - component: empty, - meta: { - permissions: ['ops.add_commandexecution'], - hidden: ({ settings }) => !settings['SECURITY_COMMAND_EXECUTION'] - }, - children: [ - { - path: '', - name: 'CommandExecutions', - component: () => import('@/views/ops/CommandExecution'), - meta: { - title: i18n.t('route.BatchCommand'), - icon: 'terminal', - permissions: ['ops.add_commandexecution'] - } - } - ] - }, + { path: `external-luna`, component: empty, @@ -97,6 +78,38 @@ export default { } } ] + }, + { + path: '/workbench/ops', + component: empty, + name: 'JobCenter', + meta: { + title: i18n.t('route.JobCenter'), + icon: 'coffee', + permissions: [] + }, + children: [ + { + path: 'a', + name: 'CommandExecutions2', + component: () => import('@/views/ops/Command'), + meta: { + title: i18n.t('route.BatchCommand'), + icon: 'terminal', + permissions: [] + } + }, + { + path: '', + name: 'CommandExecutions', + component: () => import('@/views/ops/Command'), + meta: { + title: i18n.t('route.BatchScript'), + icon: 'book', + permissions: [] + } + } + ] } ] } diff --git a/src/views/ops/Command.vue b/src/views/ops/Command.vue new file mode 100644 index 000000000..617b48826 --- /dev/null +++ b/src/views/ops/Command.vue @@ -0,0 +1,13 @@ + + + + + + + diff --git a/src/views/ops/CommandExecution.vue b/src/views/ops/CommandExecution.vue deleted file mode 100644 index e7b25b0b0..000000000 --- a/src/views/ops/CommandExecution.vue +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - {{ this.$t('ops.Execute') }} - - - - - - - - - - - - diff --git a/src/views/ops/TaskDetail/AdhocDetail/AdhocDetail.vue b/src/views/ops/TaskDetail/AdhocDetail/AdhocDetail.vue deleted file mode 100644 index ade036559..000000000 --- a/src/views/ops/TaskDetail/AdhocDetail/AdhocDetail.vue +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/views/ops/TaskDetail/AdhocDetail/AdhocExecutionHistory.vue b/src/views/ops/TaskDetail/AdhocDetail/AdhocExecutionHistory.vue deleted file mode 100644 index 46413b8c0..000000000 --- a/src/views/ops/TaskDetail/AdhocDetail/AdhocExecutionHistory.vue +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - - diff --git a/src/views/ops/TaskDetail/AdhocDetail/index.vue b/src/views/ops/TaskDetail/AdhocDetail/index.vue deleted file mode 100644 index 8b7e5f1e6..000000000 --- a/src/views/ops/TaskDetail/AdhocDetail/index.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - diff --git a/src/views/ops/TaskList.vue b/src/views/ops/TaskList.vue deleted file mode 100644 index 493d58a43..000000000 --- a/src/views/ops/TaskList.vue +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - diff --git a/src/views/ops/CeleryTaskLog.vue b/src/views/tasks/CeleryTaskLog.vue similarity index 100% rename from src/views/ops/CeleryTaskLog.vue rename to src/views/tasks/CeleryTaskLog.vue diff --git a/src/views/ops/RunInfoCard/index.vue b/src/views/tasks/RunInfoCard/index.vue similarity index 100% rename from src/views/ops/RunInfoCard/index.vue rename to src/views/tasks/RunInfoCard/index.vue diff --git a/src/views/ops/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue b/src/views/tasks/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue similarity index 97% rename from src/views/ops/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue rename to src/views/tasks/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue index 80345f564..4c297b2ca 100644 --- a/src/views/ops/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue +++ b/src/views/tasks/TaskDetail/HistoryExecutionDetail/HistoryExecutionDetail.vue @@ -13,7 +13,7 @@ + +