MCPcopy Create free account
hub / github.com/Rello/analytics / startRefreshTimer

Function startRefreshTimer

js/report.js:1206–1221  ·  view source on GitHub ↗

* Continuously refresh data in given interval

(minutes)

Source from the content-addressed store, hash-verified

1204 * Continuously refresh data in given interval
1205 */
1206 startRefreshTimer(minutes) {
1207 if (minutes !== 0 && !isNaN(minutes)) {
1208 if (OCA.Analytics.refreshTimer === null) {
1209 OCA.Analytics.refreshTimer = setTimeout(OCA.Analytics.Report.Backend.getData, minutes * 60 * 1000)
1210 } else {
1211 clearTimeout(OCA.Analytics.refreshTimer)
1212 OCA.Analytics.refreshTimer = null
1213 OCA.Analytics.Report.Backend.startRefreshTimer(minutes);
1214 }
1215 } else {
1216 if (OCA.Analytics.refreshTimer !== null) {
1217 clearTimeout(OCA.Analytics.refreshTimer)
1218 OCA.Analytics.refreshTimer = null
1219 }
1220 }
1221 },
1222});

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected