vthinkxie commented on a change in pull request #8542: [FLINK-10707][web-dashboard] flink cluster overview dashboard improvements URL: https://github.com/apache/flink/pull/8542#discussion_r301410140
########## File path: flink-runtime-web/web-dashboard/src/app/pages/overview/statistic/overview-statistic.component.ts ########## @@ -46,12 +54,64 @@ export class OverviewStatisticComponent implements OnInit, OnDestroy { ) .subscribe(data => { this.statistic = data; + this.taskSlotPercentage = Math.round( + ((data['slots-total'] - data['slots-available']) / data['slots-total']) * 100 + ); this.cdr.markForCheck(); }); + this.statusService.refresh$ + .pipe( + takeUntil(this.destroy$), + flatMap(() => this.taskManagerService.loadManagers()) + ) + .subscribe( + data => { + this.listOfTaskManager = data; + this.totalCount = data.length; + this.taskManagerCPUs = 0; + this.listOfTaskManager.map(tm => { + this.taskManagerCPUs += tm.hardware.cpuCores; + tm.milliSecondsSinceLastHeartBeat = new Date().getTime() - tm.timeSinceLastHeartbeat; + }); + + this.cdr.markForCheck(); + }, + () => {} Review comment: ```suggestion ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services