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

Fix Evacuate form #1676

Merged
merged 3 commits into from Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 1 addition & 3 deletions app/controllers/mixins/actions/vm_actions/evacuate.rb
Expand Up @@ -4,7 +4,6 @@ module VmActions
module Evacuate
def evacuate
assert_privileges("instance_evacuate")
@record ||= find_records_with_rbac(VmOrTemplate, params[:id]).first
drop_breadcrumb(:name => _("Evacuate Instances"), :url => "/vm_cloud/evacuate") unless @explorer
@sb[:explorer] = @explorer
@in_a_form = true
Expand All @@ -20,8 +19,7 @@ def evacuate

def evacuatevms
assert_privileges("instance_evacuate")
recs = checked_or_params
session[:evacuate_items] = recs
session[:evacuate_items] = checked_or_params
if @explorer
evacuate
@refresh_partial = "vm_common/evacuate"
Expand Down
4 changes: 2 additions & 2 deletions app/views/vm_common/_evacuate.html.haml
Expand Up @@ -67,12 +67,12 @@
:class => "btn btn-primary",
:alt => t,
:title => t,
:onclick => "miqAjaxButton('#{url_for_only_path(:action => "evacuate_vm", :id => "#{@record.id}", :button => "submit")}');")
:onclick => "miqAjaxButton('#{url_for_only_path(:action => "evacuate_vm", :button => "submit")}');")
= button_tag(t = _('Cancel'),
:class => "btn btn-default",
:alt => t,
:title => t,
:onclick => "miqAjaxButton('#{url_for_only_path(:action => "evacuate_vm", :id => "#{@record.id}", :button => "cancel")}');")
:onclick => "miqAjaxButton('#{url_for_only_path(:action => "evacuate_vm", :button => "cancel")}');")

:javascript
ManageIQ.angular.app.value('vmCloudEvacuateFormId', "#{@evacuate_items.length == 1 ? @evacuate_items[0].id : ''}");
Expand Down