Bug 1383 Error when consulting NS instance's topology
* SOL006 Descriptor topology changes
Change-Id: I79afb00dfb54ce2c9dc02c0c4b7bbe435b07a915
Signed-off-by: Barath Kumar R <barath.r@tataelxsi.co.in>
diff --git a/src/app/instances/ns-instances/NSInstancesComponent.ts b/src/app/instances/ns-instances/NSInstancesComponent.ts
index 07184da..41bb384 100644
--- a/src/app/instances/ns-instances/NSInstancesComponent.ts
+++ b/src/app/instances/ns-instances/NSInstancesComponent.ts
@@ -124,7 +124,7 @@
this.generateTableColumn();
this.generateTableSettings();
this.generateData();
- this.generateDataSub = this.sharedService.dataEvent.subscribe(() => { this.generateData(); });
+ this.generateDataSub = this.sharedService.dataEvent.subscribe((): void => { this.generateData(); });
}
/** Generate smart table row title and filters @public */
@@ -219,9 +219,9 @@
/** generateData initiate the ns-instance list @public */
public generateData(): void {
this.isLoadingResults = true;
- this.restService.getResource(environment.NSDINSTANCES_URL).subscribe((nsdInstancesData: NSInstanceDetails[]) => {
+ this.restService.getResource(environment.NSDINSTANCES_URL).subscribe((nsdInstancesData: NSInstanceDetails[]): void => {
this.nsInstanceData = [];
- nsdInstancesData.forEach((nsdInstanceData: NSInstanceDetails) => {
+ nsdInstancesData.forEach((nsdInstanceData: NSInstanceDetails): void => {
const nsDataObj: NSDInstanceData = {
name: nsdInstanceData.name,
identifier: nsdInstanceData.id,
@@ -229,7 +229,7 @@
OperationalStatus: nsdInstanceData['operational-status'],
ConfigStatus: nsdInstanceData['config-status'],
DetailedStatus: nsdInstanceData['detailed-status'],
- memberIndex: nsdInstanceData.nsd['constituent-vnfd'],
+ memberIndex: nsdInstanceData.nsd.df,
nsConfig: nsdInstanceData.nsd['ns-configuration']
};
this.nsInstanceData.push(nsDataObj);
@@ -239,10 +239,10 @@
} else {
this.checkDataClass = 'dataTables_empty';
}
- this.dataSource.load(this.nsInstanceData).then((data: {}) => {
+ this.dataSource.load(this.nsInstanceData).then((data: {}): void => {
this.isLoadingResults = false;
}).catch();
- }, (error: ERRORDATA) => {
+ }, (error: ERRORDATA): void => {
this.restService.handleError(error, 'get');
this.isLoadingResults = false;
});
@@ -262,7 +262,7 @@
/** Instantiate NS using modalservice @public */
public instantiateNS(): void {
const modalRef: NgbModalRef = this.modalService.open(InstantiateNsComponent, { backdrop: 'static' });
- modalRef.result.then((result: MODALCLOSERESPONSEDATA) => {
+ modalRef.result.then((result: MODALCLOSERESPONSEDATA): void => {
if (result) {
this.generateData();
}