Skip to content

Commit

Permalink
Enable attach/detach operations to storage manager
Browse files Browse the repository at this point in the history
Attaching volume is currently not possible from within the list of cloud
volumes of a chosen storage manager because the handler in `ems_common`
does not have a path for the button (even though attach/detach option is
enabled).

This patch adds the missing handlers and redirects to the required
`cloud_volume` controller.
  • Loading branch information
gberginc committed Mar 31, 2017
1 parent d722457 commit 4ab2e7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/ems_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ def button
javascript_redirect :controller => "cloud_tenant", :action => "edit", :id => find_checked_items[0]
elsif params[:pressed] == "cloud_volume_new"
javascript_redirect :controller => "cloud_volume", :action => "new", :storage_manager_id => params[:id]
elsif params[:pressed] == "cloud_volume_attach"
javascript_redirect :controller => "cloud_volume", :action => "attach", :id => find_checked_items[0]
elsif params[:pressed] == "cloud_volume_detach"
javascript_redirect :controller => "cloud_volume", :action => "detach", :id => find_checked_items[0]
elsif params[:pressed] == "cloud_volume_edit"
javascript_redirect :controller => "cloud_volume", :action => "edit", :id => find_checked_items[0]
elsif params[:pressed].ends_with?("_edit") || ["#{pfx}_miq_request_new", "#{pfx}_clone",
Expand Down

0 comments on commit 4ab2e7f

Please sign in to comment.