valuePrepareFunction: (cell: VIMData, row: VIMData): string => {
if (row.operationalState === this.operationalStateFirstStep) {
return `<span class="icon-label" title="${row.operationalState}">
- <i class="fas fa-clock text-warning"></i>
- </span>`;
+ <i class="fas fa-clock text-warning"></i>
+ </span>`;
} else if (row.operationalState === this.operationalStateSecondStep) {
return `<span class="icon-label" title="${row.operationalState}">
- <i class="fas fa-check-circle text-success"></i>
- </span>`;
+ <i class="fas fa-check-circle text-success"></i>
+ </span>`;
} else if (row.operationalState === this.operationalStateThirdStep) {
return `<span class="icon-label" title="${row.operationalState}">
- <i class="fas fa-times-circle text-danger"></i>
- </span>`;
+ <i class="fas fa-times-circle text-danger"></i>
+ </span>`;
} else {
return `<span>${row.operationalState}</span>`;
}
private arrayOfLocation(): void {
this.getLocation = [];
this.locationData.filter((item: VimAccountDetails) => {
+ // eslint-disable-next-line no-prototype-builtins
if (item.hasOwnProperty('config')) {
+ // eslint-disable-next-line no-prototype-builtins
if (item.config.hasOwnProperty('location')) {
this.getLocation.push({ name: item.name, location: item.config.location, id: item._id });
}
}
});
- if (this.getLocation !== []) {
+ if (this.getLocation.length) {
this.getLocation.filter((loc: GetLocation) => {
if (loc.location !== '') {
- const getLatLong: string[] = loc.location.split(',');
- this.lng = +getLatLong[CONSTANTNUMBER.splitLongitude];
- this.lat = +getLatLong[CONSTANTNUMBER.splitLatitude];
- this.addMarker(getLatLong[0], loc.id, loc.name);
+ if (loc.location !== ',,') {
+ const getLatLong: string[] = loc.location.split(',');
+ this.lng = +getLatLong[CONSTANTNUMBER.splitLongitude];
+ this.lat = +getLatLong[CONSTANTNUMBER.splitLatitude];
+ this.addMarker(getLatLong[0], loc.id, loc.name);
+ }
}
});
}
}
/** Add a click handler to the map to render the popup. @private */
private markerClickEvent(closer: HTMLElement, overlay: Overlay): void {
- // tslint:disable-next-line: no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
this.map.on('singleclick', (evt: any) => {
const feature: Feature = this.map.forEachFeatureAtPixel(evt.pixel,
- (f: Feature) => {
- return f;
- });
+ (f: Feature) => f);
if (feature) {
this.setCoordinates(feature, overlay);
} else {
};
}
/** Set the coordinates point if the feature is available @private */
- // tslint:disable-next-line: no-any
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
private setCoordinates(feature: any, overlay: Overlay): void {
this.popupData = '';
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 + '"><i class="fa-sitemap fas icons mr-1"></i>'
+ 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 me-1"></i>'
+ item.name + '</a></li>';
return item;
}