diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js index 9ca4fd03c8f..673b990f391 100644 --- a/ui/src/config/section/network.js +++ b/ui/src/config/section/network.js @@ -119,13 +119,13 @@ export default { columns: ['name', 'state', 'displaytext', 'cidr', 'account', 'zonename'], details: ['name', 'id', 'displaytext', 'cidr', 'networkdomain', 'ispersistent', 'redundantvpcrouter', 'restartrequired', 'zonename', 'account', 'domain'], related: [{ - name: 'publicip', - title: 'Public IP Addresses', - param: 'vpcid' - }, { name: 'privategw', title: 'Private Gateways', param: 'vpcid' + }, { + name: 'publicip', + title: 'Public IP Addresses', + param: 'vpcid' }, { name: 's2svpn', title: 'Site-to-Site VPN Gateways', @@ -151,7 +151,10 @@ export default { name: 'details', component: () => import('@/components/view/DetailsTab.vue') }, { - name: 'Tiers', + name: 'Router', + component: () => import('@/views/network/VpcRouterTab.vue') + }, { + name: 'Network', component: () => import('@/views/network/VpcTiersTab.vue') }], actions: [ @@ -293,7 +296,49 @@ export default { permission: ['listPrivateGateways'], columns: ['ipaddress', 'state', 'gateway', 'netmask', 'account', 'domain'], details: ['ipaddress', 'gateway', 'netmask', 'vlan', 'sourcenatsupported', 'aclid', 'account', 'domain', 'zone'], + tabs: [{ + name: 'details', + component: () => import('@/components/view/DetailsTab.vue') + }, { + name: 'Static Routes', + component: () => import('@/views/network/StaticRoutesTab.vue'), + show: () => true + }], actions: [ + { + api: 'createPrivateGateway', + icon: 'plus', + label: 'Add Private Gateway', + listView: true, + args: ['physicalnetworkid', 'vlan', 'ipaddress', 'gateway', 'netmask', 'sourcenatsupported', 'aclid'], + mapping: { + aclid: { + api: 'listNetworkACLLists' + } + } + }, + { + api: 'replaceNetworkACLList', + icon: 'swap', + label: 'Replace ACL List', + dataView: true, + args: ['aclid', 'gatewayid'], + mapping: { + aclid: { + api: 'listNetworkACLLists', + params: (record) => { return { vpcid: record.vpcid } } + }, + gatewayid: { + value: (record) => { return record.id } + } + } + }, + { + api: 'deletePrivateGateway', + icon: 'delete', + label: 'Delete Private Gateway', + dataView: true + } ] }, { @@ -305,6 +350,19 @@ export default { columns: ['publicip', 'account', 'domain'], details: ['publicip', 'account', 'domain'], actions: [ + { + api: 'createVpnGateway', + icon: 'plus', + label: 'Create VPN Gateway', + listView: true, + args: ['vpcid'] + }, + { + api: 'deleteVpnGateway', + icon: 'delete', + label: 'Delete VPN Gateway', + dataView: true + } ] }, { @@ -316,6 +374,33 @@ export default { columns: ['publicip', 'state', 'gateway', 'ipsecpsk', 'ikepolicy', 'esppolicy'], details: ['publicip', 'gateway', 'passive', 'cidrlist', 'ipsecpsk', 'ikepolicy', 'esppolicy', 'ikelifetime', 'esplifetime', 'dpd', 'forceencap', 'created'], actions: [ + { + api: 'createVpnConnection', + icon: 'plus', + label: 'Create VPN Connection', + listView: true, + args: ['s2scustomergatewayid', 's2svpngatewayid', 'passive'], + mapping: { + s2scustomergatewayid: { + api: 'listVpnCustomerGateways' + }, + s2svpngatewayid: { + api: 'listVpnGateways' + } + } + }, + { + api: 'resetVpnConnection', + icon: 'reload', + label: 'Reset VPN Connection', + dataView: true + }, + { + api: 'deleteVpnConnection', + icon: 'delete', + label: 'Delete VPN Connection', + dataView: true + } ] }, { @@ -357,6 +442,44 @@ export default { } ] }, + { + name: 'ilb', + title: 'Internal LB', + icon: 'share-alt', + hidden: true, + permission: ['listLoadBalancers'], + columns: ['name', 'sourceipaddress', 'loadbalancerrule', 'algorithm', 'account', 'domain'], + columns: ['name', 'sourceipaddress', 'loadbalancerrule', 'algorithm', 'account', 'domain'], + actions: [ + { + api: 'createLoadBalancer', + icon: 'plus', + label: 'Add Internal LB', + listView: true, + args: ['name', 'description', 'sourceipaddress', 'sourceport', 'instanceport', 'algorithm', 'networkid', 'sourceipaddressnetworkid', 'scheme'], + mapping: { + algorithm: { + options: ['source', 'roundrobin', 'leastconn'] + }, + scheme: { + value: (record) => { return 'Internal' } + } + } + }, + { + api: 'assignToLoadBalancerRule', + icon: 'plus', + label: 'Assign VMs', + dataView: true + }, + { + api: 'deleteLoadBalancer', + icon: 'delete', + label: 'Delete LB', + dataView: true + } + ] + }, { name: 'vpnuser', title: 'VPN Users', diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 4406a9a715d..c8bd75f97e5 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -147,7 +147,7 @@ }" > - {{ opt.name || opt.description || opt.traffictype }} + {{ opt.name || opt.description || opt.traffictype || opt.publicip }} diff --git a/ui/src/views/network/StaticRoutesTab.vue b/ui/src/views/network/StaticRoutesTab.vue new file mode 100644 index 00000000000..d96d38db9ad --- /dev/null +++ b/ui/src/views/network/StaticRoutesTab.vue @@ -0,0 +1,83 @@ +// 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. + + + + + + diff --git a/ui/src/views/network/VpcRouterTab.vue b/ui/src/views/network/VpcRouterTab.vue new file mode 100644 index 00000000000..dde958f2f04 --- /dev/null +++ b/ui/src/views/network/VpcRouterTab.vue @@ -0,0 +1,98 @@ +// 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. + + + + + + diff --git a/ui/src/views/network/VpcTiersTab.vue b/ui/src/views/network/VpcTiersTab.vue index f3da4676843..fd30f00768b 100644 --- a/ui/src/views/network/VpcTiersTab.vue +++ b/ui/src/views/network/VpcTiersTab.vue @@ -17,12 +17,53 @@ @@ -80,5 +121,39 @@ export default {