diff options
author | David Reyna <David.Reyna@windriver.com> | 2014-04-08 01:11:42 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-09 17:00:01 +0100 |
commit | dc7d3d29108d63eb5ecf276769f0099a5bc3ab86 (patch) | |
tree | 69fb763ec8b649cb14dfe826ff99017d093134a8 /bitbake | |
parent | 74e2f8501997143162855b970ffd9fdb33d24bd8 (diff) | |
download | poky-dc7d3d29108d63eb5ecf276769f0099a5bc3ab86.tar.gz |
bitbake: toaster: hide tasks without order or outcome
Hide the incomplete tasks, those without order numbers and/or outcomes.
[YOCTO #6060]
(Bitbake rev: bdbba81715765681a0404fa82f28e471b241051a)
Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/views.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 78726a88bc..f5fa72e610 100644 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -496,7 +496,8 @@ def task( request, build_id, task_id ): | |||
496 | context[ 'showing_matches' ] = True | 496 | context[ 'showing_matches' ] = True |
497 | context[ 'matching_tasks' ] = Task.objects.filter( | 497 | context[ 'matching_tasks' ] = Task.objects.filter( |
498 | sstate_checksum=task.sstate_checksum ).filter( | 498 | sstate_checksum=task.sstate_checksum ).filter( |
499 | build__completed_on__lt=task.build.completed_on ).order_by('-build__completed_on') | 499 | build__completed_on__lt=task.build.completed_on).exclude( |
500 | order__isnull=True).exclude(outcome=Task.OUTCOME_NA).order_by('-build__completed_on') | ||
500 | 501 | ||
501 | return render( request, template, context ) | 502 | return render( request, template, context ) |
502 | 503 | ||
@@ -509,7 +510,7 @@ def recipe(request, build_id, recipe_id): | |||
509 | object = Recipe.objects.filter(pk=recipe_id)[0] | 510 | object = Recipe.objects.filter(pk=recipe_id)[0] |
510 | layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0] | 511 | layer_version = Layer_Version.objects.filter(pk=object.layer_version_id)[0] |
511 | layer = Layer.objects.filter(pk=layer_version.layer_id)[0] | 512 | layer = Layer.objects.filter(pk=layer_version.layer_id)[0] |
512 | tasks = Task.objects.filter(recipe_id = recipe_id).filter(build_id = build_id).exclude(task_name__endswith='_setscene') | 513 | tasks = Task.objects.filter(recipe_id = recipe_id, build_id = build_id).exclude(order__isnull=True).exclude(task_name__endswith='_setscene').exclude(outcome=Task.OUTCOME_NA) |
513 | packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id).filter(size__gte=0) | 514 | packages = Package.objects.filter(recipe_id = recipe_id).filter(build_id = build_id).filter(size__gte=0) |
514 | 515 | ||
515 | context = { | 516 | context = { |
@@ -762,14 +763,16 @@ def dirinfo(request, build_id, target_id, file_path=None): | |||
762 | def _find_task_dep(task): | 763 | def _find_task_dep(task): |
763 | tp = [] | 764 | tp = [] |
764 | for p in Task_Dependency.objects.filter(task=task): | 765 | for p in Task_Dependency.objects.filter(task=task): |
765 | tp.append(p.depends_on); | 766 | if (p.depends_on.order > 0) and (p.depends_on.outcome != Task.OUTCOME_NA): |
767 | tp.append(p.depends_on); | ||
766 | return tp | 768 | return tp |
767 | 769 | ||
768 | 770 | ||
769 | def _find_task_revdep(task): | 771 | def _find_task_revdep(task): |
770 | tp = [] | 772 | tp = [] |
771 | for p in Task_Dependency.objects.filter(depends_on=task): | 773 | for p in Task_Dependency.objects.filter(depends_on=task): |
772 | tp.append(p.task); | 774 | if (p.task.order > 0) and (p.task.outcome != Task.OUTCOME_NA): |
775 | tp.append(p.task); | ||
773 | return tp | 776 | return tp |
774 | 777 | ||
775 | def _find_task_provider(task): | 778 | def _find_task_provider(task): |
@@ -836,7 +839,7 @@ def tasks_common(request, build_id, variant, task_anchor): | |||
836 | mandatory_parameters['anchor']=task_anchor | 839 | mandatory_parameters['anchor']=task_anchor |
837 | return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id) | 840 | return _redirect_parameters( variant, request.GET, mandatory_parameters, build_id = build_id) |
838 | (filter_string, search_term, ordering_string) = _search_tuple(request, Task) | 841 | (filter_string, search_term, ordering_string) = _search_tuple(request, Task) |
839 | queryset_all = Task.objects.filter(build=build_id, order__gt=0) | 842 | queryset_all = Task.objects.filter(build=build_id).exclude(order__isnull=True).exclude(outcome=Task.OUTCOME_NA) |
840 | queryset_with_search = _get_queryset(Task, queryset_all, None , search_term, ordering_string, 'order') | 843 | queryset_with_search = _get_queryset(Task, queryset_all, None , search_term, ordering_string, 'order') |
841 | queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order') | 844 | queryset = _get_queryset(Task, queryset_all, filter_string, search_term, ordering_string, 'order') |
842 | 845 | ||