summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru DAMIAN <alexandru.damian@intel.com>2015-01-20 18:08:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-01-23 11:33:53 +0000
commit2dba91727d2e5caa452574237f5915576c7484fe (patch)
treea3000f2202291de7164c16621a89da6c5f174c86
parent08e5a49afbc4c2b777be61785ecd7854837d6250 (diff)
downloadpoky-2dba91727d2e5caa452574237f5915576c7484fe.tar.gz
bitbake: toastergui: minor fixes
This is a minor fixes patch. - legacy sorting by "timespent" does not crash the builds pages - missing xhr_configvaredit view in observer mode is added (Bitbake rev: bd4ff7a15e74e1d4af8ea3dbaaed141678046a9b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 616b57ca2f..f84b120bd6 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -1743,7 +1743,8 @@ if toastermain.settings.MANAGED:
1743 # helper function, to be used on "all builds" and "project builds" pages 1743 # helper function, to be used on "all builds" and "project builds" pages
1744 def _build_list_helper(request, buildrequests): 1744 def _build_list_helper(request, buildrequests):
1745 # ATTN: we use here the ordering parameters for interactive mode; the translation for BuildRequest fields will happen below 1745 # ATTN: we use here the ordering parameters for interactive mode; the translation for BuildRequest fields will happen below
1746 (pagesize, orderby) = _get_parameters_values(request, 10, 'completed_on:-') 1746 default_orderby = 'completed_on:-'
1747 (pagesize, orderby) = _get_parameters_values(request, 10, default_orderby)
1747 mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby } 1748 mandatory_parameters = { 'count': pagesize, 'page' : 1, 'orderby' : orderby }
1748 retval = _verify_parameters( request.GET, mandatory_parameters ) 1749 retval = _verify_parameters( request.GET, mandatory_parameters )
1749 if retval: 1750 if retval:
@@ -1764,6 +1765,9 @@ if toastermain.settings.MANAGED:
1764 ordering_params[0] = "build__machine" 1765 ordering_params[0] = "build__machine"
1765 if ordering_params[0] == "target__target": 1766 if ordering_params[0] == "target__target":
1766 ordering_params[0] = "brtarget__target" 1767 ordering_params[0] = "brtarget__target"
1768 if ordering_params[0] == "timespent":
1769 ordering_params[0] = "id"
1770 orderby = default_orderby
1767 1771
1768 request.GET = request.GET.copy() # get a mutable copy of the GET QueryDict 1772 request.GET = request.GET.copy() # get a mutable copy of the GET QueryDict
1769 request.GET['orderby'] = ":".join(ordering_params) 1773 request.GET['orderby'] = ":".join(ordering_params)
@@ -3204,6 +3208,9 @@ else:
3204 def xhr_datatypeahead(request): 3208 def xhr_datatypeahead(request):
3205 raise Exception("page not available in interactive mode") 3209 raise Exception("page not available in interactive mode")
3206 3210
3211 def xhr_configvaredit(request):
3212 raise Exception("page not available in interactive mode")
3213
3207 def importlayer(request): 3214 def importlayer(request):
3208 raise Exception("page not available in interactive mode") 3215 raise Exception("page not available in interactive mode")
3209 3216