From ba51520d8dd79ddbffd563db1fac23b38c0b3d93 Mon Sep 17 00:00:00 2001 From: Pearl Dsilva Date: Mon, 17 Feb 2020 14:58:46 +0530 Subject: [PATCH] vpc: add Internal LB form and Assign VM to LB rule form (#154) VPC internal LB, IP pagination/management and assign vm form Signed-off-by: Rohit Yadav Co-authored-by: Rohit Yadav --- ui/src/config/section/network.js | 12 +- ui/src/locales/en.json | 2 + .../views/network/InternalLBAssignVmForm.vue | 278 ++++++++++++++ .../views/network/InternalLBAssignedVmTab.vue | 157 ++++++++ ui/src/views/network/IpAddressesTab.vue | 136 ++++++- ui/src/views/network/VpcTiersTab.vue | 358 ++++++++++++++++-- 6 files changed, 900 insertions(+), 43 deletions(-) create mode 100644 ui/src/views/network/InternalLBAssignVmForm.vue create mode 100644 ui/src/views/network/InternalLBAssignedVmTab.vue diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js index be81e0bb39a..81dfe3ebd38 100644 --- a/ui/src/config/section/network.js +++ b/ui/src/config/section/network.js @@ -430,6 +430,14 @@ export default { permission: ['listLoadBalancers'], columns: ['name', 'sourceipaddress', 'loadbalancerrule', 'algorithm', 'account', 'domain'], details: ['name', 'sourceipaddress', 'loadbalancerrule', 'algorithm', 'account', 'domain'], + tabs: [{ + name: 'details', + component: () => import('@/components/view/DetailsTab.vue') + }, { + name: 'Assigned VMs', + component: () => import('@/views/network/InternalLBAssignedVmTab.vue'), + show: () => true + }], actions: [ { api: 'createLoadBalancer', @@ -458,7 +466,9 @@ export default { api: 'assignToLoadBalancerRule', icon: 'plus', label: 'Assign VMs', - dataView: true + dataView: true, + popup: true, + component: () => import('@/views/network/InternalLBAssignVmForm.vue') }, { api: 'deleteLoadBalancer', diff --git a/ui/src/locales/en.json b/ui/src/locales/en.json index 8e8352d7a65..882aad20ab0 100644 --- a/ui/src/locales/en.json +++ b/ui/src/locales/en.json @@ -280,6 +280,7 @@ "intervaltype": "Interval Type", "invitations": "Invitations", "ip": "IP Address", +"ips": "IPs", "ip4Netmask": "IPv4 Netmask", "ip4dns1": "IPv4 DNS1", "ip4dns2": "IPv4 DNS2", @@ -405,6 +406,7 @@ "label.action.register.ncc": "Register NCC", "label.action.release.ip": "Release IP", "label.action.remove.host": "Remove Host", +"label.action.remove.vm": "Release VM", "label.action.reset.password": "Reset Password", "label.action.resize.volume": "Resize Volume", "label.action.restore.instance": "Restore Instance", diff --git a/ui/src/views/network/InternalLBAssignVmForm.vue b/ui/src/views/network/InternalLBAssignVmForm.vue new file mode 100644 index 00000000000..d9f7cbb43ee --- /dev/null +++ b/ui/src/views/network/InternalLBAssignVmForm.vue @@ -0,0 +1,278 @@ +// 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/InternalLBAssignedVmTab.vue b/ui/src/views/network/InternalLBAssignedVmTab.vue new file mode 100644 index 00000000000..a44d52e3db7 --- /dev/null +++ b/ui/src/views/network/InternalLBAssignedVmTab.vue @@ -0,0 +1,157 @@ +// 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/IpAddressesTab.vue b/ui/src/views/network/IpAddressesTab.vue index d241f971db3..7d63894c9b4 100644 --- a/ui/src/views/network/IpAddressesTab.vue +++ b/ui/src/views/network/IpAddressesTab.vue @@ -20,6 +20,23 @@ {{ $t("label.acquire.new.ip") }} +
+ Select Tier: + + + {{ $t('Show All') }} + + + {{ network.name }} + + +
{{ record.virtualmachinename || record.virtualmachineid }} + +