-
Notifications
You must be signed in to change notification settings - Fork 100
Fixes #38805 - Remove options related to filter overrides #645
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
Conversation
ofedoren
left a comment
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.
Thanks, @adamruzicka, LGTM, just one inline comment:
|
|
||
| class InfoCommand < HammerCLIForeman::InfoCommand | ||
| output ListCommand.output_definition do | ||
| HammerCLIForeman::References.taxonomies(self) |
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 information is still "there". WDYT about including it, but since it's on a different level, we could do it in two ways:
- Show at the same level to be "compatible" with the changes:
from :role do
collection :locations, _("Locations"), numbered: false, hide_blank: true do
custom_field Fields::Reference, name_key: :title
end
collection :organizations, _("Organizations"), numbered: false, hide_blank: true do
custom_field Fields::Reference, name_key: :title
end
end- Include it at
rolelevel, but this would require some additional changes:
field :role, _("Role"), Fields::Reference, details: [
{ key: :locations, structured_label: _('Locations'), except: :serialized },
{ key: :organizations, structured_label: _('Organizations'), except: :serialized }
], display_field_key: :nameand then in lib/hammer_cli_foreman/output/formatters.rb:36:
# ...
# The second check is for `base` adapter, since it's quite limited and this is a quick workaround instead of adding a better handler for nested structures (which I'm not sure we want for `base` though)
next if (detail[:id] && !show_ids) || (required_features & Array(detail[:except])).any?
# ...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.
"same level" meaning showing it as if it was a attribute of the filter itself?
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.
Yeap. Maybe include in the label (inherited), but that wouldn't as "compatible" then :/
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.
Went with this
# hammer filter info --id 338
Id: 338
Resource type: Location
Search: none
Role: zGptuCUriW
Permissions: view_locations, assign_locations
Created at: 2025/10/10 09:52:59
Updated at: 2025/10/10 09:52:59
Locations (inherited):
DVAErp
Organizations (inherited):
GxRhDkKoNeDD
5f287af to
ca8536d
Compare
ofedoren
left a comment
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.
Thanks, @adamruzicka, I think this is ready.
|
The main PR is merged, thus merging, thanks, @adamruzicka ! |
Companion to theforeman/foreman#10370