[Ovirt-devel] [PATCH] fix for bug 467758

Scott Seago sseago at redhat.com
Tue Nov 25 18:05:46 UTC 2008


Fixed the missing 'edit vm pool quota' links as well as a bug in the 'edit vm pool' form.

Signed-off-by: Scott Seago <sseago at redhat.com>
---
 src/app/controllers/resources_controller.rb |    6 +++---
 src/app/views/resources/_form.rhtml         |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/app/controllers/resources_controller.rb b/src/app/controllers/resources_controller.rb
index 6a2482c..3c6e3ee 100644
--- a/src/app/controllers/resources_controller.rb
+++ b/src/app/controllers/resources_controller.rb
@@ -86,7 +86,7 @@ class ResourcesController < PoolController
 
   def update
     begin
-      @pool.update_attributes!(params[:vm_resource_pool])
+      @pool.update_attributes!(params[:pool])
       render :json => { :object => "vm_resource_pool", :success => true, 
                         :alert => "Virtual Machine Pool was successfully modified." }
     rescue
@@ -160,7 +160,7 @@ class ResourcesController < PoolController
     super
   end
   def pre_create
-    @pool = VmResourcePool.new(params[:vm_resource_pool])
+    @pool = VmResourcePool.new(params[:pool])
     super
   end
   def pre_edit
@@ -172,8 +172,8 @@ class ResourcesController < PoolController
   end
   def pre_show
     @pool = VmResourcePool.find(params[:id])
-    @is_hwpool_admin = @pool.parent.can_modify(@user)
     super
+    @is_hwpool_admin = @pool.parent.can_modify(@user)
   end
   def pre_vm_actions
     @pool = VmResourcePool.find(params[:id])
diff --git a/src/app/views/resources/_form.rhtml b/src/app/views/resources/_form.rhtml
index 0f9fa9f..99054ae 100644
--- a/src/app/views/resources/_form.rhtml
+++ b/src/app/views/resources/_form.rhtml
@@ -2,6 +2,6 @@
 
 <!--[form:vm_resource_pool]-->
 <%= hidden_field_tag 'parent_id', @parent.id %>
-<%= text_field_with_label "Name", 'vm_resource_pool', 'name'  %>
+<%= text_field_with_label "Name", 'pool', 'name'  %>
 <!--[eoform:vm_resource_pool]-->
 
-- 
1.5.6.5




More information about the ovirt-devel mailing list