diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-11-25 10:12:46 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-11-28 14:02:58 +0000 |
commit | af1f9fda8b295d277a6967453b2d03e43474ab68 (patch) | |
tree | 0e6f9ab6194767449872e6bc0e4011026e4cc042 /bitbake/lib/toaster/toastergui | |
parent | 707a960ffa20d6093ff787084e0b0f50a7b8305e (diff) | |
download | poky-af1f9fda8b295d277a6967453b2d03e43474ab68.tar.gz |
bitbake: toaster: display Toaster exceptions and other fixes
Changing ToasterUI to log toaster exceptions on a different level than
build errors.
Updating the build dashboard to show Toaster exceptions.
We add extra logging to console for exceptions.
Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.
Toaster now checks for invalid states at startup and performs needed
cleanups.
Removed loading reference to jquery-ui.min.css as we do not have this
file.
(Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui')
4 files changed, 44 insertions, 2 deletions
diff --git a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js index 4983ef6f6d..8e76ecb85a 100644 --- a/bitbake/lib/toaster/toastergui/static/js/libtoaster.js +++ b/bitbake/lib/toaster/toastergui/static/js/libtoaster.js | |||
@@ -252,6 +252,13 @@ $(document).ready(function() { | |||
252 | $('.toggle-warnings').click(function() { | 252 | $('.toggle-warnings').click(function() { |
253 | $('#collapse-warnings').toggleClass('in'); | 253 | $('#collapse-warnings').toggleClass('in'); |
254 | }); | 254 | }); |
255 | $('.show-exceptions').click(function() { | ||
256 | $('#collapse-exceptions').addClass('in'); | ||
257 | }); | ||
258 | $('.toggle-exceptions').click(function() { | ||
259 | $('#collapse-exceptions').toggleClass('in'); | ||
260 | }); | ||
261 | |||
255 | //show warnings section when requested from the previous page | 262 | //show warnings section when requested from the previous page |
256 | if (location.href.search('#warnings') > -1) { | 263 | if (location.href.search('#warnings') > -1) { |
257 | $('#collapse-warnings').addClass('in'); | 264 | $('#collapse-warnings').addClass('in'); |
diff --git a/bitbake/lib/toaster/toastergui/templates/base.html b/bitbake/lib/toaster/toastergui/templates/base.html index f457b91dce..8170a3db88 100644 --- a/bitbake/lib/toaster/toastergui/templates/base.html +++ b/bitbake/lib/toaster/toastergui/templates/base.html | |||
@@ -8,7 +8,7 @@ | |||
8 | <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'> | 8 | <link rel="stylesheet" href="{% static 'css/font-awesome.min.css' %}" type='text/css'> |
9 | <link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'> | 9 | <link rel="stylesheet" href="{% static 'css/prettify.css' %}" type='text/css'> |
10 | <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'> | 10 | <link rel="stylesheet" href="{% static 'css/default.css' %}" type='text/css'> |
11 | <link rel="stylesheet" href="assets/css/jquery-ui-1.10.3.custom.min.css" type='text/css'> | 11 | |
12 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | 12 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
13 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> | 13 | <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> |
14 | <script src="{% static 'js/jquery-2.0.3.min.js' %}"> | 14 | <script src="{% static 'js/jquery-2.0.3.min.js' %}"> |
diff --git a/bitbake/lib/toaster/toastergui/templates/builddashboard.html b/bitbake/lib/toaster/toastergui/templates/builddashboard.html index 2aa7b6bcfb..e682094305 100644 --- a/bitbake/lib/toaster/toastergui/templates/builddashboard.html +++ b/bitbake/lib/toaster/toastergui/templates/builddashboard.html | |||
@@ -39,6 +39,14 @@ | |||
39 | <span class="pull-right">Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a></span> | 39 | <span class="pull-right">Build time: <a href="{% url 'buildtime' build.pk %}">{{ build.timespent|sectohms }}</a></span> |
40 | {%endif%} | 40 | {%endif%} |
41 | </div> | 41 | </div> |
42 | {% if build.toaster_exceptions.count > 0 %} | ||
43 | <div class="row"> | ||
44 | <small class="pull-right"> | ||
45 | <i class="icon-question-sign get-help get-help-blue" title="" data-original-title="Toaster exceptions do not affect your build: only the operation of Toaster"></i> | ||
46 | <a class="show-exceptions" href="#exceptions">Toaster threw {{build.toaster_exceptions.count}} exception{{build.toaster_exceptions.count|pluralize}}</a> | ||
47 | </small> | ||
48 | </div> | ||
49 | {% endif %} | ||
42 | </div> | 50 | </div> |
43 | </div> | 51 | </div> |
44 | 52 | ||
@@ -223,6 +231,33 @@ | |||
223 | </div> | 231 | </div> |
224 | {% endif %} | 232 | {% endif %} |
225 | 233 | ||
234 | |||
235 | {% if build.toaster_exceptions.count > 0 %} | ||
236 | <div class="accordion span10 pull-right" id="exceptions"> | ||
237 | <div class="accordion-group"> | ||
238 | <div class="accordion-heading"> | ||
239 | <a class="accordion-toggle exception toggle-exceptions"> | ||
240 | <h2 id="exception-toggle"> | ||
241 | <i class="icon-warning-sign"></i> | ||
242 | {{build.toaster_exceptions.count}} Toaster exception{{build.toaster_exceptions.count|pluralize}} | ||
243 | </h2> | ||
244 | </a> | ||
245 | </div> | ||
246 | <div class="accordion-body collapse" id="collapse-exceptions"> | ||
247 | <div class="accordion-inner"> | ||
248 | <div class="span10"> | ||
249 | {% for exception in build.toaster_exceptions %} | ||
250 | <div class="alert alert-exception"> | ||
251 | <pre>{{exception.message}}</pre> | ||
252 | </div> | ||
253 | {% endfor %} | ||
254 | </div> | ||
255 | </div> | ||
256 | </div> | ||
257 | </div> | ||
258 | </div> | ||
259 | {% endif %} | ||
260 | |||
226 | <script type="text/javascript"> | 261 | <script type="text/javascript"> |
227 | $(document).ready(function() { | 262 | $(document).ready(function() { |
228 | //show warnings section when requested from the previous page | 263 | //show warnings section when requested from the previous page |
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 11c373a84d..b13f3e813a 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -461,7 +461,7 @@ def builddashboard( request, build_id ): | |||
461 | template = "builddashboard.html" | 461 | template = "builddashboard.html" |
462 | if Build.objects.filter( pk=build_id ).count( ) == 0 : | 462 | if Build.objects.filter( pk=build_id ).count( ) == 0 : |
463 | return redirect( builds ) | 463 | return redirect( builds ) |
464 | build = Build.objects.filter( pk = build_id )[ 0 ]; | 464 | build = Build.objects.get( pk = build_id ); |
465 | layerVersionId = Layer_Version.objects.filter( build = build_id ); | 465 | layerVersionId = Layer_Version.objects.filter( build = build_id ); |
466 | recipeCount = Recipe.objects.filter( layer_version__id__in = layerVersionId ).count( ); | 466 | recipeCount = Recipe.objects.filter( layer_version__id__in = layerVersionId ).count( ); |
467 | tgts = Target.objects.filter( build_id = build_id ).order_by( 'target' ); | 467 | tgts = Target.objects.filter( build_id = build_id ).order_by( 'target' ); |