UI: Hide alarm style in notification when alarm cleared
This commit is contained in:
parent
d0cbf4efd1
commit
c870e03eb2
@ -41,7 +41,7 @@
|
|||||||
matTooltip="{{ 'notification.mark-as-read' | translate }}" matTooltipPosition="above">
|
matTooltip="{{ 'notification.mark-as-read' | translate }}" matTooltipPosition="above">
|
||||||
<mat-icon>check_circle_outline</mat-icon>
|
<mat-icon>check_circle_outline</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<div class="alarm-severity" *ngIf="notification.type === notificationType.ALARM"
|
<div class="alarm-severity" *ngIf="notification.type === notificationType.ALARM && !notification.info.cleared"
|
||||||
[ngStyle]="{backgroundColor: alarmColorSeverity(0.06)}">
|
[ngStyle]="{backgroundColor: alarmColorSeverity(0.06)}">
|
||||||
<span [ngStyle]="notificationIconColor()" class="severity">
|
<span [ngStyle]="notificationIconColor()" class="severity">
|
||||||
{{alarmSeverityTranslations.get(notification.info.alarmSeverity) | translate}}
|
{{alarmSeverityTranslations.get(notification.info.alarmSeverity) | translate}}
|
||||||
|
|||||||
@ -139,7 +139,7 @@ export class NotificationComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
notificationColor(): string {
|
notificationColor(): string {
|
||||||
if (this.notification.type === NotificationType.ALARM) {
|
if (this.notification.type === NotificationType.ALARM && !this.notification.info.cleared) {
|
||||||
return AlarmSeverityNotificationColors.get(this.notification.info.alarmSeverity);
|
return AlarmSeverityNotificationColors.get(this.notification.info.alarmSeverity);
|
||||||
}
|
}
|
||||||
return 'transparent';
|
return 'transparent';
|
||||||
|
|||||||
@ -48,6 +48,8 @@ export interface NotificationInfo {
|
|||||||
alarmStatus?: AlarmStatus;
|
alarmStatus?: AlarmStatus;
|
||||||
alarmType?: string;
|
alarmType?: string;
|
||||||
stateEntityId?: EntityId;
|
stateEntityId?: EntityId;
|
||||||
|
acknowledged?: boolean;
|
||||||
|
cleared?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface NotificationRequest extends Omit<BaseData<NotificationRequestId>, 'label'> {
|
export interface NotificationRequest extends Omit<BaseData<NotificationRequestId>, 'label'> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user