mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-06 16:36:52 +08:00
add api file
This commit is contained in:
49
resources/src/api/process.ts
Normal file
49
resources/src/api/process.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import api from "./api";
|
||||
|
||||
export function getProcessList() {
|
||||
return api.get("/process", undefined).then((res) => res);
|
||||
}
|
||||
|
||||
export function getProcessListWait() {
|
||||
return api.get("/process/wait", undefined).then((res) => res);
|
||||
}
|
||||
|
||||
export function killProcessAll(uuid) {
|
||||
return api.delete("/process/all", { uuid }).then((res) => res);
|
||||
}
|
||||
|
||||
export function startProcessAll(uuid) {
|
||||
return api.put("/process/all", { uuid }).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("/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);
|
||||
}
|
Reference in New Issue
Block a user