mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-19 15:23:51 +00:00
Code optimization
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
<h1 mat-dialog-title>Add server</h1>
|
||||
<form [formGroup]="serverForm">
|
||||
<div mat-dialog-content>
|
||||
<div mat-dialog-content>
|
||||
<mat-form-field>
|
||||
<input matInput tabindex="1" formControlName="name" placeholder="Name" />
|
||||
<mat-error *ngIf="serverForm.get('name').hasError('required')">You must enter a value</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Location" formControlName="location" >
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Location" formControlName="location">
|
||||
<mat-option *ngFor="let location of locations" [value]="location.key"> {{ location.name }} </mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -29,13 +29,13 @@
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field>
|
||||
<mat-select placeholder="Protocol" formControlName="protocol" >
|
||||
<mat-select placeholder="Protocol" formControlName="protocol">
|
||||
<mat-option *ngFor="let protocol of protocols" [value]="protocol.key"> {{ protocol.name }} </mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field *ngIf="serverForm.get('location').value === 'remote'">
|
||||
<mat-select placeholder="Authorization" formControlName="authorization" >
|
||||
<mat-select placeholder="Authorization" formControlName="authorization">
|
||||
<mat-option *ngFor="let auth of authorizations" [value]="auth.key"> {{ auth.name }} </mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
@ -47,7 +47,6 @@
|
||||
<mat-form-field *ngIf="serverForm.get('authorization').value === 'basic'">
|
||||
<input matInput tabindex="1" formControlName="password" placeholder="Password" />
|
||||
</mat-form-field>
|
||||
|
||||
</div>
|
||||
<div mat-dialog-actions>
|
||||
<button mat-button (click)="onNoClick()" tabindex="-1" color="accent">No Thanks</button>
|
||||
|
Reference in New Issue
Block a user