incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From srima...@apache.org
Subject svn commit: r1485916 - in /incubator/ambari/trunk: CHANGES.txt ambari-web/app/mappers/jobs_mapper.js ambari-web/vendor/scripts/workflow_visualization.js
Date Fri, 24 May 2013 01:22:24 GMT
Author: srimanth
Date: Fri May 24 01:22:24 2013
New Revision: 1485916

URL: http://svn.apache.org/r1485916
Log:
AMBARI-2197. Jobs page usability issues - remove the "ramps". (srimanth)

Modified:
    incubator/ambari/trunk/CHANGES.txt
    incubator/ambari/trunk/ambari-web/app/mappers/jobs_mapper.js
    incubator/ambari/trunk/ambari-web/vendor/scripts/workflow_visualization.js

Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1485916&r1=1485915&r2=1485916&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Fri May 24 01:22:24 2013
@@ -895,6 +895,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2197. Jobs page usability issues - remove the "ramps". (srimanth)
+
  AMBARI-2196. Install Wizard, Customize Services changes. (srimanth)
 
  AMBARI-2193. Remove zookeeper dependency for HIVE and HCAT. (srimanth)

Modified: incubator/ambari/trunk/ambari-web/app/mappers/jobs_mapper.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/mappers/jobs_mapper.js?rev=1485916&r1=1485915&r2=1485916&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/mappers/jobs_mapper.js (original)
+++ incubator/ambari/trunk/ambari-web/app/mappers/jobs_mapper.js Fri May 24 01:22:24 2013
@@ -64,10 +64,35 @@ App.jobTimeLineMapper = App.QuickDataMap
   map:function (json) {
     var job = this.get('model'); // @model App.MainAppsItemBarView
     var parseResult = this.parseIt(json, this.config);
-
+    var self = this;
     $.each(parseResult, function (field, value) {
-      job.set(field, value);
+      var d = self.coordinatesModify(value);
+      d.reverse();
+      d = self.coordinatesModify(d);
+      d.reverse();
+      job.set(field, d);
+    });
+  },
+
+  coordinatesModify: function(data) {
+    var d = this.zeroAdding(data);
+    d.reverse();
+    d = this.zeroAdding(d);
+    d.reverse();
+    return d;
+  },
+
+  zeroAdding: function(data) {
+    var d = [];
+    var last_y = 0;
+    data.forEach(function(coordinates) {
+      if (coordinates.y != 0 && last_y == 0) {
+        d.push({x: coordinates.x, y: 0});
+      }
+      d.push(coordinates);
+      last_y = coordinates.y;
     });
+    return d;
   }
 });
 

Modified: incubator/ambari/trunk/ambari-web/vendor/scripts/workflow_visualization.js
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/vendor/scripts/workflow_visualization.js?rev=1485916&r1=1485915&r2=1485916&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/vendor/scripts/workflow_visualization.js (original)
+++ incubator/ambari/trunk/ambari-web/vendor/scripts/workflow_visualization.js Fri May 24
01:22:24 2013
@@ -383,7 +383,7 @@ DagViewer.prototype.addTimeSeries = func
     .attr("class", function(d) { return d.name;})
     .attr("style", function(d) {
       if (d.name.substring(0,3)=="all")
-        return "stroke:"+d3.interpolateRgb(d.color, 'black')(0.125)+";fill:white"; 
+        return "";
       else
         return "stroke:"+d3.interpolateRgb(d.color, 'black')(0.125)+";fill:"+d.color; 
     })



Mime
View raw message