Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix room display in physical infra summary views #5386

Merged
merged 1 commit into from
Mar 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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