recalculate task per second on refresh

This commit is contained in:
simon987 2019-03-02 19:58:37 -05:00
parent 2056f3d8c1
commit 82b91867f2

View File

@ -73,6 +73,7 @@ export class ProjectDashboardComponent implements OnInit {
this.apiService.getMonitoringSnapshots(60, this.projectId) this.apiService.getMonitoringSnapshots(60, this.projectId)
.subscribe((data: any) => { .subscribe((data: any) => {
this.snapshots = data.content.snapshots; this.snapshots = data.content.snapshots;
this.averageTaskPerSecond();
this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => { this.lastSnapshot = this.snapshots ? this.snapshots.sort((a, b) => {
return b.time_stamp - a.time_stamp return b.time_stamp - a.time_stamp
})[0] : null; })[0] : null;