-
Notifications
You must be signed in to change notification settings - Fork 982
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 #36507 - added installable errata count report template #9734
base: develop
Are you sure you want to change the base?
Conversation
Issues: #36507 |
<%- load_hosts(search: input('Hosts filter'), preload: [:content_facet]).each_record do |host| -%> | ||
<%- content_facet = host_content_facet(host) -%> | ||
<%- | ||
security_errata_count = content_facet.try(:installable_security_errata_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fails with Safemode::NoMethodError: undefined method '#try' for Katello::Host::ContentFacet::Jail (Katello::Host::ContentFacet)
security_errata_count = content_facet.try(:installable_security_errata_count) | ||
bugfix_errata_count = content_facet.try(:installable_bugfix_errata_count) | ||
enhancement_errata_count = content_facet.try(:installable_enhancement_errata_count) | ||
upgradable_rpm_count = content_facet.try(:upgradable_rpm_count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security_errata_count = content_facet.try(:installable_security_errata_count) | |
bugfix_errata_count = content_facet.try(:installable_bugfix_errata_count) | |
enhancement_errata_count = content_facet.try(:installable_enhancement_errata_count) | |
upgradable_rpm_count = content_facet.try(:upgradable_rpm_count) | |
security_errata_count = content_facet ? content_facet.installable_security_errata_count : 0 | |
bugfix_errata_count = content_facet ? content_facet.installable_bugfix_errata_count : 0 | |
enhancement_errata_count = content_facet ? content_facet.installable_enhancement_errata_count : 0 | |
upgradable_rpm_count = content_facet ? content_facet.upgradable_rpm_count : 0 |
This resolved it for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wbclark First of all apologies for the delay, as I was caught up in multiple other tasks. Thanks for the suggestions, I amended the changes that you suggested. When you can please take a look again.
New report template to generate the installable errata counts see example below
This PR depends on Katello/katello#10607 for safe mode rendering