Skip to content

Commit

Permalink
Display the original zone on summary screens of suspended providers
Browse files Browse the repository at this point in the history
  • Loading branch information
skateman committed Dec 19, 2018
1 parent eb42d2a commit 243b3fe
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion app/helpers/ems_cloud_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ def textual_security_groups
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_topology
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/ems_container_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def textual_port
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_topology
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/ems_infra_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ def textual_orchestration_stacks
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_host_default_vnc_port_range
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/ems_network_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ def textual_topology
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.try(:name)}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_cloud_tenants
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/ems_physical_infra_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def textual_vms
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.name}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_topology
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/ems_storage_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def textual_parent_ems_cloud
end

def textual_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => @record.zone.try(:name)}
zone = @record.zone.visible? ? @record.zone : @record.backup_zone
{:label => _("Managed by Zone"), :icon => "pficon pficon-zone", :value => zone.name}
end

def textual_cloud_volumes
Expand Down

0 comments on commit 243b3fe

Please sign in to comment.