Display Horizon version number in System Info page
This patch adds the Horizon version number at the bottom of System Info page. Change-Id: I81514d1c99a32cd8161a65535638c235c2cfc317 Closes-Bug: #1261431
This commit is contained in:
parent
d329ded5ac
commit
3f513c0666
@ -11,5 +11,9 @@
|
||||
<div class="span12">
|
||||
{{ tab_group.render }}
|
||||
</div>
|
||||
<div class="version_label">
|
||||
{% blocktrans with version_info=version %}Version: {{version_info}}
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -16,7 +16,11 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from horizon import exceptions
|
||||
from horizon import tabs
|
||||
from horizon import version
|
||||
|
||||
from openstack_dashboard.dashboards.admin.info import constants
|
||||
from openstack_dashboard.dashboards.admin.info import tabs as project_tabs
|
||||
@ -25,3 +29,13 @@ from openstack_dashboard.dashboards.admin.info import tabs as project_tabs
|
||||
class IndexView(tabs.TabbedTableView):
|
||||
tab_group_class = project_tabs.SystemInfoTabs
|
||||
template_name = constants.INFO_TEMPLATE_NAME
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(IndexView, self).get_context_data(**kwargs)
|
||||
try:
|
||||
context["version"] = version.version_info.version_string()
|
||||
except Exception:
|
||||
exceptions.handle(self.request,
|
||||
_('Unable to retrieve version information.'))
|
||||
|
||||
return context
|
||||
|
@ -1540,6 +1540,12 @@ div .flavor_table {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.version_label {
|
||||
position: absolute;
|
||||
right: 1px;
|
||||
bottom: 0px;
|
||||
}
|
||||
|
||||
.header_rule {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user