Fix for Bug 1495 NG-UI does not start on Air-gapped environments.
* 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>
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index d168aa1..1d3f29d 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -28,12 +28,6 @@
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;
}
diff --git a/proxy.conf.json b/proxy.conf.json
index 40b53f6..e6a63c6 100644
--- a/proxy.conf.json
+++ b/proxy.conf.json
@@ -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
diff --git a/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html b/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html
index 7491d59..52c9200 100644
--- a/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html
+++ b/src/app/utilities/vim-accounts-action/VimAccountsActionComponent.html
@@ -25,8 +25,9 @@
<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>
diff --git a/src/app/vim-accounts/info-vim/InfoVimComponent.html b/src/app/vim-accounts/info-vim/InfoVimComponent.html
index eeb91e2..80ea8bf 100644
--- a/src/app/vim-accounts/info-vim/InfoVimComponent.html
+++ b/src/app/vim-accounts/info-vim/InfoVimComponent.html
@@ -16,7 +16,18 @@
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>
+ {{'PAGE.VIMDETAILS.NEWVIM' | translate}}
+ </button>
+ </span>
+ </div>
</div>
<div class="context-style bg-white mt-2 vim-details">
<div class="row">
diff --git a/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.html b/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.html
index ce7a5d1..883563f 100644
--- a/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.html
+++ b/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.html
@@ -22,7 +22,9 @@
<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 @@
</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 @@
<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 @@
<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>
diff --git a/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.ts b/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.ts
index 0c2b3d6..3f44af5 100644
--- a/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.ts
+++ b/src/app/vim-accounts/new-vimaccount/NewVimaccountComponent.ts
@@ -74,9 +74,6 @@
/** 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 @@
/** 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 @@
/** 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 @@
/** 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 @@
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 @@
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 @@
});
}
- /**
- * 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 @@
/** 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 @@
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 @@
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;
- });
- }
}
diff --git a/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts b/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts
index 2ebcea6..5621b0f 100644
--- a/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts
+++ b/src/app/vim-accounts/vim-account-details/VimAccountDetailsComponent.ts
@@ -449,11 +449,11 @@
// 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;
}
diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json
index c57a06b..ba63664 100644
--- a/src/assets/i18n/de.json
+++ b/src/assets/i18n/de.json
@@ -196,7 +196,7 @@
},
"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",
diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json
index 1698772..239192a 100644
--- a/src/assets/i18n/en.json
+++ b/src/assets/i18n/en.json
@@ -196,7 +196,7 @@
},
"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",
diff --git a/src/assets/i18n/es.json b/src/assets/i18n/es.json
index e080ea8..40dd3d1 100644
--- a/src/assets/i18n/es.json
+++ b/src/assets/i18n/es.json
@@ -196,7 +196,7 @@
},
"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",
diff --git a/src/assets/i18n/pt.json b/src/assets/i18n/pt.json
index 24b5300..e97c200 100644
--- a/src/assets/i18n/pt.json
+++ b/src/assets/i18n/pt.json
@@ -196,7 +196,7 @@
},
"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",
diff --git a/src/assets/scss/app.scss b/src/assets/scss/app.scss
index 11895f7..38318a7 100644
--- a/src/assets/scss/app.scss
+++ b/src/assets/scss/app.scss
@@ -709,3 +709,6 @@
.text-captilize {
text-transform: capitalize;
}
+.text-info{
+ color: $secondary !important;
+}
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index 0e734b9..440bfd1 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -53,7 +53,6 @@
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',
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index ce65d13..e3acd4f 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -53,7 +53,6 @@
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',
diff --git a/src/models/CommonModel.ts b/src/models/CommonModel.ts
index 7284bbc..c48ee62 100644
--- a/src/models/CommonModel.ts
+++ b/src/models/CommonModel.ts
@@ -243,7 +243,7 @@
user_domain_id: '',
security_groups: '',
user_domain_name: '',
- availabilityZone: '',
+ availability_zone: '',
keypair: '',
region_name: '',
dataplane_physical_net: '',
diff --git a/src/models/VimAccountModel.ts b/src/models/VimAccountModel.ts
index ea1cb71..0e02701 100644
--- a/src/models/VimAccountModel.ts
+++ b/src/models/VimAccountModel.ts
@@ -62,7 +62,7 @@
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;
diff --git a/src/services/SharedService.ts b/src/services/SharedService.ts
index 65ed864..d5c561d 100644
--- a/src/services/SharedService.ts
+++ b/src/services/SharedService.ts
@@ -78,6 +78,13 @@
// 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;