Github user rmetzger commented on a diff in the pull request:
https://github.com/apache/incubator-flink/pull/43#discussion_r14295897
--- Diff:
stratosphere-runtime/resources/web-docs-infoserver/js/configuration.js ---
@@ -29,4 +29,31 @@ function loadConfigTable(json) {
}
table += "</table>";
$("#confTable").append(table);
-}
\ No newline at end of file
+}
+
+/*
+ * Initializes taskmanagers table
+ */
+function loadTaskmanagers(json) {
+ $("#taskmanagerTable").empty();
+ var table = "<table class=\"table table-bordered table-hover
table-striped\">";
+ table += "<tr><th>Node</th><th>Ipc Port</th><th>Data Port</th><th>Time
since last Heartbeat</th>" +
+ "<th>Number of Slots</th><th>Available
Slots</th><th>CPU Cores</th><th>Physical Memory (mb)</th><th>Free Memory
(mb)</th></tr>";
+ for (var i = 0; i < json.taskmanagers.length; i++) {
+ var tm = json.taskmanagers[i]
+ table +=
"<tr><td>"+tm.inetAdress+"</td><td>"+tm.ipcPort+"</td><td>"+tm.dataPort+"</td><td>"+tm.timeSinceLastHeartbeat+"</td>"
+
+
"<td>"+tm.slotsNumber+"</td><td>"+tm.freeSlots+"</td><td>"+tm.cpuCores+"</td><td>"+tm.physicalMemory+"</td><td>"+tm.freeMemory+"</td></tr>";
+ }
+ table += "</table>";
+ $("#taskmanagerTable").append(table);
+}
+
+function pollTaskmanagers() {
+ $.ajax({ url : "configuration?get=taskmanagers", type : "GET", cache:
false, success : function(json) {
+ loadTaskmanagers(json);
+ }, dataType : "json",
+ });
+ setTimeout(function() {
+ pollTaskmanagers();
+ }, 600);
--- End diff --
I talked to stephan, he suggested to do a refresh rate of 10000ms here (10
seconds).
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---