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 Jul 11, 2018
1 parent a6f890d commit d71fb2a
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 @@ -145,7 +145,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 @@ -69,7 +69,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 @@ -102,7 +102,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 @@ -94,7 +94,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 @@ -60,7 +60,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 d71fb2a

Please sign in to comment.