]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/blob
ca261b8db3aca0fc9fcd8f0e2dec78723f3774df
[ceph-ci.git] /
1 @if (executingTasks.length > 0) {
2 <div
3   class="notification-section-heading"
4   i18n>
5   Running tasks
6 </div>
7
8 @for (task of executingTasks; track task.begin_time) {
9 <div class="notification-wrapper">
10   <div class="notification-item task-item">
11     <cd-icon type="infoCircle"></cd-icon>
12
13     <div class="notification-content">
14       <div class="notification-title">
15         {{ task.description }}
16       </div>
17
18       <cds-progress-bar
19         [max]="100"
20         [value]="task.progress || 0"
21         status="active"
22         type="inline"
23         size="small">
24       </cds-progress-bar>
25
26       <div class="task-row">
27         <span class="notification-timestamp">
28           {{ task.begin_time | relativeDate }}
29         </span>
30
31         <span class="task-progress">
32           {{ task.progress || 0 }} %
33         </span>
34       </div>
35     </div>
36   </div>
37
38   <div class="notification-divider"></div>
39 </div>
40 }
41 }
42
43 <ng-template
44   #notificationItemTemplate
45   let-notification="notification"
46   let-last="last">
47   <div class="notification-wrapper">
48     <div class="notification-item">
49       <cd-icon
50         id="notification-icon"
51         [type]="notificationIconMap[notification.type] || notificationIconMap['default']">
52       </cd-icon>
53
54       <div class="notification-content">
55         <div class="notification-timestamp">
56           {{ notification.timestamp | relativeDate }}
57         </div>
58         <div class="notification-title">
59           {{ notification.title }}
60         </div>
61         <div
62           class="notification-message"
63           [innerHTML]="notification.message | sanitizeHtml">
64         </div>
65       </div>
66
67       <button
68         cdsButton="ghost"
69         size="sm"
70         class="notification-close"
71         (click)="removeNotification(notification, $event)">
72         <cd-icon type="destroy"></cd-icon>
73       </button>
74     </div>
75
76     @if (!last) {
77     <div class="notification-divider"></div>
78     }
79   </div>
80 </ng-template>
81
82 @if (todayNotifications.length > 0) {
83 <div
84   class="notification-section-heading"
85   i18n>
86   Today
87 </div>
88
89 @for (notification of todayNotifications; track notification.timestamp; let last = $last) {
90 <ng-container
91   *ngTemplateOutlet="notificationItemTemplate;
92     context: { notification: notification, last: last }">
93 </ng-container>
94 }
95 }
96
97 @if (previousNotifications.length > 0) {
98 <div
99   class="notification-section-heading"
100   i18n>
101   Previous
102 </div>
103
104 @for (notification of previousNotifications; track notification.timestamp; let last = $last) {
105 <ng-container
106   *ngTemplateOutlet="notificationItemTemplate;
107     context: { notification: notification, last: last }">
108 </ng-container>
109 }
110 }
111
112 @if (todayNotifications.length === 0 && previousNotifications.length === 0) {
113 <div class="notification-empty">
114   <div i18n>No notifications</div>
115 </div>
116 }