Skip to content

Commit

Permalink
Merge pull request #1331 from gberginc/fix/delete_cloud_volume_from_s…
Browse files Browse the repository at this point in the history
…torage

Redirect delete action to cloud volume controller
(cherry picked from commit 132c945)

https://bugzilla.redhat.com/show_bug.cgi?id=1459190
  • Loading branch information
martinpovolny authored and simaishi committed Jun 8, 2017
1 parent 3ceefe6 commit c947b6e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions app/controllers/ems_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,13 @@ def button
javascript_redirect :controller => "cloud_volume",
:action => "edit",
:id => find_checked_ids_with_rbac(CloudVolume).first
elsif params[:pressed] == "cloud_volume_delete"
# Clear CloudVolumeController's lastaction, since we are calling the delete_volumes from
# an external controller. This will ensure that the final redirect is properly handled.
session["#{CloudVolumeController.session_key_prefix}_lastaction".to_sym] = nil
javascript_redirect :controller => "cloud_volume",
:action => "delete_volumes",
:miq_grid_checks => params[:miq_grid_checks]
elsif params[:pressed] == "network_router_edit"
javascript_redirect :controller => "network_router",
:action => "edit",
Expand Down
1 change: 1 addition & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,7 @@
backup_select
snapshot_new
edit
delete_volumes
cloud_volume_tenants
index
new
Expand Down

0 comments on commit c947b6e

Please sign in to comment.