Skip to content

Commit

Permalink
Use ApplicationHelper::Button::ZoneDelete to display button for delet…
Browse files Browse the repository at this point in the history
…ing the selected zone.

Addresses:
https://bugzilla.redhat.com/show_bug.cgi?id=1425456
hayesr committed Mar 28, 2017

Verified

This commit was signed with the committer’s verified signature.
ScottGibb Scott Gibb
1 parent 2d8a076 commit a7582ed
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
@@ -801,7 +801,7 @@ def reload_server_tree
def diagnostics_set_form_vars
active_node = x_node
if active_node && active_node.split('-').first == "z"
@record = @selected_server = Zone.find_by_id(from_cid(active_node.split('-').last))
@record = @selected_zone = @selected_server = Zone.find_by_id(from_cid(active_node.split('-').last))
@sb[:selected_server_id] = @selected_server.id
@sb[:selected_typ] = "zone"
if @selected_server.miq_servers.length >= 1 &&
Original file line number Diff line number Diff line change
@@ -15,19 +15,19 @@ class ApplicationHelper::Toolbar::DiagnosticsZoneCenter < ApplicationHelper::Too
t,
:items => [
button(
:zone_delete_server,
:zone_delete,
'pficon pficon-delete fa-lg',
t = proc do
_('Delete Server %{server_name} [%{server_id}]') % {:server_name => @record.name, :server_id => @record.id}
_('Delete Zone %{server_name} [%{server_id}]') % {:server_name => @selected_zone.name, :server_id => @selected_zone.id}
end,
t,
:confirm => proc do
_("Do you want to delete Server %{server_name} [%{server_id}]?") % {
:server_name => @record.name,
:server_id => @record.id
_("Do you want to delete Zone %{server_name} [%{server_id}]?") % {
:server_name => @selected_zone.name,
:server_id => @selected_zone.id
}
end,
:klass => ApplicationHelper::Button::ZoneDeleteServer
:klass => ApplicationHelper::Button::ZoneDelete
),
button(
:zone_role_start,

0 comments on commit a7582ed

Please sign in to comment.