mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-09-28 21:02:11 +08:00
51 lines
1.4 KiB
TypeScript
51 lines
1.4 KiB
TypeScript
import { ProcessConfig, ProcessItem } from "../types/process/process";
|
|
import api from "./api";
|
|
|
|
export function getProcessList() {
|
|
return api.get<ProcessItem[]>("/process", undefined).then((res) => res);
|
|
}
|
|
|
|
export function getProcessListWait() {
|
|
return api.get<ProcessItem[]>("/process/wait", undefined).then((res) => res);
|
|
}
|
|
|
|
export function killProcessAll() {
|
|
return api.delete("/process/all", { }).then((res) => res);
|
|
}
|
|
|
|
export function startProcessAll() {
|
|
return api.put("/process/all", { }).then((res) => res);
|
|
}
|
|
|
|
export function killProcess(uuid) {
|
|
return api.delete("/process", { uuid }).then((res) => res);
|
|
}
|
|
|
|
export function startProcess(uuid) {
|
|
return api.put("/process", { uuid }).then((res) => res);
|
|
}
|
|
|
|
export function getContorl(uuid) {
|
|
return api.get("/process/control", { uuid }).then((res) => res);
|
|
}
|
|
|
|
export function getProcessConfig(uuid) {
|
|
return api.get<ProcessConfig>("/process/config", { uuid }).then((res) => res);
|
|
}
|
|
|
|
export function deleteProcessConfig(uuid) {
|
|
return api.delete("/process/config", { uuid }).then((res) => res);
|
|
}
|
|
|
|
export function putProcessConfig(data) {
|
|
return api.put("/process/config", data).then((res) => res);
|
|
}
|
|
|
|
export function postProcessConfig(data) {
|
|
return api.post("/process/config", data).then((res) => res);
|
|
}
|
|
|
|
export function createProcessShare(data) {
|
|
return api.post("/process/share", data).then((res) => res);
|
|
}
|