lint fixes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2019-08-14 03:58:07 +05:30
parent cf53d26109
commit 84d48f79ff

View File

@ -164,9 +164,9 @@
<a slot="vmname" slot-scope="text, record" href="javascript:;"> <a slot="vmname" slot-scope="text, record" href="javascript:;">
<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, record"> <template slot="state" slot-scope="text">
<a-tooltip placement="right"> <a-tooltip placement="right">
<template slot='title'> <template slot="title">
{{ text }} {{ text }}
</template> </template>
<a-badge :title="text" :status="getBadgeStatus(text)"/> <a-badge :title="text" :status="getBadgeStatus(text)"/>
@ -434,31 +434,31 @@ export default {
} }
}) })
}, },
getRowClassName(record, index) { getRowClassName (record, index) {
if (index % 2 !== 0) { if (index % 2 === 0) {
return 'light-row' return 'light-row'
} }
return 'dark-row' return 'dark-row'
}, },
getBadgeStatus(state) { getBadgeStatus (state) {
var status = "default" var status = 'default'
switch (state) { switch (state) {
case "Running": case 'Running':
case "Ready": case 'Ready':
case "Up": case 'Up':
case "BackedUp": case 'BackedUp':
status = "success" status = 'success'
break break
case "Stopped": case 'Stopped':
status = "error" status = 'error'
break break
case "Migrating": case 'Migrating':
case "Starting": case 'Starting':
status = "processing" status = 'processing'
break break
case "Alert": case 'Alert':
case "Allocated": case 'Allocated':
status = "warning" status = 'warning'
break break
} }
return status return status