1
0
Fork 0

chore(webui): format code with prettier

This commit is contained in:
Antoine CARON 2019-02-05 18:18:04 +01:00 committed by Traefiker Bot
parent 115ddc6a4a
commit c5c8382742
32 changed files with 1525 additions and 827 deletions

View file

@ -29,7 +29,7 @@ export class HealthComponent implements OnInit, OnDestroy {
chartValue: any;
statusCodeValue: any;
constructor(private apiService: ApiService) { }
constructor(private apiService: ApiService) {}
ngOnInit() {
this.sub = Observable.timer(0, 3000)
@ -42,16 +42,30 @@ export class HealthComponent implements OnInit, OnDestroy {
this.recentErrors = data.recent_errors;
}
this.chartValue = {count: data.average_response_time_sec, date: data.time};
this.statusCodeValue = Object.keys(data.total_status_code_count)
.map(key => ({code: key, count: data.total_status_code_count[key]}));
this.chartValue = {
count: data.average_response_time_sec,
date: data.time
};
this.statusCodeValue = Object.keys(data.total_status_code_count).map(
key => ({ code: key, count: data.total_status_code_count[key] })
);
this.pid = data.pid;
this.uptime = distanceInWordsStrict(subSeconds(new Date(), data.uptime_sec), new Date());
this.uptimeSince = format(subSeconds(new Date(), data.uptime_sec), 'YYYY-MM-DD HH:mm:ss Z');
this.totalResponseTime = distanceInWordsStrict(subSeconds(new Date(), data.total_response_time_sec), new Date());
this.uptime = distanceInWordsStrict(
subSeconds(new Date(), data.uptime_sec),
new Date()
);
this.uptimeSince = format(
subSeconds(new Date(), data.uptime_sec),
'YYYY-MM-DD HH:mm:ss Z'
);
this.totalResponseTime = distanceInWordsStrict(
subSeconds(new Date(), data.total_response_time_sec),
new Date()
);
this.exactTotalResponseTime = data.total_response_time;
this.averageResponseTime = Math.floor(data.average_response_time_sec * 1000) + ' ms';
this.averageResponseTime =
Math.floor(data.average_response_time_sec * 1000) + ' ms';
this.exactAverageResponseTime = data.average_response_time;
this.codeCount = data.count;
this.totalCodeCount = data.total_count;