You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by ka...@apache.org on 2017/02/07 02:27:42 UTC

[08/13] storm git commit: STORM-2335 Fix broken Topology visualization with empty ':transferred' in executor stats

STORM-2335 Fix broken Topology visualization with empty ':transferred' in executor stats

* also fix another bug: stream table and graph box was created for each 'Show Visualization' click


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/a22793c9
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/a22793c9
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/a22793c9

Branch: refs/heads/1.0.x-branch
Commit: a22793c901afd8a7e5e3683cb58d414cdde8d16f
Parents: ec39ca1
Author: Jungtaek Lim <ka...@gmail.com>
Authored: Wed Feb 1 17:17:46 2017 +0900
Committer: Jungtaek Lim <ka...@gmail.com>
Committed: Tue Feb 7 10:40:04 2017 +0900

----------------------------------------------------------------------
 storm-core/src/ui/public/js/visualization.js | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/a22793c9/storm-core/src/ui/public/js/visualization.js
----------------------------------------------------------------------
diff --git a/storm-core/src/ui/public/js/visualization.js b/storm-core/src/ui/public/js/visualization.js
index 4daadc2..e82801f 100644
--- a/storm-core/src/ui/public/js/visualization.js
+++ b/storm-core/src/ui/public/js/visualization.js
@@ -309,7 +309,7 @@ function gather_stream_count(stats, stream, time) {
     var transferred = 0;
     if(stats)
         for(var i = 0; i < stats.length; i++) {
-            if(stats[i][":transferred"] != null)
+            if(stats[i][":transferred"] != null && stats[i][":transferred"][time] != undefined)
             {
                 var stream_trans = stats[i][":transferred"][time][stream];
                 if(stream_trans != null)
@@ -391,12 +391,14 @@ function show_visualization(sys) {
         getStatic("/templates/topology-page-template.html", function(template) {
             jsError(function() {
                 var topologyVisualization = $("#visualization-container");
-                topologyVisualization.append(
-                    Mustache.render($(template)
-                        .filter("#topology-visualization-container-template")
-                        .html(),
-                        response));
-                });
+                if (topologyVisualization.find("canvas").length == 0) {
+                    topologyVisualization.append(
+                        Mustache.render($(template)
+                            .filter("#topology-visualization-container-template")
+                            .html(),
+                            response));
+                }
+            });
 
             if(sys == null)
             {