| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | <!-- |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | --> |
| 18 | <form [formGroup]="sdnControllerForm" (ngSubmit)="sdnControllerFormSubmit()" autocomplete="off"> |
| 19 | <div class="modal-header"> |
| 20 | <h4 class="modal-title" id="modal-basic-title">{{'PAGE.SDNCONTROLLER.NEWSDNCONTROLLER' | translate}}</h4> |
| 21 | <button class="button-xs" type="button" class="close" aria-label="Close" (click)="activeModal.close()"> |
| 22 | <i class="fas fa-times-circle text-danger"></i> |
| 23 | </button> |
| 24 | </div> |
| 25 | <div class="modal-body modal-body-custom-height"> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 26 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 27 | <label class="col-sm-12 col-form-label mandatory-label" |
| 28 | [ngClass]="{'text-danger': sdnControllerForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | translate}}</label> |
| 29 | <label class="col-sm-4 col-form-label" for="name">{{'NAME' | translate}}*</label> |
| 30 | <div class="col-sm-8"> |
| 31 | <input autocomplete="off" class="form-control" placeholder="{{'NAME' | translate}}" type="text" |
| 32 | formControlName="name" id="name" [ngClass]="{ 'is-invalid': submitted && f.name.errors }" required> |
| 33 | </div> |
| 34 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 35 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 36 | <label class="col-sm-4 col-form-label" for="sdn_type">{{'TYPE' | translate}}*</label> |
| 37 | <div class="col-sm-8"> |
| 38 | <ng-select [items]="sdnType" placeholder="{{'SELECT' | translate}}" bindLabel="title" bindValue="value" |
| Barath Kumar R | d477b85 | 2020-07-07 15:24:05 +0530 | [diff] [blame] | 39 | formControlName="type" id="sdn_type" [(ngModel)]="sdnTypeMod" [addTag]="sharedService.addCustomTag" |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 40 | [ngClass]="{ 'is-invalid': submitted && f.type.errors }" required> |
| 41 | </ng-select> |
| Barath Kumar R | d477b85 | 2020-07-07 15:24:05 +0530 | [diff] [blame] | 42 | <small class="text-info">{{'TYPEINFO' | translate}}</small> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 43 | </div> |
| 44 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 45 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 46 | <label class="col-sm-4 col-form-label" for="username">{{'USERNAME' | translate}}*</label> |
| 47 | <div class="col-sm-8"> |
| 48 | <input autocomplete="off" class="form-control" placeholder="{{'USERNAME' | translate}}" type="text" |
| 49 | formControlName="user" id="username" [ngClass]="{ 'is-invalid': submitted && f.user.errors }" |
| 50 | required> |
| 51 | </div> |
| 52 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 53 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 54 | <label class="col-sm-4 col-form-label" for="password">{{'PASSWORD' | translate}}*</label> |
| 55 | <div class="col-sm-8"> |
| 56 | <input autocomplete="off" class="form-control" placeholder="{{'PASSWORD' | translate}}" type="password" |
| 57 | formControlName="password" id="password" |
| 58 | [ngClass]="{ 'is-invalid': submitted && f.password.errors }" required> |
| 59 | </div> |
| 60 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 61 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 62 | <label class="col-sm-4 col-form-label" for="ip">{{'IP' | translate}}*</label> |
| 63 | <div class="col-sm-8"> |
| 64 | <input autocomplete="off" class="form-control" placeholder="{{'IP' | translate}}" type="text" |
| 65 | formControlName="ip" id="ip" [ngClass]="{ 'is-invalid': submitted && f.ip.errors }" required> |
| 66 | <div *ngIf="sdnControllerForm.invalid" class="invalid-feedback"> |
| 67 | <div *ngIf="f.ip.errors && f.ip.value">{{'DOMVALIDATIONS.INVALIDIPADDRESS' | translate}}</div> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 71 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 72 | <label class="col-sm-4 col-form-label" for="port">{{'PORT' | translate}}*</label> |
| 73 | <div class="col-sm-8"> |
| 74 | <input autocomplete="off" class="form-control" placeholder="{{'PORT' | translate}}" type="text" |
| 75 | formControlName="port" id="port" [ngClass]="{ 'is-invalid': submitted && f.port.errors }" required> |
| 76 | <div *ngIf="sdnControllerForm.invalid" class="invalid-feedback"> |
| 77 | <div *ngIf="f.port.errors && f.port.value">{{'DOMVALIDATIONS.INVALIDPORTADDRESS' | translate}}</div> |
| 78 | </div> |
| 79 | </div> |
| 80 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 81 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 82 | <label class="col-sm-4 col-form-label" for="dpid">{{'PAGE.SDNCONTROLLER.DPID' | translate}}*</label> |
| 83 | <div class="col-sm-8"> |
| 84 | <input autocomplete="off" class="form-control" |
| 85 | placeholder="{{'PAGE.SDNCONTROLLER.DPIDPLACEHOLDER' | translate}}" type="text" |
| 86 | formControlName="dpid" id="dpid" [ngClass]="{ 'is-invalid': submitted && f.dpid.errors }" required> |
| 87 | <div *ngIf="sdnControllerForm.invalid" class="invalid-feedback"> |
| 88 | <div *ngIf="f.dpid.errors && f.dpid.value">{{'DOMVALIDATIONS.INVALIDDPID' | translate}}</div> |
| 89 | </div> |
| 90 | </div> |
| 91 | </div> |
| SANDHYA.JS | c84f112 | 2024-06-04 21:50:03 +0530 | [diff] [blame] | 92 | <div class="form-group row mb-3"> |
| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 93 | <label class="col-sm-4 col-form-label" for="version">{{'VERSION' | translate}}</label> |
| 94 | <div class="col-sm-8"> |
| 95 | <input autocomplete="off" class="form-control" placeholder="{{'VERSION' | translate}}" type="text" |
| 96 | formControlName="version" id="version"> |
| 97 | </div> |
| 98 | </div> |
| 99 | </div> |
| 100 | <div class="modal-footer"> |
| 101 | <button type="button" class="btn btn-danger" (click)="activeModal.close()">{{'CANCEL' | translate}}</button> |
| 102 | <button type="submit" class="btn btn-primary">{{'CREATE' | translate}}</button> |
| 103 | </div> |
| 104 | </form> |
| 105 | <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader> |