This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cloudstack-primate.git
commit 76c8ed8f5f2a15a67a459f9913c880af173d073d Author: Rohit Yadav <[email protected]> AuthorDate: Sat Nov 23 02:37:26 2019 +0530 config: add resource filter and view buttons Signed-off-by: Rohit Yadav <[email protected]> --- src/config/section/compute.js | 14 ++++++++++++++ src/config/section/iam.js | 5 +++++ src/config/section/image.js | 10 ++++++++++ src/config/section/infra/clusters.js | 5 +++++ src/config/section/infra/hosts.js | 5 +++++ src/config/section/infra/pods.js | 9 +++++++++ src/config/section/infra/primaryStorages.js | 5 +++++ src/config/section/infra/zones.js | 21 +++++++++++++++++++++ src/config/section/monitor.js | 5 +++++ src/config/section/network.js | 11 ++++++++++- src/config/section/offering.js | 15 +++++++++++++++ src/config/section/storage.js | 5 +++++ src/views/AutogenView.vue | 3 +++ 13 files changed, 112 insertions(+), 1 deletion(-) diff --git a/src/config/section/compute.js b/src/config/section/compute.js index 5bb1eb2..dfdf56a 100644 --- a/src/config/section/compute.js +++ b/src/config/section/compute.js @@ -38,6 +38,10 @@ export default { 'account', 'zonename' ], related: [{ + name: 'volume', + title: 'Volumes', + param: 'virtualmachineid' + }, { name: 'vmsnapshot', title: 'VM Snapshots', param: 'virtualmachineid' @@ -234,6 +238,11 @@ export default { permission: ['listSSHKeyPairs'], columns: ['name', 'fingerprint', 'account', 'domain'], details: ['name', 'fingerprint', 'account', 'domain'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'keypair' + }], actions: [ { api: 'createSSHKeyPair', @@ -265,6 +274,11 @@ export default { permission: ['listAffinityGroups'], columns: ['name', 'type', 'description', 'account', 'domain'], details: ['name', 'id', 'description', 'type', 'account', 'domain'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'affinitygroupid' + }], actions: [ { api: 'createAffinityGroup', diff --git a/src/config/section/iam.js b/src/config/section/iam.js index 868783a..07946ea 100644 --- a/src/config/section/iam.js +++ b/src/config/section/iam.js @@ -157,6 +157,11 @@ export default { resourceType: 'Domain', columns: ['name', 'state', 'path', 'parentdomainname', 'level'], details: ['name', 'id', 'path', 'parentdomainname', 'level', 'networkdomain', 'iptotal', 'vmtotal', 'volumetotal', 'vmlimit', 'iplimit', 'volumelimit', 'snapshotlimit', 'templatelimit', 'vpclimit', 'cpulimit', 'memorylimit', 'networklimit', 'primarystoragelimit', 'secondarystoragelimit'], + related: [{ + name: 'account', + title: 'Accounts', + param: 'domainid' + }], actions: [ { api: 'createDomain', diff --git a/src/config/section/image.js b/src/config/section/image.js index 1190800..f6e164c 100644 --- a/src/config/section/image.js +++ b/src/config/section/image.js @@ -29,6 +29,11 @@ export default { resourceType: 'Template', columns: ['name', 'ostypename', 'status', 'hypervisor', 'account', 'domain'], details: ['name', 'id', 'displaytext', 'checksum', 'hypervisor', 'format', 'ostypename', 'size', 'isready', 'passwordenabled', 'directdownload', 'isextractable', 'isdynamicallyscalable', 'ispublic', 'isfeatured', 'crosszones', 'type', 'account', 'domain', 'created'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'templateid' + }], tabs: [{ name: 'details', component: () => import('@/components/view/DetailsTab.vue') @@ -102,6 +107,11 @@ export default { resourceType: 'ISO', columns: ['name', 'ostypename', 'account', 'domain'], details: ['name', 'id', 'displaytext', 'checksum', 'ostypename', 'size', 'bootable', 'isready', 'directdownload', 'isextractable', 'ispublic', 'isfeatured', 'crosszones', 'account', 'domain', 'created'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'isoid' + }], actions: [ { api: 'registerIso', diff --git a/src/config/section/infra/clusters.js b/src/config/section/infra/clusters.js index 231803c..79ad842 100644 --- a/src/config/section/infra/clusters.js +++ b/src/config/section/infra/clusters.js @@ -22,6 +22,11 @@ export default { permission: ['listClustersMetrics', 'listClusters'], columns: ['name', 'state', 'clustertype', 'hypervisortype', 'hosts', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'podname', 'zonename'], details: ['name', 'id', 'allocationstate', 'clustertype', 'hypervisortype', 'podname', 'zonename'], + related: [{ + name: 'host', + title: 'Hosts', + param: 'clusterid' + }], actions: [ { api: 'addCluster', diff --git a/src/config/section/infra/hosts.js b/src/config/section/infra/hosts.js index a54e9f6..5c63177 100644 --- a/src/config/section/infra/hosts.js +++ b/src/config/section/infra/hosts.js @@ -24,6 +24,11 @@ export default { params: { type: 'routing' }, columns: ['name', 'state', 'resourcestate', 'powerstate', 'ipaddress', 'hypervisor', 'instances', 'cpunumber', 'cputotalghz', 'cpuusedghz', 'cpuallocatedghz', 'memorytotalgb', 'memoryusedgb', 'memoryallocatedgb', 'networkread', 'networkwrite', 'clustername', 'zonename'], details: ['name', 'id', 'resourcestate', 'ipaddress', 'hypervisor', 'hypervisorversion', 'version', 'type', 'oscategoryname', 'hosttags', 'clustername', 'podname', 'zonename', 'created'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'hostid' + }], actions: [ { api: 'addHost', diff --git a/src/config/section/infra/pods.js b/src/config/section/infra/pods.js index 5df31a8..04aa26e 100644 --- a/src/config/section/infra/pods.js +++ b/src/config/section/infra/pods.js @@ -22,6 +22,15 @@ export default { permission: ['listPods'], columns: ['name', 'allocationstate', 'gateway', 'netmask', 'zonename'], details: ['name', 'id', 'allocationstate', 'netmask', 'gateway', 'zonename'], + related: [{ + name: 'cluster', + title: 'Clusters', + param: 'podid' + }, { + name: 'host', + title: 'Hosts', + param: 'podid' + }], actions: [ { api: 'createPod', diff --git a/src/config/section/infra/primaryStorages.js b/src/config/section/infra/primaryStorages.js index 0ebc1db..bab4a91 100644 --- a/src/config/section/infra/primaryStorages.js +++ b/src/config/section/infra/primaryStorages.js @@ -22,6 +22,11 @@ export default { permission: ['listStoragePoolsMetrics', 'listStoragePools'], columns: ['name', 'state', 'ipaddress', 'type', 'path', 'scope', 'disksizeusedgb', 'disksizetotalgb', 'disksizeallocatedgb', 'disksizeunallocatedgb', 'clustername', 'zonename'], details: ['name', 'id', 'ipaddress', 'type', 'scope', 'path', 'provider', 'hypervisor', 'overprovisionfactor', 'disksizetotal', 'disksizeallocated', 'disksizeused', 'clustername', 'podname', 'zonename', 'created'], + related: [{ + name: 'volume', + title: 'Volumes', + param: 'storageid' + }], actions: [ { api: 'createStoragePool', diff --git a/src/config/section/infra/zones.js b/src/config/section/infra/zones.js index ad2bda0..cf40392 100644 --- a/src/config/section/infra/zones.js +++ b/src/config/section/infra/zones.js @@ -22,6 +22,27 @@ export default { permission: ['listZonesMetrics', 'listZones'], columns: ['name', 'state', 'networktype', 'clusters', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal'], details: ['name', 'id', 'allocationstate', 'networktype', 'guestcidraddress', 'localstorageenabled', 'securitygroupsenabled', 'dns1', 'dns2', 'internaldns1', 'internaldns2'], + related: [{ + name: 'pod', + title: 'Pods', + param: 'zoneid' + }, { + name: 'cluster', + title: 'Clusters', + param: 'zoneid' + }, { + name: 'host', + title: 'Hosts', + param: 'zoneid' + }, { + name: 'storagepool', + title: 'Primate Storage', + param: 'zoneid' + }, { + name: 'imagestore', + title: 'Secondary Storage', + param: 'zoneid' + }], actions: [ { api: 'createZone', diff --git a/src/config/section/monitor.js b/src/config/section/monitor.js index ea436ee..aa6419c 100644 --- a/src/config/section/monitor.js +++ b/src/config/section/monitor.js @@ -28,6 +28,11 @@ export default { permission: ['listEvents'], columns: ['username', 'description', 'state', 'level', 'type', 'account', 'domain', 'created'], details: ['username', 'id', 'description', 'state', 'level', 'type', 'account', 'domain', 'created'], + related: [{ + name: 'event', + title: 'Event Timeline', + param: 'startid' + }], actions: [ { api: 'archiveEvents', diff --git a/src/config/section/network.js b/src/config/section/network.js index 99fa485..dda00a0 100644 --- a/src/config/section/network.js +++ b/src/config/section/network.js @@ -31,7 +31,11 @@ export default { related: [{ name: 'publicip', title: 'IP Addresses', - param: 'associatedNetworkId' + param: 'associatednetworkid' + }, { + name: 'vm', + title: 'Instances', + param: 'networkid' }], tabs: [{ name: 'details', @@ -80,6 +84,11 @@ export default { resourceType: 'Vpc', columns: ['name', 'state', 'displaytext', 'cidr', 'account', 'zonename'], details: ['name', 'id', 'displaytext', 'cidr', 'networkdomain', 'ispersistent', 'redundantvpcrouter', 'restartrequired', 'zonename', 'account', 'domain'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'vpcid' + }], tabs: [{ name: 'configure', component: () => import('@/views/network/VpcConfigure.vue') diff --git a/src/config/section/offering.js b/src/config/section/offering.js index 4951b01..5c17dc3 100644 --- a/src/config/section/offering.js +++ b/src/config/section/offering.js @@ -28,6 +28,11 @@ export default { permission: ['listServiceOfferings'], columns: ['name', 'displaytext', 'cpunumber', 'cpuspeed', 'memory', 'tags', 'domain', 'zone'], details: ['name', 'id', 'displaytext', 'offerha', 'provisioningtype', 'storagetype', 'iscustomized', 'limitcpuuse', 'cpunumber', 'cpuspeed', 'memory', 'tags', 'domain', 'zone', 'created'], + related: [{ + name: 'vm', + title: 'Instances', + param: 'serviceofferingid' + }], actions: [{ api: 'createServiceOffering', icon: 'plus', @@ -88,6 +93,11 @@ export default { permission: ['listDiskOfferings'], columns: ['name', 'displaytext', 'disksize', 'tags', 'domain', 'zone'], details: ['name', 'id', 'displaytext', 'disksize', 'provisioningtype', 'storagetype', 'iscustomized', 'tags', 'domain', 'zone', 'created'], + related: [{ + name: 'volume', + title: 'Volumes', + param: 'diskofferingid' + }], actions: [{ api: 'createDiskOffering', icon: 'plus', @@ -145,6 +155,11 @@ export default { resourceType: 'VpcOffering', columns: ['name', 'state', 'displaytext', 'domain', 'zone'], details: ['name', 'id', 'displaytext', 'distributedvpcrouter', 'service', 'tags', 'domain', 'zone', 'created'], + related: [{ + name: 'vpc', + title: 'VPCs', + param: 'vpcofferingid' + }], actions: [{ api: 'createVPCOffering', icon: 'plus', diff --git a/src/config/section/storage.js b/src/config/section/storage.js index cdc25ff..dccb782 100644 --- a/src/config/section/storage.js +++ b/src/config/section/storage.js @@ -28,6 +28,11 @@ export default { resourceType: 'Volume', columns: ['name', 'state', 'type', 'vmname', 'size', 'physicalsize', 'utilization', 'diskkbsread', 'diskkbswrite', 'diskiopstotal', 'storage', 'account', 'zonename'], details: ['name', 'id', 'type', 'deviceid', 'sizegb', 'physicalsize', 'provisioningtype', 'utilization', 'diskkbsread', 'diskkbswrite', 'diskioread', 'diskiowrite', 'diskiopstotal', 'path'], + related: [{ + name: 'snapshot', + title: 'Snapshots', + param: 'volumeid' + }], actions: [ { api: 'createVolume', diff --git a/src/views/AutogenView.vue b/src/views/AutogenView.vue index ae8ca6f..76f8226 100644 --- a/src/views/AutogenView.vue +++ b/src/views/AutogenView.vue @@ -385,6 +385,9 @@ export default { this.items[idx][key] = func(this.items[idx]) } } + if (this.$route.path.startsWith('/ssh')) { + this.items[idx].id = this.items[idx].name + } } if (this.items.length > 0) { this.resource = this.items[0]
