|
@@ -1,6 +1,8 @@
|
|
|
import { get, post, postForm } from '@/utils/request'
|
|
import { get, post, postForm } from '@/utils/request'
|
|
|
|
|
|
|
|
const devopsApi = {
|
|
const devopsApi = {
|
|
|
|
|
+ getEnvList: '/api/devops/envs',
|
|
|
|
|
+ getAppTypeList: '/api/devops/app_types',
|
|
|
getDashboard: '/api/devops/dashboard',
|
|
getDashboard: '/api/devops/dashboard',
|
|
|
getAccount: '/api/devops/account',
|
|
getAccount: '/api/devops/account',
|
|
|
getBuildDir: '/api/devops/build/dir',
|
|
getBuildDir: '/api/devops/build/dir',
|
|
@@ -9,9 +11,8 @@ const devopsApi = {
|
|
|
getAliyunKeyList: '/api/devops/machine/aliyun/key',
|
|
getAliyunKeyList: '/api/devops/machine/aliyun/key',
|
|
|
getMachineProcList: '/api/devops/machine/proc',
|
|
getMachineProcList: '/api/devops/machine/proc',
|
|
|
getMachineTaskList: '/api/devops/machine/task',
|
|
getMachineTaskList: '/api/devops/machine/task',
|
|
|
|
|
+ getMachineNginx: '/api/devops/srv/nginx',
|
|
|
getDockerList: '/api/devops/docker',
|
|
getDockerList: '/api/devops/docker',
|
|
|
- getEnvList: '/api/devops/envs',
|
|
|
|
|
- getAppTypeList: '/api/devops/app_types',
|
|
|
|
|
getCompilerList: '/api/devops/build/compiler',
|
|
getCompilerList: '/api/devops/build/compiler',
|
|
|
getRepoAuthList: '/api/devops/build/repoauth',
|
|
getRepoAuthList: '/api/devops/build/repoauth',
|
|
|
getPackerList: '/api/devops/build/packer',
|
|
getPackerList: '/api/devops/build/packer',
|
|
@@ -26,6 +27,10 @@ const devopsApi = {
|
|
|
getUserList: '/api/devops/rbac/user'
|
|
getUserList: '/api/devops/rbac/user'
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+export function getEnvList() {
|
|
|
|
|
+ return get(devopsApi.getEnvList)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export function getDashboard() {
|
|
export function getDashboard() {
|
|
|
return get(devopsApi.getDashboard)
|
|
return get(devopsApi.getDashboard)
|
|
|
}
|
|
}
|
|
@@ -102,6 +107,18 @@ export function eraseMachineTask(queryInfo) {
|
|
|
return postForm(devopsApi.getMachineTaskList + '/clear', queryInfo)
|
|
return postForm(devopsApi.getMachineTaskList + '/clear', queryInfo)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+export function getFileTree(queryInfo) {
|
|
|
|
|
+ return get(devopsApi.getMachineNginx + '/tree', queryInfo)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+export function getNginxConf(queryInfo) {
|
|
|
|
|
+ return get(devopsApi.getMachineNginx + '/conf', queryInfo)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+export function updateNginxConf(payload) {
|
|
|
|
|
+ return post(devopsApi.getMachineNginx + '/conf', payload)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
export function getDockerfileImageList() {
|
|
export function getDockerfileImageList() {
|
|
|
return get(devopsApi.getDockerList + '/image')
|
|
return get(devopsApi.getDockerList + '/image')
|
|
|
}
|
|
}
|
|
@@ -118,10 +135,6 @@ export function deleteDockerRegistry(formData) {
|
|
|
return postForm(devopsApi.getDockerList + '/registry/delete', formData)
|
|
return postForm(devopsApi.getDockerList + '/registry/delete', formData)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export function getEnvList() {
|
|
|
|
|
- return get(devopsApi.getEnvList)
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
export function getBuildDir() {
|
|
export function getBuildDir() {
|
|
|
return get(devopsApi.getBuildDir)
|
|
return get(devopsApi.getBuildDir)
|
|
|
}
|
|
}
|