1 <ng-template #tasksTpl>
3 <div *ngFor="let executingTask of executingTasks; trackBy:trackByFn">
4 <div class="card tc_task border-0">
5 <div class="row no-gutters">
6 <div class="col-md-2 text-center">
7 <span [ngClass]="[icons.stack, icons.large2x]"
9 <i [ngClass]="[icons.stack2x, icons.circle]"></i>
10 <i [ngClass]="[icons.stack1x, icons.spinner, icons.spin, icons.inverse]"></i>
13 <div class="col-md-9">
14 <div class="card-body p-1">
15 <h6 class="card-title bold">{{ executingTask.description }}</h6>
18 <ngb-progressbar type="info"
19 [value]="executingTask?.progress"
21 [animated]="true"></ngb-progressbar>
24 <p class="card-text text-muted">
25 <small class="date float-start">
26 {{ executingTask.begin_time | cdDate }}
29 <span class="float-end">
30 {{ executingTask.progress || 0 }} %
43 <ng-template #notificationsTpl>
44 <ng-container *ngIf="notifications.length > 0">
46 class="btn btn-light btn-block"
47 (click)="removeAll(); $event.stopPropagation()">
48 <i [ngClass]="[icons.trash]"
49 aria-hidden="true"></i>
51 <ng-container i18n>Clear notifications</ng-container>
56 <div *ngFor="let notification of notifications; let i = index"
57 [ngClass]="notification.borderClass">
58 <div class="card tc_notification border-0">
59 <div class="row no-gutters">
60 <div class="col-md-2 text-center">
61 <span [ngClass]="[icons.stack, icons.large2x, notification.textClass]">
62 <i [ngClass]="[icons.circle, icons.stack2x]"></i>
63 <i [ngClass]="[icons.stack1x, icons.inverse, notification.iconClass]"></i>
66 <div class="col-md-10">
67 <div class="card-body p-1">
68 <button class="btn btn-link float-end mt-0 pt-0"
69 title="Remove notification"
71 (click)="remove(i); $event.stopPropagation()">
72 <i [ngClass]="[icons.trash]"></i>
74 <button *ngIf="notification.application === 'Prometheus' && notification.type !== 2 && !notification.alertSilenced"
75 class="btn btn-link float-end text-muted mute m-0 p-0"
78 (click)="silence(notification)">
79 <i [ngClass]="[icons.mute]"></i>
81 <button *ngIf="notification.application === 'Prometheus' && notification.type !== 2 && notification.alertSilenced"
82 class="btn btn-link float-end text-muted mute m-0 p-0"
83 title="Expire Silence"
85 (click)="expire(notification)">
86 <i [ngClass]="[icons.bell]"></i>
90 <h6 class="card-title bold">{{ notification.title }}</h6>
92 [innerHtml]="notification.message"></p>
93 <p class="card-text text-muted">
94 <ng-container *ngIf="notification.duration">
96 <ng-container i18n>Duration:</ng-container> {{ notification.duration | duration }}
101 [title]="notification.timestamp | cdDate">{{ notification.timestamp | relativeDate }}</small>
102 <i class="float-end custom-icon"
103 [ngClass]="[notification.applicationClass]"
104 [title]="notification.application"></i>
116 <ng-template #emptyTpl>
117 <div *ngIf="notifications.length === 0 && executingTasks.length === 0">
118 <div class="message text-center"
119 i18n>There are no notifications.</div>
124 (clickOutside)="closeSidebar()"
125 [clickOutsideEnabled]="isSidebarOpened">
126 <div class="card-header">
127 <ng-container i18n>Tasks and Notifications</ng-container>
129 <button class="btn-close float-end"
133 (click)="closeSidebar()">
137 <ngx-simplebar [options]="simplebar">
138 <div class="card-body">
139 <ng-container *ngTemplateOutlet="tasksTpl"></ng-container>
140 <ng-container *ngTemplateOutlet="notificationsTpl"></ng-container>
141 <ng-container *ngTemplateOutlet="emptyTpl"></ng-container>