Skip to content

Commit

Permalink
Add support for renaming VMs displayed through details page of Datastore
Browse files Browse the repository at this point in the history
  • Loading branch information
Hilda Stastna committed Aug 13, 2018
1 parent 2002f49 commit 1c2d8de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/controllers/storage_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def button
"#{pfx}_ownership", "#{pfx}_right_size", "#{pfx}_reconfigure"].include?(params[:pressed]) &&
@flash_array.nil? # Tag screen is showing, so return

unless ["host_edit", "#{pfx}_edit", "#{pfx}_miq_request_new", "#{pfx}_clone", "#{pfx}_migrate", "#{pfx}_publish"].include?(params[:pressed])
unless ["host_edit", "#{pfx}_edit", "#{pfx}_miq_request_new", "#{pfx}_clone", "#{pfx}_migrate", "#{pfx}_publish", 'vm_rename'].include?(params[:pressed])
@refresh_div = "main_div"
@refresh_partial = "layouts/gtl"
show
Expand All @@ -118,8 +118,9 @@ def button

if single_delete_test
single_delete_redirect
elsif params[:pressed].ends_with?("_edit") || ["#{pfx}_miq_request_new", "#{pfx}_clone",
"#{pfx}_migrate", "#{pfx}_publish"].include?(params[:pressed])
elsif params[:pressed].ends_with?("_edit") ||
["#{pfx}_miq_request_new", "#{pfx}_clone", "#{pfx}_migrate", "#{pfx}_publish"].include?(params[:pressed]) ||
params[:pressed] == 'vm_rename' && @flash_array.nil?
render_or_redirect_partial(pfx)
elsif !flash_errors? && @refresh_div == "main_div" && @lastaction == "show_list"
replace_gtl_main_div
Expand Down

0 comments on commit 1c2d8de

Please sign in to comment.