From 99bbf30b1da86c0c0d3e0df9bf9476c3cde45920 Mon Sep 17 00:00:00 2001 From: Alexandru DAMIAN Date: Mon, 19 Jan 2015 17:15:02 +0000 Subject: bitbake: toastergui: fix duplicate IDs all builds page This patch fixes the duplicate IDs found in the all builds page, originating in the "Project" column filter. Also fix misspell "Log1" instead of "Log". (Bitbake rev: bd681cb2ce349dd7de01c98d5089a368c4514c37) Signed-off-by: Alexandru DAMIAN Signed-off-by: Richard Purdie --- bitbake/lib/toaster/toastergui/views.py | 37 +++++++++------------------------ 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'bitbake') diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 4d00fbd551..7a11bbd807 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py @@ -1725,10 +1725,10 @@ if toastermain.settings.MANAGED: return _redirect_parameters( builds, request.GET, e.response) context['tablecols'].append( - {'name': 'Project', 'clclass': 'project', + {'name': 'Project', 'clclass': 'projectx', 'filter': {'class': 'project', 'label': 'Project:', - 'options': map(lambda x: (x.name,'',x.build_set.filter(outcome__lt=BuildRequest.REQ_INPROGRESS).count()), Project.objects.all()), + 'options': map(lambda x: (x.name,'project:%d' % x.id,x.build_set.filter(outcome__lt=BuildRequest.REQ_INPROGRESS).count()), Project.objects.all()), } } @@ -3152,6 +3152,14 @@ else: ] } }, + {'name': 'Log', + 'dclass': "span4", + 'qhelp': "Path to the build main log file", + 'clclass': 'log', 'hidden': 1, + 'orderfield': _get_toggle_order(request, "cooker_log_path"), + 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"), + 'orderkey' : 'cooker_log_path', + }, {'name': 'Time', 'clclass': 'time', 'hidden' : 1, 'qhelp': "How long it took the build to finish", 'orderfield': _get_toggle_order(request, "timespent", True), @@ -3165,31 +3173,6 @@ else: ] } - if not toastermain.settings.MANAGED: - context['tablecols'].insert(-2, - {'name': 'Log1', - 'dclass': "span4", - 'qhelp': "Path to the build main log file", - 'clclass': 'log', 'hidden': 1, - 'orderfield': _get_toggle_order(request, "cooker_log_path"), - 'ordericon':_get_toggle_order_icon(request, "cooker_log_path"), - 'orderkey' : 'cooker_log_path', - } - ) - - - if toastermain.settings.MANAGED: - context['tablecols'].append( - {'name': 'Project', 'clclass': 'project', - 'filter': {'class': 'project', - 'label': 'Project:', - 'options': map(lambda x: (x.name,'',x.build_set.filter(outcome__lt=Build.IN_PROGRESS).count()), Project.objects.all()), - - } - } - ) - - response = render(request, template, context) _save_parameters_cookies(response, pagesize, orderby, request) return response -- cgit v1.2.3-54-g00ecf