/**
* @file NS History Of Operations Component
*/
+import { isNullOrUndefined } from 'util';
import { Component, Injector, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Router } from '@angular/router';
import { Subscription } from 'rxjs';
import { SharedService } from 'SharedService';
import { ShowInfoComponent } from 'ShowInfoComponent';
-import { isNullOrUndefined } from 'util';
/**
* Creating component
/** Lifecyle Hooks the trigger before component is instantiate @public */
public ngOnInit(): void {
- // tslint:disable-next-line:no-backbone-get-set-outside-model
this.paramsID = this.activatedRoute.snapshot.paramMap.get('id');
- // tslint:disable-next-line:no-backbone-get-set-outside-model
this.paramsType = this.activatedRoute.snapshot.paramMap.get('type');
if (this.paramsType === 'ns') {
this.historyURL = environment.NSHISTORYOPERATIONS_URL + '/?nsInstanceId=' + this.paramsID;
}
/** show information methods modal with ns history info */
public showInformation(event: MessageEvent): void {
+ // eslint-disable-next-line security/detect-non-literal-fs-filename
this.modalService.open(ShowInfoComponent, { backdrop: 'static' }).componentInstance.params = {
id: event.data.id,
page: this.page,
}
this.dataSource.load(this.nsAndnstInstanceData).then((data: {}): void => {
//empty block
- }).catch();
+ }).catch((): void => {
+ // Catch Navigation Error
+ });
this.isLoadingResults = false;
}, (error: ERRORDATA): void => {
this.isLoadingResults = false;
if (error.error.status === HttpStatus.NOT_FOUND || error.error.status === HttpStatus.UNAUTHORIZED) {
- this.router.navigateByUrl('404', { skipLocationChange: true }).catch();
+ this.router.navigateByUrl('404', { skipLocationChange: true }).catch((): void => {
+ // Catch Navigation Error
+ });
} else {
this.restService.handleError(error, 'get');
}