Skip to content

Commit

Permalink
Restore the Delete button for servers in a zone, selected from the ri…
Browse files Browse the repository at this point in the history
…ght-side "Roles By Servers" tab
  • Loading branch information
lgalis committed Mar 14, 2018
1 parent 6912c0a commit f150cad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/controllers/ops_controller/diagnostics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ def reload_server_tree
def diagnostics_set_form_vars
active_node = x_node
if active_node && active_node.split('-').first == "z"
@record = @selected_zone = @selected_server = Zone.find_by_id(active_node.split('-').last)
@record = @selected_server = Zone.find_by(:id => active_node.split('-').last)
@sb[:selected_server_id] = @selected_server.id
@sb[:selected_typ] = "zone"
if @selected_server.miq_servers.length >= 1 &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ class ApplicationHelper::Toolbar::DiagnosticsZoneCenter < ApplicationHelper::Too
t,
:items => [
button(
:zone_delete,
:zone_delete_server,
'pficon pficon-delete fa-lg',
t = proc do
_('Delete Zone %{server_name} [%{server_id}]') % {:server_name => @selected_zone.name, :server_id => @selected_zone.id}
_('Delete Server %{server_name} [%{server_id}]') % {:server_name => @record.name, :server_id => @record.id}
end,
t,
:confirm => proc do
_("Do you want to delete Zone %{server_name} [%{server_id}]?") % {
:server_name => @selected_zone.name,
:server_id => @selected_zone.id
_("Do you want to delete Server %{server_name} [%{server_id}]?") % {
:server_name => @record.name,
:server_id => @record.id
}
end,
:klass => ApplicationHelper::Button::ZoneDelete
:klass => ApplicationHelper::Button::ZoneDeleteServer
),
button(
:zone_role_start,
Expand Down

0 comments on commit f150cad

Please sign in to comment.