Skip to content

Commit

Permalink
Merge pull request kubernetes#492 from anvithks/fixalertsview
Browse files Browse the repository at this point in the history
Fixed alerts view in storage details
  • Loading branch information
skdwriting authored Dec 22, 2020
2 parents b00541a + 3856089 commit 882dfc1
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
<button class="" title="Refresh list" pButton type="button" (click)="getAllActiveAlerts(selectedStorageId)" icon="fa-refresh"></button>
</div>
</div>
<p-dataTable [value]="allActiveAlerts" [globalFilter]="searchAll" [rows]="10" [expandableRows]="true" [paginator]="true" [pageLinks]="3" [rowsPerPageOptions]="[10,20,50,100]" [totalRecords]="totalRecords" #at>
<p-dataTable *ngIf="allActiveAlerts" [value]="allActiveAlerts" [immutable]="false" [globalFilter]="searchAll" [rows]="10" [expandableRows]="true" [paginator]="true" [pageLinks]="3" [rowsPerPageOptions]="[10,20,50,100]" [totalRecords]="totalRecords" #at>
<p-column expander="true" styleClass="col-icon" [style]="{'width': '3%'}"></p-column>
<p-column field="alert_name" header="Name" #alertName>
<ng-template pTemplate="body" let-alert="rowData">
Expand All @@ -352,10 +352,10 @@
<p-column field="severity" header="Severity">
<ng-template pTemplate="body" let-alert="rowData">
<div class="severity-icon">
<i *ngIf="alert.severity=='Major'" class="fa fa-exclamation major"></i>
<i *ngIf="alert.severity=='Critical'" class="fa fa-exclamation-triangle critical"></i>
<i *ngIf="alert.severity=='Fatal'" class="fa fa-times-circle fatal"></i>
<i *ngIf="alert.severity=='Informational'" class="fa fa-info-circle informational"></i>
<i *ngIf="alert.severity.toLowerCase()=='major' || alert.severity.toLowerCase()=='warning'" class="fa fa-exclamation major"></i>
<i *ngIf="alert.severity.toLowerCase()=='critical'" class="fa fa-exclamation-triangle critical"></i>
<i *ngIf="alert.severity.toLowerCase()=='fatal'" class="fa fa-times-circle fatal"></i>
<i *ngIf="alert.severity.toLowerCase()=='informational'" class="fa fa-info-circle informational"></i>
</div>
<div class="severity-label">
{{alert.severity}}
Expand All @@ -365,7 +365,7 @@
<p-column field="description" header="Description" [sortable]="true" [style]="{'width': '40%'}"></p-column>
<p-column field="occur_time" header="Occured At">
<ng-template pTemplate="body" let-alert="rowData">
<span>{{alert.created_at ? (alert.created_at | date:'long') : '--'}}</span>
<span>{{alert.occur_time ? (alert.occur_time | date:'long') : '--'}}</span>
</ng-template>
</p-column>
<ng-template let-alert pTemplate="rowexpansion">
Expand Down

0 comments on commit 882dfc1

Please sign in to comment.