Web UI: Polling on tables
This commit is contained in:
parent
7f085df240
commit
b3c9a50ead
20 changed files with 2028 additions and 361 deletions
|
@ -1,5 +1,6 @@
|
|||
<script>
|
||||
import { Doughnut } from 'vue-chartjs'
|
||||
import isEqual from 'lodash.isequal'
|
||||
|
||||
export default {
|
||||
extends: Doughnut,
|
||||
|
@ -16,8 +17,8 @@ export default {
|
|||
watch: {
|
||||
chartdata: function (newData, oldData) {
|
||||
// TODO - bug, 'update()' not update the chart, remplace for renderChart()
|
||||
// console.log('new data from watcher...', newData, oldData, this.$_.isEqual(newData.datasets[0].data, oldData.datasets[0].data))
|
||||
if (!this.$_.isEqual(newData.datasets[0].data, oldData.datasets[0].data)) {
|
||||
// console.log('new data from watcher...', newData, oldData, isEqual(newData.datasets[0].data, oldData.datasets[0].data))
|
||||
if (!isEqual(newData.datasets[0].data, oldData.datasets[0].data)) {
|
||||
// this.$data._chart.update()
|
||||
this.renderChart(this.chartdata, this.options)
|
||||
}
|
||||
|
|
|
@ -24,10 +24,10 @@ export default {
|
|||
props: ['featureKey', 'featureVal'],
|
||||
computed: {
|
||||
isString () {
|
||||
return this.$_.isString(this.featureVal)
|
||||
return typeof this.featureVal === 'string'
|
||||
},
|
||||
isBoolean () {
|
||||
return this.$_.isBoolean(this.featureVal) || this.featureVal === ''
|
||||
return typeof variable === 'boolean' || this.featureVal === ''
|
||||
},
|
||||
isTrue () {
|
||||
return this.isBoolean && this.featureVal === true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue