diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2015-01-19 15:14:39 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-01-23 11:33:52 +0000 |
commit | 4dc8edb610f1a01c5f40fd54cc5198a1e2b0dd25 (patch) | |
tree | 09335d98ebbd9bef3e4152fe06d003a3e5c3c205 /bitbake | |
parent | 07bfa681958a852980f151e14becf069287952cd (diff) | |
download | poky-4dc8edb610f1a01c5f40fd54cc5198a1e2b0dd25.tar.gz |
bitbake: toastergui: save cookie for orderby/page size settings
We save the current settings as cookies on the server side
for the layers, targets and machines pages under Project pages.
[YOCTO #6961]
(Bitbake rev: 58b35c055e37b5e1552d8ba3db2e05ea4ee85023)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/targets.html | 2 | ||||
-rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 15 |
2 files changed, 11 insertions, 6 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/targets.html b/bitbake/lib/toaster/toastergui/templates/targets.html index cc339fbbb7..590ecb9a0e 100644 --- a/bitbake/lib/toaster/toastergui/templates/targets.html +++ b/bitbake/lib/toaster/toastergui/templates/targets.html | |||
@@ -39,7 +39,6 @@ | |||
39 | 39 | ||
40 | {% include "basetable_top.html" %} | 40 | {% include "basetable_top.html" %} |
41 | {% for o in objects %} | 41 | {% for o in objects %} |
42 | {% if o.name %} | ||
43 | <tr class="data"> | 42 | <tr class="data"> |
44 | <td class="target"> | 43 | <td class="target"> |
45 | {{o.name}} | 44 | {{o.name}} |
@@ -79,7 +78,6 @@ | |||
79 | </a> | 78 | </a> |
80 | </td> | 79 | </td> |
81 | </tr> | 80 | </tr> |
82 | {% endif %} | ||
83 | {% endfor %} | 81 | {% endfor %} |
84 | {% include "basetable_bottom.html" %} | 82 | {% include "basetable_bottom.html" %} |
85 | 83 | ||
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 5fcad63e45..4d00fbd551 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
@@ -2560,7 +2560,10 @@ if toastermain.settings.MANAGED: | |||
2560 | ] | 2560 | ] |
2561 | } | 2561 | } |
2562 | 2562 | ||
2563 | return render(request, template, context) | 2563 | response = render(request, template, context) |
2564 | _save_parameters_cookies(response, pagesize, orderby, request) | ||
2565 | |||
2566 | return response | ||
2564 | 2567 | ||
2565 | def layerdetails(request, layerid): | 2568 | def layerdetails(request, layerid): |
2566 | template = "layerdetails.html" | 2569 | template = "layerdetails.html" |
@@ -2626,7 +2629,7 @@ if toastermain.settings.MANAGED: | |||
2626 | (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe) | 2629 | (filter_string, search_term, ordering_string) = _search_tuple(request, Recipe) |
2627 | 2630 | ||
2628 | prj = Project.objects.get(pk = request.session['project_id']) | 2631 | prj = Project.objects.get(pk = request.session['project_id']) |
2629 | queryset_all = Recipe.objects.filter(Q(layer_version__up_branch__name= prj.release.name) | Q(layer_version__build__in = prj.build_set.all())) | 2632 | queryset_all = Recipe.objects.filter(Q(layer_version__up_branch__name= prj.release.name) | Q(layer_version__build__in = prj.build_set.all())).filter(name__regex=r'.{1,}.*') |
2630 | 2633 | ||
2631 | queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name') | 2634 | queryset_with_search = _get_queryset(Recipe, queryset_all, None, search_term, ordering_string, '-name') |
2632 | 2635 | ||
@@ -2711,8 +2714,10 @@ if toastermain.settings.MANAGED: | |||
2711 | } | 2714 | } |
2712 | }, ] | 2715 | }, ] |
2713 | 2716 | ||
2717 | response = render(request, template, context) | ||
2718 | _save_parameters_cookies(response, pagesize, orderby, request) | ||
2714 | 2719 | ||
2715 | return render(request, template, context) | 2720 | return response |
2716 | 2721 | ||
2717 | def machines(request): | 2722 | def machines(request): |
2718 | template = "machines.html" | 2723 | template = "machines.html" |
@@ -2783,8 +2788,10 @@ if toastermain.settings.MANAGED: | |||
2783 | 2788 | ||
2784 | ] | 2789 | ] |
2785 | } | 2790 | } |
2791 | response = render(request, template, context) | ||
2792 | _save_parameters_cookies(response, pagesize, orderby, request) | ||
2786 | 2793 | ||
2787 | return render(request, template, context) | 2794 | return response |
2788 | 2795 | ||
2789 | 2796 | ||
2790 | def get_project_configvars_context(): | 2797 | def get_project_configvars_context(): |