diff --git a/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandLogOperatorType.java b/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandLogOperatorType.java
index 0c4f4480..37d7f458 100644
--- a/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandLogOperatorType.java
+++ b/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandLogOperatorType.java
@@ -8,7 +8,7 @@ import static com.orion.ops.framework.biz.operator.log.core.enums.OperatorRiskLe
import static com.orion.ops.framework.biz.operator.log.core.enums.OperatorRiskLevel.L;
/**
- * 批量执行 操作记录类型
+ * 批量执行日志 操作记录类型
*
* @author Jiahang Li
* @version 1.0.1
@@ -29,8 +29,8 @@ public class ExecCommandLogOperatorType extends InitializingOperatorTypes {
public OperatorType[] types() {
return new OperatorType[]{
new OperatorType(H, DELETE, "删除执行记录 ${count} 条"),
- new OperatorType(H, CLEAR, "清理执行记录 ${count} 条"),
new OperatorType(H, DELETE_HOST, "删除主机执行记录 ${logId} ${hostName}"),
+ new OperatorType(H, CLEAR, "清理执行记录 ${count} 条"),
new OperatorType(L, DOWNLOAD, "下载主机执行日志 ${logId} ${hostName}"),
};
}
diff --git a/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandOperatorType.java b/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandOperatorType.java
index f9945e59..b4b28c9a 100644
--- a/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandOperatorType.java
+++ b/orion-ops-module-asset/orion-ops-module-asset-service/src/main/java/com/orion/ops/module/asset/define/operator/ExecCommandOperatorType.java
@@ -13,7 +13,7 @@ import static com.orion.ops.framework.biz.operator.log.core.enums.OperatorRiskLe
* @version 1.0.1
* @since 2024-3-11 11:31
*/
-@Module("asset:exec-command-log")
+@Module("asset:exec-command")
public class ExecCommandOperatorType extends InitializingOperatorTypes {
public static final String EXEC = "exec-command:exec";
diff --git a/orion-ops-ui/src/api/exec/exec-command.ts b/orion-ops-ui/src/api/exec/exec-command.ts
index bfc4498a..9c3b6568 100644
--- a/orion-ops-ui/src/api/exec/exec-command.ts
+++ b/orion-ops-ui/src/api/exec/exec-command.ts
@@ -1,4 +1,4 @@
-import type { ExecLogQueryResponse } from './exec-log';
+import type { ExecCommandLogQueryResponse } from './exec-command-log';
import axios from 'axios';
/**
@@ -25,14 +25,14 @@ export interface ExecCommandInterruptRequest {
* 批量执行命令
*/
export function batchExecCommand(request: ExecCommandRequest) {
- return axios.post('/asset/exec-command/exec', request);
+ return axios.post('/asset/exec-command/exec', request);
}
/**
* 重新执行命令
*/
export function reExecCommand(request: ExecCommandRequest) {
- return axios.post('/asset/exec-command/re-exec', request);
+ return axios.post('/asset/exec-command/re-exec', request);
}
/**
diff --git a/orion-ops-ui/src/api/exec/exec-log.ts b/orion-ops-ui/src/api/exec/exec-log.ts
index 125ae5ad..30c0dbf2 100644
--- a/orion-ops-ui/src/api/exec/exec-log.ts
+++ b/orion-ops-ui/src/api/exec/exec-log.ts
@@ -1,20 +1,7 @@
-import type { DataGrid, Pagination } from '@/types/global';
import type { TableData } from '@arco-design/web-vue/es/table/interface';
import axios from 'axios';
import qs from 'query-string';
-/**
- * 执行记录查询请求
- */
-export interface ExecLogQueryRequest extends Pagination {
- id?: number;
- userId?: number;
- description?: string;
- command?: string;
- status?: string;
- startTimeRange?: string[];
-}
-
/**
* 执行记录查询响应
*/
@@ -66,13 +53,6 @@ export interface ExecStatusResponse {
hostList: Array;
}
-/**
- * 分页查询执行记录
- */
-export function getExecLogPage(request: ExecLogQueryRequest) {
- return axios.post>('/asset/exec-log/query', request);
-}
-
/**
* 查询执行记录
*/
@@ -80,12 +60,6 @@ export function getExecLog(id: number) {
return axios.get('/asset/exec-log/get', { params: { id } });
}
-/**
- * 查询主机执行记录
- */
-export function getExecHostLogList(logId: number) {
- return axios.get>('/asset/exec-log/host-list', { params: { logId } });
-}
/**
* 查询命令执行状态
@@ -98,50 +72,3 @@ export function getExecLogStatus(idList: Array) {
}
});
}
-
-/**
- * 查询历史执行记录
- */
-export function getExecLogHistory(limit: number) {
- return axios.get>('/asset/exec-log/history', { params: { page: 1, limit } });
-}
-
-/**
- * 删除执行记录
- */
-export function deleteExecLog(id: number) {
- return axios.delete('/asset/exec-log/delete', { params: { id } });
-}
-
-/**
- * 批量删除执行记录
- */
-export function batchDeleteExecLog(idList: Array) {
- return axios.delete('/asset/exec-log/batch-delete', {
- params: { idList },
- paramsSerializer: params => {
- return qs.stringify(params, { arrayFormat: 'comma' });
- }
- });
-}
-
-/**
- * 删除主机执行记录
- */
-export function deleteExecHostLog(id: number) {
- return axios.delete('/asset/exec-log/delete-host', { params: { id } });
-}
-
-/**
- * 查询操作日志数量
- */
-export function getExecLogCount(request: ExecLogQueryRequest) {
- return axios.post('/asset/exec-log/query-count', request);
-}
-
-/**
- * 清空操作日志
- */
-export function clearExecLog(request: ExecLogQueryRequest) {
- return axios.post('/asset/exec-log/clear', request);
-}
diff --git a/orion-ops-ui/src/api/exec/exec.ts b/orion-ops-ui/src/api/exec/exec.ts
index b36b0ba8..e4e5bc69 100644
--- a/orion-ops-ui/src/api/exec/exec.ts
+++ b/orion-ops-ui/src/api/exec/exec.ts
@@ -1,26 +1,5 @@
-import type { ExecLogQueryResponse } from './exec-log';
import axios from 'axios';
-/**
- * 执行命令请求
- */
-export interface ExecCommandRequest {
- logId?: number;
- description?: string;
- timeout?: number;
- command?: string;
- parameterSchema?: string;
- hostIdList?: Array;
-}
-
-/**
- * 中断命令请求
- */
-export interface ExecInterruptRequest {
- logId?: number;
- hostLogId?: number;
-}
-
/**
* 中断命令请求
*/
@@ -29,34 +8,6 @@ export interface ExecTailRequest {
hostExecIdList?: Array;
}
-/**
- * 批量执行命令
- */
-export function batchExecCommand(request: ExecCommandRequest) {
- return axios.post('/asset/exec/exec-command', request);
-}
-
-/**
- * 重新执行命令
- */
-export function reExecCommand(request: ExecCommandRequest) {
- return axios.post('/asset/exec/re-exec-command', request);
-}
-
-/**
- * 中断执行命令
- */
-export function interruptExec(request: ExecInterruptRequest) {
- return axios.put('/asset/exec/interrupt', request);
-}
-
-/**
- * 中断执行主机命令
- */
-export function interruptHostExec(request: ExecInterruptRequest) {
- return axios.put('/asset/exec/interrupt-host', request);
-}
-
/**
* 查看执行日志
*/
diff --git a/orion-ops-ui/src/router/routes/modules/exec.ts b/orion-ops-ui/src/router/routes/modules/exec.ts
index 46c5f59f..81c6c20f 100644
--- a/orion-ops-ui/src/router/routes/modules/exec.ts
+++ b/orion-ops-ui/src/router/routes/modules/exec.ts
@@ -17,6 +17,16 @@ const EXEC: AppRouteRecordRaw[] = [
path: '/exec-command-log',
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',
path: '/exec-template',
@@ -30,9 +40,14 @@ const EXEC: AppRouteRecordRaw[] = [
component: FULL_LAYOUT,
children: [
{
- name: 'execLogView',
- path: '/exec-log-view',
- component: () => import('@/views/exec/exec-log-view/index.vue'),
+ name: 'execCommandLogView',
+ path: '/exec-command-log-view',
+ 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'),
},
],
}
diff --git a/orion-ops-ui/src/views/exec/exec-log-view/index.vue b/orion-ops-ui/src/views/exec/exec-command-log-view/index.vue
similarity index 97%
rename from orion-ops-ui/src/views/exec/exec-log-view/index.vue
rename to orion-ops-ui/src/views/exec/exec-command-log-view/index.vue
index ac874112..85e5d226 100644
--- a/orion-ops-ui/src/views/exec/exec-log-view/index.vue
+++ b/orion-ops-ui/src/views/exec/exec-command-log-view/index.vue
@@ -8,7 +8,7 @@
diff --git a/orion-ops-ui/src/views/exec/exec-log/components/exec-host-log-table.vue b/orion-ops-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue
similarity index 89%
rename from orion-ops-ui/src/views/exec/exec-log/components/exec-host-log-table.vue
rename to orion-ops-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue
index fbbfdb2c..2e14d84e 100644
--- a/orion-ops-ui/src/views/exec/exec-log/components/exec-host-log-table.vue
+++ b/orion-ops-ui/src/views/exec/exec-command-log/components/exec-command-host-log-table.vue
@@ -96,13 +96,13 @@
@@ -33,8 +33,8 @@
import { dictKeys } from './types/const';
import { useRouter } from 'vue-router';
import { openNewRoute } from '@/router';
- import ExecLogTable from './components/exec-log-table.vue';
- import ExecLogClearModal from './components/exec-log-clear-modal.vue';
+ import ExecCommandLogTable from './components/exec-command-log-table.vue';
+ import ExecCommandLogClearModal from './components/exec-command-log-clear-modal.vue';
import JsonEditorModal from '@/components/view/json-editor/modal/index.vue';
import ShellEditorModal from '@/components/view/shell-editor/modal/index.vue';
import ExecLogPanelModal from '@/components/exec/log/panel-modal/index.vue';
@@ -68,7 +68,7 @@
if (newWindow) {
// 跳转新页面
openNewRoute({
- name: 'execLogView',
+ name: 'execCommandLogView',
query: {
id
}
diff --git a/orion-ops-ui/src/views/exec/exec-log/types/const.ts b/orion-ops-ui/src/views/exec/exec-command-log/types/const.ts
similarity index 100%
rename from orion-ops-ui/src/views/exec/exec-log/types/const.ts
rename to orion-ops-ui/src/views/exec/exec-command-log/types/const.ts
diff --git a/orion-ops-ui/src/views/exec/exec-log/types/host-table.columns.ts b/orion-ops-ui/src/views/exec/exec-command-log/types/host-table.columns.ts
similarity index 100%
rename from orion-ops-ui/src/views/exec/exec-log/types/host-table.columns.ts
rename to orion-ops-ui/src/views/exec/exec-command-log/types/host-table.columns.ts
diff --git a/orion-ops-ui/src/views/exec/exec-log/types/table.columns.ts b/orion-ops-ui/src/views/exec/exec-command-log/types/table.columns.ts
similarity index 100%
rename from orion-ops-ui/src/views/exec/exec-log/types/table.columns.ts
rename to orion-ops-ui/src/views/exec/exec-command-log/types/table.columns.ts
diff --git a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-editor.vue b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-editor.vue
similarity index 97%
rename from orion-ops-ui/src/views/exec/exec-command/components/exec-panel-editor.vue
rename to orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-editor.vue
index 5c9b7f11..3173208c 100644
--- a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-editor.vue
+++ b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-editor.vue
@@ -25,7 +25,7 @@
diff --git a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-form.vue b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-form.vue
similarity index 96%
rename from orion-ops-ui/src/views/exec/exec-command/components/exec-panel-form.vue
rename to orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-form.vue
index d91c9a0f..f8b9b24f 100644
--- a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-form.vue
+++ b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-form.vue
@@ -23,7 +23,7 @@
diff --git a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-history.vue b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue
similarity index 88%
rename from orion-ops-ui/src/views/exec/exec-command/components/exec-panel-history.vue
rename to orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue
index 1b7844a6..f9d89aa8 100644
--- a/orion-ops-ui/src/views/exec/exec-command/components/exec-panel-history.vue
+++ b/orion-ops-ui/src/views/exec/exec-command/components/exec-command-panel-history.vue
@@ -38,15 +38,15 @@