Added support for refreshSeconds on dashboard level
This commit is contained in:
parent
62b651789a
commit
ecf6a844dd
2 changed files with 16 additions and 1 deletions
|
@ -20,6 +20,15 @@ export default {
|
|||
name: 'Dashboard',
|
||||
mixins: [Utils],
|
||||
components: {Widget, Loading},
|
||||
props: {
|
||||
// Refresh interval in seconds.
|
||||
refreshSeconds: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 0,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
widgets: [],
|
||||
|
@ -75,6 +84,12 @@ export default {
|
|||
|
||||
mounted() {
|
||||
this.refreshDashboard()
|
||||
if (this.refreshSeconds) {
|
||||
const self = this
|
||||
setTimeout(() => {
|
||||
self.refreshDashboard()
|
||||
}, parseInt((this.refreshSeconds*1000).toFixed(0)))
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -99,7 +99,7 @@ export default {
|
|||
}
|
||||
|
||||
.event {
|
||||
font-size: .95em;
|
||||
font-size: .9em;
|
||||
}
|
||||
|
||||
.event-list {
|
||||
|
|
Loading…
Reference in a new issue