Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect delete action to cloud volume controller #1331

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions app/controllers/ems_common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,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 @@ -492,6 +492,7 @@
backup_select
snapshot_new
edit
delete_volumes
cloud_volume_tenants
index
new
Expand Down