59 lines
2.5 KiB
HTML
59 lines
2.5 KiB
HTML
<div class="dialog-container">
|
|
<div class="dialog-header">
|
|
<h2 mat-dialog-title>{{ data ? 'Editar Servidor Boot' : 'Añadir Servidor Boot' }}</h2>
|
|
<button mat-icon-button (click)="close()">
|
|
<mat-icon>close</mat-icon>
|
|
</button>
|
|
</div>
|
|
|
|
<mat-dialog-content>
|
|
<form [formGroup]="bootServerForm" class="boot-server-form">
|
|
<mat-form-field appearance="outline" class="full-width">
|
|
<mat-label>Nombre</mat-label>
|
|
<input matInput formControlName="name" placeholder="Ej: Servidor Principal TFTP">
|
|
@if (bootServerForm.controls['name'].invalid && bootServerForm.controls['name'].touched) {
|
|
<mat-error>El nombre es obligatorio</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field appearance="outline" class="full-width">
|
|
<mat-label>IP</mat-label>
|
|
<input matInput formControlName="ip" placeholder="192.168.1.10">
|
|
@if (bootServerForm.controls['ip'].invalid && bootServerForm.controls['ip'].touched) {
|
|
<mat-error>La IP es obligatoria</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<div class="port-row">
|
|
<mat-form-field appearance="outline" class="half-width">
|
|
<mat-label>Puerto API</mat-label>
|
|
<input matInput type="number" formControlName="apiPort">
|
|
@if (bootServerForm.controls['apiPort'].invalid && bootServerForm.controls['apiPort'].touched) {
|
|
<mat-error>El puerto es obligatorio</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field appearance="outline" class="half-width">
|
|
<mat-label>Puerto PXE (TFTP)</mat-label>
|
|
<input matInput type="number" formControlName="pxePort">
|
|
@if (bootServerForm.controls['pxePort'].invalid && bootServerForm.controls['pxePort'].touched) {
|
|
<mat-error>El puerto es obligatorio</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
</div>
|
|
|
|
<mat-form-field appearance="outline" class="full-width">
|
|
<mat-label>Comentarios</mat-label>
|
|
<textarea matInput formControlName="comments" rows="3" placeholder="Información adicional..."></textarea>
|
|
</mat-form-field>
|
|
</form>
|
|
</mat-dialog-content>
|
|
|
|
<mat-dialog-actions align="end">
|
|
<button mat-button (click)="close()">Cancelar</button>
|
|
<button mat-raised-button color="primary" [disabled]="bootServerForm.invalid" (click)="save()">
|
|
{{ data ? 'Guardar' : 'Añadir' }}
|
|
</button>
|
|
</mat-dialog-actions>
|
|
</div>
|