Skip to content

Commit 7dac8bb

Browse files
committed
Restore IPv4 Subnets menu
1 parent 84a2b04 commit 7dac8bb

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

ui/src/config/section/network.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,6 +1445,46 @@ export default {
14451445
show: (record) => { return (record.allocationstate === 'Allocated') }
14461446
}],
14471447
show: isZoneCreated
1448+
},
1449+
{
1450+
name: 'ipv4subnets',
1451+
title: 'label.ipv4.subnets',
1452+
icon: 'pic-center-outlined',
1453+
permission: ['listIpv4SubnetsForGuestNetwork'],
1454+
columns: ['subnet', 'zonename', 'parentsubnet', 'networkname', 'vpcname', 'created', 'allocated'],
1455+
details: ['subnet', 'zonename', 'zoneid', 'parentsubnet', 'networkname', 'networkid', 'vpcname', 'vpcid', 'created', 'allocated', 'state'],
1456+
searchFilters: ['zoneid'],
1457+
show: () => {
1458+
if (!store.getters.zones || store.getters.zones.length === 0) {
1459+
return false
1460+
}
1461+
const AdvancedZonesWithRoutedmode = store.getters.zones.filter(zone => zone.routedmodeenabled)
1462+
if (isAdmin() && (AdvancedZonesWithRoutedmode && AdvancedZonesWithRoutedmode.length > 0)) {
1463+
return true
1464+
}
1465+
return false
1466+
},
1467+
actions: [
1468+
{
1469+
api: 'createIpv4SubnetForGuestNetwork',
1470+
icon: 'plus-outlined',
1471+
label: 'label.add.ipv4.subnet',
1472+
listView: true,
1473+
popup: true,
1474+
component: shallowRef(defineAsyncComponent(() => import('@/views/network/CreateIpv4SubnetForNetwork.vue')))
1475+
},
1476+
{
1477+
api: 'deleteIpv4SubnetForGuestNetwork',
1478+
icon: 'delete-outlined',
1479+
label: 'label.delete.ipv4.subnet',
1480+
message: 'message.action.delete.ipv4.subnet',
1481+
dataView: true,
1482+
show: (record) => { return !record.networkid },
1483+
groupAction: true,
1484+
popup: true,
1485+
groupMap: (selection) => { return selection.map(x => { return { id: x } }) }
1486+
}
1487+
]
14481488
}
14491489
]
14501490
}

0 commit comments

Comments
 (0)