Fixes #39328 - Add macro for fetching activation_key_names#11745
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between df1275f3d85a25dd5f32323a53b380a02ea5ce67 and 6ce8c26. 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughAdds ChangesActivation Key Names Extension
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
What are the changes introduced in this pull request?
Added a new macro called activation_key_names that, if used correctly, would help to extract the names of activation keys used to register a content host.
If more than one key was used, then the key names are printed in comma-separated values.
Considerations taken when implementing this change?
While we expose subscription_facet and allow rendering registered_at\through and last_checkin, we don't have any macro that exposes the activation key names, used to register a system, and users are demanding the same.
We already have host_subscription_facet macro present in https://github.com/Katello/katello/blob/master/app/lib/katello/concerns/base_template_scope_extensions.rb#L316-L318 i.e.
We needed to simply do
host_subscription_facet(host)&.activation_keys&.map(&:name)to get the activation key names associated with a registered content host.What are the testing steps for this pull request?
( make sure that you don't have this line there
<%- search = "(last_checkin < \"#{input('Interval')} ago\"#{include_unknown_search})" -%>)I would expect the AK fields to get populated with right activation key names.
Summary by CodeRabbit