[ARVADOS] created: 7b877535b3ef1cb38882b2f1926aaa79d9732e31
Git user
git at public.curoverse.com
Thu Jun 23 12:47:59 EDT 2016
at 7b877535b3ef1cb38882b2f1926aaa79d9732e31 (commit)
commit 7b877535b3ef1cb38882b2f1926aaa79d9732e31
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Jun 23 12:47:49 2016 -0400
9486: Use API to filter nodes by last_ping_at.
diff --git a/apps/workbench/app/views/projects/_show_dashboard.html.erb b/apps/workbench/app/views/projects/_show_dashboard.html.erb
index 8abcee4..6dfa1bc 100644
--- a/apps/workbench/app/views/projects/_show_dashboard.html.erb
+++ b/apps/workbench/app/views/projects/_show_dashboard.html.erb
@@ -107,7 +107,7 @@
</div>
<div class="col-md-6">
- <% nodes = Node.all %>
+ <% nodes = Node.filter([["last_ping_at", ">", Time.now - 3600]]) %>
<div class="panel panel-default" style="min-height: 10.5em">
<div class="panel-heading"><span class="panel-title">Compute node status</span>
<span class="pull-right compute-node-actions">
@@ -130,7 +130,7 @@
<%= render partial: 'compute_node_summary', locals: {nodes: nodes} %>
<% active_nodes = [] %>
<% nodes.sort_by { |n| n.hostname || "" }.each do |n| %>
- <% if n.crunch_worker_state.in? ["busy", "idle"] and (Time.now - n[:last_ping_at]) < 3600 %>
+ <% if n.crunch_worker_state.in? ["busy", "idle"] %>
<% active_nodes << n %>
<% end %>
<% end %>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list