diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2015-12-02 10:02:50 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-12-07 17:37:10 +0000 |
| commit | 4c1e5ec29ace325d03a5a1386e384201a00f15cf (patch) | |
| tree | eafadc88924ac99464de68d1ab2108808cec41d0 /bitbake/lib/toaster/toastergui/views.py | |
| parent | 990289511b7dc56580f2cecdda75fa14f436966d (diff) | |
| download | poky-4c1e5ec29ace325d03a5a1386e384201a00f15cf.tar.gz | |
bitbake: toaster: remove usage of BUILD_MODE variable
As both modes can be used at the same time we can't have any
difference in UI between modes.
Removed all conditional statements that used BUILD_MODE.
(Bitbake rev: 4ce1559c2558bd0fd278ff02a1a93bec03c4156b)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
| -rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 0e255f1b86..69f5af0f3a 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
| @@ -76,10 +76,6 @@ def landing(request): | |||
| 76 | default_project = Project.objects.get_default_project() | 76 | default_project = Project.objects.get_default_project() |
| 77 | default_project_builds = Build.objects.filter(project = default_project) | 77 | default_project_builds = Build.objects.filter(project = default_project) |
| 78 | 78 | ||
| 79 | if (not toastermain.settings.BUILD_MODE) and default_project_builds.count() > 0: | ||
| 80 | args = (default_project.id,) | ||
| 81 | return redirect(reverse('projectbuilds', args = args), permanent = False) | ||
| 82 | |||
| 83 | # we only redirect to projects page if there is a user-generated project | 79 | # we only redirect to projects page if there is a user-generated project |
| 84 | num_builds = Build.objects.all().count() | 80 | num_builds = Build.objects.all().count() |
| 85 | user_projects = Project.objects.filter(is_default = False) | 81 | user_projects = Project.objects.filter(is_default = False) |
| @@ -102,9 +98,6 @@ def _get_latest_builds(prj=None): | |||
| 102 | if prj is not None: | 98 | if prj is not None: |
| 103 | queryset = queryset.filter(project = prj) | 99 | queryset = queryset.filter(project = prj) |
| 104 | 100 | ||
| 105 | if not toastermain.settings.BUILD_MODE: | ||
| 106 | queryset = queryset.exclude(project__is_default=False) | ||
| 107 | |||
| 108 | return list(itertools.chain( | 101 | return list(itertools.chain( |
| 109 | queryset.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"), | 102 | queryset.filter(outcome=Build.IN_PROGRESS).order_by("-started_on"), |
| 110 | queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-started_on")[:3] )) | 103 | queryset.filter(outcome__lt=Build.IN_PROGRESS).order_by("-started_on")[:3] )) |
| @@ -1893,10 +1886,6 @@ def managedcontextprocessor(request): | |||
| 1893 | "projects": projects, | 1886 | "projects": projects, |
| 1894 | "non_cli_projects": projects.exclude(is_default=True), | 1887 | "non_cli_projects": projects.exclude(is_default=True), |
| 1895 | "DEBUG" : toastermain.settings.DEBUG, | 1888 | "DEBUG" : toastermain.settings.DEBUG, |
| 1896 | |||
| 1897 | # True if Toaster is in build mode, False otherwise | ||
| 1898 | "BUILD_MODE": toastermain.settings.BUILD_MODE, | ||
| 1899 | |||
| 1900 | "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE, | 1889 | "CUSTOM_IMAGE" : toastermain.settings.CUSTOM_IMAGE, |
| 1901 | "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH, | 1890 | "TOASTER_BRANCH": toastermain.settings.TOASTER_BRANCH, |
| 1902 | "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION, | 1891 | "TOASTER_REVISION" : toastermain.settings.TOASTER_REVISION, |
| @@ -1939,11 +1928,6 @@ if True: | |||
| 1939 | 1928 | ||
| 1940 | queryset = Build.objects.all() | 1929 | queryset = Build.objects.all() |
| 1941 | 1930 | ||
| 1942 | # if in analysis mode, exclude builds for all projects except | ||
| 1943 | # command line builds | ||
| 1944 | if not toastermain.settings.BUILD_MODE: | ||
| 1945 | queryset = queryset.exclude(project__is_default=False) | ||
| 1946 | |||
| 1947 | redirect_page = resolve(request.path_info).url_name | 1931 | redirect_page = resolve(request.path_info).url_name |
| 1948 | 1932 | ||
| 1949 | context, pagesize, orderby = _build_list_helper(request, | 1933 | context, pagesize, orderby = _build_list_helper(request, |
| @@ -3048,10 +3032,6 @@ if True: | |||
| 3048 | queryset_all = queryset_all.filter(Q(is_default=False) | | 3032 | queryset_all = queryset_all.filter(Q(is_default=False) | |
| 3049 | q_default_with_builds) | 3033 | q_default_with_builds) |
| 3050 | 3034 | ||
| 3051 | # if in BUILD_MODE, exclude everything but the command line builds project | ||
| 3052 | if not toastermain.settings.BUILD_MODE: | ||
| 3053 | queryset_all = queryset_all.exclude(is_default=False) | ||
| 3054 | |||
| 3055 | # boilerplate code that takes a request for an object type and returns a queryset | 3035 | # boilerplate code that takes a request for an object type and returns a queryset |
| 3056 | # for that object type. copypasta for all needed table searches | 3036 | # for that object type. copypasta for all needed table searches |
| 3057 | (filter_string, search_term, ordering_string) = _search_tuple(request, Project) | 3037 | (filter_string, search_term, ordering_string) = _search_tuple(request, Project) |
