2 ========================LICENSE_START=================================
5 Copyright (C) 2019 AT&T Intellectual Property and Nokia
7 Licensed under the Apache License, Version 2.0 (the "License");
8 you may not use this file except in compliance with the License.
9 You may obtain a copy of the License at
11 http://www.apache.org/licenses/LICENSE-2.0
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18 ========================LICENSE_END===================================
21 <div mat-dialog-title>
25 <form [formGroup]="ranDialogForm" novalidate autocomplete="off" (ngSubmit)="setupConnection(ranDialogForm.value)">
26 <div mat-dialog-content>
28 <label id="request-type-radio-group-label">RAN type:</label>
29 <mat-radio-group aria-label="RAN Type" formControlName="ranType">
30 <mat-radio-button class="ran-type-radio-button" value="endc">EN-DC</mat-radio-button>
31 <mat-radio-button class="ran-type-radio-button" value="x2">X2</mat-radio-button>
34 <mat-form-field class="input-display-block">
35 <input matInput type="text" placeholder="RAN Name" formControlName="ranName">
36 <mat-hint align="end">Example: ABCD123456</mat-hint>
37 <mat-error *ngIf="validateControl('ranName') && hasError('ranName', 'required')">Name is required</mat-error>
38 <mat-error *ngIf="hasError('ranName', 'length')">Valid name is required</mat-error>
40 <mat-form-field class="input-display-block">
41 <input matInput type="text" placeholder="IP" formControlName="ranIp">
42 <mat-error *ngIf="validateControl('ranIp') && hasError('ranIp', 'required')">IP is required</mat-error>
43 <mat-error *ngIf="hasError('ranIp', 'pattern')">Valid IP is required</mat-error>
45 <mat-form-field class="input-display-block">
46 <input matInput type="text" placeholder="Port" formControlName="ranPort">
47 <mat-error *ngIf="validateControl('ranPort') && hasError('ranPort', 'required')">Port is required</mat-error>
48 <mat-error *ngIf="hasError('ranPort', 'pattern')">Valid port number is required</mat-error>
51 <div mat-dialog-actions class="modal-footer justify-content-center">
52 <button class="mat-raised-button" (click)="onCancel()">Cancel</button>
53 <button class="mat-raised-button mat-primary" [disabled]="!ranDialogForm.valid">Connect</button>