Ver Fonte

添加 /mgr_config 接口获取 mgr 的配置文件, 即 springboot 项目的 application.yml 配置文件

reghao há 2 meses atrás
pai
commit
48009d4924
2 ficheiros alterados com 14 adições e 2 exclusões
  1. 4 0
      src/api/devops.js
  2. 10 2
      src/views/devops/sys/SysUpdate.vue

+ 4 - 0
src/api/devops.js

@@ -361,6 +361,10 @@ export function getRemoteHostList(queryInfo) {
   return get(devopsApi.getDeployer + '/remote_host/list', queryInfo)
 }
 
+export function getMgrCofig() {
+  return get(devopsApi.getDeployer + '/mgr_config')
+}
+
 export function updateRemoteApp(formData) {
   return post(devopsApi.getDeployer + '/update', formData)
 }

+ 10 - 2
src/views/devops/sys/SysUpdate.vue

@@ -240,7 +240,7 @@ import {
   addAgentConfig,
   addRemoteHost, deleteAgentConfig,
   deleteRemoteHost,
-  getAgentConfigList,
+  getAgentConfigList, getMgrCofig,
   getRemoteHostList,
   updateRemoteApp
 } from '@/api/devops'
@@ -419,7 +419,15 @@ export default {
       if (this.queryInfo.nodeType === 'agent') {
         this.configForm = row.remoteAgentConfig
       } else {
-        this.mgrConfig = 'mgr config'
+        getMgrCofig().then(resp => {
+          if (resp.code === 0) {
+            this.mgrConfig = resp.data
+          } else {
+            this.$message.warning(resp.msg)
+          }
+        }).catch(error => {
+          this.$message.error(error.message)
+        })
       }
 
       this.title = this.queryInfo.nodeType + ' 节点配置'