Fix Bug 2148: VDU Id issue & Multivdu Count Index Error in VM Action

	- Resolved vduId dropdown issue by removing the duplicate values
	  from the array
	- Resolved multivdu countIndex error by filtering count index
	  with selected vduId

Change-Id: I1231afb4bb3b013816cd8d7b8c50ae3decf5dbea
Signed-off-by: SANDHYA.JS <sandhya.j@tataelxsi.co.in>
diff --git a/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts b/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts
index 69eb9eb..949506a 100644
--- a/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts
+++ b/src/app/utilities/vertical-scaling/VerticalScalingComponent.ts
@@ -67,6 +67,10 @@
     public nsIdFilteredData: {}[] = [];
     /** Form valid on submit trigger @public */
     public submitted: boolean = false;
+     /** Contains vduId @public */
+    public vduId: {};
+    /** Items for countIndex @public */
+    public countIndex: {}[];
     /** Input contains component objects @private */
     @Input() private params: URLPARAMS;
     /** FormBuilder instance added to the formBuilder @private */
@@ -175,6 +179,12 @@
                             vnfInstanceData.push(vnfInstanceDataObj);
                         });
                         this.vdu = vnfInstanceData;
+                        const vduName: string = 'VDU';
+                        this.vduId = this.vdu.filter((vdu: {}, index: number, self: {}[]): {} =>
+                            index === self.findIndex((t: {}): {} => (
+                                t[vduName] === vdu[vduName]
+                            ))
+                        );
                     }
                 }, (error: ERRORDATA): void => {
                     this.restService.handleError(error, 'get');
@@ -183,6 +193,12 @@
         }
     }
 
+    /** Getting count-index by filtering id  */
+    public getCountIndex(id: string): void {
+        const VDU: string = 'VDU';
+        this.countIndex = this.vdu.filter((vnfdData: {}[]): boolean => vnfdData[VDU] === id);
+    }
+
     /** Vertical Scaling on submit */
     public triggerVerticalScaling(): void {
         this.submitted = true;