Fix for Bug 1495 NG-UI does not start on Air-gapped environments. 52/10652/9
authorBarath Kumar R <barath.r@tataelxsi.co.in>
Fri, 16 Apr 2021 08:04:06 +0000 (13:34 +0530)
committerrbara <barath.r@tataelxsi.co.in>
Fri, 16 Apr 2021 14:04:57 +0000 (16:04 +0200)
 * Removed external access URL.
 * Need to add the location latitude & longitude manually.

Change-Id: I08392af62431b36c7ce312fcfa8820861790ed34
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
17 files changed:
nginx/nginx.conf
proxy.conf.json
src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html
src/app/vim-accounts/info-vim/InfoVimComponent.html
src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.html
src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.ts
src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts
src/assets/i18n/de.json
src/assets/i18n/en.json
src/assets/i18n/es.json
src/assets/i18n/pt.json
src/assets/scss/app.scss
src/environments/environment.prod.ts
src/environments/environment.ts
src/models/CommonModel.ts
src/models/VimAccountModel.ts
src/services/SharedService.ts

index d168aa1..1d3f29d 100644 (file)
@@ -28,12 +28,6 @@ server {
         proxy_set_header Accept-Encoding "";
     }
 
-    location /api {
-        proxy_pass https://photon.komoot.de;
-        proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
-        proxy_set_header Accept-Encoding "";
-    }
-
     location / {
         try_files $uri $uri/ /index.html;
     }
index 40b53f6..e6a63c6 100644 (file)
@@ -3,10 +3,5 @@
         "target": "https://nbi:9999",
         "secure": false,
         "logLevel": "info"
-    },
-    "/api/*": {
-        "target": "https://photon.komoot.de",
-        "secure": false,
-        "logLevel": "info"
     }
 }
\ No newline at end of file
index 7491d59..52c9200 100644 (file)
@@ -25,8 +25,9 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
     <ng-template #popContent>
         <ul class="list-group">
             <li class="list-group-item text-left p-1 border-0" *ngFor="let instanceDetails of showInstanceDetails">
-                <a class="d-block text-truncate" target="_parent"
-                    routerLink="/instances/ns/{{instanceDetails._id}}"><i class="fa-sitemap fas icons"></i> {{instanceDetails.name}}</a>
+                <a class="d-block text-truncate" target="_parent" routerLink="/instances/ns/{{instanceDetails._id}}">
+                    <i class="fa-sitemap fas icons"></i> {{instanceDetails.name}}
+                </a>
             </li>
         </ul>
     </ng-template>
index eeb91e2..80ea8bf 100644 (file)
@@ -16,7 +16,18 @@ limitations under the License.
 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
 -->
 <div class="row d-flex flex-row justify-content-between">
-  <div class="d-flex align-items-center header-style">{{'PAGE.VIMDETAILS.VIMACCOUNTDETAILS' | translate}}</div>
+  <div class="col-sm-4">
+      <div class="d-flex align-items-center header-style">{{'PAGE.VIMDETAILS.VIMACCOUNTDETAILS' | translate}}</div>
+  </div>
+  <div class="col-sm-8 text-right">
+      <span class="button">
+          <button class="btn btn-primary" type="button" placement="top" container="body"
+              ngbTooltip="{{'PAGE.VIMDETAILS.NEWVIM' | translate}}" routerLink="/vim/new">
+              <i class="fas fa-plus-circle" aria-hidden="true"></i>&nbsp;
+              {{'PAGE.VIMDETAILS.NEWVIM' | translate}}
+          </button>
+      </span>
+  </div>
 </div>
 <div class="context-style bg-white mt-2 vim-details">
   <div class="row">
index ce7a5d1..883563f 100644 (file)
@@ -22,7 +22,9 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
     <div class="context-style bg-white p-3">
         <div class="row form-group content-style">
             <label class="col-sm-12 col-form-label mandatory-label"
-                [ngClass]="{'text-danger': vimNewAccountForm.invalid === true && submitted === true}">{{'MANDATORYCHECK' | translate}}</label>
+                [ngClass]="{'text-danger': vimNewAccountForm.invalid === true && submitted === true}">
+                {{'MANDATORYCHECK' | translate}}
+            </label>
             <div class="col-sm-3">
                 <label for="name">{{'PAGE.VIMDETAILS.NAME' | translate}}*</label>
             </div>
@@ -47,8 +49,9 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
             </div>
             <div class="col-sm-3">
                 <ng-select bindLabel="title" bindValue="value" [items]="vimType" placeholder="{{'SELECT' | translate}}"
-                    formControlName="vim_type" id="vim_type" [(ngModel)]="selectedVimType" [addTag]="sharedService.addCustomTag"
-                    [ngClass]="{ 'is-invalid': submitted && f.vim_type.errors }" (change)="clearConfig()">
+                    formControlName="vim_type" id="vim_type" [(ngModel)]="selectedVimType"
+                    [addTag]="sharedService.addCustomTag" [ngClass]="{ 'is-invalid': submitted && f.vim_type.errors }"
+                    (change)="clearConfig()">
                 </ng-select>
                 <small class="text-info">{{'TYPEINFO' | translate}}</small>
             </div>
@@ -103,13 +106,20 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
             <div class="col-sm-3">
                 <label for="location">{{'PAGE.VIMDETAILS.VIMLOCATION' | translate}}</label>
             </div>
-            <div class="col-sm-3" formGroupName="config">
-                <ng-select [items]="getVIMLocation" bindLabel="label" bindValue="value"
-                    placeholder="{{'PAGE.VIMDETAILS.VIMLOCATION' | translate}}" formControlName="location" id="location"
-                    (keydown.enter)="fetchLocationLatLong($event.target.value)" (change)="locationChange($event)">
-                </ng-select>
-                <small class="text-info">{{'PAGE.VIM.LOCATIONINFO' | translate}}</small>
+            <div class="col-sm-9 form-inline">
+                <div class="input-group">
+                    <input autocomplete="off" formControlName="locationName" type="text" class="form-control"
+                        placeholder="{{'PAGE.VIMDETAILS.NAME' | translate}}"
+                        [ngClass]="{ 'is-invalid': submitted && f.locationName.errors }">
+                    <input autocomplete="off" formControlName="latitude" type="text" class="form-control"
+                        placeholder="Latitude" [ngClass]="{ 'is-invalid': submitted && f.latitude.errors }">
+                    <input autocomplete="off" formControlName="longitude" type="text" class="form-control"
+                        placeholder="Longitude" [ngClass]="{ 'is-invalid': submitted && f.longitude.errors }">
+                </div>
+                <small class="text-info mt-1 ml-1">{{'PAGE.VIM.LOCATIONINFO' | translate}}</small>
             </div>
+        </div>
+        <div class="row form-group content-style">
             <div class="col-sm-3">
                 <label>{{'UPLOADCONFIG' | translate}}</label>
             </div>
@@ -117,8 +127,9 @@ Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.i
                 <div class="custom-file">
                     <input [disabled]="!selectedVimType" type="file" #fileInput class="custom-file-input"
                         (change)="filesDropped($event.target.files)" id="customFile">
-                    <label class="custom-file-label" #fileInputLabel
-                        for="customFile">{{'CHOOSEFILE' | translate}}</label>
+                    <label class="custom-file-label" #fileInputLabel for="customFile">
+                        {{'CHOOSEFILE' | translate}}
+                    </label>
                 </div>
                 <small class="text-info">{{'UPLOADCONFIGLABEL' | translate}}</small>
             </div>
index 0c2b3d6..3f44af5 100644 (file)
@@ -74,9 +74,6 @@ export class NewVimaccountComponent implements OnInit {
   /** Supported Vim type for the dropdown */
   public selectedVimType: string;
 
-  /** Supported true and false value for the dropdown */
-  public boolValue: {}[];
-
   /** Form submission Add */
   public submitted: boolean = false;
 
@@ -92,12 +89,6 @@ export class NewVimaccountComponent implements OnInit {
   /** Give the message for the loading @public */
   public message: string = 'PLEASEWAIT';
 
-  /** set the longitude value of the selected place @public */
-  public setLong: number;
-
-  /** set the latitude value of the selected place @public */
-  public setLat: number;
-
   /** Handle the formate Change @public */
   public defaults: {} = {
     'text/x-yaml': ''
@@ -128,9 +119,6 @@ export class NewVimaccountComponent implements OnInit {
   /** Data @public */
   public data: string = '';
 
-  /** Controls the File Type List form @public */
-  public fileTypes: { value: string; viewValue: string; }[] = [];
-
   /** Element ref for fileInput @public */
   @ViewChild('fileInput', { static: true }) public fileInput: ElementRef;
 
@@ -161,9 +149,6 @@ export class NewVimaccountComponent implements OnInit {
   /** VIM Details @private */
   private vimDetail: VimAccountDetails[];
 
-  /** convenience getter for easy access to form fields */
-  get f(): FormGroup['controls'] { return this.vimNewAccountForm.controls; }
-
   constructor(injector: Injector) {
     this.injector = injector;
     this.restService = this.injector.get(RestService);
@@ -172,8 +157,26 @@ export class NewVimaccountComponent implements OnInit {
     this.notifierService = this.injector.get(NotifierService);
     this.translateService = this.injector.get(TranslateService);
     this.sharedService = this.injector.get(SharedService);
+  }
 
-    /** Initializing Form Action */
+  /** convenience getter for easy access to form fields */
+  get f(): FormGroup['controls'] { return this.vimNewAccountForm.controls; }
+
+  /**
+   * Lifecyle Hooks the trigger before component is instantiate
+   */
+  public ngOnInit(): void {
+    this.vimType = VIM_TYPES;
+    this.headers = new HttpHeaders({
+      Accept: 'application/json',
+      'Content-Type': 'application/json',
+      'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0'
+    });
+    this.initializeForm();
+  }
+
+  /** VIM Initialize Forms @public */
+  public initializeForm(): void {
     this.vimNewAccountForm = this.formBuilder.group({
       name: [null, Validators.required],
       vim_type: [null, Validators.required],
@@ -183,6 +186,9 @@ export class NewVimaccountComponent implements OnInit {
       schema_type: [''],
       vim_user: [null, Validators.required],
       vim_password: [null, Validators.required],
+      locationName: [''],
+      latitude: ['', Validators.pattern(this.sharedService.REGX_LAT_PATTERN)],
+      longitude: ['', Validators.pattern(this.sharedService.REGX_LONG_PATTERN)],
       config: this.paramsBuilder()
     });
   }
@@ -194,68 +200,63 @@ export class NewVimaccountComponent implements OnInit {
     });
   }
 
-  /**
-   * Lifecyle Hooks the trigger before component is instantiate
-   */
-  public ngOnInit(): void {
-    this.fileTypes = [{ value: 'text/x-yaml', viewValue: 'yaml' }];
-    this.vimType = VIM_TYPES;
-    this.boolValue = [
-      { id: '', name: 'None' },
-      { id: true, name: 'True' },
-      { id: false, name: 'False' }
-    ];
-    this.headers = new HttpHeaders({
-      Accept: 'application/json',
-      'Content-Type': 'application/json',
-      'Cache-Control': 'no-cache, no-store, must-revalidate, max-age=0'
-    });
-    this.getVIMDetails();
-  }
-
   /** On modal submit newVimAccountSubmit will called @public */
   public newVimAccountSubmit(): void {
     this.submitted = true;
+
     if (!this.vimNewAccountForm.invalid) {
       this.isLocationLoadingResults = true;
       this.sharedService.cleanForm(this.vimNewAccountForm, 'vim');
       if (!isNullOrUndefined(this.data) && this.data !== '') {
         Object.assign(this.vimNewAccountForm.value.config, jsyaml.load(this.data.toString(), { json: true }));
       } else {
-        Object.keys(this.vimNewAccountForm.value.config).forEach((res: string) => {
+        Object.keys(this.vimNewAccountForm.value.config).forEach((res: string): void => {
           if (res !== 'location') {
             delete this.vimNewAccountForm.value.config[res];
           }
         });
       }
+      if (!isNullOrUndefined(this.vimNewAccountForm.value.latitude) && !isNullOrUndefined(this.vimNewAccountForm.value.longitude)) {
+        this.vimNewAccountForm.value.config.location = this.vimNewAccountForm.value.locationName + ',' +
+          this.vimNewAccountForm.value.longitude + ',' +
+          this.vimNewAccountForm.value.latitude;
+      }
 
       if (isNullOrUndefined(this.vimNewAccountForm.value.config.location)) {
         delete this.vimNewAccountForm.value.config.location;
       }
-      Object.keys(this.vimNewAccountForm.value.config).forEach((res: string) => {
+
+      Object.keys(this.vimNewAccountForm.value.config).forEach((res: string): void => {
         if (isNullOrUndefined(this.vimNewAccountForm.value.config[res]) || this.vimNewAccountForm.value.config[res] === '') {
           delete this.vimNewAccountForm.value.config[res];
         }
       });
-      const apiURLHeader: APIURLHEADER = {
-        url: environment.VIMACCOUNTS_URL,
-        httpOptions: { headers: this.headers }
-      };
-      this.restService.postResource(apiURLHeader, this.vimNewAccountForm.value)
-        .subscribe((result: {}) => {
-          this.notifierService.notify('success', this.translateService.instant('PAGE.VIM.CREATEDSUCCESSFULLY'));
-          this.isLocationLoadingResults = false;
-          this.router.navigate(['vim/details']).catch(() => {
-            // Error Cached;
-          });
-          // Post the New Vim data and reflect in the VIM Details Page.
-        }, (error: ERRORDATA) => {
-          this.restService.handleError(error, 'post');
-          this.isLocationLoadingResults = false;
-        });
+      this.createNewVIM();
     }
   }
 
+  /** Create a new VIM Account @public */
+  public createNewVIM(): void {
+    const apiURLHeader: APIURLHEADER = {
+      url: environment.VIMACCOUNTS_URL,
+      httpOptions: { headers: this.headers }
+    };
+    delete this.vimNewAccountForm.value.locationName;
+    delete this.vimNewAccountForm.value.latitude;
+    delete this.vimNewAccountForm.value.longitude;
+    this.restService.postResource(apiURLHeader, this.vimNewAccountForm.value)
+      .subscribe((result: {id: string}): void => {
+        this.notifierService.notify('success', this.translateService.instant('PAGE.VIM.CREATEDSUCCESSFULLY'));
+        this.isLocationLoadingResults = false;
+        this.router.navigate(['vim/info/' + result.id]).catch((): void => {
+          // Error Cached;
+        });
+      }, (error: ERRORDATA): void => {
+        this.restService.handleError(error, 'post');
+        this.isLocationLoadingResults = false;
+      });
+  }
+
   /** HandleChange function @public */
   public handleChange($event: string): void {
     this.data = $event;
@@ -263,51 +264,11 @@ export class NewVimaccountComponent implements OnInit {
 
   /** Routing to VIM Account Details Page @public */
   public onVimAccountBack(): void {
-    this.router.navigate(['vim/details']).catch(() => {
+    this.router.navigate(['vim/details']).catch((): void => {
       // Error Cached
     });
   }
 
-  /** Fetching the location with name,latitude,longitude @public */
-  public fetchLocationLatLong(value: string): void {
-    this.isLocationLoadingResults = true;
-    const newVIMLocation: VIMLOCATIONDATA[] = [];
-    const locationTrack: string = environment.MAPLATLONGAPI_URL;
-    const locationAPIURL: string = locationTrack.replace('{value}', value);
-    this.restService.getResource(locationAPIURL).subscribe((result: VIMLOCATION) => {
-      result.features.forEach((getFeturesResult: FEATURES) => {
-        if ('extent' in getFeturesResult.properties) {
-          getFeturesResult.properties.extent.forEach((extentResult: number, index: number) => {
-            if (index === 0) {
-              this.setLong = extentResult;
-            }
-            if (index === 1) {
-              this.setLat = extentResult;
-            }
-          });
-        } else {
-          getFeturesResult.geometry.coordinates.forEach((coordinateResult: number, index: number) => {
-            if (index === 0) {
-              this.setLong = coordinateResult;
-            }
-            if (index === 1) {
-              this.setLat = coordinateResult;
-            }
-          });
-        }
-        newVIMLocation.push({
-          label: getFeturesResult.properties.name + ',' + getFeturesResult.properties.state + ', ' + getFeturesResult.properties.country,
-          value: getFeturesResult.properties.name + ',' + this.setLong + ',' + this.setLat
-        });
-      });
-      this.getVIMLocation = newVIMLocation;
-      this.isLocationLoadingResults = false;
-    }, (error: ERRORDATA) => {
-      this.restService.handleError(error, 'get');
-      this.isLocationLoadingResults = false;
-    });
-  }
-
   /** Drag and drop feature and fetchind the details of files  @private */
   public filesDropped(files: FileList): void {
     if (files && files.length === 1) {
@@ -331,19 +292,6 @@ export class NewVimaccountComponent implements OnInit {
     this.fileInput.nativeElement.value = null;
   }
 
-  /** Location chnage event in select box @public */
-  public locationChange(data: { value: string }): void {
-    this.vimDetail.forEach((vimAccountData: VimAccountDetails) => {
-      if (!isNullOrUndefined(vimAccountData.config.location) && !isNullOrUndefined(data)) {
-        if (vimAccountData.config.location === data.value) {
-          this.notifierService.notify('error', this.translateService.instant('PAGE.VIMDETAILS.LOCATIONERROR'));
-          // tslint:disable-next-line: no-backbone-get-set-outside-model
-          this.vimNewAccountForm.controls.config.get('location').setValue(null);
-        }
-      }
-    });
-  }
-
   /** Load sample config based on VIM type @public */
   public loadSampleConfig(): void {
     this.clearConfig();
@@ -374,16 +322,4 @@ export class NewVimaccountComponent implements OnInit {
     this.data = '';
     this.fileInput.nativeElement.value = null;
   }
-
-  /** Method to get VIM details @private */
-  private getVIMDetails(): void {
-    this.isLocationLoadingResults = true;
-    this.restService.getResource(environment.VIMACCOUNTS_URL).subscribe((vimAccountsData: VimAccountDetails[]) => {
-      this.vimDetail = vimAccountsData;
-      this.isLocationLoadingResults = false;
-    }, (error: ERRORDATA) => {
-      this.restService.handleError(error, 'get');
-      this.isLocationLoadingResults = false;
-    });
-  }
 }
index 2ebcea6..5621b0f 100644 (file)
@@ -449,11 +449,11 @@ export class VimAccountDetailsComponent implements OnInit {
     // tslint:disable-next-line: no-any
     private setCoordinates(feature: any, overlay: Overlay): void {
         this.popupData = '';
-        this.popupData += '<h3 class="popover-header">' + feature.values_.vimName + '</h3>';
+        this.popupData += '<h3 class="popover-header">' + feature.values_.vimName + '- (' + feature.values_.location + ')</h3>';
         this.popupData += '<ul class="list-unstyled m-2">';
         const instnaceData: NSInstanceDetails[] = this.nsData.filter((item: NSInstanceDetails) => {
             if (item.datacenter === feature.values_.Id) {
-                this.popupData += '<li class="m-2"><a class="d-block text-truncate" target="_parent" href="instances/ns/' + item._id + '">'
+                this.popupData += '<li class="m-2"><a class="d-block text-truncate" target="_parent" href="instances/ns/' + item._id + '"><i class="fa-sitemap fas icons mr-1"></i>'
                     + item.name + '</a></li>';
                 return item;
             }
index 0c45011..79cf07f 100644 (file)
         },
         "VIM": {
             "CREATEDSUCCESSFULLY": "VIM erfolgreich erstellt",
-            "LOCATIONINFO": "Geben Sie den Standortnamen ein und klicken Sie auf die Eingabetaste"
+            "LOCATIONINFO": "Geben Sie den Namen des Datenorts, den Breiten- und Längengrad ein, der in der Kartenansicht angezeigt werden soll"
         },
         "VIMDETAILS": {
             "NEWVIM": "Nieuwe VIM",
index 62138c9..164d465 100644 (file)
         },
         "VIM": {
             "CREATEDSUCCESSFULLY": "VIM Created Successfully",
-            "LOCATIONINFO": "Type the location name and click enter"
+            "LOCATIONINFO": "Type the Data location name, Latitude & Longitude to show in map view"
         },
         "VIMDETAILS": {
             "NEWVIM": "New VIM",
index 729ec4c..9592c8d 100644 (file)
         },
         "VIM": {
             "CREATEDSUCCESSFULLY": "VIM creada correctamente",
-            "LOCATIONINFO": "Escriba el nombre de la ubicación y haga clic en ingresar"
+            "LOCATIONINFO": "Escriba el nombre de la ubicación de datos, latitud y longitud para mostrar en la vista de mapa"
         },
         "VIMDETAILS": {
             "NEWVIM": "Nuevo VIM",
index 5af81aa..67db90a 100644 (file)
         },
         "VIM": {
             "CREATEDSUCCESSFULLY": "VIM criado com sucesso",
-            "LOCATIONINFO": "Digite o nome do local e clique em Enter"
+            "LOCATIONINFO": "Digite o nome do local de dados, latitude e longitude para mostrar na visualização do mapa"
         },
         "VIMDETAILS": {
             "NEWVIM": "Novo VIM",
index 11895f7..38318a7 100644 (file)
@@ -709,3 +709,6 @@ body {
 .text-captilize {
   text-transform: capitalize;
 }
+.text-info{
+  color: $secondary !important;
+}
index 0e734b9..440bfd1 100644 (file)
@@ -53,7 +53,6 @@ export const environment = {
     packageSize: 50,
     paginationNumber: 10, //Possible values are 10, 25, 50, 100
     packageVersion: version,
-    MAPLATLONGAPI_URL: 'api/?q={value}&limit=5',
     GENERATETOKEN_URL: OSM_ADMIN_ENDPOINT + 'tokens',
     PROJECTS_URL: OSM_ADMIN_ENDPOINT + 'projects',
     USERS_URL: OSM_ADMIN_ENDPOINT + 'users',
index ce65d13..e3acd4f 100644 (file)
@@ -53,7 +53,6 @@ export const environment = {
     packageSize: 50,
     paginationNumber: 10, //Possible values are 10, 25, 50, 100
     packageVersion: version,
-    MAPLATLONGAPI_URL: 'api/?q={value}&limit=5',
     GENERATETOKEN_URL: OSM_ADMIN_ENDPOINT + 'tokens',
     PROJECTS_URL: OSM_ADMIN_ENDPOINT + 'projects',
     USERS_URL: OSM_ADMIN_ENDPOINT + 'users',
index 2d1c9c3..7bd1cca 100644 (file)
@@ -250,7 +250,7 @@ export const TYPEOPENSTACK: {} = {
     user_domain_id: '',
     security_groups: '',
     user_domain_name: '',
-    availabilityZone: '',
+    availability_zone: '',
     keypair: '',
     region_name: '',
     dataplane_physical_net: '',
index ea1cb71..0e02701 100644 (file)
@@ -62,7 +62,7 @@ export interface CONFIG {
     sdn_port_mapping?: string;
     vim_network_name?: string;
     security_groups?: string;
-    availabilityZone?: string;
+    availability_zone?: string;
     region_name?: string;
     insecure?: string;
     use_existing_flavors?: string;
index 65ed864..d5c561d 100644 (file)
@@ -78,6 +78,13 @@ export class SharedService {
     // tslint:disable-next-line: max-line-length
     public REGX_PASSWORD_PATTERN: RegExp = new RegExp(/^.*(?=.{8,})((?=.*[!@#$%^&*()\-_=+{};:,<.>]){1})(?=.*\d)((?=.*[a-z]){1})((?=.*[A-Z]){1}).*$/);
 
+    /** Variables to hold regexp pattern for Latitude */
+    public REGX_LAT_PATTERN: RegExp = new RegExp(/^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,15})?))$/);
+
+    /** Variables to hold regexp pattern for Longitude */
+    // tslint:disable-next-line: max-line-length
+    public REGX_LONG_PATTERN: RegExp = new RegExp(/^(\+|-)?(?:180(?:(?:\.0{1,6})?)|(?:[0-9]|[1-9][0-9]|1[0-7][0-9])(?:(?:\.[0-9]{1,15})?))$/);
+
     /** Variables to hold maxlength for the description @public */
     public MAX_LENGTH_DESCRIPTION: number = 500;