some update to my first post
I updated dashboard 2 to 1.9.1
In Activity Tracker "WebSocket Connection Issues" are under Review, does this means that it should be fixed ?
Just want to give the information that my ui-templates still do not refresh after client connect.
They keep freeze until I do a manual page refresh, after this they start updating again.
ui-template
<template>
<div>
<v-progress-linear class="my-progress-class"
label="Batterie"
min="0"
max="100"
height="25"
bg-color="grey"
bg-opacity="0.5"
:color="getColor(value)"
v-model=calcvalue>
<template v-slot:default="{ value }">
<strong>{{ this.value }} W</strong>
</template>
</v-progress-linear>
</div>
</template>
<script>
/*
<strong>{{ Math.abs(Math.floor(value)) }} W</strong>
*/
export default {
data() {
// define variables available component-wide
// (in <template> and component functions)
return {
count: 0
}
},
watch: {
// watch for any changes of "count"
count: function () {
if (this.count % 5 === 0) {
this.send({payload: 'Multiple of 5'})
}
}
},
computed: {
// automatically compute this variable
// whenever VueJS deems appropriate
calcvalue: function () {
//return this.value*100/10000
return Math.round(this.msg.payload*100/10000)
}
},
/*
methods: {
// expose a method to our <template> and Vue Application
increase: function () {
this.count++
}
},
*/
methods: {
// add a function to determine the color of the progress bar given the row's item
getColor: function (value) {
if (value<30) {
return 'red'
} else if (value<1000) {
return 'yellow'
} else{
return 'green'
}
},
getValue: function (value) {
return value*100/2500
}
},
mounted() {
// code here when the component is first loaded
},
unmounted() {
// code here when the component is removed from the Dashboard
// i.e. when the user navigates away from the page
}
}
</script>
<style>
/* define any styles here - supports raw CSS */
/* color: red;*/
/* background-color: blue-grey-lighten-3;*/
.my-progress-class {
}
</style>