diff --git a/ui/src/config/section/infra/zones.js b/ui/src/config/section/infra/zones.js index 929add5210d0..ecfeb6f6f788 100644 --- a/ui/src/config/section/infra/zones.js +++ b/ui/src/config/section/infra/zones.js @@ -72,6 +72,9 @@ export default { }, { name: 'physical.network', component: shallowRef(defineAsyncComponent(() => import('@/views/infra/zone/PhysicalNetworksTab.vue'))) + }, { + name: 'ipv4.subnets', + component: shallowRef(defineAsyncComponent(() => import('@/views/infra/zone/Ipv4GuestSubnetsTab.vue'))) }, { name: 'system.vms', component: shallowRef(defineAsyncComponent(() => import('@/views/infra/zone/SystemVmsTab.vue'))), diff --git a/ui/src/views/infra/network/IpRangesTabGuest.vue b/ui/src/views/infra/network/IpRangesTabGuest.vue index 52b7707e2911..85a6daf53aa9 100644 --- a/ui/src/views/infra/network/IpRangesTabGuest.vue +++ b/ui/src/views/infra/network/IpRangesTabGuest.vue @@ -108,7 +108,7 @@
{{ $t('label.account') }}
-
{{ selectedItem.account }}
+
{{ selectedIpv4GuestSubnet.account }}
{{ $t('label.domain') }}
-
{{ selectedItem.domain }}
+
{{ selectedIpv4GuestSubnet.domain }}
@@ -227,7 +227,7 @@ @@ -410,7 +410,7 @@ export default { showCreateForm: false, page: 1, pageSize: 10, - selectedItem: null, + selectedIpv4GuestSubnet: null, ipv4Subnets: [], showAccountForIpv4GuestSubnetFields: false, accountForIpv4GuestSubnetModal: false, @@ -574,8 +574,8 @@ export default { api('listIpv4GuestSubnetsForZone', { zoneid: this.resource.zoneid, showicon: true, - page: this.page, - pagesize: this.pageSize + page: this.ipv4SubnetPage, + pagesize: this.ipv4SubnetPageSize }).then(response => { this.ipv4Subnets = response?.listipv4guestsubnetsforzoneresponse?.zoneipv4subnet || [] this.ipv4SubnetsTotal = response?.listipv4guestsubnetsforzoneresponse?.count || 0 @@ -707,8 +707,8 @@ export default { } var params = { - id: this.selectedItem.id, - zoneid: this.selectedItem.zoneid, + id: this.selectedIpv4GuestSubnet.id, + zoneid: this.selectedIpv4GuestSubnet.zoneid, domainid: this.addAccountForIpv4GuestSubnet.domain } @@ -774,7 +774,7 @@ export default { }, handleOpenAddAccountForIpv4GuestSubnetModal (item) { if (!this.addIpv4SubnetModal) { - this.selectedItem = item + this.selectedIpv4GuestSubnet = item } this.addAccountForIpv4GuestSubnetModal = true this.fetchDomains() @@ -790,9 +790,9 @@ export default { }, handleUpdateIpv4SubnetModal (item) { this.initUpdateIpv4SubnetForm() - this.selectedItem = item + this.selectedIpv4GuestSubnet = item this.updateIpv4SubnetModal = true - this.formUpdateIpv4Subnet.subnet = this.selectedItem?.subnet || '' + this.formUpdateIpv4Subnet.subnet = this.selectedIpv4GuestSubnet?.subnet || '' }, handleDeleteIpv4Subnet (id) { this.componentLoading = true @@ -863,7 +863,7 @@ export default { this.componentLoading = true this.updateIpv4SubnetModal = false var params = { - id: this.selectedItem.id, + id: this.selectedIpv4GuestSubnet.id, subnet: values.subnet } api('updateIpv4GuestSubnetForZone', params).then(response => { diff --git a/ui/src/views/infra/zone/Ipv4GuestSubnetsTab.vue b/ui/src/views/infra/zone/Ipv4GuestSubnetsTab.vue new file mode 100644 index 000000000000..9553b5892d56 --- /dev/null +++ b/ui/src/views/infra/zone/Ipv4GuestSubnetsTab.vue @@ -0,0 +1,637 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + + + + + +