diff --git a/bitbake/lib/webhob/bldviewer/templates/task.html b/bitbake/lib/webhob/bldviewer/templates/task.html new file mode 100644 index 0000000..26a09e9 --- /dev/null +++ b/bitbake/lib/webhob/bldviewer/templates/task.html @@ -0,0 +1,81 @@ + + + + WebHob Task page + + + + +

WebHob Tasks

+ + {% if not tasks %} +

No tasks were executed in this build!

+ {% else %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% for task in tasks %} + + + + + + + + {% if task.task_executed %} + + {% else %} + + {% endif %} + + + + + + + + + + + + + + + + + + + + {% endfor %} + +
OrderTaskRecipeRecipe VersionTask TypeOutcomeErrorsWarningsTimeLogWork directoryCPU usageDisk I/OSstate ChecksumPath to sstate objectSource URLScript typeFile pathLine numberPython Stack TraceSstate Result
{{task.order}}{{task.task_name}}{{task.recipe.name}}{{task.recipe.version}}ExecutedPrebuilt{{task.get_outcome_display}}{{task.errors_no}}{{task.warnings_no}}{{task.elapsed_time}}{{task.log_file}}{{task.work_directory}}{{task.cpu_usage}}{{task.disk_io}}{{task.sstate_checksum}}{{task.path_to_sstate_obj}}{{task.source_url}}{{task.get_script_type_display}}{{task.file_path}}{{task.line_number}}{{task.py_stack_trace}}{{task.get_sstate_result_display}}
+ + {% endif %} + + + + diff --git a/bitbake/lib/webhob/bldviewer/urls.py b/bitbake/lib/webhob/bldviewer/urls.py index 3ec2a30..335885c 100644 --- a/bitbake/lib/webhob/bldviewer/urls.py +++ b/bitbake/lib/webhob/bldviewer/urls.py @@ -3,4 +3,5 @@ from django.conf.urls import patterns, include, url urlpatterns = patterns('bldviewer.views', url(r'^$', 'build', name='build'), + url(r'^(?P\d+)/$', 'task', name='task'), ) diff --git a/bitbake/lib/webhob/bldviewer/views.py b/bitbake/lib/webhob/bldviewer/views.py index 15a2d1d..292a638 100644 --- a/bitbake/lib/webhob/bldviewer/views.py +++ b/bitbake/lib/webhob/bldviewer/views.py @@ -1,5 +1,5 @@ from django.shortcuts import render -from orm.models import Build +from orm.models import Build, Task def build(request): @@ -9,3 +9,12 @@ def build(request): context = {'builds': build_info} return render(request, template, context) + +def task(request, build_id): + template = 'task.html' + + tasks = Task.objects.filter(build=build_id) + + context = {'tasks': tasks} + + return render(request, template, context) diff --git a/bitbake/lib/webhob/whbmain/urls.py b/bitbake/lib/webhob/whbmain/urls.py index a15fc1b..c40e7c7 100644 --- a/bitbake/lib/webhob/whbmain/urls.py +++ b/bitbake/lib/webhob/whbmain/urls.py @@ -5,7 +5,7 @@ from django.conf.urls import patterns, include, url # admin.autodiscover() urlpatterns = patterns('', - url(r'^build/$', include('bldviewer.urls')), + url(r'^build/', include('bldviewer.urls')), # Examples: # url(r'^webhob/', include('webhob.foo.urls')),