Help with report function - simple report example

Problem: Hi can anyone be so kind as to provide a sample report that provides the total amount of pending RPM upgrades on all hosts. I have tried to comprehend the help section but it is not very clear. I assume it’s the host’s upgradable_rpm_count parameter that needs to be called. But I seem to be invoicing it incorrectly (even tried to modify the erratum report to no avail). Can anyone kindly assist, please

It seems the upgradable_rpm_count is not allowed in the safe mode so you’d need to disable that first or open a PR to add it to the white list. If you’re fine with safe mode disabled (I’d discourage from that unless you can fully trust your users), this is the bareminimum what should work

<%- load_hosts.each_record do |host| -%>
<%-   report_row(
        'Upgradable': host&.content_facet&.upgradable_rpm_count,
      ) -%>
<%- end -%>
<%= report_render -%>

Much appriciated

It would be great if someone with better @katello knowledge could look at content facet and add all interesting attributes to the safe mode. Currently, there’s very limited set that can be used in the reports. Let me know if you need more info on how.