Skip to content

Instantly share code, notes, and snippets.

@tstrachota
Last active October 5, 2018 14:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tstrachota/8fd4c7c4dd29ee1b7755bc9e91fed433 to your computer and use it in GitHub Desktop.
Save tstrachota/8fd4c7c4dd29ee1b7755bc9e91fed433 to your computer and use it in GitHub Desktop.
<%#
name: Subscriptions
snippet: false
template_inputs:
- name: Include custom products
required: false
input_type: user
options: "yes\r\nno"
advanced: false
model: ReportTemplate
%>
<%-
rh_only = (input('Include custom products').strip != 'yes')
rows = Katello::Pool.readable.map do |s|
next if rh_only && s.available < 0
report_row({
'ID': s.id,
'Name': s.name,
'Available': s.available,
'Quantity': s.quantity,
'SKU': s.product_id,
'Contract number': s.contract_number,
})
end
%>
<%= report_render -%>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment