summaryrefslogtreecommitdiffstats
path: root/lib/toaster/toastergui/views.py
diff options
context:
space:
mode:
authorMichael Wood <michael.g.wood@intel.com>2016-05-26 16:12:21 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-13 22:04:30 +0100
commit9434d3925bb7768876aae8d649ea00b8d849c6e9 (patch)
tree02ab4abc59facf73d0d0172324a96a5caaf07880 /lib/toaster/toastergui/views.py
parentdf62f38ff4e634544c9b1e97c5f6ca45e84a4f1e (diff)
downloadbitbake-contrib-9434d3925bb7768876aae8d649ea00b8d849c6e9.tar.gz
toaster: port Built recipes table to toastertables
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Diffstat (limited to 'lib/toaster/toastergui/views.py')
-rwxr-xr-xlib/toaster/toastergui/views.py111
1 files changed, 0 insertions, 111 deletions
diff --git a/lib/toaster/toastergui/views.py b/lib/toaster/toastergui/views.py
index de1e4139a..3a25d5ea1 100755
--- a/lib/toaster/toastergui/views.py
+++ b/lib/toaster/toastergui/views.py
@@ -1274,117 +1274,6 @@ def diskio(request, build_id):
def cputime(request, build_id):
return tasks_common(request, build_id, 'cputime', '')
-def recipes(request, build_id):
- template = 'recipes.html'
- (pagesize, orderby) = _get_parameters_values(request, 100, 'name:+')
- mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
- retval = _verify_parameters( request.GET, mandatory_parameters )
- if retval:
- return _redirect_parameters( 'recipes', request.GET, mandatory_parameters, build_id = build_id)
- (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe)
-
- build = Build.objects.get(pk=build_id)
-
- queryset = build.get_recipes()
- queryset = _get_queryset(Recipe, queryset, filter_string, search_term, ordering_string, 'name')
-
- recipes = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1))
-
- # prefetch the forward and reverse recipe dependencies
- deps = { }
- revs = { }
- queryset_dependency=Recipe_Dependency.objects.filter(recipe__layer_version__build_id = build_id).select_related("depends_on", "recipe")
- for recipe in recipes:
- deplist = [ ]
- for recipe_dep in [x for x in queryset_dependency if x.recipe_id == recipe.id]:
- deplist.append(recipe_dep)
- deps[recipe.id] = deplist
- revlist = [ ]
- for recipe_dep in [x for x in queryset_dependency if x.depends_on_id == recipe.id]:
- revlist.append(recipe_dep)
- revs[recipe.id] = revlist
-
- context = {
- 'objectname': 'recipes',
- 'build': build,
- 'project': build.project,
- 'objects': recipes,
- 'default_orderby' : 'name:+',
- 'recipe_deps' : deps,
- 'recipe_revs' : revs,
- 'tablecols':[
- {
- 'name':'Recipe',
- 'qhelp':'Information about a single piece of software, including where to download the source, configuration options, how to compile the source files and how to package the compiled output',
- 'orderfield': _get_toggle_order(request, "name"),
- 'ordericon':_get_toggle_order_icon(request, "name"),
- },
- {
- 'name':'Recipe version',
- 'qhelp':'The recipe version and revision',
- },
- {
- 'name':'Dependencies',
- 'qhelp':'Recipe build-time dependencies (i.e. other recipes)',
- 'clclass': 'depends_on', 'hidden': 1,
- },
- {
- 'name':'Reverse dependencies',
- 'qhelp':'Recipe build-time reverse dependencies (i.e. the recipes that depend on this recipe)',
- 'clclass': 'depends_by', 'hidden': 1,
- },
- {
- 'name':'Recipe file',
- 'qhelp':'Path to the recipe .bb file',
- 'orderfield': _get_toggle_order(request, "file_path"),
- 'ordericon':_get_toggle_order_icon(request, "file_path"),
- 'orderkey' : 'file_path',
- 'clclass': 'recipe_file', 'hidden': 0,
- },
- {
- 'name':'Section',
- 'qhelp':'The section in which recipes should be categorized',
- 'orderfield': _get_toggle_order(request, "section"),
- 'ordericon':_get_toggle_order_icon(request, "section"),
- 'orderkey' : 'section',
- 'clclass': 'recipe_section', 'hidden': 0,
- },
- {
- 'name':'License',
- 'qhelp':'The list of source licenses for the recipe. Multiple license names separated by the pipe character indicates a choice between licenses. Multiple license names separated by the ampersand character indicates multiple licenses exist that cover different parts of the source',
- 'orderfield': _get_toggle_order(request, "license"),
- 'ordericon':_get_toggle_order_icon(request, "license"),
- 'orderkey' : 'license',
- 'clclass': 'recipe_license', 'hidden': 0,
- },
- {
- 'name':'Layer',
- 'qhelp':'The name of the layer providing the recipe',
- 'orderfield': _get_toggle_order(request, "layer_version__layer__name"),
- 'ordericon':_get_toggle_order_icon(request, "layer_version__layer__name"),
- 'orderkey' : 'layer_version__layer__name',
- 'clclass': 'layer_version__layer__name', 'hidden': 0,
- },
- {
- 'name':'Layer branch',
- 'qhelp':'The Git branch of the layer providing the recipe',
- 'orderfield': _get_toggle_order(request, "layer_version__branch"),
- 'ordericon':_get_toggle_order_icon(request, "layer_version__branch"),
- 'orderkey' : 'layer_version__branch',
- 'clclass': 'layer_version__branch', 'hidden': 1,
- },
- {
- 'name':'Layer commit',
- 'qhelp':'The Git commit of the layer providing the recipe',
- 'clclass': 'layer_version__layer__commit', 'hidden': 1,
- },
- ]
- }
-
- response = render(request, template, context)
- _set_parameters_values(pagesize, orderby, request)
- return response
-
def configuration(request, build_id):
template = 'configuration.html'