Skip to content

Commit

Permalink
Fix room display in physical infra summary views
Browse files Browse the repository at this point in the history
Code responsible for retrieving the room data used the invalid room_id
key. This commit changes the key and associated display fields
accordingly.
  • Loading branch information
Tadej Borovšak committed Mar 27, 2019
1 parent 2f31e65 commit f311a1c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/helpers/physical_server_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def textual_group_management_networks
def textual_group_asset_details
TextualGroup.new(
_("Asset Details"),
%i(support_contact description location room_id rack_name lowest_rack_unit)
%i(support_contact description location room rack_name lowest_rack_unit)
)
end

Expand Down Expand Up @@ -180,8 +180,8 @@ def textual_location
{:label => _("Location"), :value => @record.asset_detail['location']}
end

def textual_room_id
{:label => _("Room"), :value => @record.asset_detail['room_id']}
def textual_room
{:label => _("Room"), :value => @record.asset_detail['room']}
end

def textual_rack_name
Expand Down
6 changes: 3 additions & 3 deletions app/helpers/physical_storage_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def textual_group_relationships
def textual_group_asset_details
TextualGroup.new(
_("Asset Details"),
%i(machine_type model contact location room_id rack_name lowest_rack_unit)
%i(machine_type model contact location room rack_name lowest_rack_unit)
)
end

Expand Down Expand Up @@ -86,8 +86,8 @@ def textual_location
{:label => _("Location"), :value => @record.asset_detail["location"]}
end

def textual_room_id
{:label => _("Room ID"), :value => @record.asset_detail["room_id"]}
def textual_room
{:label => _("Room"), :value => @record.asset_detail["room"]}
end

def textual_rack_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
support_contact
description
location
room_id
room
rack_name
lowest_rack_unit
), "asset_details"
Expand Down
10 changes: 5 additions & 5 deletions spec/helpers/physical_storage_helper/textual_summary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
:model,
:contact,
:location,
:room_id,
:room,
:rack_name,
:lowest_rack_unit
)
Expand Down Expand Up @@ -246,11 +246,11 @@
end
end

describe '.textual_room_id' do
subject { textual_room_id }
describe '.textual_room' do
subject { textual_room }

it 'show the storage Room ID' do
expect(subject).to eq(:label => 'Room ID', :value => nil)
it 'show the storage Room' do
expect(subject).to eq(:label => 'Room', :value => 'Room')
end
end

Expand Down

0 comments on commit f311a1c

Please sign in to comment.