/** Invoke service injectors @public */
public injector: Injector;
- /** handle translate @public */
+ /** Handle translate @public */
public translateService: TranslateService;
/** Observable holds logined value @public */
/** Contians hour converter @private */
private hourConverter: number = 3600;
+ /** Converter used to round off time to one decimal point @private */
+ private converter: number = 10;
+
/** Notifier service to popup notification @private */
private notifierService: NotifierService;
const now: Date = new Date();
const currentTime: number = Number((now.getTime().toString().slice(0, this.sliceLimit)));
this.createdTimes.forEach((createdTime: string): void => {
- this.noOfHours.push((Math.round((currentTime - Number(createdTime)) / this.hourConverter)));
+ this.noOfHours.push(Math.floor(((currentTime - Number(createdTime)) / this.hourConverter) * (this.converter)) / this.converter);
});
this.drawNsChart();
}
display: true,
scaleLabel: {
display: true,
- labelString: this.translateService.instant('INSTANCES')
+ labelString: this.translateService.instant('NSINSTANCES')
}
}],
yAxes: [{
/** Get VNFD instance details @public */
public getVnfInstanceCount(): void {
- this.vnfInstanceCountSub = this.restService.getResource(environment.NSDINSTANCES_URL)
+ this.vnfInstanceCountSub = this.restService.getResource(environment.VNFINSTANCES_URL)
.subscribe((vnfInstanceData: VNFInstanceDetails[]): void => {
this.vnfInstanceCount = vnfInstanceData.length;
}, (error: ERRORDATA): void => {