You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@edgent.apache.org by dl...@apache.org on 2016/05/26 16:46:37 UTC

[1/2] incubator-quarks git commit: [QUARKS-187] Console: deal with TopologyTestBasic

Repository: incubator-quarks
Updated Branches:
  refs/heads/master 00236f8f4 -> 5a3b9ad47


[QUARKS-187] Console: deal with TopologyTestBasic

Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/31b3b5ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/31b3b5ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/31b3b5ae

Branch: refs/heads/master
Commit: 31b3b5aed72aab438262775c5316093d1ec52c78
Parents: 9f97f31
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Thu May 26 11:47:46 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu May 26 11:47:46 2016 -0400

----------------------------------------------------------------------
 console/servlets/webapp_content/js/graph.js | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/31b3b5ae/console/servlets/webapp_content/js/graph.js
----------------------------------------------------------------------
diff --git a/console/servlets/webapp_content/js/graph.js b/console/servlets/webapp_content/js/graph.js
index 7154221..78bc2f0 100644
--- a/console/servlets/webapp_content/js/graph.js
+++ b/console/servlets/webapp_content/js/graph.js
@@ -47,6 +47,10 @@ addValuesToEdges = function(graph, counterMetrics) {
 	// and set value in equivalent edges
 	counterMetrics.forEach(function(cm){
 	    var edges = graph.edgeMap[incomingEdgesKey(cm.opId)];
+	    if (edges === undefined) {
+	       // QUARKS-20 
+	       edges = [];
+        }
 	    pushArray(edges, graph.edgeMap[outgoingEdgesKey(cm.opId)]);
         edges.forEach(function(edge){
             edge.value = cm.value;
@@ -71,7 +75,9 @@ addValuesToEdges = function(graph, counterMetrics) {
 
 // augment arr with arr2's items
 function pushArray(arr, arr2) {
-  arr.push.apply(arr, arr2);
+  if (arr2) {
+    arr.push.apply(arr, arr2);
+  }
 }
 
 // edgeMap key for edge
@@ -130,12 +136,18 @@ function makeEquivMetricEdgeMap(graph, counterMetrics) {
     var map = {};
     counterMetrics.forEach(function(cm){
         var edges = graph.edgeMap[outgoingEdgesKey(cm.opId)];
-        var edge = edges[0];
-        map[edgeKey(edge)] = collectEquivMetricEdges(graph, edge, true);
+        if (edges) {
+            // QUARKS-20 TopologyTestBasic has cm with no outgoing edges - runtime bug?
+            var edge = edges[0];
+            map[edgeKey(edge)] = collectEquivMetricEdges(graph, edge, true);
+        }
         
         var edges = graph.edgeMap[incomingEdgesKey(cm.opId)];
-        var edge = edges[0];
-        map[edgeKey(edge)] = collectEquivMetricEdges(graph, edge, false);
+        if (edges) {
+            // QUARKS-20 TopologyTestBasic has cm with no incoming edges???
+            var edge = edges[0];
+            map[edgeKey(edge)] = collectEquivMetricEdges(graph, edge, false);
+        }
     });
     
     return map;


[2/2] incubator-quarks git commit: Merge pull request #122

Posted by dl...@apache.org.
Merge pull request #122

This closes #122


Project: http://git-wip-us.apache.org/repos/asf/incubator-quarks/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-quarks/commit/5a3b9ad4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quarks/tree/5a3b9ad4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quarks/diff/5a3b9ad4

Branch: refs/heads/master
Commit: 5a3b9ad4716412b049960b1bf378f238597fe8be
Parents: 00236f8 31b3b5a
Author: Dale LaBossiere <dl...@us.ibm.com>
Authored: Thu May 26 12:46:34 2016 -0400
Committer: Dale LaBossiere <dl...@us.ibm.com>
Committed: Thu May 26 12:46:34 2016 -0400

----------------------------------------------------------------------
 console/servlets/webapp_content/js/graph.js | 22 +++++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------