[mod] more colors

This commit is contained in:
2020-05-03 16:25:29 +02:00
parent 2937abf7b4
commit 2ff525c093

View File

@@ -2,8 +2,8 @@
<div class="mt-3">
<ul>
<li v-for="w in watchers">
<i class="fas" v-bind:class="watcherClass(w)"></i>
{{ w.name }} <span>{{ w.state }}</span>
<i class="fas" v-bind:class="watcherIconClass(w)"></i>
{{ w.name }} <span v-bind:class="watcherClass(w)">{{ w.state }}</span>
</li>
</ul>
</div>
@@ -24,7 +24,7 @@
},
methods: {
watcherClass(watcher) {
watcherIconClass(watcher) {
if (watcher.state === 'OK') {
return ['fa-check', 'text-success']
}
@@ -32,6 +32,15 @@
return ['fa-times', 'text-danger']
}
return ['fa-question']
},
watcherClass(watcher) {
if (watcher.state === 'OK') {
return ['text-success']
}
if (watcher.state === 'FAILURE') {
return ['text-danger']
}
return ['text-info']
}
}
}