fix(inventory): hide CACHE and EMPTY partitions and disable non-OS partitions in software inventory modal
parent
7a16e3a128
commit
e0736eaf99
|
|
@ -10,7 +10,8 @@
|
|||
[(selectedPartition)]="selectedPartition"
|
||||
[partitions]="dataSource.data"
|
||||
[columns]="columns"
|
||||
[displayedColumns]="displayedColumns">
|
||||
[displayedColumns]="displayedColumns"
|
||||
[disableCondition]="isPartitionDisabled">
|
||||
</app-disk-partition-selector>
|
||||
</div>
|
||||
</mat-dialog-content>
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ export class SoftwareProfilePartitionComponent implements OnInit{
|
|||
|
||||
displayedColumns = ['select', ...this.columns.map(column => column.columnDef)];
|
||||
|
||||
isPartitionDisabled = (partition: any): boolean => {
|
||||
return !partition.operativeSystem;
|
||||
};
|
||||
|
||||
constructor(
|
||||
@Inject(MAT_DIALOG_DATA) public data: { client: any },
|
||||
private dialogRef: MatDialogRef<SoftwareProfilePartitionComponent>,
|
||||
|
|
@ -79,7 +83,7 @@ export class SoftwareProfilePartitionComponent implements OnInit{
|
|||
this.http.get(url).subscribe(
|
||||
(response: any) => {
|
||||
if (response.partitions) {
|
||||
this.dataSource.data = response.partitions;
|
||||
this.dataSource.data = response.partitions.filter((p: any) => p.partitionCode !== 'CACHE' && p.partitionCode !== 'EMPTY');
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue