From e0736eaf991ac7a41c84496421e8ef2356262a6c Mon Sep 17 00:00:00 2001 From: jmbardallo Date: Fri, 31 Jul 2026 14:10:25 +0200 Subject: [PATCH] fix(inventory): hide CACHE and EMPTY partitions and disable non-OS partitions in software inventory modal --- .../software-profile-partition.component.html | 3 ++- .../software-profile-partition.component.ts | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html index 539c46e..8ed11bf 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.html @@ -10,7 +10,8 @@ [(selectedPartition)]="selectedPartition" [partitions]="dataSource.data" [columns]="columns" - [displayedColumns]="displayedColumns"> + [displayedColumns]="displayedColumns" + [disableCondition]="isPartitionDisabled"> diff --git a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts index 1bfad9e..28a6f3a 100644 --- a/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts +++ b/ogWebconsole/src/app/components/commands/main-commands/execute-command/software-profile-partition/software-profile-partition.component.ts @@ -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, @@ -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) => {