]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/services/motd-notification.service.ts
import ceph quincy 17.2.4
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / services / motd-notification.service.ts
index 11feca26b053189d76b4747f1039dbb884896e1f..d2ee89f9cd168b7890d4e5faaafff117679a51e3 100644 (file)
@@ -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();
   }