bitbake: toasterui: style the Toaster version information

When debugging is turned on, we show some Toaster version
information in the top bar. Present it so that it can
be easily copied and pasted.

(Bitbake rev: 5de46fabe9ab1e525048353c2ecd8846ffefc760)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Belen Barros Pena 2015-02-24 17:20:53 +00:00 committed by Richard Purdie
parent 4742ae94a9
commit 1e0e700f4b
5 changed files with 12 additions and 7 deletions

View File

@ -5,7 +5,8 @@
/* style the version information */
.brand > a { color: #777; }
.brand > a:hover { color: #999; text-decoration: none; }
.icon-info-sign.get-help { color: #777; font-size: 16px; margin-left: 5px;}
.icon-info-sign { color: #777; font-size: 16px; margin-left: 5px;}
.icon-info-sign:hover { color: #999; cursor: pointer; }
/* Style the breadcrumb */
.breadcrumb { display: inline-block; background-color: transparent; }

View File

@ -317,6 +317,9 @@ $(document).ready(function() {
// initialise the tooltips for the download icons
$(".icon-download-alt").tooltip({ container: 'body', html: true, delay: { show: 200 } });
// initialise popover for debug information
$(".icon-info-sign").popover( { placement: 'bottom', html: true, container: 'body' });
// linking directly to tabs
$(function(){
var hash = window.location.hash;

View File

@ -61,7 +61,7 @@
<span class="brand">
<a href="/">Toaster</a>
{% if DEBUG %}
<i class="icon-info-sign get-help heading-help" data-placement="bottom" title="Version: {{TOASTER_VERSION}} <br /> Mode: {%if MANAGED%}build{%else%}analysis{%endif%}"></i>
<i class="icon-info-sign" title="<strong>Toaster version information</strong>" data-content="<dl><dt>Branch</dt><dd>{{TOASTER_BRANCH}}</dd><dt>Revision</dt><dd>{{TOASTER_REVISION}}</dd><dt>Mode</dt><dd>{%if MANAGED%}Build{%else%}Analysis{%endif%}</dd></dl>"></i>
{% endif %}
</span>
<a class="pull-right manual" target="_blank" href="http://www.yoctoproject.org/documentation/toaster-manual">

View File

@ -1731,7 +1731,8 @@ if toastermain.settings.MANAGED:
"projects": Project.objects.all(),
"MANAGED" : toastermain.settings.MANAGED,
"DEBUG" : toastermain.settings.DEBUG,
"TOASTER_VERSION": toastermain.settings.TOASTER_VERSION,
"TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
"TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION,
}
if 'project_id' in request.session:
try:
@ -3104,8 +3105,8 @@ else:
"projects": [],
"MANAGED" : toastermain.settings.MANAGED,
"DEBUG" : toastermain.settings.DEBUG,
"TOASTER_VERSION": toastermain.settings.TOASTER_VERSION,
"TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH,
"TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION,
}

View File

@ -232,8 +232,8 @@ from os.path import dirname as DN
SITE_ROOT=DN(DN(os.path.abspath(__file__)))
import subprocess
TOASTER_VERSION = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
TOASTER_VERSION += " " + subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
TOASTER_BRANCH = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
TOASTER_REVISION = subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0]
ROOT_URLCONF = 'toastermain.urls'