|
|
@@ -108,7 +108,7 @@
|
|
|
<el-button
|
|
|
style="margin-top: 5px; margin-left: 5px"
|
|
|
size="mini"
|
|
|
- @click="handleEdit(scope.$index, scope.row)"
|
|
|
+ @click="handleEdit(scope.row)"
|
|
|
>编辑</el-button>
|
|
|
<el-button
|
|
|
style="margin-top: 5px; margin-left: 5px"
|
|
|
@@ -258,32 +258,7 @@
|
|
|
center
|
|
|
>
|
|
|
<template>
|
|
|
- <el-form v-if="appConfigDetail !== null" :model="appConfigDetail" label-width="80px">
|
|
|
- <el-form-item label="应用 ID" style="width: 70%; padding-right: 2px">
|
|
|
- <el-input v-model="appConfigDetail.appId" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="应用仓库" style="width: 70%; padding-right: 2px">
|
|
|
- <el-input v-model="appConfigDetail.appRepo" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="仓库分支" style="width: 70%; padding-right: 2px">
|
|
|
- <el-input v-model="appConfigDetail.repoBranch" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="HTTP 端口" style="width: 70%; padding-right: 2px">
|
|
|
- <el-input v-model="appConfigDetail.httpPort" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="仓库认证">
|
|
|
- <el-input v-model="appConfigDetail.repoAuthConfig" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="编译工具">
|
|
|
- <el-input v-model="appConfigDetail.compilerConfig" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="打包工具">
|
|
|
- <el-input v-model="appConfigDetail.packerConfig" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="Dockerfile" style="width: 70%; padding-right: 2px">
|
|
|
- <el-input v-model="appConfigDetail.dockerfile" type="textarea" :rows="10" style="width: 70%; padding-right: 2px" readonly />
|
|
|
- </el-form-item>
|
|
|
- </el-form>
|
|
|
+ <app-config-card v-if="appConfigDetail !== null" :config="appConfigDetail" />
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
|
@@ -594,6 +569,7 @@
|
|
|
import RepoAuthAddCard from '@/components/card/RepoAuthAddCard.vue'
|
|
|
import CompilerAddCard from '@/components/card/CompilerAddCard.vue'
|
|
|
import PackerAddCard from '@/components/card/PackerAddCard.vue'
|
|
|
+import AppConfigCard from '@/components/card/AppConfigCard.vue';
|
|
|
|
|
|
import {
|
|
|
addAppBindDomain,
|
|
|
@@ -615,7 +591,8 @@ export default {
|
|
|
components: {
|
|
|
RepoAuthAddCard,
|
|
|
CompilerAddCard,
|
|
|
- PackerAddCard
|
|
|
+ PackerAddCard,
|
|
|
+ AppConfigCard
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -657,10 +634,6 @@ export default {
|
|
|
dockerfile: [{ required: true, message: '请填写 Dockerfile', trigger: 'blur' }],
|
|
|
},
|
|
|
// **********************************************************************
|
|
|
- repoAuthForm: {
|
|
|
- appId: '',
|
|
|
- domain: ''
|
|
|
- },
|
|
|
showAddRepoAuthDialog: false,
|
|
|
showAddCompilerDialog: false,
|
|
|
showAddPackerDialog: false,
|
|
|
@@ -851,8 +824,19 @@ export default {
|
|
|
this.showCopyDialog = false
|
|
|
})
|
|
|
},
|
|
|
- handleEdit(index, row) {
|
|
|
+ handleEdit(row) {
|
|
|
this.getBuildConfigWrapper()
|
|
|
+ const appId = row.appId
|
|
|
+ getAppConfig(appId).then(resp => {
|
|
|
+ if (resp.code === 0) {
|
|
|
+ this.editForm = resp.data
|
|
|
+ this.showEditDialog = true
|
|
|
+ } else {
|
|
|
+ this.$message.error(resp.msg)
|
|
|
+ }
|
|
|
+ }).catch(error => {
|
|
|
+ this.$message.error(error.message)
|
|
|
+ })
|
|
|
},
|
|
|
onEdit() {
|
|
|
const formData = new FormData()
|
|
|
@@ -888,6 +872,7 @@ export default {
|
|
|
},
|
|
|
handleAdd() {
|
|
|
this.getBuildConfigWrapper()
|
|
|
+ this.showAddDialog = true
|
|
|
},
|
|
|
getBuildConfigWrapper() {
|
|
|
getBuildConfig().then(resp => {
|
|
|
@@ -895,7 +880,6 @@ export default {
|
|
|
this.repoAuthList = resp.data.repoAuthList
|
|
|
this.compilerList = resp.data.compilerList
|
|
|
this.packerList = resp.data.packerList
|
|
|
- this.showAddDialog = true
|
|
|
} else {
|
|
|
this.$message.error(resp.msg)
|
|
|
}
|