Skip to content

Commit

Permalink
[FLINK-5145] WebInterface only polls selected metrics
Browse files Browse the repository at this point in the history
This closes apache#2867.
  • Loading branch information
zentol authored and static-max committed Dec 13, 2016
1 parent ed38849 commit f2b7c51
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 29 deletions.
Expand Up @@ -29,17 +29,16 @@ angular.module('flinkApp')
}

@refresh = $interval =>
angular.forEach @watched, (v, jobid) =>
angular.forEach v, (nodeid, nk) =>
@getAllAvailableMetrics(jobid, nodeid).then (data) =>
names = []
angular.forEach data, (metric, mk) =>
names.push metric.id

if names.length > 0
@getMetrics(jobid, nodeid, names).then (values) =>
if jobid == @observer.jobid && nodeid == @observer.nodeid
@observer.callback(values) if @observer.callback
angular.forEach @metrics, (vertices, jobid) =>
angular.forEach vertices, (metrics, nodeid) =>
names = []
angular.forEach metrics, (metric, index) =>
names.push metric.id

if names.length > 0
@getMetrics(jobid, nodeid, names).then (values) =>
if jobid == @observer.jobid && nodeid == @observer.nodeid
@observer.callback(values) if @observer.callback


, flinkConfig["refresh-interval"]
Expand Down
34 changes: 16 additions & 18 deletions flink-runtime-web/web-dashboard/web/js/index.js

Large diffs are not rendered by default.

0 comments on commit f2b7c51

Please sign in to comment.