From b6543be0cf330c696a4a00878639641dd611f026 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Thu, 23 Jan 2014 05:22:55 -0500 Subject: [PATCH] AC-939 Update browsable REST API branding to Tower. --- awx/api/templates/api/_list_common.md | 12 +-- awx/api/templates/api/_new_in_awx.md | 7 +- awx/api/templates/api/api_root_view.md | 2 +- awx/api/templates/api/api_v1_config_view.md | 2 +- awx/api/templates/api/api_v1_root_view.md | 2 +- .../templates/api/inventory_script_view.md | 4 +- awx/api/views.py | 2 +- awx/templates/rest_framework/api.html | 74 +++++++++++++++---- 8 files changed, 77 insertions(+), 28 deletions(-) diff --git a/awx/api/templates/api/_list_common.md b/awx/api/templates/api/_list_common.md index 3a9184bbd9..e80e14b98e 100644 --- a/awx/api/templates/api/_list_common.md +++ b/awx/api/templates/api/_list_common.md @@ -54,7 +54,7 @@ within all designated text fields of a model. ?search=findme -_New in AWX 1.4_ +_New since AWX 1.4_ ## Filtering @@ -75,7 +75,7 @@ To exclude results matching certain criteria, prefix the field parameter with ?not__field=value -(_New in AWX 1.4_) By default, all query string filters are AND'ed together, so +(_New since AWX 1.4_) By default, all query string filters are AND'ed together, so only the results matching *all* filters will be returned. To combine results matching *any* one of multiple criteria, prefix each query string parameter with `or__`: @@ -83,10 +83,10 @@ with `or__`: ?or__field=value&or__field=othervalue ?or__not__field=value&or__field=othervalue -(_New in AWX 1.5_) The default AND filtering applies all filters simultaneously -to each related object being filtered across database relationships. The chain -filter instead applies filters separately for each related object. To use, -prefix the query string parameter with `chain__`: +(_New in Ansible Tower 1.4.5_) The default AND filtering applies all filters +simultaneously to each related object being filtered across database +relationships. The chain filter instead applies filters separately for each +related object. To use, prefix the query string parameter with `chain__`: ?chain__related__field=value&chain__related__field2=othervalue ?chain__not__related__field=value&chain__related__field2=othervalue diff --git a/awx/api/templates/api/_new_in_awx.md b/awx/api/templates/api/_new_in_awx.md index a49e4bfd2b..344d3fe2b1 100644 --- a/awx/api/templates/api/_new_in_awx.md +++ b/awx/api/templates/api/_new_in_awx.md @@ -1,3 +1,4 @@ -{% if new_in_13 %}> _New in AWX 1.3_{% endif %} -{% if new_in_14 %}> _New in AWX 1.4_{% endif %} -{% if new_in_15 %}> _New in AWX 1.5_{% endif %} +{% if new_in_13 %}> _New since AWX 1.3_{% endif %} +{% if new_in_14 %}> _New since AWX 1.4_{% endif %} +{% if new_in_145 %}> _New in Ansible Tower 1.4.5_{% endif %} +{% if new_in_15 %}> _New in Ansible Tower 1.5_{% endif %} diff --git a/awx/api/templates/api/api_root_view.md b/awx/api/templates/api/api_root_view.md index 603002b004..1d487dc9fe 100644 --- a/awx/api/templates/api/api_root_view.md +++ b/awx/api/templates/api/api_root_view.md @@ -1,4 +1,4 @@ -The root of the AWX REST API. +The root of the Ansible Tower REST API. Make a GET request to this resource to obtain information about the available API versions. diff --git a/awx/api/templates/api/api_v1_config_view.md b/awx/api/templates/api/api_v1_config_view.md index 5d9bd6667e..bcaaf3d1c0 100644 --- a/awx/api/templates/api/api_v1_config_view.md +++ b/awx/api/templates/api/api_v1_config_view.md @@ -9,4 +9,4 @@ the following fields (some fields may not be visible to all users): use when creating/editing a project. * `time_zone`: The configured time zone for the server. * `license_info`: Information about the current license. -* `version`: Version of AWX package installed. +* `version`: Version of Ansible Tower (AWX) package installed. diff --git a/awx/api/templates/api/api_v1_root_view.md b/awx/api/templates/api/api_v1_root_view.md index c6d0fcb8c5..8cfa97f5f1 100644 --- a/awx/api/templates/api/api_v1_root_view.md +++ b/awx/api/templates/api/api_v1_root_view.md @@ -1,4 +1,4 @@ -Version 1 of the AWX REST API. +Version 1 of the Ansible Tower REST API. Make a GET request to this resource to obtain a list of all child resources available via the API. diff --git a/awx/api/templates/api/inventory_script_view.md b/awx/api/templates/api/inventory_script_view.md index 4ba960db9e..aacbe34b3b 100644 --- a/awx/api/templates/api/inventory_script_view.md +++ b/awx/api/templates/api/inventory_script_view.md @@ -10,7 +10,7 @@ object containing groups, including the hosts, children and variables for each group. The response data is equivalent to that returned by passing the `--list` argument to an inventory script. -_(New in AWX 1.3)_ Specify a query string of `?hostvars=1` to retrieve the JSON +_(New since AWX 1.3)_ Specify a query string of `?hostvars=1` to retrieve the JSON object above including all host variables. The `['_meta']['hostvars']` object in the response contains an entry for each host with its variables. This response format can be used with Ansible 1.3 and later to avoid making a @@ -18,7 +18,7 @@ separate API request for each host. Refer to [Tuning the External Inventory Script](http://www.ansibleworks.com/docs/api.html#tuning-the-external-inventory-script) for more information on this feature. -_(New in AWX 1.4)_ By default, the inventory script will only return hosts that +_(New since AWX 1.4)_ By default, the inventory script will only return hosts that are enabled in the inventory. This feature allows disabled hosts to be skipped when running jobs without removing them from the inventory. Specify a query string of `?all=1` to return all hosts, including disabled ones. diff --git a/awx/api/views.py b/awx/api/views.py index 1c991b8cd4..ac7305f5be 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -59,7 +59,7 @@ class ApiRootView(APIView): current = reverse('api:api_v1_root_view', args=[]) data = dict( - description = 'AWX REST API', + description = 'Ansible Tower REST API', current_version = current, available_versions = dict( v1 = current diff --git a/awx/templates/rest_framework/api.html b/awx/templates/rest_framework/api.html index 3b83540e42..fd6a47e7a2 100644 --- a/awx/templates/rest_framework/api.html +++ b/awx/templates/rest_framework/api.html @@ -30,23 +30,23 @@ html body .navbar-inverse .nav > li > a { } html body .navbar-inverse .nav > li > a:hover, html body .navbar-inverse .nav > li > a:focus { - color: #2078be; + color: #4e9998; } html body .navbar .brand img { width: 200px; - margin-top: -6px; - margin-right: 0.5em; + margin-top: -2px; + margin-right: 0.75em; } html body .navbar-inverse .nav li.dropdown.open > .dropdown-toggle, html body .navbar-inverse .nav li.dropdown.active > .dropdown-toggle, html body .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { - background-color: #074979; + background-color: #1a3333; } html body .navbar-inverse .brand { font-size: 1.2em; color: #fff; - padding-top: 6px; - padding-left: 4px; + padding-top: 18px; + padding-left: 20px; } html body .navbar-inverse .nav.pull-right { margin-top: 8px; @@ -68,11 +68,11 @@ html body .hero-unit h2, html body .hero-unit h1, html body a, html body a { - color: #2078be; + color: #4e9998; } html body .navbar .navbar-inner .dropdown-menu li a:hover, html body a:hover { - color: #2078be; + color: #4e9998; } html body ul.breadcrumb, html body .prettyprint, @@ -85,7 +85,12 @@ html body .prettyprint { html body .str, html body .atv, html body code { - color: #074979; + color: #1a3333; +} +html body .kwd, +html body .ta, +html body .lit { + color: #346665; } html body .str a { text-decoration: underline; @@ -107,8 +112,7 @@ html body .description { #footer a:hover { color: #333; } -img.awxlogo { - width: 125px; +img.towerlogo { margin-bottom: 0.5em; } html body .wrapper { @@ -122,11 +126,55 @@ html body #footer { html body #push { height: 0; } +html body .btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; /* 66c8c7 l=6fd9d7 d=55a6a4 */ + background-image: -moz-linear-gradient(top, #6fd9d7, #55a6a4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6fd9d7), to(#55a6a4)); + background-image: -webkit-linear-gradient(top, #6fd9d7, #55a6a4); + background-image: -o-linear-gradient(top, #6fd9d7, #55a6a4); + background-image: linear-gradient(to bottom, #6fd9d7, #55a6a4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6fd9d7', endColorstr='#ff55a6a4', GradientType=0); + border-color: #55a6a4 #55a6a4 #41807e; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +html body .btn-success:hover, +html body .btn-success:active, +html body .btn-success.active, +html body .btn-success.disabled, +html body .btn-success[disabled] { + color: #ffffff; + background-color: #55a6a4; +} +html body .btn-group.open .btn-success.dropdown-toggle { + background-color: #55a6a4; +} +html body .btn-success:active, +html body .btn-success.active { + background-color:#41807e \9; +} +html body .dropdown-menu li>a:hover, +html body .dropdown-menu li>a:focus, +html body .dropdown-submenu:hover>a { + text-decoration: none; + color: #ffffff; + background-color: #55a6a4; + background-image: -moz-linear-gradient(top, #55a6a4, #41807e); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#55a6a4), to(#41807e)); + background-image: -webkit-linear-gradient(top, #55a6a4, #41807e); + background-image: -o-linear-gradient(top, #55a6a4, #41807e); + background-image: linear-gradient(to bottom, #55a6a4, #41807e); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff55a6a4', endColorstr='#ff41807e', GradientType=0); +} {% endblock %} {% block branding %} - {% block branding_title %}{% trans 'REST API' %}{% endblock %} + {% block branding_title %}{% trans 'REST API' %}{% endblock %} {% endblock %} {% block userlinks %} @@ -139,7 +187,7 @@ html body #push { {% block footer %} {% endblock %}