mirror of
https://github.com/ansible/awx.git
synced 2026-01-17 04:31:21 -03:30
Merge pull request #3736 from ryanpetrello/red-means-loud-on-the-internet
make deprecation warnings at /api/ much more obvious Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
97a6255531
@ -73,6 +73,11 @@
|
||||
|
||||
<!-- Content -->
|
||||
<div id="content" role="main" aria-label="{% trans "content" %}">
|
||||
{% if deprecated %}
|
||||
<div class="breadcrumb" style="background: #FCC;">
|
||||
<b>This resource has been deprecated and will be removed in a future release.</b>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% block content %}
|
||||
|
||||
<div class="region" aria-label="{% trans "request form" %}">
|
||||
|
||||
@ -13,8 +13,14 @@ def settings(request):
|
||||
}
|
||||
|
||||
def version(request):
|
||||
context = getattr(request, 'parser_context', {})
|
||||
return {
|
||||
'version': get_awx_version(),
|
||||
'tower_version': get_awx_version(),
|
||||
'short_tower_version': get_awx_version().split('-')[0],
|
||||
'deprecated': getattr(
|
||||
context.get('view'),
|
||||
'deprecated',
|
||||
False
|
||||
) or request.path.startswith('/api/v1/')
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user