Skip to content

Commit 3ad581e

Browse files
committed
cosistent
Signed-off-by: Abhishek Kumar <[email protected]>
1 parent 14cf02a commit 3ad581e

File tree

2 files changed

+26
-34
lines changed

2 files changed

+26
-34
lines changed

ui/src/views/compute/CreateAutoScaleVmGroup.vue

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ export default {
13821382
options: {
13831383
zoneid: _.get(this.zone, 'id'),
13841384
networkid: this.defaultNetworkId,
1385-
id: this.lbRuleId,
1385+
id: this.queryLbRuleId,
13861386
projectid: store.getters.project ? store.getters.project.id : null,
13871387
domainid: store.getters.project && store.getters.project.id ? null : store.getters.userInfo.domainid,
13881388
account: store.getters.project && store.getters.project.id ? null : store.getters.userInfo.account,
@@ -1417,13 +1417,13 @@ export default {
14171417
templateConfigurationExists () {
14181418
return this.vm.templateid && this.templateConfigurations && this.templateConfigurations.length > 0
14191419
},
1420-
templateId () {
1420+
queryTemplateId () {
14211421
return this.$route.query.templateid || null
14221422
},
1423-
networkId () {
1423+
queryNetworkId () {
14241424
return this.$route.query.networkid || null
14251425
},
1426-
lbRuleId () {
1426+
queryLbRuleId () {
14271427
return this.$route.query.lbruleid || null
14281428
},
14291429
imageTypeTabList () {
@@ -1800,7 +1800,7 @@ export default {
18001800
return ['community']
18011801
}
18021802
}
1803-
return ['all']
1803+
return this.isNormalAndDomainUser ? ['executable'] : ['all']
18041804
}
18051805
return [
18061806
'featured',
@@ -1848,18 +1848,18 @@ export default {
18481848
let zones = []
18491849
let apiName = ''
18501850
const params = {}
1851-
if (this.templateId) {
1851+
if (this.queryTemplateId) {
18521852
apiName = 'listTemplates'
18531853
params.listall = true
18541854
params.templatefilter = this.isNormalAndDomainUser ? 'executable' : 'all'
1855-
params.id = this.templateId
1856-
} else if (this.networkId) {
1855+
params.id = this.queryTemplateId
1856+
} else if (this.queryNetworkId) {
18571857
params.listall = true
1858-
params.id = this.networkId
1858+
params.id = this.queryNetworkId
18591859
apiName = 'listNetworks'
1860-
} else if (this.lbRuleId) {
1860+
} else if (this.queryLbRuleId) {
18611861
params.listall = true
1862-
params.id = this.lbRuleId
1862+
params.id = this.queryLbRuleId
18631863
apiName = 'listLoadBalancerRules'
18641864
}
18651865
if (!apiName) return resolve(zones)
@@ -3010,15 +3010,15 @@ export default {
30103010
async fetchZoneOptions () {
30113011
let guestOsFetch = null
30123012
for (const [name, param] of Object.entries(this.params)) {
3013-
if (this.networkId && name === 'networks') {
3014-
param.options = { id: this.networkId }
3013+
if (this.queryNetworkId && name === 'networks') {
3014+
param.options = { id: this.queryNetworkId }
30153015
}
30163016
if (name === 'loadbalancers') {
3017-
if (!this.lbRuleId && !this.defaultNetworkId) {
3017+
if (!this.queryLbRuleId && !this.defaultNetworkId) {
30183018
continue
30193019
}
3020-
if (this.lbRuleId) {
3021-
param.options = { id: this.lbRuleId }
3020+
if (this.queryLbRuleId) {
3021+
param.options = { id: this.queryLbRuleId }
30223022
}
30233023
}
30243024
const shouldLoad = !('isLoad' in param) || param.isLoad

ui/src/views/compute/DeployVnfAppliance.vue

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1266,13 +1266,10 @@ export default {
12661266
templateConfigurationExists () {
12671267
return this.vm.templateid && this.templateConfigurations && this.templateConfigurations.length > 0
12681268
},
1269-
templateId () {
1269+
queryTemplateId () {
12701270
return this.$route.query.templateid || null
12711271
},
1272-
isoId () {
1273-
return this.$route.query.isoid || null
1274-
},
1275-
networkId () {
1272+
queryNetworkId () {
12761273
return this.$route.query.networkid || null
12771274
},
12781275
imageTypeList () {
@@ -1640,7 +1637,7 @@ export default {
16401637
return ['community']
16411638
}
16421639
}
1643-
return ['all']
1640+
return this.isNormalAndDomainUser ? ['executable'] : ['all']
16441641
}
16451642
return [
16461643
'featured',
@@ -1688,19 +1685,14 @@ export default {
16881685
let zones = []
16891686
let apiName = ''
16901687
const params = {}
1691-
if (this.templateId) {
1688+
if (this.queryTemplateId) {
16921689
apiName = 'listVnfTemplates'
16931690
params.listall = true
16941691
params.templatefilter = this.isNormalAndDomainUser ? 'executable' : 'all'
1695-
params.id = this.templateId
1696-
} else if (this.isoId) {
1697-
params.listall = true
1698-
params.isofilter = this.isNormalAndDomainUser ? 'executable' : 'all'
1699-
params.id = this.isoId
1700-
apiName = 'listIsos'
1701-
} else if (this.networkId) {
1692+
params.id = this.queryTemplateId
1693+
} else if (this.queryNetworkId) {
17021694
params.listall = true
1703-
params.id = this.networkId
1695+
params.id = this.queryNetworkId
17041696
apiName = 'listNetworks'
17051697
}
17061698
if (!apiName) return resolve(zones)
@@ -2529,7 +2521,7 @@ export default {
25292521
args.templatefilter = templateFilter
25302522
args.details = 'all'
25312523
args.showicon = 'true'
2532-
args.id = this.templateId
2524+
args.id = this.queryTemplateId
25332525
25342526
delete args.category
25352527
delete args.public
@@ -2580,8 +2572,8 @@ export default {
25802572
async fetchZoneOptions () {
25812573
let guestOsFetch = null
25822574
for (const [name, param] of Object.entries(this.params)) {
2583-
if (this.networkId && name === 'networks') {
2584-
param.options = { id: this.networkId }
2575+
if (this.queryNetworkId && name === 'networks') {
2576+
param.options = { id: this.queryNetworkId }
25852577
}
25862578
const shouldLoad = !('isLoad' in param) || param.isLoad
25872579
if (!shouldLoad) continue

0 commit comments

Comments
 (0)