mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 13:36:02 -03:30
Merge branch 'release_3.1.0' into devel
* release_3.1.0: (186 commits) check related credential for inventory source Fixed org jt's smart status Show the data that would have been a problem sending payload Implement optional message persistence on callback events changing the related tab on an edit of an organization to be for users, instead of users & teams fixing cancel function for workflow results Handle deleting root node while adding a child to that root node Skip sending task to process cache changes when migrating to database settings. only loop over project OPTIONS response if the response is valid Added the ability to pass in a maximum number of pages shown to pagination directive. This is useful for narrow lists particularly in modals. fix a CTinT bug in static config parsing Recursively fetch workflow nodes when there is more than 1 page of nodes enforce a sane default OPT_NETWORK_TIMEOUT for LDAP connections Labels expects the iterator to be `template` not `job_template` Disable workflow editor save when currently adding a node Fixed up organizations/job templates list surface dry_run option for system jobs through the API fix bugs with system auditors and orphan JTs incorporating organization into the custom inv script option selection for a group catch and log LDAP auth plugin misconfigurations ...
This commit is contained in:
@@ -32,6 +32,7 @@ class Metadata(metadata.SimpleMetadata):
|
||||
'min_length', 'max_length',
|
||||
'min_value', 'max_value',
|
||||
'category', 'category_slug',
|
||||
'defined_in_file'
|
||||
]
|
||||
|
||||
for attr in text_attrs:
|
||||
@@ -156,6 +157,10 @@ class Metadata(metadata.SimpleMetadata):
|
||||
|
||||
# For PUT/POST methods, remove read-only fields.
|
||||
if method in ('PUT', 'POST'):
|
||||
# This value should always be False for PUT/POST, so don't
|
||||
# show it (file-based read-only settings can't be updated)
|
||||
meta.pop('defined_in_file', False)
|
||||
|
||||
if meta.pop('read_only', False):
|
||||
actions[method].pop(field)
|
||||
|
||||
@@ -187,6 +192,10 @@ class Metadata(metadata.SimpleMetadata):
|
||||
if getattr(view, 'related_search_fields', None):
|
||||
metadata['related_search_fields'] = view.related_search_fields
|
||||
|
||||
from rest_framework import generics
|
||||
if isinstance(view, generics.ListAPIView) and hasattr(view, 'paginator'):
|
||||
metadata['max_page_size'] = view.paginator.max_page_size
|
||||
|
||||
return metadata
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user