adding support for device sort in UI.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
<div class="flex flex-wrap w-full" *ngFor="let hostId of hostGroups | keyvalue">
|
||||
<h3 class="ml-4" *ngIf="hostId.key">{{hostId.key}}</h3>
|
||||
<div class="flex flex-wrap w-full">
|
||||
<app-dashboard-device class="flex gt-sm:w-1/2 min-w-80 p-4" *ngFor="let wwn of hostId.value" [deviceWWN]="wwn" [deviceSummary]="data.data.summary[wwn]"></app-dashboard-device>
|
||||
<app-dashboard-device class="flex gt-sm:w-1/2 min-w-80 p-4" *ngFor="let deviceSummary of (deviceSummariesForHostGroup(hostId.value) | deviceSort )" [deviceWWN]="deviceSummary.device.wwn" [deviceSummary]="deviceSummary"></app-dashboard-device>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -226,6 +226,14 @@ export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy
|
||||
return titleParts.join(' - ')
|
||||
}
|
||||
|
||||
deviceSummariesForHostGroup(hostGroupWWNs: string[]) {
|
||||
let deviceSummaries = []
|
||||
for(let wwn of hostGroupWWNs){
|
||||
deviceSummaries.push(this.data.data.summary[wwn])
|
||||
}
|
||||
return deviceSummaries
|
||||
}
|
||||
|
||||
openDialog() {
|
||||
const dialogRef = this.dialog.open(DashboardSettingsComponent);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user