fix(inventory): hide CACHE and EMPTY partitions and disable non-OS partitions in software inventory modal
testing/ogGui-multibranch/pipeline/head There was a failure building this commit Details
oggui-debian-package/pipeline/head This commit looks good Details
testing/ogGui-multibranch/pipeline/pr-main Build started... Details

pull/98/head
Juan Manuel Bardallo 2026-07-31 14:10:25 +02:00
parent 7a16e3a128
commit e0736eaf99
2 changed files with 7 additions and 2 deletions

View File

@ -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>

View File

@ -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) => {