mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 12:55:04 -02:30
Allow settings access from api templates
This commit is contained in:
@@ -202,6 +202,7 @@ class GenericAPIView(generics.GenericAPIView, APIView):
|
|||||||
'model_verbose_name_plural': unicode(self.model._meta.verbose_name_plural),
|
'model_verbose_name_plural': unicode(self.model._meta.verbose_name_plural),
|
||||||
})
|
})
|
||||||
d.update({'serializer_fields': self.get_serializer().metadata()})
|
d.update({'serializer_fields': self.get_serializer().metadata()})
|
||||||
|
d['settings'] = settings
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def metadata(self, request):
|
def metadata(self, request):
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ to specify a range of line numbers to retrieve.
|
|||||||
Use `dark=1` or `dark=0` as a query string parameter to force or disable a
|
Use `dark=1` or `dark=0` as a query string parameter to force or disable a
|
||||||
dark background.
|
dark background.
|
||||||
|
|
||||||
Files over 1MB (configurable) will not display in the browser. Use the `txt_download`
|
Files over {{ settings.STDOUT_MAX_BYTES_DISPLAY|filesizeformat }} (configurable) will not display in the browser. Use the `txt_download`
|
||||||
format to download the file directly to view it.
|
format to download the file directly to view it.
|
||||||
|
|
||||||
{% include "api/_new_in_awx.md" %}
|
{% include "api/_new_in_awx.md" %}
|
||||||
|
|||||||
@@ -567,7 +567,7 @@ FACT_CACHE_PORT = 6564
|
|||||||
ORG_ADMINS_CAN_SEE_ALL_USERS = True
|
ORG_ADMINS_CAN_SEE_ALL_USERS = True
|
||||||
|
|
||||||
# Control when we display stdout and where to store the temporary files for downloading
|
# Control when we display stdout and where to store the temporary files for downloading
|
||||||
STDOUT_MAX_BYTES_DISPLAY = 1000000
|
STDOUT_MAX_BYTES_DISPLAY = 1048576
|
||||||
STDOUT_TEMP_DIR = "/var/lib/awx/"
|
STDOUT_TEMP_DIR = "/var/lib/awx/"
|
||||||
|
|
||||||
# Logging configuration.
|
# Logging configuration.
|
||||||
|
|||||||
Reference in New Issue
Block a user