This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch 4.15
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.15 by this push:
new ee5b01f ui: Show host as unsecure in listview (#5292)
ee5b01f is described below
commit ee5b01f26a3d381368c96010df4a613f9d1a2a0c
Author: davidjumani <[email protected]>
AuthorDate: Mon Aug 9 13:34:56 2021 +0530
ui: Show host as unsecure in listview (#5292)
---
ui/src/components/view/ListView.vue | 11 +++++++++--
ui/src/components/widgets/Status.vue | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/ui/src/components/view/ListView.vue
b/ui/src/components/view/ListView.vue
index 9d77750..708b037 100644
--- a/ui/src/components/view/ListView.vue
+++ b/ui/src/components/view/ListView.vue
@@ -135,8 +135,9 @@
</span>
<span v-else>{{ text }}</span>
</span>
- <template slot="state" slot-scope="text">
- <status :text="text ? text : ''" displayText />
+ <template slot="state" slot-scope="text, record">
+ <status v-if="$route.path.startsWith('/host')"
:text="getHostState(record)" displayText />
+ <status v-else :text="text ? text : ''" displayText />
</template>
<template slot="allocationstate" slot-scope="text">
<status :text="text ? text : ''" displayText />
@@ -578,6 +579,12 @@ export default {
}
return record.nic.filter(e => { return e.ip6address }).map(e => { return
e.ip6address }).join(', ') || text
+ },
+ getHostState (host) {
+ if (host && host.hypervisor === 'KVM' && host.state === 'Up' &&
host.details && host.details.secured !== 'true') {
+ return 'Unsecure'
+ }
+ return host.state
}
}
}
diff --git a/ui/src/components/widgets/Status.vue
b/ui/src/components/widgets/Status.vue
index 97028c8..0453bd9 100644
--- a/ui/src/components/widgets/Status.vue
+++ b/ui/src/components/widgets/Status.vue
@@ -127,6 +127,7 @@ export default {
case 'created':
case 'maintenance':
case 'pending':
+ case 'unsecure':
status = 'warning'
break
}