From: Tom Clegg Date: Sun, 13 Jan 2013 19:35:20 +0000 (-0800) Subject: in /nodes, click row to show info[] X-Git-Tag: 1.1.0~3527 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/d548127a8c1884118a1fd2e4c759c5dfa521f726 in /nodes, click row to show info[] --- diff --git a/app/assets/javascripts/nodes.js b/app/assets/javascripts/nodes.js index dee720facd..a734426a75 100644 --- a/app/assets/javascripts/nodes.js +++ b/app/assets/javascripts/nodes.js @@ -1,2 +1,17 @@ +// -*- mode: javascript; js-indent-level: 4; indent-tabs-mode: nil; -*- // Place all the behaviors and hooks related to the matching controller here. // All this logic will automatically be available in application.js. + +var loaded_nodes_js; +$(function(){ + if (loaded_nodes_js) return; loaded_nodes_js = true; + + $('[data-showhide-selector]').on('click', function(e){ + var x = $($(this).attr('data-showhide-selector')); + if (x.css('display') == 'none') + x.show(); + else + x.hide(); + }); + $('[data-showhide-default]').hide(); +}); diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index 34480ce24f..d4e8aa1eda 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb @@ -1,4 +1,4 @@ - +
<% @objects.each do |o| %> - + - <% if o.info[:ec2_start_command] and !o.first_ping_at %> - + <% if %> + >
status @@ -16,12 +16,14 @@ startup delay last ping + + instance_id
<%= o.status %> @@ -43,12 +45,15 @@
- <%= o.info[:ec2_start_command] %> -
- <%= o.info[:ec2_start_result] %> +
+ <% o.info.each do |k,v| %> +
<%= k %>
+
<%= v %>
+ <% end %> +