diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index de1e4139a1..3a25d5ea1e 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -1274,117 +1274,6 @@ def diskio(request, build_id): | |||
1274 | def cputime(request, build_id): | 1274 | def cputime(request, build_id): |
1275 | return tasks_common(request, build_id, 'cputime', '') | 1275 | return tasks_common(request, build_id, 'cputime', '') |
1276 | 1276 | ||
1277 | def recipes(request, build_id): | ||
1278 | template = 'recipes.html' | ||
1279 | (pagesize, orderby) = _get_parameters_values(request, 100, 'name:+') | ||
1280 | mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby } | ||
1281 | retval = _verify_parameters( request.GET, mandatory_parameters ) | ||
1282 | if retval: | ||
1283 | return _redirect_parameters( 'recipes', request.GET, mandatory_parameters, build_id = build_id) | ||
1284 | (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe) | ||
1285 | |||
1286 | build = Build.objects.get(pk=build_id) | ||
1287 | |||
1288 | queryset = build.get_recipes() | ||
1289 | queryset = _get_queryset(Recipe, queryset, filter_string, search_term, ordering_string, 'name') | ||
1290 | |||
1291 | recipes = _build_page_range(Paginator(queryset, pagesize),request.GET.get('page', 1)) | ||
1292 | |||
1293 | # prefetch the forward and reverse recipe dependencies | ||
1294 | deps = { } | ||
1295 | revs = { } | ||
1296 | queryset_dependency=Recipe_Dependency.objects.filter(recipe__layer_version__build_id = build_id).select_related("depends_on", "recipe") | ||
1297 | for recipe in recipes: | ||
1298 | deplist = [ ] | ||
1299 | for recipe_dep in [x for x in queryset_dependency if x.recipe_id == recipe.id]: | ||
1300 | deplist.append(recipe_dep) | ||
1301 | deps[recipe.id] = deplist | ||
1302 | revlist = [ ] | ||
1303 | for recipe_dep in [x for x in queryset_dependency if x.depends_on_id == recipe.id]: | ||
1304 | revlist.append(recipe_dep) | ||
1305 | revs[recipe.id] = revlist | ||
1306 | |||
1307 | context = { | ||
1308 | 'objectname': 'recipes', | ||
1309 | 'build': build, | ||
1310 | 'project': build.project, | ||
1311 | 'objects': recipes, | ||
1312 | 'default_orderby' : 'name:+', | ||
1313 | 'recipe_deps' : deps, | ||
1314 | 'recipe_revs' : revs, | ||
1315 | 'tablecols':[ | ||
1316 | { | ||
1317 | 'name':'Recipe', | ||
1318 | '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', | ||
1319 | 'orderfield': _get_toggle_order(request, "name"), | ||
1320 | 'ordericon':_get_toggle_order_icon(request, "name"), | ||
1321 | }, | ||
1322 | { | ||
1323 | 'name':'Recipe version', | ||
1324 | 'qhelp':'The recipe version and revision', | ||
1325 | }, | ||
1326 | { | ||
1327 | 'name':'Dependencies', | ||
1328 | 'qhelp':'Recipe build-time dependencies (i.e. other recipes)', | ||
1329 | 'clclass': 'depends_on', 'hidden': 1, | ||
1330 | }, | ||
1331 | { | ||
1332 | 'name':'Reverse dependencies', | ||
1333 | 'qhelp':'Recipe build-time reverse dependencies (i.e. the recipes that depend on this recipe)', | ||
1334 | 'clclass': 'depends_by', 'hidden': 1, | ||
1335 | }, | ||
1336 | { | ||
1337 | 'name':'Recipe file', | ||
1338 | 'qhelp':'Path to the recipe .bb file', | ||
1339 | 'orderfield': _get_toggle_order(request, "file_path"), | ||
1340 | 'ordericon':_get_toggle_order_icon(request, "file_path"), | ||
1341 | 'orderkey' : 'file_path', | ||
1342 | 'clclass': 'recipe_file', 'hidden': 0, | ||
1343 | }, | ||
1344 | { | ||
1345 | 'name':'Section', | ||
1346 | 'qhelp':'The section in which recipes should be categorized', | ||
1347 | 'orderfield': _get_toggle_order(request, "section"), | ||
1348 | 'ordericon':_get_toggle_order_icon(request, "section"), | ||
1349 | 'orderkey' : 'section', | ||
1350 | 'clclass': 'recipe_section', 'hidden': 0, | ||
1351 | }, | ||
1352 | { | ||
1353 | 'name':'License', | ||
1354 | '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', | ||
1355 | 'orderfield': _get_toggle_order(request, "license"), | ||
1356 | 'ordericon':_get_toggle_order_icon(request, "license"), | ||
1357 | 'orderkey' : 'license', | ||
1358 | 'clclass': 'recipe_license', 'hidden': 0, | ||
1359 | }, | ||
1360 | { | ||
1361 | 'name':'Layer', | ||
1362 | 'qhelp':'The name of the layer providing the recipe', | ||
1363 | 'orderfield': _get_toggle_order(request, "layer_version__layer__name"), | ||
1364 | 'ordericon':_get_toggle_order_icon(request, "layer_version__layer__name"), | ||
1365 | 'orderkey' : 'layer_version__layer__name', | ||
1366 | 'clclass': 'layer_version__layer__name', 'hidden': 0, | ||
1367 | }, | ||
1368 | { | ||
1369 | 'name':'Layer branch', | ||
1370 | 'qhelp':'The Git branch of the layer providing the recipe', | ||
1371 | 'orderfield': _get_toggle_order(request, "layer_version__branch"), | ||
1372 | 'ordericon':_get_toggle_order_icon(request, "layer_version__branch"), | ||
1373 | 'orderkey' : 'layer_version__branch', | ||
1374 | 'clclass': 'layer_version__branch', 'hidden': 1, | ||
1375 | }, | ||
1376 | { | ||
1377 | 'name':'Layer commit', | ||
1378 | 'qhelp':'The Git commit of the layer providing the recipe', | ||
1379 | 'clclass': 'layer_version__layer__commit', 'hidden': 1, | ||
1380 | }, | ||
1381 | ] | ||
1382 | } | ||
1383 | |||
1384 | response = render(request, template, context) | ||
1385 | _set_parameters_values(pagesize, orderby, request) | ||
1386 | return response | ||
1387 | |||
1388 | def configuration(request, build_id): | 1277 | def configuration(request, build_id): |
1389 | template = 'configuration.html' | 1278 | template = 'configuration.html' |
1390 | 1279 | ||