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

Sort custom attributes by attribute name #228

Merged
merged 1 commit into from
Jan 26, 2017
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
2 changes: 1 addition & 1 deletion app/helpers/container_summary_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def textual_group_container_labels
def textual_miq_custom_attributes
attrs = @record.custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name.tr("_", " "), :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name.tr("_", " "), :value => a.value} }
end

def textual_group_container_selectors
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/ems_container_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ def textual_endpoints
def textual_miq_custom_attributes
attrs = @record.custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name.tr("_", " "), :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name.tr("_", " "), :value => a.value} }
end
end
4 changes: 2 additions & 2 deletions app/helpers/host_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,13 @@ def textual_esx_logs
def textual_miq_custom_attributes
attrs = @record.miq_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_ems_custom_attributes
attrs = @record.ems_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_openstack_nova_scheduler
Expand Down
2 changes: 1 addition & 1 deletion app/helpers/service_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ def textual_created
def textual_miq_custom_attributes
attrs = @record.miq_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end
end
4 changes: 2 additions & 2 deletions app/helpers/vm_cloud_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@ def textual_vmsafe_timeout
def textual_miq_custom_attributes
attrs = @record.miq_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_ems_custom_attributes
attrs = @record.ems_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_compliance_history
Expand Down
4 changes: 2 additions & 2 deletions app/helpers/vm_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -759,13 +759,13 @@ def textual_vmsafe_timeout
def textual_miq_custom_attributes
attrs = @record.miq_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_ems_custom_attributes
attrs = @record.ems_custom_attributes
return nil if attrs.blank?
attrs.collect { |a| {:label => a.name, :value => a.value} }
attrs.sort_by(&:name).collect { |a| {:label => a.name, :value => a.value} }
end

def textual_compliance_history
Expand Down