diff --git a/bitbake/lib/webhob/bldviewer/templates/layer.html b/bitbake/lib/webhob/bldviewer/templates/layer.html index 905a781..24bd86b 100644 --- a/bitbake/lib/webhob/bldviewer/templates/layer.html +++ b/bitbake/lib/webhob/bldviewer/templates/layer.html @@ -15,6 +15,7 @@ Name Local Path Layer Index URL + Known Versions {% for layer in layers %} @@ -23,6 +24,13 @@ {{layer.name}} {{layer.local_path}} {{layer.layer_index_url}} + + {% for lv in layer.versions %} + + {% endfor %} +
+ {{lv.branch}}:{{lv.commit}} ({{lv.count}} recipes) +
{% endfor %} diff --git a/bitbake/lib/webhob/bldviewer/templates/recipe.html b/bitbake/lib/webhob/bldviewer/templates/recipe.html new file mode 100644 index 0000000..8f5dcb3 --- /dev/null +++ b/bitbake/lib/webhob/bldviewer/templates/recipe.html @@ -0,0 +1,48 @@ + + + + WebHob Recipe page + + + +

WebHob Recipes for a Layer

+ + + + {% load projecttags %} + + + + + + + + + + + + + + + {% for recipe in recipes %} + + + + + + + + + + + + + + + {% endfor %} + +
NameVersionSummaryDescriptionSectionLicenseHomepageBugtrackerAuthorFile_path
{{recipe.name}}{{recipe.version}}{{recipe.summary}}{{recipe.description}}{{recipe.section}}{{recipe.license}}{{recipe.homepage}}{{recipe.bugtracker}}{{recipe.author}}{{recipe.file_path}}
+ + + + diff --git a/bitbake/lib/webhob/bldviewer/urls.py b/bitbake/lib/webhob/bldviewer/urls.py index 756b3fa..b6c6796 100644 --- a/bitbake/lib/webhob/bldviewer/urls.py +++ b/bitbake/lib/webhob/bldviewer/urls.py @@ -1,10 +1,10 @@ from django.conf.urls import patterns, include, url from django.views.generic.simple import redirect_to - urlpatterns = patterns('bldviewer.views', url(r'^build/$', 'build', name='build'), - url(r'^layers/$', 'layer', name='layer'), url(r'^build/(?P\d+)/task/$', 'task', name='task'), + url(r'^layer/$', 'layer', name='layer'), + url(r'^layerversions/(?P\d+)/recipes$', 'layer_versions_recipes', name='layer_versions_recipes'), url(r'^$', redirect_to, {'url': 'build/'}), ) diff --git a/bitbake/lib/webhob/bldviewer/views.py b/bitbake/lib/webhob/bldviewer/views.py index 58d9444..de89b84 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, Task, Layer, Task_Dependency +from orm.models import Build, Task, Layer, Layer_Version, Task_Dependency, Recipe def build(request): @@ -30,11 +30,24 @@ def layer(request): template = 'layer.html' layer_info = Layer.objects.all() + for li in layer_info: + li.versions = Layer_Version.objects.filter(layer = li) + for liv in li.versions: + liv.count = Recipe.objects.filter(layer_version__id = liv.id).count() + context = {'layers': layer_info} return render(request, template, context) +def layer_versions_recipes(request, layerversion_id): + template = 'recipe.html' + recipes = Recipe.objects.filter(layer_version__id = layerversion_id) + + context = {'recipes': recipes} + + return render(request, template, context) + #### API import json