oggui/ogWebconsole/src/app/components/images/create-image/create-image.component.html

61 lines
2.8 KiB
HTML

<div class="create-image-container">
<h2 mat-dialog-title>{{ isEditMode ? 'Editar' : 'Crear' }} imagen</h2>
<div class="mat-dialog-content" [ngClass]="{'loading': loading}">
<mat-spinner class="loading-spinner" *ngIf="loading"></mat-spinner>
<form *ngIf="!loading" [formGroup]="imageForm" (ngSubmit)="saveImage()" class="image-form">
<mat-card *ngIf="showWarning" class="warning-card">
<mat-card-content>
<mat-icon color="warn">warning</mat-icon>
{{ 'youHaveChecked' | translate }}<strong>{{ 'globalImageQuote' | translate }}</strong>{{ 'imageTransferInfo' | translate }}</mat-card-content>
</mat-card>
<mat-form-field appearance="fill" class="form-field">
<mat-label>{{ 'labelImageName' | translate }}</mat-label>
<input matInput formControlName="name" required>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field" *ngIf="!imageId">
<mat-label>{{ 'labelRepository' | translate }}</mat-label>
<mat-select formControlName="imageRepositories" required multiple>
<mat-option *ngFor="let imageRepository of repositories" [value]="imageRepository['@id']">
{{ imageRepository.name }}
</mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>{{ 'labelDescription' | translate }}</mat-label>
<input matInput formControlName="description" name="description">
</mat-form-field>
<mat-form-field appearance="fill" class="form-field">
<mat-label>{{ 'labelComments' | translate }}</mat-label>
<input matInput formControlName="comments" name="comments">
</mat-form-field>
<mat-checkbox formControlName="remotePc">
{{ 'labelRemotePc' | translate }}
</mat-checkbox>
<mat-checkbox formControlName="isGlobal" (click)="changeIsGlobal()">
{{ 'labelGlobalImage' | translate }}
</mat-checkbox>
<mat-divider *ngIf="imageId && partitionInfo"></mat-divider>
<div *ngIf="imageId && partitionInfo" class="partition-info-container">
<h3>{{ 'sourcePartitionInfo' | translate }}</h3>
<p>Sistema de archivos: {{ partitionInfo['filesystem'] }}</p>
<p>Disco: {{ partitionInfo['numDisk'] }}</p>
<p>Particion: {{ partitionInfo['numPartition'] }}</p>
<p>Nombre del SO: {{ partitionInfo['osName'] }}</p>
<p>Código de partición: {{ partitionInfo['partitionCode'] }}</p>
</div>
</form>
</div>
<mat-dialog-actions class="action-container">
<button class="ordinary-button" (click)="close()">{{ 'buttonCancel' | translate }}</button>
<button class="submit-button" (click)="saveImage()" [disabled]="loading">{{ 'labelSaveButton' | translate }}</button>
</mat-dialog-actions>
</div>