Follow-up from "Alarms" delayed connection
The following discussion from !7 (merged) should be addressed:
-
@sfargier started a discussion: We should eventually delay alarms retrival (like we talked about earlier), it can be really simple, something like
constructor(store) { ... this.delay = setTimeout(() => { delete this.delay; this.store.commit('alarms/fetchStamp', undefined) this.connect() }); this.store.commit('alarms/fetchStamp', now() + delay) } connect() { if (this.timer) { clearTimeout(this.timer); this.store.commit('alarms/fetchStamp', undefined) delete this.timer; } return super.connect(); } // add if (!this.timer && dns) in onDnsUpdate
Alarms component needs to call
connect
on the source in itsmounted
functionThen we should implement a Countdown widget, eventually using SVG + stroke-dasharray (I can take that part if you want)