Fix error related to timewizard formatting.
Effect: numbers on sidebar were wrong because an error was occuring.
The error was due to scoping of this when calling another function in the class.
Removed the function
@@ -78,16 +78,15 @@ export class ServiceGroupsFacadeService {
return 'Since the service was loaded,';
}
- return 'Changed from ' + this.formatHealthStatusForTimewizard(previousHealth) +
- ' to ' + this.formatHealthStatusForTimewizard(currentHealth);
+ if (currentHealth !== 'OK') {
+ currentHealth = currentHealth.toLowerCase();
}
- // display all health check status in lower case, except for 'OK' (upper case)
- private formatHealthStatusForTimewizard(health: string): string {
- if (health !== 'OK') {
- return health.toLowerCase();
+ if (previousHealth !== 'OK') {
+ previousHealth = previousHealth.toLowerCase();
}
- return health;
+
+ return 'Changed from ' + currentHealth + ' to ' + previousHealth;
}
public updatePageNumber(pageNumber: number, total: number, pageSize: number, trackEvent: string) {
