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