mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI - Add Network: shows "Offering for Isolated networks with no Source Nat service" on Network Offering for normal users (#5904)
* shows "Offering for Isolated networks with no Source Nat service" for normal users * fixes roles * fix selected tabs
This commit is contained in:
parent
ce81a8e708
commit
b275c29709
@ -344,7 +344,6 @@ export default {
|
||||
var params = {
|
||||
zoneid: this.selectedZone.id,
|
||||
guestiptype: 'Isolated',
|
||||
supportedServices: 'SourceNat',
|
||||
state: 'Enabled'
|
||||
}
|
||||
if (isAdminOrDomainAdmin() && this.selectedDomain.id !== '-1') { // domain is visible only for admins
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
<template>
|
||||
<a-spin :spinning="loading" class="form-layout">
|
||||
<a-tabs defaultActiveKey="1" :animated="false" v-if="!loading">
|
||||
<a-tabs :default-active-key="defaultNetworkTypeTabKey" :animated="false" v-if="!loading">
|
||||
<a-tab-pane :tab="$t('label.isolated')" key="1" v-if="isAdvancedZoneWithoutSGAvailable">
|
||||
<CreateIsolatedNetworkForm
|
||||
:loading="loading"
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isAdvancedZoneWithoutSGAvailable: true,
|
||||
isAdvancedZoneWithoutSGAvailable: false,
|
||||
defaultNetworkTypeTabKey: '1',
|
||||
loading: false,
|
||||
actionZones: [],
|
||||
@ -79,14 +79,17 @@ export default {
|
||||
const promises = []
|
||||
promises.push(this.fetchActionZoneData())
|
||||
Promise.all(promises).then(() => {
|
||||
this.isAdvancedZoneWithoutSGAvailable = false
|
||||
this.defaultNetworkTypeTabKey = '2'
|
||||
|
||||
for (const i in this.actionZones) {
|
||||
const zone = this.actionZones[i]
|
||||
if (zone.networktype === 'Advanced' && zone.securitygroupsenabled !== true) {
|
||||
this.isAdvancedZoneWithoutSGAvailable = true
|
||||
this.defaultNetworkTypeTabKey = '1'
|
||||
return
|
||||
}
|
||||
}
|
||||
this.isAdvancedZoneWithoutSGAvailable = false
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user