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 daf98605ead12363d2d7ba8f264ee9ea05706e50 Author: Rohit Yadav <[email protected]> AuthorDate: Thu Mar 5 15:29:21 2020 +0530 components: show allocation and resource state for infra Signed-off-by: Rohit Yadav <[email protected]> --- src/components/view/InfoCard.vue | 15 +++++++++++++++ src/components/view/ListView.vue | 9 +++++++++ src/components/widgets/Status.vue | 1 + src/config/section/infra/clusters.js | 2 +- src/config/section/infra/zones.js | 2 +- 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/components/view/InfoCard.vue b/src/components/view/InfoCard.vue index 13e9b35..13c87fd 100644 --- a/src/components/view/InfoCard.vue +++ b/src/components/view/InfoCard.vue @@ -73,6 +73,21 @@ <span>{{ resource.state || resource.status }}</span> </div> </div> + <div class="resource-detail-item" v-if="resource.allocationstate"> + <div class="resource-detail-item__label">{{ $t('allocationstate') }}</div> + <div class="resource-detail-item__details"> + <status class="status" :text="resource.allocationstate"/> + <span>{{ resource.allocationstate }}</span> + </div> + </div> + <div class="resource-detail-item" v-if="resource.resourcestate"> + <div class="resource-detail-item__label">{{ $t('resourcestate') }}</div> + <div class="resource-detail-item__details"> + <status class="status" :text="resource.resourcestate"/> + <span>{{ resource.resourcestate }}</span> + </div> + </div> + <div class="resource-detail-item" v-if="resource.id"> <div class="resource-detail-item__label">{{ $t('id') }}</div> <div class="resource-detail-item__details"> diff --git a/src/components/view/ListView.vue b/src/components/view/ListView.vue index 0423fd7..f60ccd0 100644 --- a/src/components/view/ListView.vue +++ b/src/components/view/ListView.vue @@ -96,6 +96,15 @@ <template slot="state" slot-scope="text"> <status :text="text ? text : ''" displayText /> </template> + <template slot="allocationstate" slot-scope="text"> + <status :text="text ? text : ''" displayText /> + </template> + <template slot="resourcestate" slot-scope="text"> + <status :text="text ? text : ''" displayText /> + </template> + <template slot="powerstate" slot-scope="text"> + <status :text="text ? text : ''" displayText /> + </template> <template slot="agentstate" slot-scope="text"> <status :text="text ? text : ''" displayText /> </template> diff --git a/src/components/widgets/Status.vue b/src/components/widgets/Status.vue index 2f5ccf4..75222a1 100644 --- a/src/components/widgets/Status.vue +++ b/src/components/widgets/Status.vue @@ -81,6 +81,7 @@ export default { case 'Allocated': case 'Created': case 'Pending': + case 'Maintenance': status = 'warning' break } diff --git a/src/config/section/infra/clusters.js b/src/config/section/infra/clusters.js index 6ea959c..cfbab32 100644 --- a/src/config/section/infra/clusters.js +++ b/src/config/section/infra/clusters.js @@ -20,7 +20,7 @@ export default { title: 'Clusters', icon: 'cluster', permission: ['listClustersMetrics', 'listClusters'], - columns: ['name', 'state', 'clustertype', 'hypervisortype', 'hosts', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'podname', 'zonename'], + columns: ['name', 'state', 'allocationstate', 'clustertype', 'hypervisortype', 'hosts', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'podname', 'zonename'], details: ['name', 'id', 'allocationstate', 'clustertype', 'hypervisortype', 'podname', 'zonename'], related: [{ name: 'host', diff --git a/src/config/section/infra/zones.js b/src/config/section/infra/zones.js index ff94ca2..c2099e6 100644 --- a/src/config/section/infra/zones.js +++ b/src/config/section/infra/zones.js @@ -20,7 +20,7 @@ export default { title: 'Zones', icon: 'global', permission: ['listZonesMetrics', 'listZones'], - columns: ['name', 'state', 'networktype', 'clusters', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'order'], + columns: ['name', 'state', 'allocationstate', 'networktype', 'clusters', 'cpuused', 'cpumaxdeviation', 'cpuallocated', 'cputotal', 'memoryused', 'memorymaxdeviation', 'memoryallocated', 'memorytotal', 'order'], details: ['name', 'id', 'allocationstate', 'networktype', 'guestcidraddress', 'localstorageenabled', 'securitygroupsenabled', 'dns1', 'dns2', 'internaldns1', 'internaldns2'], related: [{ name: 'pod',
