diff options
author | Belen Barros Pena <belen.barros.pena@intel.com> | 2015-02-24 17:20:53 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-02-24 23:35:44 +0000 |
commit | 1e0e700f4b52465ee0afd5b67222785b9a1a0055 (patch) | |
tree | ad61b8bd874c9aab76b87aaeb5eac4c717942ad6 | |
parent | 4742ae94a91028f7128b862fdb6ec80123749859 (diff) | |
download | poky-1e0e700f4b52465ee0afd5b67222785b9a1a0055.tar.gz |
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>
5 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/css/default.css b/bitbake/lib/toaster/toastergui/static/css/default.css index 86cf67ad53..f97e6c4b76 100644 --- a/bitbake/lib/toaster/toastergui/static/css/default.css +++ b/bitbake/lib/toaster/toastergui/static/css/default.css | |||
@@ -5,7 +5,8 @@ | |||
5 | /* style the version information */ | 5 | /* style the version information */ |
6 | .brand > a { color: #777; } | 6 | .brand > a { color: #777; } |
7 | .brand > a:hover { color: #999; text-decoration: none; } | 7 | .brand > a:hover { color: #999; text-decoration: none; } |
8 | .icon-info-sign.get-help { color: #777; font-size: 16px; margin-left: 5px;} | 8 | .icon-info-sign { color: #777; font-size: 16px; margin-left: 5px;} |
9 | .icon-info-sign:hover { color: #999; cursor: pointer; } | ||
9 | 10 | ||
10 | /* Style the breadcrumb */ | 11 | /* Style the breadcrumb */ |
11 | .breadcrumb { display: inline-block; background-color: transparent; } | 12 | .breadcrumb { display: inline-block; background-color: transparent; } |
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index 2dc5b0a0a1..ea1522f471 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -317,6 +317,9 @@ $(document).ready(function() { | |||
317 | // initialise the tooltips for the download icons | 317 | // initialise the tooltips for the download icons |
318 | $(".icon-download-alt").tooltip({ container: 'body', html: true, delay: { show: 200 } }); | 318 | $(".icon-download-alt").tooltip({ container: 'body', html: true, delay: { show: 200 } }); |
319 | 319 | ||
320 | // initialise popover for debug information | ||
321 | $(".icon-info-sign").popover( { placement: 'bottom', html: true, container: 'body' }); | ||
322 | |||
320 | // linking directly to tabs | 323 | // linking directly to tabs |
321 | $(function(){ | 324 | $(function(){ |
322 | var hash = window.location.hash; | 325 | var hash = window.location.hash; |
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index 695ca5d2ca..62cc7ad94c 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -61,7 +61,7 @@ | |||
61 | <span class="brand"> | 61 | <span class="brand"> |
62 | <a href="/">Toaster</a> | 62 | <a href="/">Toaster</a> |
63 | {% if DEBUG %} | 63 | {% if DEBUG %} |
64 | <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> | 64 | <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> |
65 | {% endif %} | 65 | {% endif %} |
66 | </span> | 66 | </span> |
67 | <a class="pull-right manual" target="_blank" href="http://www.yoctoproject.org/documentation/toaster-manual"> | 67 | <a class="pull-right manual" target="_blank" href="http://www.yoctoproject.org/documentation/toaster-manual"> |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 0284b1abcd..4960ba0e40 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -1731,7 +1731,8 @@ if toastermain.settings.MANAGED: | |||
1731 | "projects": Project.objects.all(), | 1731 | "projects": Project.objects.all(), |
1732 | "MANAGED" : toastermain.settings.MANAGED, | 1732 | "MANAGED" : toastermain.settings.MANAGED, |
1733 | "DEBUG" : toastermain.settings.DEBUG, | 1733 | "DEBUG" : toastermain.settings.DEBUG, |
1734 | "TOASTER_VERSION": toastermain.settings.TOASTER_VERSION, | 1734 | "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH, |
1735 | "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION, | ||
1735 | } | 1736 | } |
1736 | if 'project_id' in request.session: | 1737 | if 'project_id' in request.session: |
1737 | try: | 1738 | try: |
@@ -3104,8 +3105,8 @@ else: | |||
3104 | "projects": [], | 3105 | "projects": [], |
3105 | "MANAGED" : toastermain.settings.MANAGED, | 3106 | "MANAGED" : toastermain.settings.MANAGED, |
3106 | "DEBUG" : toastermain.settings.DEBUG, | 3107 | "DEBUG" : toastermain.settings.DEBUG, |
3107 | "TOASTER_VERSION": toastermain.settings.TOASTER_VERSION, | 3108 | "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH, |
3108 | 3109 | "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION, | |
3109 | } | 3110 | } |
3110 | 3111 | ||
3111 | 3112 | ||
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py index a7304fa167..80f26e0ce6 100644 --- a/bitbake/lib/toaster/toastermain/settings.py +++ b/bitbake/lib/toaster/toastermain/settings.py | |||
@@ -232,8 +232,8 @@ from os.path import dirname as DN | |||
232 | SITE_ROOT=DN(DN(os.path.abspath(__file__))) | 232 | SITE_ROOT=DN(DN(os.path.abspath(__file__))) |
233 | 233 | ||
234 | import subprocess | 234 | import subprocess |
235 | TOASTER_VERSION = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] | 235 | TOASTER_BRANCH = subprocess.Popen('git branch | grep "^* " | tr -d "* "', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] |
236 | TOASTER_VERSION += " " + subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] | 236 | TOASTER_REVISION = subprocess.Popen('git rev-parse HEAD ', cwd = SITE_ROOT, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()[0] |
237 | 237 | ||
238 | ROOT_URLCONF = 'toastermain.urls' | 238 | ROOT_URLCONF = 'toastermain.urls' |
239 | 239 | ||