Added version info into UI

* Version and build is shown as tooltip of 'About' link
* Explicit version is removed from setup.cfg
* Build directory is added into pep8 ignore list

Resolves bug 1218934

Change-Id: Ideac6fa18580c1298d24212a8b1dbad0ef39b7b1
This commit is contained in:
Ilya Shakhat 2013-09-05 15:40:32 +04:00
parent 1af20b2fff
commit a721810ab0
4 changed files with 7 additions and 3 deletions

View File

@ -391,7 +391,7 @@
<div class="page">
<div class="aheader">
<div style="float: right; margin-top: 10px; margin-right: 20px;">
<a href="https://wiki.openstack.org/wiki/Stackalytics">About ↗</a>
<a href="https://wiki.openstack.org/wiki/Stackalytics" title="Version {{ stackalytics_version }} ({{ stackalytics_release }})">About ↗</a>
</div>
<div id="analytics_header">
<span id="logo"><a href="/?metric={{ metric }}&release={{ release }}&project_type={{ project_type }}">Stackalytics</a></span>

View File

@ -33,6 +33,7 @@ from stackalytics.openstack.common import log as logging
from stackalytics.processor import config
from stackalytics.processor import runtime_storage
from stackalytics.processor import utils
from stackalytics import version as stackalytics_version
# Constants and Parameters ---------
@ -498,6 +499,10 @@ def templated(template=None, return_code=200):
ctx['user_id'] = get_single_parameter(kwargs, 'user_id')
ctx['page_title'] = make_page_title(ctx['company'], ctx['user_id'],
ctx['module'], ctx['release'])
ctx['stackalytics_version'] = (
stackalytics_version.version_info.version_string())
ctx['stackalytics_release'] = (
stackalytics_version.version_info.release_string())
return flask.render_template(template_name, **ctx), return_code

View File

@ -1,6 +1,5 @@
[metadata]
name = stackalytics
version = 0.1
summary = OpenStack analytics dashboard
description-file =
README.rst

View File

@ -33,4 +33,4 @@ commands = python setup.py build_sphinx
ignore = E125,H404
show-source = true
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools,build