Skip to content

Commit

Permalink
fix(build): fixed select namespace invalid
Browse files Browse the repository at this point in the history
Signed-off-by: Jody <[email protected]>
  • Loading branch information
facethesunsea committed Dec 14, 2021
1 parent ac07c7f commit a123778
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/projects/build/build_env.vue
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,14 @@ export default {
// the method must callback after init data requested
paddingData () {
const initNs = () => {
const localId = this.clusters.find(cluster => cluster.local).id
this.$set(this.pre_build, 'cluster_id', localId)
this.getProductHostingNamespace(localId).then(() => {
this.$set(this.pre_build, 'cluster_id', '')
this.$set(this.pre_build, 'namespace', '')
const local = this.clusters.find(cluster => cluster.local)
this.pre_build.cluster_id = local ? local.id : ''
this.getProductHostingNamespace(this.pre_build.cluster_id).then(() => {
const ns = this.namespaces.find(ns => ns.current)
this.$set(this.pre_build, 'namespace', ns ? ns.name : '')
this.pre_build.namespace = ns ? ns.name : ''
})
}
Expand Down

0 comments on commit a123778

Please sign in to comment.