From 0182a95ac66a813a9e2aeda9679b6e2877ca29cc Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Thu, 10 Oct 2019 12:52:41 +0530 Subject: [PATCH] compute: vm view customisation Signed-off-by: Rohit Yadav --- ui/src/components/widgets/ListView.vue | 2 +- ui/src/components/widgets/Status.vue | 4 ++- ui/src/config/section/compute.js | 6 ++++ ui/src/views/AutogenView.vue | 3 +- ui/src/views/compute/InstanceView.vue | 38 ++++++++++++-------------- 5 files changed, 30 insertions(+), 23 deletions(-) diff --git a/ui/src/components/widgets/ListView.vue b/ui/src/components/widgets/ListView.vue index 9c15a4544d4..3b13303c708 100644 --- a/ui/src/components/widgets/ListView.vue +++ b/ui/src/components/widgets/ListView.vue @@ -33,7 +33,7 @@ {{ text }} diff --git a/ui/src/components/widgets/Status.vue b/ui/src/components/widgets/Status.vue index cf3065cc99f..22c95336076 100644 --- a/ui/src/components/widgets/Status.vue +++ b/ui/src/components/widgets/Status.vue @@ -47,8 +47,10 @@ export default { case 'Started': status = 'success' break - case 'Stopped': + case 'Disabled': + case 'Down': case 'Error': + case 'Stopped': status = 'error' break case 'Migrating': diff --git a/ui/src/config/section/compute.js b/ui/src/config/section/compute.js index 6c759904ea2..30a76360832 100644 --- a/ui/src/config/section/compute.js +++ b/ui/src/config/section/compute.js @@ -117,6 +117,12 @@ export default { label: 'Reset SSH Key', dataView: true }, + { + api: 'assignVirtualMachine', + icon: 'user-add', + label: 'Assign Instance to Another Account', + dataView: true + }, { api: 'destroyVirtualMachine', icon: 'delete', diff --git a/ui/src/views/AutogenView.vue b/ui/src/views/AutogenView.vue index 76ebec2fc03..8a74e2528c0 100644 --- a/ui/src/views/AutogenView.vue +++ b/ui/src/views/AutogenView.vue @@ -3,7 +3,7 @@ - + @@ -322,6 +322,7 @@ export default { this.columns.push({ title: this.$t(key), dataIndex: key, + width: key === 'state' ? '8%' : '', scopedSlots: { customRender: key }, sorter: (a, b) => String(a[key]).length - String(b[key]).length }) diff --git a/ui/src/views/compute/InstanceView.vue b/ui/src/views/compute/InstanceView.vue index f8309921bfe..f94be6852a8 100644 --- a/ui/src/views/compute/InstanceView.vue +++ b/ui/src/views/compute/InstanceView.vue @@ -3,7 +3,7 @@ - -