🔨 抽象执行日志.

This commit is contained in:
lijiahang
2024-04-12 15:23:15 +08:00
parent 40d0ec2025
commit a4c5d25815
42 changed files with 1304 additions and 388 deletions

View File

@@ -1,4 +1,4 @@
import type { ExecCommandLogQueryResponse } from './exec-command-log';
import type { ExecLogQueryResponse } from './exec-log';
import axios from 'axios';
/**
@@ -13,38 +13,16 @@ export interface ExecCommandRequest {
hostIdList?: Array<number>;
}
/**
* 中断命令请求
*/
export interface ExecCommandInterruptRequest {
logId?: number;
hostLogId?: number;
}
/**
* 批量执行命令
*/
export function batchExecCommand(request: ExecCommandRequest) {
return axios.post<ExecCommandLogQueryResponse>('/asset/exec-command/exec', request);
return axios.post<ExecLogQueryResponse>('/asset/exec-command/exec', request);
}
/**
* 重新执行命令
*/
export function reExecCommand(request: ExecCommandRequest) {
return axios.post<ExecCommandLogQueryResponse>('/asset/exec-command/re-exec', request);
}
/**
* 中断执行命令
*/
export function interruptExecCommand(request: ExecCommandInterruptRequest) {
return axios.put('/asset/exec-command/interrupt', request);
}
/**
* 中断执行主机命令
*/
export function interruptHostExecCommand(request: ExecCommandInterruptRequest) {
return axios.put('/asset/exec-command/interrupt-host', request);
return axios.post<ExecLogQueryResponse>('/asset/exec-command/re-exec', request);
}