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

Function startRefreshTimer

js/report.js:1146–1161  ·  view source on GitHub ↗

* Continuously refresh data in given interval

(minutes)

Source from the content-addressed store, hash-verified

1144 * Continuously refresh data in given interval
1145 */
1146 startRefreshTimer(minutes) {
1147 if (minutes !== 0 && !isNaN(minutes)) {
1148 if (OCA.Analytics.refreshTimer === null) {
1149 OCA.Analytics.refreshTimer = setTimeout(OCA.Analytics.Report.Backend.getData, minutes * 60 * 1000)
1150 } else {
1151 clearTimeout(OCA.Analytics.refreshTimer)
1152 OCA.Analytics.refreshTimer = null
1153 OCA.Analytics.Report.Backend.startRefreshTimer(minutes);
1154 }
1155 } else {
1156 if (OCA.Analytics.refreshTimer !== null) {
1157 clearTimeout(OCA.Analytics.refreshTimer)
1158 OCA.Analytics.refreshTimer = null
1159 }
1160 }
1161 },
1162});

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected