]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/notifications/notifications.component.ts
bump version to 15.2.1-pve1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / navigation / notifications / notifications.component.ts
1 import { Component, OnInit } from '@angular/core';
2
3 import * as _ from 'lodash';
4
5 import { Icons } from '../../../shared/enum/icons.enum';
6 import { NotificationService } from '../../../shared/services/notification.service';
7 import { SummaryService } from '../../../shared/services/summary.service';
8
9 @Component({
10 selector: 'cd-notifications',
11 templateUrl: './notifications.component.html',
12 styleUrls: ['./notifications.component.scss']
13 })
14 export class NotificationsComponent implements OnInit {
15 icons = Icons;
16
17 hasRunningTasks = false;
18
19 constructor(
20 public notificationService: NotificationService,
21 private summaryService: SummaryService
22 ) {}
23
24 ngOnInit() {
25 this.summaryService.subscribe((data: any) => {
26 if (!data) {
27 return;
28 }
29 this.hasRunningTasks = data.executing_tasks.length > 0;
30 });
31 }
32
33 toggleSidebar() {
34 this.notificationService.toggleSidebar();
35 }
36 }