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

Fixes #37957 - Add CVE labels to host rabl #11194

Merged
merged 1 commit into from
Nov 1, 2024
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/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
Loading