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 Modal dialog component Instance @public */
@Input() public instanceType: string;
/** Input contains Modal dialog component Instance @public */
/** Getting vdu-id & count-index from VNFInstance API */
public getVdu(id: string): void {
const vnfInstanceData: {}[] = [];
- const vnfrDetails: {}[] = [];
this.getFormControl('vduId').setValue(null);
this.getFormControl('countIndex').setValue(null);
if (!isNullOrUndefined(id)) {
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]
+ ))
+ );
}
this.checkDay12Operation(this.selectedvnfId);
}, (error: ERRORDATA): void => {
}
}
+ /** 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);
+ }
+
/** To check primitve actions from VNFR */
public checkDay12Operation(id: string): void {
const apiUrl: string = environment.VNFPACKAGES_URL + '?id=' + id;