2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 09:13:49 +08:00
This commit is contained in:
耗子
2024-10-11 02:03:10 +08:00
parent 3157011cc0
commit cfc1d46381
2 changed files with 8 additions and 10 deletions

2
.gitignore vendored
View File

@@ -17,8 +17,6 @@ _cgo_export.*
*.exe
*.o
*.so
panel
panel.exe
# 压缩包
# Git 自带压缩,如果这些压缩包里有代码,建议解压后 commit

View File

@@ -5,26 +5,26 @@ import { request } from '@/utils'
export default {
// 服务状态
status: (service: string): Promise<AxiosResponse<any>> =>
request.get('/system/service/status', { params: { service } }),
request.get('/systemctl/status', { params: { service } }),
// 是否启用服务
isEnabled: (service: string): Promise<AxiosResponse<any>> =>
request.get('/system/service/isEnabled', { params: { service } }),
request.get('/systemctl/isEnabled', { params: { service } }),
// 启用服务
enable: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/enable', { service }),
request.post('/systemctl/enable', { service }),
// 禁用服务
disable: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/disable', { service }),
request.post('/systemctl/disable', { service }),
// 重启服务
restart: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/restart', { service }),
request.post('/systemctl/restart', { service }),
// 重载服务
reload: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/reload', { service }),
request.post('/systemctl/reload', { service }),
// 启动服务
start: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/start', { service }),
request.post('/systemctl/start', { service }),
// 停止服务
stop: (service: string): Promise<AxiosResponse<any>> =>
request.post('/system/service/stop', { service })
request.post('/systemctl/stop', { service })
}