Skip to content

Commit

Permalink
Fixes #37957 - Add CVE labels to host rabl (#11194)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylenz authored Nov 1, 2024
1 parent 82d7a2c commit c123c23
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/katello/activation_key.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def available_releases
end

def content_view_environment_labels
content_view_environment_names.join(',')
content_view_environments.map(&:label).join(',')
end

def available_subscriptions
Expand Down
4 changes: 4 additions & 0 deletions app/models/katello/host/content_facet.rb
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ def content_view_environments=(new_cves)
self.host&.update_candlepin_associations unless self.host&.new_record?
end

def content_view_environment_labels
content_view_environments.map(&:label).join(',')
end

# rubocop:disable Metrics/CyclomaticComplexity
def assign_single_environment(
content_view_id: nil, lifecycle_environment_id: nil, environment_id: nil,
Expand Down
2 changes: 2 additions & 0 deletions app/views/katello/api/v2/content_facet/base.json.rabl
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ child :content_view_environments => :content_view_environments do
end
end

attributes :content_view_environment_labels

node :multi_content_view_environment do |content_facet|
content_facet.multi_content_view_environment?
end
Expand Down

0 comments on commit c123c23

Please sign in to comment.