Explorar o código

update views/devops/app

reghao hai 3 meses
pai
achega
7117da440a

+ 3 - 1
src/views/devops/app/AppConfig.vue

@@ -364,7 +364,7 @@
       </template>
     </el-dialog>
     <el-dialog
-      title="部署配置列表"
+      :title="deployConfigDialogTitle"
       append-to-body
       :visible.sync="showDeployConfigDialog"
       width="70%"
@@ -561,6 +561,7 @@ export default {
       showDetailDialog: false,
       appConfigDetail: null,
       // **********************************************************************
+      deployConfigDialogTitle: '',
       showDeployConfigDialog: false,
       appDeployConfigList: [],
       showAddDeployConfigDialog: false,
@@ -807,6 +808,7 @@ export default {
       getAppDeployConfigList(row.appId).then(resp => {
         if (resp.code === 0) {
           this.appDeployConfigList = resp.data
+          this.deployConfigDialogTitle = row.appId + ' 的部署配置列表'
           this.showDeployConfigDialog = true
         } else {
           this.$message.error(resp.msg)

+ 19 - 2
src/views/devops/app/AppStat.vue

@@ -93,7 +93,7 @@
     </el-main>
 
     <el-dialog
-      title="应用状态列表"
+      :title="statDialogTitle"
       append-to-body
       :visible.sync="showStatDialog"
       width="70%"
@@ -117,7 +117,22 @@
           <el-table-column
             prop="status"
             label="运行状态"
-          />
+          >
+            <template slot-scope="scope">
+              <el-button
+                v-if="scope.row.status === '运行中'"
+                type="text"
+              >
+                <span style="color: green">{{ scope.row.status }}</span>
+              </el-button>
+              <el-button
+                v-else
+                type="text"
+              >
+                <span style="color: red">{{ scope.row.status }}</span>
+              </el-button>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="startTime"
             label="启动时间"
@@ -198,6 +213,7 @@ export default {
       videoProp: null,
       showVideoResourceDialog: false,
       showEditScopeDialog: false,
+      statDialogTitle: '',
       showStatDialog: false,
       appStatList: [],
       form: {
@@ -269,6 +285,7 @@ export default {
       getAppStatDeatil(row.appId).then(resp => {
         if (resp.code === 0) {
           this.appStatList = resp.data
+          this.statDialogTitle = row.appId + ' 的应用状态列表'
           this.showStatDialog = true
         } else {
           this.$message.error(resp.msg)

+ 53 - 5
src/views/devops/app/BuildDeploy.vue

@@ -96,7 +96,9 @@
             <el-button
               v-else
               type="text"
-            >{{ scope.row.buildResult }}</el-button>
+            >
+              <span>{{ scope.row.buildResult }}</span>
+            </el-button>
           </template>
         </el-table-column>
         <el-table-column
@@ -204,7 +206,7 @@
       </template>
     </el-dialog>
     <el-dialog
-      title="部署列表"
+      :title="deployDialogTitle"
       append-to-body
       :visible.sync="showDeployDialog"
       width="70%"
@@ -224,7 +226,22 @@
           <el-table-column
             prop="machineStatus"
             label="机器状态"
-          />
+          >
+            <template slot-scope="scope">
+              <el-button
+                v-if="scope.row.buildResult === 'Online'"
+                type="text"
+              >
+                <span style="color: green">{{ scope.row.machineStatus }}</span>
+              </el-button>
+              <el-button
+                v-else
+                type="text"
+              >
+                <span style="color: red">{{ scope.row.machineStatus }}</span>
+              </el-button>
+            </template>
+          </el-table-column>
           <el-table-column
             prop="commitId"
             label="当前版本"
@@ -244,7 +261,34 @@
           <el-table-column
             prop="deployResult"
             label="部署结果"
-          />
+          >
+            <template slot-scope="scope">
+              <el-button
+                v-if="scope.row.deployResult === '部署成功'"
+                type="text"
+              >
+                <span style="color: green">{{ scope.row.deployResult }}</span>
+              </el-button>
+              <el-button
+                v-else-if="scope.row.deployResult === '部署失败'"
+                type="text"
+              >
+                <span style="color: red">{{ scope.row.deployResult }}</span>
+              </el-button>
+              <el-button
+                v-else-if="scope.row.deployResult === '正在部署'"
+                type="text"
+              >
+                <span style="color: blue">{{ scope.row.deployResult }}</span>
+              </el-button>
+              <el-button
+                v-else
+                type="text"
+              >
+                <span>{{ scope.row.deployResult }}</span>
+              </el-button>
+            </template>
+          </el-table-column>
           <el-table-column
             fixed="right"
             label="操作"
@@ -262,7 +306,7 @@
       </template>
     </el-dialog>
     <el-dialog
-      title="构建历史列表"
+      :title="buildLogDialogTitle"
       append-to-body
       :visible.sync="showBuildLogDialog"
       width="100%"
@@ -550,6 +594,7 @@ export default {
       showTaskDialog: null,
       buildTaskList: [],
       // **********************************************************************
+      buildLogDialogTitle: '',
       showBuildLogDialog: false,
       queryInfo1: {
         appId: '',
@@ -566,6 +611,7 @@ export default {
       showConsumedDialog: false,
       buildConsumed: null,
       // **********************************************************************
+      deployDialogTitle: '',
       showDeployDialog: false,
       deployList: [],
       deployForm: {
@@ -668,6 +714,7 @@ export default {
           const respData = resp.data
           this.dataList1 = respData.list
           this.totalSize1 = respData.totalSize
+          this.buildLogDialogTitle = row.appId + ' 的构建历史列表'
           this.showBuildLogDialog = true
         } else {
           this.$message.error(resp.msg)
@@ -792,6 +839,7 @@ export default {
       getDeployList(queryInfo).then(resp => {
         if (resp.code === 0) {
           this.deployList = resp.data
+          this.deployDialogTitle = row.appId + ' 的部署列表'
           this.showDeployDialog = true
         } else {
           this.$message.error(resp.msg)