-
Notifications
You must be signed in to change notification settings - Fork 263
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 to onboarding Cluster
, IPAddress
, Prefix
, Rack
to Dynamic Groups
#2200
Conversation
…ic Groups - `DynamicGroup._map_filter_fields` now explicitly skips any method filters. This is a stop-gap until we are able to vet every method filter on every filterset. This is because we moved to Q object filtering for nested groups. - Introduced a new pattern for filterset method filters to be backed by a corresponding `generate_query_{filter_method}` method that itself emits a `Q` object that can be used by `DynamicGroup.generate_query()` machinery - Specific filterset fields have been revised to have these `generate_query_` filterset methods defined to maintain feature parity w/ v1.3 Dynamic Groups (in the case of Device/VM), and list view filtering (in the case of Rack, IPAddress, Prefix) - Fixed a bug in which method filters would only be filtered out if they were found to be a missing field
# This stringification is done to make the `pretty_print_query()` output look human-readable, | ||
# and nothing more. It would work as complex objects but looks bad in the web UI. |
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.
Is this still an issue after #2197?
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.
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.
Cool, thanks. Not blocking but wonder if we can/should fix this in pretty_print_query()
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.
Yeah I think that is probably better so it's not up to plugin authors or us in the future.
Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
* nav fix * include inc/javascript in graphiql.html
Thanks Jathan! User experience looks much better now! |
- Parent groups that had null filters were linking to an empty list view - `DynamicGroup.get_group_membership_url()` has been updated to always link to the "Members" tab on the detail view for that group. - `DynamicGroup.members_base_url` has been eliminated.
Co-authored-by: Jathan McCollum <jathan@gmail.com>
Note here: We skipped automatic field population on a few of these models due in part to this: #2162 (ex: |
…ic Groups (#2200) - `DynamicGroup._map_filter_fields` now explicitly skips any method filters. This is a stop-gap until we are able to vet every method filter on every filterset. This is because we moved to Q object filtering for nested groups. - Introduced a new pattern for filterset method filters to be backed by a corresponding `generate_query_{filter_method}` method that itself emits a `Q` object that can be used by `DynamicGroup.generate_query()` machinery - Specific filterset fields have been revised to have these `generate_query_` filterset methods defined to maintain feature parity w/ v1.3 Dynamic Groups (in the case of Device/VM), and list view filtering (in the case of Rack, IPAddress, Prefix) - Fixed a bug in which method filters would only be filtered out if they were found to be a missing field - Parent groups that had null filters were linking to an empty list view - `DynamicGroup.get_group_membership_url()` has been updated to always link to the "Members" tab on the detail view for that group. - `DynamicGroup.members_base_url` has been eliminated. Co-authored-by: Marek Zbroch <marek.zbroch@networktocode.com> Co-authored-by: Glenn Matthews <glenn.matthews@networktocode.com>
Replaces: #2188
What's Changed
DynamicGroup._map_filter_fields
now explicitly skips any method filters. This is a stop-gap until we are able to vet every method filter on every filterset. This is because we moved to Q object filtering for nested groups.generate_query_{filter_method}
method that itself emits aQ
object that can be used byDynamicGroup.generate_query()
machinerygenerate_query_
filterset methods defined to maintain feature parity w/ v1.3 Dynamic Groups (in the case of Device/VM), and list view filtering (in the case of Rack, IPAddress, Prefix)TODO