Skip to content

Commit

Permalink
Merge pull request #1322 from GabrielSVinha/ems_relationship
Browse files Browse the repository at this point in the history
Add parent relationship for physical server textual summary
  • Loading branch information
Dan Clarizio authored May 11, 2017
2 parents 560aa5e + 7e29169 commit 3db553e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/helpers/physical_server_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def textual_group_properties
def textual_group_relationships
TextualGroup.new(
_("Relationships"),
%i(host)
%i(host ext_management_system)
)
end

Expand All @@ -27,6 +27,10 @@ def textual_host
{:label => _("Host"), :value => @record.host.try(:name), :icon => "pficon pficon-virtual-machine", :link => url_for(:controller => 'host', :action => 'show', :id => @record.host.try(:id))}
end

def textual_ext_management_system
textual_link(ExtManagementSystem.find(@record.ems_id))
end

def textual_name
{:label => _("Server name"), :value => @record.name }
end
Expand Down
3 changes: 2 additions & 1 deletion spec/controllers/physical_server_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
before(:each) do
EvmSpecHelper.create_guid_miq_server_zone
login_as FactoryGirl.create(:user)
ems = FactoryGirl.create(:ems_physical_infra)
computer_system = FactoryGirl.create(:computer_system, :hardware => FactoryGirl.create(:hardware))
physical_server = FactoryGirl.create(:physical_server, :computer_system => computer_system)
physical_server = FactoryGirl.create(:physical_server, :computer_system => computer_system, :ems_id => ems.id)
get :show, :params => {:id => physical_server.id}
end
it { expect(response.status).to eq(200) }
Expand Down

0 comments on commit 3db553e

Please sign in to comment.