storm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kabh...@apache.org
Subject [1/3] storm git commit: STORM-2335 Fix broken Topology visualization with empty ':transferred' in executor stats
Date Thu, 02 Feb 2017 14:43:57 GMT
Repository: storm
Updated Branches:
  refs/heads/1.x-branch 9c2733a3b -> b975dbdf0


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/d8162245
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/d8162245
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/d8162245

Branch: refs/heads/1.x-branch
Commit: d81622452d6dd2ca9b15d045136ebfd85bbdc856
Parents: 9c2733a
Author: Jungtaek Lim <kabhwan@gmail.com>
Authored: Wed Feb 1 17:17:46 2017 +0900
Committer: Jungtaek Lim <kabhwan@gmail.com>
Committed: Thu Feb 2 23:42:09 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/d8162245/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)
             {


Mime
View raw message