Skip to content

Commit

Permalink
Merge pull request #1458 from MaysaMacedo/display_hosts_relationship_…
Browse files Browse the repository at this point in the history
…with_physical_server

Displayed number of relationships between Hosts and Physical Server
  • Loading branch information
mzazrivec authored Jun 6, 2017
2 parents b40d794 + 8dc7b29 commit a2af360
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/helpers/ems_physical_infra_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def textual_group_properties
def textual_group_relationships
TextualGroup.new(
_("Relationships"),
%i(physical_servers datastores vms)
%i(physical_servers datastores vms hosts)
)
end

Expand Down Expand Up @@ -62,6 +62,11 @@ def textual_physical_servers
h
end

def textual_hosts
count_of_host_relationships = (@record.physical_servers.select { |server| !server.host.nil? }).length
{:label => _("Hosts"), :icon => "pficon pficon-screen", :value => count_of_host_relationships}
end

def textual_guid
{:label => _("Management Engine GUID"), :value => @record.guid}
end
Expand Down

0 comments on commit a2af360

Please sign in to comment.