mirror of https://github.com/apache/cloudstack.git
vpc: api/sections
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
f5618fb5be
commit
1d9e455986
|
|
@ -81,6 +81,9 @@
|
|||
<a-tag>source-nat</a-tag>
|
||||
</span>
|
||||
</a>
|
||||
<a slot="publicip" slot-scope="text, record" href="javascript:;">
|
||||
<router-link :to="{ path: $route.path + '/' + record.id }">{{ text }}</router-link>
|
||||
</a>
|
||||
<a slot="vmname" slot-scope="text, record" href="javascript:;">
|
||||
<router-link :to="{ path: '/vm/' + record.virtualmachineid }">{{ text }}</router-link>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export default {
|
|||
case 'enabled':
|
||||
case 'Active':
|
||||
case 'Completed':
|
||||
case 'Connected':
|
||||
case 'Started':
|
||||
case 'Download Complete':
|
||||
case 'Successfully Installed':
|
||||
|
|
|
|||
|
|
@ -84,6 +84,23 @@ export default {
|
|||
dataView: true,
|
||||
args: ['makeredundant', 'cleanup']
|
||||
},
|
||||
{
|
||||
api: 'replaceNetworkACLList',
|
||||
icon: 'swap',
|
||||
label: 'Replace ACL List',
|
||||
dataView: true,
|
||||
show: (record) => { return record.vpcid },
|
||||
args: ['aclid', 'networkid'],
|
||||
mapping: {
|
||||
aclid: {
|
||||
api: 'listNetworkACLLists',
|
||||
params: (record) => { return { vpcid: record.vpcid } }
|
||||
},
|
||||
networkid: {
|
||||
value: (record) => { return record.id }
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
api: 'deleteNetwork',
|
||||
icon: 'delete',
|
||||
|
|
@ -101,16 +118,40 @@ 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: 's2svpn',
|
||||
title: 'Site-to-Site VPN Gateways',
|
||||
param: 'vpcid'
|
||||
}, {
|
||||
name: 's2svpnconn',
|
||||
title: 'Site-to-Site VPN Connections',
|
||||
param: 'vpcid'
|
||||
}, {
|
||||
name: 'acllist',
|
||||
title: 'Network ACL Lists',
|
||||
param: 'vpcid'
|
||||
}, {
|
||||
name: 'guestnetwork',
|
||||
title: 'Networks',
|
||||
param: 'vpcid'
|
||||
}, {
|
||||
name: 'vm',
|
||||
title: 'Instances',
|
||||
param: 'vpcid'
|
||||
}],
|
||||
tabs: [{
|
||||
name: 'configure',
|
||||
component: () => import('@/views/network/VpcConfigure.vue')
|
||||
}, {
|
||||
name: 'details',
|
||||
component: () => import('@/components/view/DetailsTab.vue')
|
||||
}, {
|
||||
name: 'Tiers',
|
||||
component: () => import('@/views/network/VpcTiers.vue')
|
||||
}],
|
||||
actions: [
|
||||
{
|
||||
|
|
@ -271,6 +312,50 @@ export default {
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'privategw',
|
||||
title: 'Private Gateway',
|
||||
icon: 'branches',
|
||||
hidden: true,
|
||||
permission: ['listPrivateGateways'],
|
||||
columns: ['ipaddress', 'state', 'gateway', 'netmask', 'account', 'domain'],
|
||||
details: ['ipaddress', 'gateway', 'netmask', 'vlan', 'sourcenatsupported', 'aclid', 'account', 'domain', 'zone'],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 's2svpn',
|
||||
title: 'Site-to-Site VPNs',
|
||||
icon: 'lock',
|
||||
hidden: true,
|
||||
permission: ['listVpnGateways'],
|
||||
columns: ['publicip', 'account', 'domain'],
|
||||
details: ['publicip', 'account', 'domain'],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 's2svpnconn',
|
||||
title: 'Site-to-Site VPN Connections',
|
||||
icon: 'sync',
|
||||
hidden: true,
|
||||
permission: ['listVpnConnections'],
|
||||
columns: ['publicip', 'state', 'gateway', 'ipsecpsk', 'ikepolicy', 'esppolicy'],
|
||||
details: ['publicip', 'gateway', 'passive', 'cidrlist', 'ipsecpsk', 'ikepolicy', 'esppolicy', 'ikelifetime', 'esplifetime', 'dpd', 'forceencap', 'created'],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'acllist',
|
||||
title: 'Network ACL Lists',
|
||||
icon: 'bars',
|
||||
hidden: true,
|
||||
permission: ['listNetworkACLLists'],
|
||||
columns: ['name', 'description', 'id'],
|
||||
details: ['name', 'description', 'id'],
|
||||
actions: [
|
||||
]
|
||||
},
|
||||
{
|
||||
name: 'vpnuser',
|
||||
title: 'VPN Users',
|
||||
|
|
@ -307,8 +392,8 @@ export default {
|
|||
]
|
||||
},
|
||||
{
|
||||
name: 'vpngateway',
|
||||
title: 'VPN Gateway',
|
||||
name: 'vpncustomergateway',
|
||||
title: 'VPN Customer Gateway',
|
||||
icon: 'lock',
|
||||
permission: ['listVpnCustomerGateways'],
|
||||
resourceType: 'VpnGateway',
|
||||
|
|
|
|||
|
|
@ -533,10 +533,17 @@ export default {
|
|||
return
|
||||
}
|
||||
var paramName = param.name
|
||||
var params = { listall: true }
|
||||
const possibleName = 'list' + paramName.replace('ids', '').replace('id', '').toLowerCase() + 's'
|
||||
var possibleApi
|
||||
if (this.currentAction.mapping && param.name in this.currentAction.mapping && this.currentAction.mapping[param.name].api) {
|
||||
possibleApi = this.currentAction.mapping[param.name].api
|
||||
if (this.currentAction.mapping[param.name].params) {
|
||||
const customParams = this.currentAction.mapping[param.name].params(this.resource)
|
||||
if (customParams) {
|
||||
params = { ...params, ...customParams }
|
||||
}
|
||||
}
|
||||
} else if (paramName === 'id') {
|
||||
possibleApi = this.apiName
|
||||
} else {
|
||||
|
|
@ -552,7 +559,6 @@ export default {
|
|||
}
|
||||
param.loading = true
|
||||
param.opts = []
|
||||
var params = { listall: true }
|
||||
if (possibleApi === 'listTemplates') {
|
||||
params.templatefilter = 'executable'
|
||||
} else if (possibleApi === 'listIsos') {
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
<template>
|
||||
<div>
|
||||
TODO: VPC configure view
|
||||
TODO: VPC tiers management
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue