mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 20:48:42 +08:00
feat: 初步实现compose template
This commit is contained in:
17
web/src/api/panel/template/index.ts
Normal file
17
web/src/api/panel/template/index.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { http } from '@/utils'
|
||||
|
||||
export default {
|
||||
// 获取模版列表
|
||||
list: (): any => http.Get('/template'),
|
||||
// 获取模版详情
|
||||
get: (slug: string): any => http.Get(`/template/${slug}`),
|
||||
// 使用模版创建编排
|
||||
create: (data: {
|
||||
slug: string
|
||||
name: string
|
||||
envs: { key: string; value: string }[]
|
||||
auto_firewall: boolean
|
||||
}): any => http.Post('/template', data),
|
||||
// 模版下载回调
|
||||
callback: (slug: string): any => http.Post(`/template/${slug}/callback`)
|
||||
}
|
||||
Reference in New Issue
Block a user