mirror of
https://github.com/acepanel/panel.git
synced 2026-02-07 13:13:06 +08:00
feat: 初步支持环境管理
This commit is contained in:
16
web/src/api/panel/environment/index.ts
Normal file
16
web/src/api/panel/environment/index.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取环境类型列表
|
||||
types: (): any => http.Get('/environment/types'),
|
||||
// 获取环境列表
|
||||
list: (page: number, limit: number, type?: string): any =>
|
||||
http.Get('/environment/list', { params: { page, limit, type } }),
|
||||
// 安装环境
|
||||
install: (type: string, slug: string): any => http.Post('/environment/install', { type, slug }),
|
||||
// 卸载环境
|
||||
uninstall: (type: string, slug: string): any =>
|
||||
http.Post('/environment/uninstall', { type, slug }),
|
||||
// 更新环境
|
||||
update: (type: string, slug: string): any => http.Post('/environment/update', { type, slug })
|
||||
}
|
||||
Reference in New Issue
Block a user