X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fpybind%2Fmgr%2Fdashboard%2Ffrontend%2Fsrc%2Fapp%2Fshared%2Fservices%2Fmotd-notification.service.ts;h=d2ee89f9cd168b7890d4e5faaafff117679a51e3;hb=2a845540123ad00df2e55947b8080306ebdcf410;hp=11feca26b053189d76b4747f1039dbb884896e1f;hpb=522d829b51d55703d604fa6a2177d1ec6ece4586;p=ceph.git diff --git a/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/services/motd-notification.service.ts b/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/services/motd-notification.service.ts index 11feca26b..d2ee89f9c 100644 --- a/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/services/motd-notification.service.ts +++ b/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/services/motd-notification.service.ts @@ -5,6 +5,7 @@ import { BehaviorSubject, EMPTY, Observable, of, Subscription } from 'rxjs'; import { catchError, delay, mergeMap, repeat, tap } from 'rxjs/operators'; import { Motd, MotdService } from '~/app/shared/api/motd.service'; +import { whenPageVisible } from '../rxjs/operators/page-visibilty.operator'; @Injectable({ providedIn: 'root' @@ -31,7 +32,8 @@ export class MotdNotificationService implements OnDestroy { }), tap((motd: Motd | null) => this.processResponse(motd)), delay(60000), - repeat() + repeat(), + whenPageVisible() ) .subscribe(); }