Merge "Add optional Report Bug link to Horizon"

This commit is contained in:
Jenkins 2015-10-16 08:36:12 +00:00 committed by Gerrit Code Review
commit dbe10c5ea7
8 changed files with 41 additions and 1 deletions

View File

@ -147,6 +147,17 @@ If provided, will auto-fade the alert types specified. Valid alert types
include: ['alert-success', 'alert-info', 'alert-warning', 'alert-error'] include: ['alert-success', 'alert-info', 'alert-warning', 'alert-error']
Can also define the delay before the alert fades and the fade out duration. Can also define the delay before the alert fades and the fade out duration.
``bug_url``
------------
.. versionadded:: 9.0.0(Mitaka)
Default: ``None``
If provided, a "Report Bug" link will be displayed in the site header which
links to the value of this setting (ideally a URL containing information on
how to report issues).
``help_url`` ``help_url``
------------ ------------
@ -155,7 +166,7 @@ Can also define the delay before the alert fades and the fade out duration.
Default: ``None`` Default: ``None``
If provided, a "Help" link will be displayed in the site header which links If provided, a "Help" link will be displayed in the site header which links
to the value of this settings (ideally a URL containing help information). to the value of this setting (ideally a URL containing help information).
``exceptions`` ``exceptions``
-------------- --------------

View File

@ -28,6 +28,9 @@ HORIZON_CONFIG = {
'ajax_queue_limit': 10, 'ajax_queue_limit': 10,
'ajax_poll_interval': 2500, 'ajax_poll_interval': 2500,
# URL for reporting issue with this site.
'bug_url': None,
# URL for additional help with this site. # URL for additional help with this site.
'help_url': None, 'help_url': None,

View File

@ -137,6 +137,7 @@ HORIZON_CONFIG = {
"help_text": "Password must be between 8 and 18 characters." "help_text": "Password must be between 8 and 18 characters."
}, },
'user_home': None, 'user_home': None,
'bug_url': None,
'help_url': "http://example.com", 'help_url': "http://example.com",
} }

View File

@ -68,6 +68,11 @@ WEBROOT = '/'
# Set to None explicitly if you want to deactivate the console. # Set to None explicitly if you want to deactivate the console.
#CONSOLE_TYPE = "AUTO" #CONSOLE_TYPE = "AUTO"
# If provided, a "Report Bug" link will be displayed in the site header
# which links to the value of this setting (ideally a URL containing
# information on how to report issues).
#HORIZON_CONFIG["bug_url"] = "http://bug-report.example.com"
# Show backdrop element outside the modal, do not close the modal # Show backdrop element outside the modal, do not close the modal
# after clicking on backdrop. # after clicking on backdrop.
#HORIZON_CONFIG["modal_backdrop"] = "static" #HORIZON_CONFIG["modal_backdrop"] = "static"

View File

@ -60,6 +60,7 @@ HORIZON_CONFIG = {
'fade_duration': 1500, 'fade_duration': 1500,
'types': ['alert-success', 'alert-info'] 'types': ['alert-success', 'alert-info']
}, },
'bug_url': None,
'help_url': "http://docs.openstack.org", 'help_url': "http://docs.openstack.org",
'exceptions': {'recoverable': exceptions.RECOVERABLE, 'exceptions': {'recoverable': exceptions.RECOVERABLE,
'not_found': exceptions.NOT_FOUND, 'not_found': exceptions.NOT_FOUND,

View File

@ -71,6 +71,9 @@
<div id="links"> <div id="links">
{% block links %} {% block links %}
<p><a href="{{ CONF.WEBROOT }}">{% trans "Home" %}</a></p> <p><a href="{{ CONF.WEBROOT }}">{% trans "Home" %}</a></p>
{% if CONF.HORIZON_CONFIG.bug_url %}
<p><a href="{{ CONF.HORIZON_CONFIG.bug_url }}">{% trans "Report Bug" %}</a></p>
{% endif %}
<p><a href="{{ CONF.HORIZON_CONFIG.help_url }}">{% trans "Help" %}</a></p> <p><a href="{{ CONF.HORIZON_CONFIG.help_url }}">{% trans "Help" %}</a></p>
{% endblock %} {% endblock %}
</div> </div>

View File

@ -67,6 +67,14 @@
{% trans "Settings" %} {% trans "Settings" %}
</a> </a>
</li> </li>
{% if HORIZON_CONFIG.bug_url %}
<li>
<a href="{{ HORIZON_CONFIG.bug_url }}" target="_blank">
<span class="fa fa-bug"></span>
{% trans "Report Bug" %}
</a>
</li>
{% endif %}
{% if HORIZON_CONFIG.help_url %} {% if HORIZON_CONFIG.help_url %}
<li> <li>
<a href="{{ HORIZON_CONFIG.help_url }}" target="_blank"> <a href="{{ HORIZON_CONFIG.help_url }}" target="_blank">

View File

@ -76,6 +76,14 @@
{% trans "Settings" %} {% trans "Settings" %}
</a> </a>
</li> </li>
{% if HORIZON_CONFIG.bug_url %}
<li>
<a href="{{ HORIZON_CONFIG.bug_url }}" target="_blank">
<span class="fa fa-bug"></span>
{% trans "Report Bug" %}
</a>
</li>
{% endif %}
{% if HORIZON_CONFIG.help_url %} {% if HORIZON_CONFIG.help_url %}
<li> <li>
<a href="{{ HORIZON_CONFIG.help_url }}" target="_blank"> <a href="{{ HORIZON_CONFIG.help_url }}" target="_blank">