mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
compute: vm view customisation
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
ef7b338d73
commit
0182a95ac6
@ -33,7 +33,7 @@
|
|||||||
<router-link :to="{ path: '/vm/' + record.virtualmachineid }">{{ text }}</router-link>
|
<router-link :to="{ path: '/vm/' + record.virtualmachineid }">{{ text }}</router-link>
|
||||||
</a>
|
</a>
|
||||||
<template slot="state" slot-scope="text">
|
<template slot="state" slot-scope="text">
|
||||||
<status :text="text ? text : ''" />
|
<status :text="text ? text : ''" displayText />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<a slot="account" slot-scope="text, record" href="javascript:;">
|
<a slot="account" slot-scope="text, record" href="javascript:;">
|
||||||
|
|||||||
@ -47,8 +47,10 @@ export default {
|
|||||||
case 'Started':
|
case 'Started':
|
||||||
status = 'success'
|
status = 'success'
|
||||||
break
|
break
|
||||||
case 'Stopped':
|
case 'Disabled':
|
||||||
|
case 'Down':
|
||||||
case 'Error':
|
case 'Error':
|
||||||
|
case 'Stopped':
|
||||||
status = 'error'
|
status = 'error'
|
||||||
break
|
break
|
||||||
case 'Migrating':
|
case 'Migrating':
|
||||||
|
|||||||
@ -117,6 +117,12 @@ export default {
|
|||||||
label: 'Reset SSH Key',
|
label: 'Reset SSH Key',
|
||||||
dataView: true
|
dataView: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
api: 'assignVirtualMachine',
|
||||||
|
icon: 'user-add',
|
||||||
|
label: 'Assign Instance to Another Account',
|
||||||
|
dataView: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
api: 'destroyVirtualMachine',
|
api: 'destroyVirtualMachine',
|
||||||
icon: 'delete',
|
icon: 'delete',
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<breadcrumb v-if="device !== 'desktop'" class="mobile-breadcrumb" />
|
<breadcrumb v-if="device !== 'desktop'" class="mobile-breadcrumb" />
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="17">
|
<a-col :span="17">
|
||||||
<a-tooltip placement="bottom" v-for="(action, actionIndex) in actions" :key="actionIndex" v-if="(!dataView && (action.listView || action.groupAction && selectedRowKeys.length > 0)) || (dataView && action.dataView)">
|
<a-tooltip placement="bottom" v-for="(action, actionIndex) in actions" :key="actionIndex" v-if="action.api in $store.getters.apis && ((!dataView && (action.listView || action.groupAction && selectedRowKeys.length > 0)) || (dataView && action.dataView))">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
{{ action.label }}
|
{{ action.label }}
|
||||||
</template>
|
</template>
|
||||||
@ -322,6 +322,7 @@ export default {
|
|||||||
this.columns.push({
|
this.columns.push({
|
||||||
title: this.$t(key),
|
title: this.$t(key),
|
||||||
dataIndex: key,
|
dataIndex: key,
|
||||||
|
width: key === 'state' ? '8%' : '',
|
||||||
scopedSlots: { customRender: key },
|
scopedSlots: { customRender: key },
|
||||||
sorter: (a, b) => String(a[key]).length - String(b[key]).length
|
sorter: (a, b) => String(a[key]).length - String(b[key]).length
|
||||||
})
|
})
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<a-row :gutter="12">
|
<a-row :gutter="12">
|
||||||
<a-col :md="24" :lg="7" style="margin-bottom: 12px">
|
<a-col :md="24" :lg="7" style="margin-bottom: 12px">
|
||||||
<a-card :bordered="true">
|
<a-card :bordered="true">
|
||||||
<div class="account-center-avatarHolder">
|
<div class="resource-details">
|
||||||
<div class="avatar">
|
<div class="avatar">
|
||||||
<font-awesome-icon :icon="['fab', osLogo]" size="4x" style="color: #666;" />
|
<font-awesome-icon :icon="['fab', osLogo]" size="4x" style="color: #666;" />
|
||||||
</div>
|
</div>
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<a-tag :color="vm.isdynamicallyscalable ? 'green': 'red'">Dynamic Scalable</a-tag>
|
<a-tag :color="vm.isdynamicallyscalable ? 'green': 'red'">Dynamic Scalable</a-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="account-center-detail">
|
<div class="resource-center-detail">
|
||||||
<p>
|
<p>
|
||||||
<status :text="vm.state ? vm.state : ''" style="padding-left: 8px; padding-right: 5px"/>{{ vm.state }}
|
<status :text="vm.state ? vm.state : ''" style="padding-left: 8px; padding-right: 5px"/>{{ vm.state }}
|
||||||
</p>
|
</p>
|
||||||
@ -43,26 +43,23 @@
|
|||||||
<font-awesome-icon :icon="['fas', 'database']" />
|
<font-awesome-icon :icon="['fas', 'database']" />
|
||||||
{{ (totalStorage / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage
|
{{ (totalStorage / (1024 * 1024 * 1024.0)).toFixed(2) }} GB Storage
|
||||||
(<router-link :to="{ path: '/template/' + vm.templateid }">{{ vm.templatename }}</router-link>)<br/>
|
(<router-link :to="{ path: '/template/' + vm.templateid }">{{ vm.templatename }}</router-link>)<br/>
|
||||||
<span style="padding-left: 32px">
|
<div style="margin-left: 45px">
|
||||||
<a-tag color="green">Disk Read {{ vm.diskkbsread }} KB</a-tag>
|
<a-tag><a-icon type="download" /> Read {{ vm.diskkbsread }} KB</a-tag>
|
||||||
<a-tag color="blue">Disk Write {{ vm.diskkbswrite }} KB</a-tag>
|
<a-tag><a-icon type="upload" /> Write {{ vm.diskkbswrite }} KB</a-tag><br/>
|
||||||
</span><br/>
|
<a-tag><a-icon type="download" /> Read (IO) {{ vm.diskioread }}</a-tag>
|
||||||
<span style="padding-left: 32px">
|
<a-tag><a-icon type="upload" /> Write (IO) {{ vm.diskiowrite }}</a-tag>
|
||||||
<a-tag color="green">Disk Read (IO) {{ vm.diskioread }}</a-tag>
|
</div>
|
||||||
<a-tag color="blue">Disk Write (IO) {{ vm.diskiowrite }}</a-tag>
|
|
||||||
</span>
|
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<font-awesome-icon :icon="['fas', 'ethernet']" />
|
<font-awesome-icon :icon="['fas', 'ethernet']" />
|
||||||
<span>
|
<span style="margin-left: 5px">
|
||||||
{{ vm && vm.nic ? vm.nic.length : 0 }} NIC(s):
|
<a-tag><a-icon type="arrow-down" /> RX {{ vm.networkkbsread }} KB</a-tag>
|
||||||
<a-tag color="green"><a-icon type="arrow-down" /> RX {{ vm.networkkbsread }} KB</a-tag>
|
<a-tag><a-icon type="arrow-up" /> TX {{ vm.networkkbswrite }} KB</a-tag>
|
||||||
<a-tag color="blue"><a-icon type="arrow-up" /> TX {{ vm.networkkbswrite }} KB</a-tag>
|
|
||||||
</span>
|
</span>
|
||||||
<br/>
|
<br/>
|
||||||
<span style="padding-left: 34px" v-for="eth in vm.nic" :key="eth.id">
|
<div style="margin-left: 45px" v-for="(eth, index) in vm.nic" :key="eth.id">
|
||||||
{{ eth.ipaddress }} <router-link :to="{ path: '/guestnetwork/' + eth.networkid }">({{ eth.networkname }})</router-link> <br/>
|
<a-icon type="api"/> eth{{ index }} {{ eth.ipaddress}} (<router-link :to="{ path: '/guestnetwork/' + eth.networkid }">{{ eth.networkname }}</router-link>)
|
||||||
</span>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
<p v-if="vm.group">
|
<p v-if="vm.group">
|
||||||
<a-icon type="team" style="margin-left: 6px; margin-right: 10px" />
|
<a-icon type="team" style="margin-left: 6px; margin-right: 10px" />
|
||||||
@ -189,7 +186,7 @@
|
|||||||
<status :text="item.state" displayText /><br/>
|
<status :text="item.state" displayText /><br/>
|
||||||
</div>
|
</div>
|
||||||
<div slot="description">
|
<div slot="description">
|
||||||
<a-icon type="barcode"/> <router-link :to="{ path: '/volume/' + item.id }"> {{ item.id }}</router-link>
|
<a-icon type="barcode"/> {{ item.id }}
|
||||||
</div>
|
</div>
|
||||||
<a-avatar slot="avatar">
|
<a-avatar slot="avatar">
|
||||||
<font-awesome-icon :icon="['fas', 'database']" />
|
<font-awesome-icon :icon="['fas', 'database']" />
|
||||||
@ -382,7 +379,7 @@ export default {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
.account-center-avatarHolder {
|
.resource-details {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
& > .avatar {
|
& > .avatar {
|
||||||
@ -406,10 +403,11 @@ export default {
|
|||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.account-center-detail {
|
.resource-center-detail {
|
||||||
p {
|
p {
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
padding-left: 12px;
|
padding-left: 12px;
|
||||||
|
padding-right: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
font-awesome-icon, .svg-inline--fa {
|
font-awesome-icon, .svg-inline--fa {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user