Skip to content

Commit

Permalink
add network domain edit for shared networks to UI
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanHoogland committed Sep 10, 2024
1 parent a652c2c commit 074d0d8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui/src/views/network/UpdateNetwork.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
</template>
<a-switch v-model:checked="form.changecidr" />
</a-form-item>
<a-form-item name="networkdomain" ref="networkdomain" v-if="isUpdatingIsolatedNetwork">
<a-form-item name="networkdomain" ref="networkdomain" v-if="hasNetworkDomain">
<template #label>
<tooltip-label :title="$t('label.networkdomain')" :tooltip="apiParams.guestvmcidr.description"/>
</template>
Expand Down Expand Up @@ -274,7 +274,7 @@ export default {
ip6dns1: this.resource.ip6dns1,
ip6dns2: this.resource.ip6dns2
}
if (this.isUpdatingIsolatedNetwork) {
if (this.hasNetworkDomain) {
this.resourceValues.networkdomain = this.resource.networkdomain
}
for (var field in this.resourceValues) {
Expand All @@ -289,6 +289,12 @@ export default {
isUpdatingIsolatedNetwork () {
return this.resource && this.resource.type === 'Isolated'
},
isUpdatingSharedNetwork () {
return this.resource && this.resource.type === 'Shared'
},
hasNetworkDomain () {
return this.isUpdatingIsolatedNetwork || this.isUpdatingSharedNetwork
},
selectedNetworkOfferingSupportsDns () {
if (this.networkOffering) {
const services = this.networkOffering?.service || []
Expand Down

0 comments on commit 074d0d8

Please sign in to comment.