mirror of
https://github.com/bastienwirtz/homer.git
synced 2024-11-07 08:44:00 +01:00
feat: auto update for glances widget
This commit is contained in:
parent
e377b005e0
commit
4421fb99e4
@ -516,7 +516,7 @@ services:
|
||||
container_name: glances
|
||||
environment:
|
||||
- TZ=Europe/Rome
|
||||
- GLANCES_OPT=-w --disable-webui
|
||||
- GLANCES_OPT=-w
|
||||
ports:
|
||||
- 61208:61208
|
||||
restart: unless-stopped
|
||||
@ -533,9 +533,11 @@ services:
|
||||
url: http://192.168.1.2:61208
|
||||
type: Glances
|
||||
stat: cpu
|
||||
updateInterval: 5000 # (Optional) Interval (in ms) for updating the stats
|
||||
- name: Memory
|
||||
icon: fas fa-memory
|
||||
url: http://192.168.1.2:61208
|
||||
type: Glances
|
||||
stat: mem
|
||||
updateInterval: 5000 # (Optional) Interval (in ms) for updating the stats
|
||||
```
|
||||
|
@ -24,6 +24,10 @@ export default {
|
||||
percentage: 0,
|
||||
}),
|
||||
created() {
|
||||
const updateInterval = parseInt(this.item.updateInterval, 10) || 0;
|
||||
if (updateInterval > 0) {
|
||||
setInterval(() => this.fetchStat(), updateInterval);
|
||||
}
|
||||
this.fetchStat();
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user