/** operational State failed data @public */
public operationalStateThirdStep: string = CONFIGCONSTANT.operationalStateThirdStep;
+ /** operational State scaling data @public */
+ public operationalStateFourthStep: string = CONFIGCONSTANT.operationalStateFourthStep;
+
/** Config State init data @public */
public configStateFirstStep: string = CONFIGCONSTANT.configStateFirstStep;
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 */
list: [
{ value: this.operationalStateFirstStep, title: this.operationalStateFirstStep },
{ value: this.operationalStateSecondStep, title: this.operationalStateSecondStep },
- { value: this.operationalStateThirdStep, title: this.operationalStateThirdStep }
+ { value: this.operationalStateThirdStep, title: this.operationalStateThirdStep },
+ { value: this.operationalStateFourthStep, title: this.operationalStateFourthStep }
]
}
},
return `<span class="icon-label" title="${row.OperationalStatus}">
<i class="fas fa-times-circle text-danger"></i>
</span>`;
+ } else if (row.OperationalStatus === this.operationalStateFourthStep) {
+ return `<span class="icon-label" title="${row.OperationalStatus}">
+ <i class="fas fa-compress-alt text-success"></i>
+ </span>`;
} else {
return `<span>${row.OperationalStatus}</span>`;
}
/** 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,
OperationalStatus: nsdInstanceData['operational-status'],
ConfigStatus: nsdInstanceData['config-status'],
DetailedStatus: nsdInstanceData['detailed-status'],
- memberIndex: nsdInstanceData.nsd['constituent-vnfd'],
- nsConfig: nsdInstanceData.nsd['ns-configuration']
+ memberIndex: nsdInstanceData.nsd.df,
+ nsConfig: nsdInstanceData.nsd['ns-configuration'],
+ adminDetails: nsdInstanceData._admin,
+ vnfID: nsdInstanceData['vnfd-id'],
+ nsd: nsdInstanceData.nsd,
+ 'nsd-id': nsdInstanceData['nsd-id'],
+ vcaStatus: nsdInstanceData.vcaStatus,
+ constituent: nsdInstanceData['constituent-vnfr-ref']
};
this.nsInstanceData.push(nsDataObj);
});
} 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;
});
/** 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();
}