Permalink
Browse files

Fixes graph view job selected, mouseover behavior

  • Loading branch information...
1 parent fa45075 commit c6792352bf05817acc7bf6a928d771a2db1167d4 @sagemintblue sagemintblue committed Apr 3, 2013
Showing with 3 additions and 6 deletions.
  1. +3 −6 common/src/main/resources/web/js/ambrose/view/graph.js
@@ -62,7 +62,7 @@ define(['jquery', 'd3', '../core', './core'], function(
self.handleJobsUpdated([job], 350);
});
workflow.on('jobSelected jobMouseOver', function(event, job, prev) {
- self.handleJobsUpdated($.grep([prev, job], function(j) { j != null; }));
+ self.handleJobsUpdated($.grep([prev, job], function(j) { return j != null; }));
});
},
@@ -164,13 +164,10 @@ define(['jquery', 'd3', '../core', './core'], function(
var colors = this.params.colors;
var fill = function(node) {
var job = node.data;
- var status = job.status;
+ var status = job.status || '';
if (job.mouseover) return colors.mouseover;
if (job.selected) return colors.selected;
- if (status == 'RUNNING') return colors.running;
- if (status == 'COMPLETE') return colors.complete;
- if (status == 'FAILED') return colors.failed;
- return '#555';
+ return colors[status.toLowerCase()] || '#555';
};
g.selectAll('g.node circle').attr('fill', fill);
},

0 comments on commit c679235

Please sign in to comment.