diff options
Diffstat (limited to 'bitbake/lib')
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 1e9df3fc5e..a07f720543 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2304,7 +2304,7 @@ if toastermain.settings.MANAGED: | |||
2304 | # and show only the selected layers for this project | 2304 | # and show only the selected layers for this project |
2305 | final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all]) | 2305 | final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset_all]) |
2306 | 2306 | ||
2307 | return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, final_list) }), content_type = "application/json") | 2307 | return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, sorted(final_list, key = lambda x: x.layer.name)) }), content_type = "application/json") |
2308 | 2308 | ||
2309 | 2309 | ||
2310 | # returns layer dependencies for a layer, excluding current project layers | 2310 | # returns layer dependencies for a layer, excluding current project layers |
@@ -2314,7 +2314,7 @@ if toastermain.settings.MANAGED: | |||
2314 | 2314 | ||
2315 | final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset]) | 2315 | final_list = set([x.get_equivalents_wpriority(prj)[0] for x in queryset]) |
2316 | 2316 | ||
2317 | return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, final_list) }), content_type = "application/json") | 2317 | return HttpResponse(jsonfilter( { "error":"ok", "list" : map( _lv_to_dict, sorted(final_list, key = lambda x: x.layer.name)) }), content_type = "application/json") |
2318 | 2318 | ||
2319 | 2319 | ||
2320 | 2320 | ||
@@ -2361,7 +2361,7 @@ if toastermain.settings.MANAGED: | |||
2361 | 2361 | ||
2362 | # if we have more than one hit here (for distinct name and version), max the id it out | 2362 | # if we have more than one hit here (for distinct name and version), max the id it out |
2363 | queryset_all_maxids = queryset_all.values('name').distinct().annotate(max_id=Max('id')).values_list('max_id') | 2363 | queryset_all_maxids = queryset_all.values('name').distinct().annotate(max_id=Max('id')).values_list('max_id') |
2364 | queryset_all = queryset_all.filter(id__in = queryset_all_maxids) | 2364 | queryset_all = queryset_all.filter(id__in = queryset_all_maxids).order_by("name") |
2365 | 2365 | ||
2366 | 2366 | ||
2367 | return HttpResponse(jsonfilter({ "error":"ok", | 2367 | return HttpResponse(jsonfilter({ "error":"ok", |
@@ -2374,7 +2374,7 @@ if toastermain.settings.MANAGED: | |||
2374 | if request.GET['type'] == "machines": | 2374 | if request.GET['type'] == "machines": |
2375 | queryset_all = Machine.objects.all() | 2375 | queryset_all = Machine.objects.all() |
2376 | if 'project_id' in request.session: | 2376 | if 'project_id' in request.session: |
2377 | queryset_all = queryset_all.filter(layer_version__in = prj.projectlayer_equivalent_set()) | 2377 | queryset_all = queryset_all.filter(layer_version__in = prj.projectlayer_equivalent_set()).order_by("name") |
2378 | 2378 | ||
2379 | return HttpResponse(jsonfilter({ "error":"ok", | 2379 | return HttpResponse(jsonfilter({ "error":"ok", |
2380 | "list" : map ( lambda x: {"id": x.pk, "name": x.name, "detail":"[" + x.layer_version.layer.name+ (" | " + x.layer_version.up_branch.name + "]" if x.layer_version.up_branch is not None else "]")}, | 2380 | "list" : map ( lambda x: {"id": x.pk, "name": x.name, "detail":"[" + x.layer_version.layer.name+ (" | " + x.layer_version.up_branch.name + "]" if x.layer_version.up_branch is not None else "]")}, |