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 = {
|
var params = {
|
||||||
zoneid: this.selectedZone.id,
|
zoneid: this.selectedZone.id,
|
||||||
guestiptype: 'Isolated',
|
guestiptype: 'Isolated',
|
||||||
supportedServices: 'SourceNat',
|
|
||||||
state: 'Enabled'
|
state: 'Enabled'
|
||||||
}
|
}
|
||||||
if (isAdminOrDomainAdmin() && this.selectedDomain.id !== '-1') { // domain is visible only for admins
|
if (isAdminOrDomainAdmin() && this.selectedDomain.id !== '-1') { // domain is visible only for admins
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="loading" class="form-layout">
|
<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">
|
<a-tab-pane :tab="$t('label.isolated')" key="1" v-if="isAdvancedZoneWithoutSGAvailable">
|
||||||
<CreateIsolatedNetworkForm
|
<CreateIsolatedNetworkForm
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@ -68,7 +68,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
isAdvancedZoneWithoutSGAvailable: true,
|
isAdvancedZoneWithoutSGAvailable: false,
|
||||||
defaultNetworkTypeTabKey: '1',
|
defaultNetworkTypeTabKey: '1',
|
||||||
loading: false,
|
loading: false,
|
||||||
actionZones: [],
|
actionZones: [],
|
||||||
@ -79,14 +79,17 @@ export default {
|
|||||||
const promises = []
|
const promises = []
|
||||||
promises.push(this.fetchActionZoneData())
|
promises.push(this.fetchActionZoneData())
|
||||||
Promise.all(promises).then(() => {
|
Promise.all(promises).then(() => {
|
||||||
|
this.isAdvancedZoneWithoutSGAvailable = false
|
||||||
|
this.defaultNetworkTypeTabKey = '2'
|
||||||
|
|
||||||
for (const i in this.actionZones) {
|
for (const i in this.actionZones) {
|
||||||
const zone = this.actionZones[i]
|
const zone = this.actionZones[i]
|
||||||
if (zone.networktype === 'Advanced' && zone.securitygroupsenabled !== true) {
|
if (zone.networktype === 'Advanced' && zone.securitygroupsenabled !== true) {
|
||||||
this.isAdvancedZoneWithoutSGAvailable = true
|
this.isAdvancedZoneWithoutSGAvailable = true
|
||||||
|
this.defaultNetworkTypeTabKey = '1'
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.isAdvancedZoneWithoutSGAvailable = false
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user