[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Ovirt-devel] [PATCH 1/6] Select a host in the grid using GET instead of POST



The url_for call must set 'id' to nil to keep the controller from appending
the ID of the current hardware pool, since we want a URL of the form
/hosts/show/ID where ID is dynamically determined in JavaScript.

Signed-off-by: David Lutterkort <dlutter redhat com>
---
 wui/src/app/views/hardware/show_hosts.rhtml |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/wui/src/app/views/hardware/show_hosts.rhtml b/wui/src/app/views/hardware/show_hosts.rhtml
index f2962cb..38f942d 100644
--- a/wui/src/app/views/hardware/show_hosts.rhtml
+++ b/wui/src/app/views/hardware/show_hosts.rhtml
@@ -49,8 +49,7 @@
     }
     if (selected_ids.length == 1)
     {
-      $('#hosts_selection').load('<%= url_for :controller => "host", :action => "show" %>',
-                { id: parseInt(selected_ids[0].substring(3))})
+      $('#hosts_selection').load('<%= url_for :controller => "host", :action => "show", :id => nil %>/' + parseInt(selected_ids[0].substring(3)))
     }
   }
 </script>
-- 
1.5.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]