Files
orion-visor/orion-ops-ui/src/api/exec/exec-command.ts

30 lines
671 B
TypeScript
Raw Normal View History

2024-04-12 15:23:15 +08:00
import type { ExecLogQueryResponse } from './exec-log';
2024-04-10 19:24:59 +08:00
import axios from 'axios';
/**
*
*/
export interface ExecCommandRequest {
logId?: number;
description?: string;
timeout?: number;
2024-04-17 00:14:23 +08:00
scriptExec?: number;
2024-04-10 19:24:59 +08:00
command?: string;
parameterSchema?: string;
hostIdList?: Array<number>;
}
/**
*
*/
export function batchExecCommand(request: ExecCommandRequest) {
2024-04-12 15:23:15 +08:00
return axios.post<ExecLogQueryResponse>('/asset/exec-command/exec', request);
2024-04-10 19:24:59 +08:00
}
/**
*
*/
export function reExecCommand(request: ExecCommandRequest) {
2024-04-12 15:23:15 +08:00
return axios.post<ExecLogQueryResponse>('/asset/exec-command/re-exec', request);
2024-04-10 19:24:59 +08:00
}