mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-12-10 01:40:25 +08:00
refactor: 前端统一使用prettier格式化&枚举值统一管理
This commit is contained in:
@@ -2,47 +2,47 @@ import Api from '@/common/Api';
|
||||
|
||||
export const machineApi = {
|
||||
// 获取权限列表
|
||||
list: Api.newGet("/machines"),
|
||||
getMachinePwd: Api.newGet("/machines/{id}/pwd"),
|
||||
info: Api.newGet("/machines/{id}/sysinfo"),
|
||||
stats: Api.newGet("/machines/{id}/stats"),
|
||||
process: Api.newGet("/machines/{id}/process"),
|
||||
list: Api.newGet('/machines'),
|
||||
getMachinePwd: Api.newGet('/machines/{id}/pwd'),
|
||||
info: Api.newGet('/machines/{id}/sysinfo'),
|
||||
stats: Api.newGet('/machines/{id}/stats'),
|
||||
process: Api.newGet('/machines/{id}/process'),
|
||||
// 终止进程
|
||||
killProcess: Api.newDelete("/machines/{id}/process"),
|
||||
closeCli: Api.newDelete("/machines/{id}/close-cli"),
|
||||
testConn: Api.newPost("/machines/test-conn"),
|
||||
killProcess: Api.newDelete('/machines/{id}/process'),
|
||||
closeCli: Api.newDelete('/machines/{id}/close-cli'),
|
||||
testConn: Api.newPost('/machines/test-conn'),
|
||||
// 保存按钮
|
||||
saveMachine: Api.newPost("/machines"),
|
||||
saveMachine: Api.newPost('/machines'),
|
||||
// 调整状态
|
||||
changeStatus: Api.newPut("/machines/{id}/{status}"),
|
||||
changeStatus: Api.newPut('/machines/{id}/{status}'),
|
||||
// 删除机器
|
||||
del: Api.newDelete("/machines/{id}"),
|
||||
scripts: Api.newGet("/machines/{machineId}/scripts"),
|
||||
runScript: Api.newGet("/machines/{machineId}/scripts/{scriptId}/run"),
|
||||
saveScript: Api.newPost("/machines/{machineId}/scripts"),
|
||||
deleteScript: Api.newDelete("/machines/{machineId}/scripts/{scriptId}"),
|
||||
del: Api.newDelete('/machines/{id}'),
|
||||
scripts: Api.newGet('/machines/{machineId}/scripts'),
|
||||
runScript: Api.newGet('/machines/{machineId}/scripts/{scriptId}/run'),
|
||||
saveScript: Api.newPost('/machines/{machineId}/scripts'),
|
||||
deleteScript: Api.newDelete('/machines/{machineId}/scripts/{scriptId}'),
|
||||
// 获取配置文件列表
|
||||
files: Api.newGet("/machines/{id}/files"),
|
||||
lsFile: Api.newGet("/machines/{machineId}/files/{fileId}/read-dir"),
|
||||
dirSize: Api.newGet("/machines/{machineId}/files/{fileId}/dir-size"),
|
||||
fileStat: Api.newGet("/machines/{machineId}/files/{fileId}/file-stat"),
|
||||
rmFile: Api.newDelete("/machines/{machineId}/files/{fileId}/remove"),
|
||||
uploadFile: Api.newPost("/machines/{machineId}/files/{fileId}/upload?token={token}"),
|
||||
fileContent: Api.newGet("/machines/{machineId}/files/{fileId}/read"),
|
||||
createFile: Api.newPost("/machines/{machineId}/files/{id}/create-file"),
|
||||
files: Api.newGet('/machines/{id}/files'),
|
||||
lsFile: Api.newGet('/machines/{machineId}/files/{fileId}/read-dir'),
|
||||
dirSize: Api.newGet('/machines/{machineId}/files/{fileId}/dir-size'),
|
||||
fileStat: Api.newGet('/machines/{machineId}/files/{fileId}/file-stat'),
|
||||
rmFile: Api.newDelete('/machines/{machineId}/files/{fileId}/remove'),
|
||||
uploadFile: Api.newPost('/machines/{machineId}/files/{fileId}/upload?token={token}'),
|
||||
fileContent: Api.newGet('/machines/{machineId}/files/{fileId}/read'),
|
||||
createFile: Api.newPost('/machines/{machineId}/files/{id}/create-file'),
|
||||
// 修改文件内容
|
||||
updateFileContent: Api.newPost("/machines/{machineId}/files/{id}/write"),
|
||||
updateFileContent: Api.newPost('/machines/{machineId}/files/{id}/write'),
|
||||
// 添加文件or目录
|
||||
addConf: Api.newPost("/machines/{machineId}/files"),
|
||||
addConf: Api.newPost('/machines/{machineId}/files'),
|
||||
// 删除配置的文件or目录
|
||||
delConf: Api.newDelete("/machines/{machineId}/files/{id}"),
|
||||
terminal: Api.newGet("/api/machines/{id}/terminal"),
|
||||
recDirNames: Api.newGet("/machines/rec/names")
|
||||
}
|
||||
delConf: Api.newDelete('/machines/{machineId}/files/{id}'),
|
||||
terminal: Api.newGet('/api/machines/{id}/terminal'),
|
||||
recDirNames: Api.newGet('/machines/rec/names'),
|
||||
};
|
||||
|
||||
export const authCertApi = {
|
||||
baseList : Api.newGet("/sys/authcerts/base"),
|
||||
list: Api.newGet("/sys/authcerts"),
|
||||
save: Api.newPost("/sys/authcerts"),
|
||||
delete: Api.newDelete("/sys/authcerts/{id}"),
|
||||
}
|
||||
baseList: Api.newGet('/sys/authcerts/base'),
|
||||
list: Api.newGet('/sys/authcerts'),
|
||||
save: Api.newPost('/sys/authcerts'),
|
||||
delete: Api.newDelete('/sys/authcerts/{id}'),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user