⚡ 分离批量执行模块.
This commit is contained in:
@@ -14,19 +14,9 @@ const EXEC: AppRouteRecordRaw[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'execCommandLog',
|
name: 'execCommandLog',
|
||||||
path: '/exec-command-log',
|
path: '/exec-log',
|
||||||
component: () => import('@/views/exec/exec-command-log/index.vue'),
|
component: () => import('@/views/exec/exec-command-log/index.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'execJob',
|
|
||||||
path: '/exec-job',
|
|
||||||
component: () => import('@/views/exec/exec-job/index.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'execJobLog',
|
|
||||||
path: '/exec-job-log',
|
|
||||||
component: () => import('@/views/exec/exec-job-log/index.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: 'execTemplate',
|
name: 'execTemplate',
|
||||||
path: '/exec-template',
|
path: '/exec-template',
|
||||||
@@ -41,14 +31,9 @@ const EXEC: AppRouteRecordRaw[] = [
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
name: 'execCommandLogView',
|
name: 'execCommandLogView',
|
||||||
path: '/exec-command-log-view',
|
path: '/exec-log-view',
|
||||||
component: () => import('@/views/exec/exec-command-log-view/index.vue'),
|
component: () => import('@/views/exec/exec-command-log-view/index.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'execJobLogView',
|
|
||||||
path: '/exec-job-log-view',
|
|
||||||
component: () => import('@/views/exec/exec-job-log-view/index.vue'),
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
36
orion-ops-ui/src/router/routes/modules/job.ts
Normal file
36
orion-ops-ui/src/router/routes/modules/job.ts
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import type { AppRouteRecordRaw } from '../types';
|
||||||
|
import { DEFAULT_LAYOUT, FULL_LAYOUT } from '../base';
|
||||||
|
|
||||||
|
const JOB: AppRouteRecordRaw[] = [
|
||||||
|
{
|
||||||
|
name: 'jobModule',
|
||||||
|
path: '/job-module',
|
||||||
|
component: DEFAULT_LAYOUT,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'execJob',
|
||||||
|
path: '/exec-job',
|
||||||
|
component: () => import('@/views/job/exec-job/index.vue'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'execJobLog',
|
||||||
|
path: '/exec-job-log',
|
||||||
|
component: () => import('@/views/job/exec-job-log/index.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'jobFullModule',
|
||||||
|
path: '/job-full-module',
|
||||||
|
component: FULL_LAYOUT,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'execJobLogView',
|
||||||
|
path: '/job-log-view',
|
||||||
|
component: () => import('@/views/job/exec-job-log-view/index.vue'),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
export default JOB;
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro">操作文档</a-link>
|
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro">操作文档</a-link>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro/#/about/change-log">更新文档</a-link>
|
<a-link target="_blank" href="https://lijiahangmax.github.io/orion-ops-pro/#/about/update-log">更新日志</a-link>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, nextTick } from 'vue';
|
import { onMounted, ref, nextTick } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { getExecCommandLog } from '@/api/exec/exec-command-log';
|
import { getExecJobLog } from '@/api/exec/exec-job-log';
|
||||||
import ExecLogPanel from '@/components/exec/log/panel/index.vue';
|
import ExecLogPanel from '@/components/exec/log/panel/index.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
// 初始化
|
// 初始化
|
||||||
const init = async (id: number) => {
|
const init = async (id: number) => {
|
||||||
// 获取执行日志
|
// 获取执行日志
|
||||||
const { data } = await getExecCommandLog(id);
|
const { data } = await getExecJobLog(id);
|
||||||
// 打开日志
|
// 打开日志
|
||||||
await nextTick(() => {
|
await nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
import { execHostStatusKey, execHostStatus } from '@/components/exec/log/const';
|
||||||
import { useDictStore } from '@/store';
|
import { useDictStore } from '@/store';
|
||||||
import useLoading from '@/hooks/loading';
|
import useLoading from '@/hooks/loading';
|
||||||
import columns from '../../exec-command-log/types/host-table.columns';
|
import columns from '@/views/exec/exec-command-log/types/host-table.columns';
|
||||||
import { useExpandable } from '@/types/table';
|
import { useExpandable } from '@/types/table';
|
||||||
import { dateFormat, formatDuration } from '@/utils';
|
import { dateFormat, formatDuration } from '@/utils';
|
||||||
import { downloadExecJobLogFile } from '@/api/exec/exec-job-log';
|
import { downloadExecJobLogFile } from '@/api/exec/exec-job-log';
|
||||||
Reference in New Issue
Block a user