Merge branch 'devel' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into devel
commit
c72d49f576
|
|
@ -53,42 +53,13 @@
|
||||||
<mat-divider *ngIf="!loading" style="margin-top: 20px;"></mat-divider>
|
<mat-divider *ngIf="!loading" style="margin-top: 20px;"></mat-divider>
|
||||||
|
|
||||||
<div *ngIf="!loading" class="partition-table-container">
|
<div *ngIf="!loading" class="partition-table-container">
|
||||||
<table mat-table [dataSource]="dataSource" class="mat-elevation-z8">
|
<app-disk-partition-selector
|
||||||
<ng-container matColumnDef="select">
|
[(selectedPartition)]="selectedPartition"
|
||||||
<th mat-header-cell *matHeaderCellDef i18n="@@columnActions" style="text-align: start">{{ 'buttonSelectPartition' | translate }}</th>
|
[partitions]="dataSource.data"
|
||||||
<td mat-cell *matCellDef="let row">
|
[columns]="columns"
|
||||||
<mat-radio-group
|
[displayedColumns]="displayedColumns"
|
||||||
[(ngModel)]="selectedPartition"
|
[disableCondition]="isPartitionDisabled">
|
||||||
[disabled]="!row.operativeSystem"
|
</app-disk-partition-selector>
|
||||||
>
|
|
||||||
<mat-radio-button [value]="row">
|
|
||||||
</mat-radio-button>
|
|
||||||
</mat-radio-group>
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<ng-container *ngFor="let column of columns" [matColumnDef]="column.columnDef">
|
|
||||||
<th mat-header-cell *matHeaderCellDef> {{ column.header | translate }} </th>
|
|
||||||
<td mat-cell *matCellDef="let image">
|
|
||||||
<ng-container *ngIf="column.columnDef !== 'size'">
|
|
||||||
{{ column.cell(image) }}
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ng-container *ngIf="column.columnDef === 'size'">
|
|
||||||
<div style="display: flex; flex-direction: column;">
|
|
||||||
<span> {{ image.size }} MB</span>
|
|
||||||
<span style="font-size: 0.75rem; color: gray;">{{ image.size / 1024 }} GB</span>
|
|
||||||
</div>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
</td>
|
|
||||||
</ng-container>
|
|
||||||
|
|
||||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
||||||
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</mat-dialog-content>
|
</mat-dialog-content>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,10 @@ export class BootSoPartitionComponent implements OnInit {
|
||||||
|
|
||||||
displayedColumns = ['select', ...this.columns.map(column => column.columnDef)];
|
displayedColumns = ['select', ...this.columns.map(column => column.columnDef)];
|
||||||
|
|
||||||
|
isPartitionDisabled = (partition: any): boolean => {
|
||||||
|
return !partition.operativeSystem;
|
||||||
|
};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(MAT_DIALOG_DATA) public data: { clients: any },
|
@Inject(MAT_DIALOG_DATA) public data: { clients: any },
|
||||||
private dialogRef: MatDialogRef<BootSoPartitionComponent>,
|
private dialogRef: MatDialogRef<BootSoPartitionComponent>,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue