There are several concepts that implements or requires periodical refresh after action in UPS Admin:
-
Activity Log
-
Metrics
-
Variants
-
Application List
-
App Creation Wizard
I suggest we manage them under one RefreshService service so that they share implementation.
We shouild also leverage kind of exponential backoff when managing timeout/interval (e.g. start on 300ms updates, but continue with prolounging the timeout up to several seconds, e.g. 5s or 10s (depends on the action we perform)).
The service should:
-
de-duplicate the requests for updates (so that one screen does not poll several times the same source, e.g. because several messages were pushed)
-
allow to provide condition determining when the interval should stop polling
-
destroy periodic/scheduled action at navigation ($scope.$on("$destroy", ...))
|