From 1294a6ec984cc2ec822e7932c855f71df3202712 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Sat, 10 Aug 2019 23:24:14 +0530 Subject: [PATCH] dashboard fixes, working event card, new public ips view Signed-off-by: Rohit Yadav --- ui/src/components/CloudMonkey/Resource.vue | 8 +- ui/src/config/section/infra.js | 2 +- ui/src/config/section/network.js | 7 ++ ui/src/views/dashboard/CapacityDashboard.vue | 121 +++++++++++-------- ui/src/views/dashboard/UsageDashboard.vue | 109 ++++++++++++----- 5 files changed, 162 insertions(+), 85 deletions(-) diff --git a/ui/src/components/CloudMonkey/Resource.vue b/ui/src/components/CloudMonkey/Resource.vue index e1a7a276b17..05af44a2b7c 100644 --- a/ui/src/components/CloudMonkey/Resource.vue +++ b/ui/src/components/CloudMonkey/Resource.vue @@ -232,9 +232,11 @@ export default { this.columns = [] this.columnKeys = [] var params = { listall: true } - if (this.$route.meta.params) { - params = this.$route.meta.params - params['listall'] = 'true' + console.log(this.$route) + if (Object.keys(this.$route.query).length > 0) { + Object.assign(params, this.$route.query) + } else if (this.$route.meta.params) { + Object.assign(params, this.$route.meta.params) } if (search !== '') { params['keyword'] = search diff --git a/ui/src/config/section/infra.js b/ui/src/config/section/infra.js index a6f67ea3299..bf7247b7e68 100644 --- a/ui/src/config/section/infra.js +++ b/ui/src/config/section/infra.js @@ -71,7 +71,7 @@ export default { { name: 'ms', title: 'Management Servers', - icon: 'environment', + icon: 'rocket', permission: [ 'listManagementServers' ], component: () => import('@/components/CloudMonkey/Resource.vue') } diff --git a/ui/src/config/section/network.js b/ui/src/config/section/network.js index 9b37e01be95..a5f1ddbb3f6 100644 --- a/ui/src/config/section/network.js +++ b/ui/src/config/section/network.js @@ -24,6 +24,13 @@ export default { permission: [ 'listSecurityGroups' ], component: () => import('@/components/CloudMonkey/Resource.vue') }, + { + name: 'publicip', + title: 'Public IP Addresses', + icon: 'environment', + permission: [ 'listPublicIpAddresses' ], + component: () => import('@/components/CloudMonkey/Resource.vue') + }, { name: 'vpngateway', title: 'VPN Gateways', diff --git a/ui/src/views/dashboard/CapacityDashboard.vue b/ui/src/views/dashboard/CapacityDashboard.vue index 7d88f5a0e0b..4a9c0160b5c 100644 --- a/ui/src/views/dashboard/CapacityDashboard.vue +++ b/ui/src/views/dashboard/CapacityDashboard.vue @@ -1,7 +1,7 @@