Skip to content

Commit

Permalink
Merge pull request #1272 from MaysaMacedo/show_physical_server_hardwa…
Browse files Browse the repository at this point in the history
…re_info

Displayed Physical Server Hardware info
  • Loading branch information
Dan Clarizio authored May 9, 2017
2 parents 9c83494 + 2ac2836 commit 08fba62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/helpers/physical_server_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module PhysicalServerHelper::TextualSummary
def textual_group_properties
TextualGroup.new(
_("Properties"),
%i(name model product_name manufacturer machine_type serial_number ems_ref)
%i(name model product_name manufacturer machine_type serial_number ems_ref memory cores)
)
end

Expand Down Expand Up @@ -47,4 +47,12 @@ def textual_ems_ref
def textual_model
{:label => _("Model"), :value => @record.model}
end

def textual_memory
{:label => _("Total memory (mb)"), :value => @record.hardware.memory_mb }
end

def textual_cores
{:label => _("CPU total cores"), :value => @record.hardware.cpu_total_cores }
end
end
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,7 +9,8 @@
before(:each) do
EvmSpecHelper.create_guid_miq_server_zone
login_as FactoryGirl.create(:user)
physical_server = FactoryGirl.create(:physical_server)
computer_system = FactoryGirl.create(:computer_system, :hardware => FactoryGirl.create(:hardware))
physical_server = FactoryGirl.create(:physical_server, :computer_system => computer_system)
get :show, :params => {:id => physical_server.id}
end
it { expect(response.status).to eq(200) }
Expand Down

0 comments on commit 08fba62

Please sign in to comment.