This commit is contained in:
@ -3,6 +3,7 @@
|
||||
<b-card
|
||||
:title="cardTitle"
|
||||
class="m-2"
|
||||
v-hotkey.prevent="keymap"
|
||||
>
|
||||
<b-card-text>
|
||||
Could not read device data!
|
||||
@ -31,6 +32,13 @@ export default {
|
||||
computed: {
|
||||
cardTitle() {
|
||||
return `Device: ${this.device_id}`
|
||||
},
|
||||
keymap() {
|
||||
return {
|
||||
"up": this.bringOnline,
|
||||
"down": this.bringOffline,
|
||||
"right": this.doManualAlert
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -7,9 +7,12 @@ import axios from 'axios'
|
||||
|
||||
import { BootstrapVue, IconsPlugin } from 'bootstrap-vue'
|
||||
|
||||
import VueHotkey from 'v-hotkey'
|
||||
|
||||
import 'bootstrap/dist/css/bootstrap.css'
|
||||
import 'bootstrap-vue/dist/bootstrap-vue.css'
|
||||
|
||||
Vue.use(VueHotkey)
|
||||
Vue.use(BootstrapVue)
|
||||
Vue.use(IconsPlugin)
|
||||
|
||||
|
Reference in New Issue
Block a user