diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
| -rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index bd65c08b06..cad23570f8 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
| @@ -1772,6 +1772,7 @@ if toastermain.settings.MANAGED: | |||
| 1772 | from django.contrib.auth.decorators import login_required | 1772 | from django.contrib.auth.decorators import login_required |
| 1773 | 1773 | ||
| 1774 | from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable | 1774 | from orm.models import Project, ProjectLayer, ProjectTarget, ProjectVariable |
| 1775 | from orm.models import Branch, LayerSource, ToasterSetting | ||
| 1775 | from bldcontrol.models import BuildRequest | 1776 | from bldcontrol.models import BuildRequest |
| 1776 | 1777 | ||
| 1777 | import traceback | 1778 | import traceback |
| @@ -1791,6 +1792,8 @@ if toastermain.settings.MANAGED: | |||
| 1791 | context = { | 1792 | context = { |
| 1792 | 'email': request.user.email if request.user.is_authenticated() else '', | 1793 | 'email': request.user.email if request.user.is_authenticated() else '', |
| 1793 | 'username': request.user.username if request.user.is_authenticated() else '', | 1794 | 'username': request.user.username if request.user.is_authenticated() else '', |
| 1795 | 'branches': Branch.objects.order_by("-up_id"), | ||
| 1796 | 'defaultbranch': ToasterSetting.objects.get(name = "DEFAULT_RELEASE").value, | ||
| 1794 | } | 1797 | } |
| 1795 | 1798 | ||
| 1796 | 1799 | ||
| @@ -1816,7 +1819,7 @@ if toastermain.settings.MANAGED: | |||
| 1816 | 1819 | ||
| 1817 | # save the project | 1820 | # save the project |
| 1818 | prj = Project.objects.create_project(name = request.POST['projectname'], | 1821 | prj = Project.objects.create_project(name = request.POST['projectname'], |
| 1819 | branch = request.POST['projectversion'].split(" ")[0], | 1822 | branch = Branch.objects.get(pk = request.POST['projectversion'].split(" ")[0]), |
| 1820 | short_description=request.POST['projectversion'].split(" ")[1:]) | 1823 | short_description=request.POST['projectversion'].split(" ")[1:]) |
| 1821 | prj.user_id = request.user.pk | 1824 | prj.user_id = request.user.pk |
| 1822 | prj.save() | 1825 | prj.save() |
| @@ -1919,6 +1922,26 @@ if toastermain.settings.MANAGED: | |||
| 1919 | except Exception as e: | 1922 | except Exception as e: |
| 1920 | return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json") | 1923 | return HttpResponse(json.dumps({"error":str(e) + "\n" + traceback.format_exc()}), content_type = "application/json") |
| 1921 | 1924 | ||
| 1925 | def importlayer(request): | ||
| 1926 | raise Exception("TODO: implement page #6595") | ||
| 1927 | |||
| 1928 | def layers(request): | ||
| 1929 | raise Exception("TODO: implement page #6590") | ||
| 1930 | |||
| 1931 | def layerdetails(request, layerid): | ||
| 1932 | raise Exception("TODO: implement page #6591") | ||
| 1933 | |||
| 1934 | def targets(request): | ||
| 1935 | raise Exception("TODO: implement page #6592") | ||
| 1936 | |||
| 1937 | def machines(request): | ||
| 1938 | raise Exception("TODO: implement page #6593") | ||
| 1939 | |||
| 1940 | def projectconf(request, pid): | ||
| 1941 | raise Exception("TODO: implement page #6588") | ||
| 1942 | |||
| 1943 | def projectbuilds(request, pid): | ||
| 1944 | raise Exception("TODO: implement page #6589") | ||
| 1922 | 1945 | ||
| 1923 | else: | 1946 | else: |
| 1924 | # these are pages that are NOT available in interactive mode | 1947 | # these are pages that are NOT available in interactive mode |
| @@ -1940,3 +1963,26 @@ else: | |||
| 1940 | def xhr_projectedit(request, pid): | 1963 | def xhr_projectedit(request, pid): |
| 1941 | raise Exception("page not available in interactive mode") | 1964 | raise Exception("page not available in interactive mode") |
| 1942 | 1965 | ||
| 1966 | def importlayer(request): | ||
| 1967 | raise Exception("page not available in interactive mode") | ||
| 1968 | |||
| 1969 | def layers(request): | ||
| 1970 | raise Exception("page not available in interactive mode") | ||
| 1971 | |||
| 1972 | def layerdetails(request): | ||
| 1973 | raise Exception("page not available in interactive mode") | ||
| 1974 | |||
| 1975 | def targets(request): | ||
| 1976 | raise Exception("page not available in interactive mode") | ||
| 1977 | |||
| 1978 | def targetdetails(request): | ||
| 1979 | raise Exception("page not available in interactive mode") | ||
| 1980 | |||
| 1981 | def machines(request): | ||
| 1982 | raise Exception("page not available in interactive mode") | ||
| 1983 | |||
| 1984 | def projectconf(request): | ||
| 1985 | raise Exception("page not available in interactive mode") | ||
| 1986 | |||
| 1987 | def projectbuilds(request): | ||
| 1988 | raise Exception("page not available in interactive mode") | ||
