fix lint issues

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2019-09-01 02:34:03 +05:30
parent 14bbb93741
commit 7b2c84de8c
4 changed files with 20 additions and 21 deletions

View File

@ -50,7 +50,7 @@
:loading="loading"
:checked="autoRefresh"
@change="toggleAutoRefresh"
/>
/>
</a-tooltip>
<a-tooltip placement="bottom">
<template slot="title">
@ -82,12 +82,13 @@
<template slot="title">
{{ "Auto-Refresh" }}
</template>
<a-switch v-if="dataView"
<a-switch
v-if="dataView"
style="float: right; margin: 5px;"
:loading="loading"
:checked="autoRefresh"
@change="toggleAutoRefresh"
/>
/>
</a-tooltip>
<a-input-search
size="default"
@ -121,7 +122,7 @@
:label="field.name"
:v-bind="field.name"
v-if="field.name !== 'id'"
>
>
<span v-if="field.type==='boolean'">
<a-switch
@ -405,7 +406,7 @@ export default {
}
const doRefresh = this.doRefresh
const fetchData = this.fetchData
setTimeout(function() {
setTimeout(function () {
fetchData()
doRefresh()
}, 5000)
@ -521,7 +522,7 @@ export default {
})
const fetchData = this.fetchData
setTimeout(function() {
setTimeout(function () {
fetchData()
}, 2500)
}

View File

@ -33,8 +33,7 @@ export default {
props: {
resource: {
type: Object,
required: true,
default: {}
required: true
}
}
}

View File

@ -6,11 +6,13 @@
</a-col>
<a-col :span="5">
<a :href="'/client/console?cmd=access&vm=' + vm.id" target="_blank">
<a-avatar shape="square" :size="200"
<a-avatar
shape="square"
:size="200"
style="color: #fff; backgroundColor: #333; width: 175px; height: 120px;">
<span style="text-align: bottom">
<a-icon type="right-square"/>
{{ vm.instancename }}
<a-icon type="right-square"/>
{{ vm.instancename }}
</span>
</a-avatar>
</a>
@ -26,7 +28,7 @@
Zone: <router-link :to="{ path: '/zone/' + vm.zoneid }">{{ vm.zonename }}</router-link> <br/>
IP Addresses: <ul>
<li v-for="eth in vm.nic">
<li v-for="eth in vm.nic" :key="eth.id">
{{ eth.ipaddress }} <router-link :to="{ path: '/guestnetwork/' + eth.networkid }">({{ eth.networkname }})</router-link> <br/>
</li>
</ul>
@ -57,7 +59,7 @@
itemLayout="horizontal"
:dataSource="volumes"
>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-list-item slot="renderItem" slot-scope="item">
<a-list-item-meta :description="item.id">
<a slot="title" href="">
<router-link :to="{ path: '/volume/' + item.id }">{{ item.name }}</router-link>
@ -77,16 +79,15 @@
</a-list-item>
</a-list>
</a-collapse-panel>
<a-collapse-panel :header="'Network Adapter(s): ' + vm.nic.length" >
<a-list
itemLayout="horizontal"
:dataSource="vm.nic"
>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-list-item slot="renderItem" slot-scope="item">
<a-list-item-meta :description="item.id">
<a slot="title" href="https://vue.ant.design/">{{item.ipaddress}} <span v-show="item.isdefault">(Default)</span></a>
<a slot="title" href="https://vue.ant.design/">{{ item.ipaddress }} <span v-show="item.isdefault">(Default)</span></a>
<a-avatar slot="avatar">
<font-awesome-icon :icon="['fas', 'ethernet']" />
</a-avatar>
@ -106,7 +107,6 @@
</a-card>
</a-col>
</a-row>
</div>
@ -123,8 +123,7 @@ export default {
props: {
vm: {
type: Object,
required: true,
default: {}
required: true
}
},
data () {
@ -140,7 +139,7 @@ export default {
}
},
methods: {
fetchData() {
fetchData () {
api('listVolumes', { 'listall': true, 'virtualmachineid': this.vm.id }).then(json => {
this.volumes = json.listvolumesresponse.volume
this.totalStorage = 0

View File

@ -53,7 +53,7 @@ export default {
icon: 'sync',
label: 'Reboot VM',
dataView: true,
hidden: (record) => { return record.state !== 'Running' },
hidden: (record) => { return record.state !== 'Running' }
},
{
api: 'restoreVirtualMachine',