public/js/admin_console.js in documentcloud-cloud-crowd-0.1.1 vs public/js/admin_console.js in documentcloud-cloud-crowd-0.2.0

- old
+ new

@@ -115,17 +115,19 @@ jobEl[0] ? Console.updateJob(this, jobEl) : Console.renderJob(this); }); }, // Re-render all workers from scratch each time. + // This method is desperately in need of Javascript templates... renderNodes : function() { var header = $('#sidebar_header'); var nc = this._nodes.length, wc = this._workerCount; $('.has_nodes', header).html(nc + " Node" + (nc != 1 ? 's' : '') + " / " + wc + " Worker" + (wc != 1 ? 's' : '')); header.toggleClass('no_nodes', this._nodes.length <= 0); $('#nodes').html($.map(this._nodes, function(node) { var html = ""; - html += '<div class="node">' + node.host + '</div>'; + var extra = node.status == 'busy' ? ' <span class="busy">[busy]</span>' : ''; + html += '<div class="node ' + node.status + '">' + node.host + extra + '</div>'; html += $.map(node.workers, function(pid) { var name = pid + '@' + node.host; return '<div class="worker" rel="' + name + '">' + name + '</div>'; }).join(''); return html; \ No newline at end of file