Signed-off-by: Scott Seago <sseago at redhat.com> --- wui/src/app/views/hardware/show.html.erb | 2 -- wui/src/app/views/host/_grid.rhtml | 6 +++--- wui/src/app/views/host/addhost.html.erb | 2 +- wui/src/app/views/storage/_grid.rhtml | 6 +++--- wui/src/app/views/storage/addstorage.html.erb | 2 +- wui/src/app/views/vm/_grid.rhtml | 2 +- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/wui/src/app/views/hardware/show.html.erb b/wui/src/app/views/hardware/show.html.erb index a3a8e8b..240d689 100644 --- a/wui/src/app/views/hardware/show.html.erb +++ b/wui/src/app/views/hardware/show.html.erb @@ -20,7 +20,6 @@ <div>Hardware pool quota details.</div> </div> -<%- content_for :scripts do -%> <script type="text/javascript"> refresh_summary('hwpool_selection', @@ -28,4 +27,3 @@ :action => "quick_summary" %>', <%= @pool.id %>) </script> -<%- end -%> diff --git a/wui/src/app/views/host/_grid.rhtml b/wui/src/app/views/host/_grid.rhtml index fc8dcae..c9af220 100644 --- a/wui/src/app/views/host/_grid.rhtml +++ b/wui/src/app/views/host/_grid.rhtml @@ -10,7 +10,7 @@ $("#<%= table_id %>").flexigrid ( { - url: '<%= url_for :controller => "hardware", :action => "hosts_json", :id => hwpool.id, :exclude_id => exclude_id %>', + url: '<%= url_for :controller => "hardware", :action => "hosts_json", :id => (hwpool.nil? ? nil : hwpool.id), :exclude_id => exclude_id %>', dataType: 'json', colModel : [ {display: '', width : 20, align: 'left', process: <%= table_id %>checkbox}, @@ -27,8 +27,8 @@ ], sortname: "hostname", sortorder: "asc", - usepager: <%= hwpool.hosts.size > hosts_per_page ? 'true' : 'false' %>, - useRp: true, + usepager: <%= (!hwpool.nil? and hwpool.hosts.size > hosts_per_page) ? 'true' : 'false' %>, + useRp: <%= (!hwpool.nil? and hwpool.hosts.size > hosts_per_page) ? 'true' : 'false' %>, rp: <%= hosts_per_page %>, showTableToggleBtn: true, onSelect: <%= on_select %>, diff --git a/wui/src/app/views/host/addhost.html.erb b/wui/src/app/views/host/addhost.html.erb index 11b28ac..c540f95 100644 --- a/wui/src/app/views/host/addhost.html.erb +++ b/wui/src/app/views/host/addhost.html.erb @@ -8,7 +8,7 @@ <div class="panel_header"></div> <div class="dialog_body"> <%= render :partial => "/host/grid", :locals => { :table_id => "addhosts_grid", - :hwpool_id => nil, :exclude_id => @hardware_pool.id, + :hwpool => nil, :exclude_id => @hardware_pool.id, :on_select => "load_widget_select", :on_deselect => "load_widget_deselect", :on_hover => "load_widget_hover", diff --git a/wui/src/app/views/storage/_grid.rhtml b/wui/src/app/views/storage/_grid.rhtml index 13838a6..ce5943a 100644 --- a/wui/src/app/views/storage/_grid.rhtml +++ b/wui/src/app/views/storage/_grid.rhtml @@ -9,7 +9,7 @@ $("#<%= table_id %>").flexigrid ( { - url: '<%= url_for :controller => "hardware", :action => "storage_pools_json", :id => hwpool.id, :exclude_id => exclude_id %>', + url: '<%= url_for :controller => "hardware", :action => "storage_pools_json", :id => (hwpool.nil? ? nil : hwpool.id), :exclude_id => exclude_id %>', dataType: 'json', colModel : [ {display: '', width : 20, align: 'left', process: <%= table_id %>checkbox}, @@ -20,8 +20,8 @@ ], sortname: "ip_addr", sortorder: "asc", - usepager: <%= hwpool.storage_volumes.size > storage_per_page ? 'true' : 'false' %>, - useRp: true, + usepager: <%= (!hwpool.nil? and hwpool.storage_pools.size > storage_per_page) ? 'true' : 'false' %>, + useRp: <%= (!hwpool.nil? and hwpool.storage_pools.size > storage_per_page) ? 'true' : 'false' %>, rp: <%= storage_per_page %>, showTableToggleBtn: true, onSelect: <%= on_select %> diff --git a/wui/src/app/views/storage/addstorage.html.erb b/wui/src/app/views/storage/addstorage.html.erb index e465d12..0fb3ce1 100644 --- a/wui/src/app/views/storage/addstorage.html.erb +++ b/wui/src/app/views/storage/addstorage.html.erb @@ -31,7 +31,7 @@ <div class="panel_header"></div> <div class="dialog_body"> <%= render :partial => "/storage/grid", :locals => { :table_id => "addstorage_grid", - :hwpool_id => nil, :exclude_id => @hardware_pool.id, + :hwpool => nil, :exclude_id => @hardware_pool.id, :on_select => "false" } %> </div> </div> diff --git a/wui/src/app/views/vm/_grid.rhtml b/wui/src/app/views/vm/_grid.rhtml index 04830e6..93e4857 100644 --- a/wui/src/app/views/vm/_grid.rhtml +++ b/wui/src/app/views/vm/_grid.rhtml @@ -24,7 +24,7 @@ sortname: "description", sortorder: "asc", usepager: <%= pool.vms.size > vms_per_page ? 'true' : 'false' %>, - useRp: true, + useRp: <%= pool.vms.size > vms_per_page ? 'true' : 'false' %>, rp: <%= vms_per_page %>, showTableToggleBtn: true, onSelect: <%= on_select %>, -- 1.5.4.1 --------------070905000607010207010108--