From 8075fca3b427cdedb19c50bf8c8ede5476aaf7ad Mon Sep 17 00:00:00 2001 From: Magnus Granberg Date: Fri, 6 Jan 2017 18:38:55 +0100 Subject: Redone the layout --- python/gentoo_www/models.py | 12 +- python/tbc_www/forms.py | 33 ++ python/tbc_www/models.py | 51 ++- python/tbc_www/urls.py | 24 +- python/tbc_www/views.py | 459 +++++++++++--------- python/templates/includes/frontpage/new_build_req | 23 +- python/templates/includes/frontpage/new_logs | 32 +- python/templates/includes/frontpage/new_packages | 20 +- python/templates/includes/frontpage/new_repoman | 8 +- .../templates/includes/frontpage/updated_packages | 77 ++++ python/templates/includes/layout/footer.html | 23 +- .../templates/includes/layout/footer_sitemap.html | 12 - python/templates/includes/layout/head.html | 4 + python/templates/includes/layout/header.html | 26 +- python/templates/includes/navigation/primary | 2 +- python/templates/includes/navigation/secondary | 13 +- python/templates/layout/base.html | 4 +- python/templates/pages/donate/cancel.html | 13 - python/templates/pages/donate/index.html | 116 ----- python/templates/pages/donate/thanks.html | 21 - python/templates/pages/downloads/index.html | 75 ---- .../templates/pages/downloads/mirrors/index.html | 98 ----- .../pages/downloads/signatures/index.html | 74 ---- .../pages/get-involved/become-developer/index.md | 54 --- .../pages/get-involved/contribute/index.html | 271 ------------ .../get-involved/discussion-forums/index.html | 10 - .../pages/get-involved/get-code/index.html | 69 --- python/templates/pages/get-involved/index.html | 52 --- .../get-involved/irc-channels/all-channels.html | 73 ---- .../pages/get-involved/irc-channels/index.html | 69 --- .../get-involved/mailing-lists/all-lists.html | 76 ---- .../pages/get-involved/mailing-lists/index.html | 72 ---- .../get-involved/mailing-lists/instructions.md | 155 ------- .../templates/pages/get-started/about/index.html | 77 ---- python/templates/pages/get-started/faq/index.html | 8 - python/templates/pages/get-started/index.html | 100 ----- .../pages/get-started/philosophy/index.md | 20 - .../get-started/philosophy/social-contract.md | 50 --- .../pages/get-started/screenshots/index.html | 71 --- python/templates/pages/home/index.html | 82 +++- .../pages/inside-gentoo/artwork/index.html | 478 --------------------- .../pages/inside-gentoo/contact/index.html | 143 ------ .../pages/inside-gentoo/developers/herds.html | 65 --- .../pages/inside-gentoo/developers/index.html | 55 --- .../pages/inside-gentoo/developers/map.html | 55 --- .../developers/retired-developers.html | 31 -- .../developers/unavailable-developers.html | 32 -- .../pages/inside-gentoo/foundation/index.md | 166 ------- .../foundation/name-logo-guidelines.md | 84 ---- python/templates/pages/inside-gentoo/index.html | 46 -- .../pages/inside-gentoo/projects/index.html | 10 - .../inside-gentoo/sponsors/former-sponsors.html | 21 - .../pages/inside-gentoo/sponsors/index.html | 49 --- .../templates/pages/inside-gentoo/stores/index.md | 63 --- python/templates/pages/new/index.html | 25 -- python/templates/pages/new/logs/build/index.html | 90 ---- python/templates/pages/new/logs/index.html | 46 -- python/templates/pages/new/repoman/index.html | 25 -- .../templates/pages/packages/category/index.html | 47 -- .../pages/packages/ebuilds/ebuild/index.html | 75 ---- python/templates/pages/packages/ebuilds/index.html | 56 --- python/templates/pages/packages/index.html | 28 -- .../pages/support/documentation/index.html | 72 ---- python/templates/pages/support/index.html | 78 ---- .../templates/pages/support/news-items/index.html | 49 --- .../pages/support/package-database/index.html | 7 - .../pages/support/rsync-mirrors/index.html | 93 ---- python/templates/pages/support/security/index.html | 133 ------ .../pages/support/security/stay-informed.html | 85 ---- .../security/vulnerability-treatment-policy.html | 421 ------------------ python/templates/registration/bugzillauser.html | 10 + python/templates/registration/logged_out.html | 5 + python/templates/registration/login.html | 12 + 73 files changed, 606 insertions(+), 4578 deletions(-) create mode 100644 python/tbc_www/forms.py create mode 100644 python/templates/includes/frontpage/updated_packages delete mode 100644 python/templates/includes/layout/footer_sitemap.html delete mode 100644 python/templates/pages/donate/cancel.html delete mode 100644 python/templates/pages/donate/index.html delete mode 100644 python/templates/pages/donate/thanks.html delete mode 100644 python/templates/pages/downloads/index.html delete mode 100644 python/templates/pages/downloads/mirrors/index.html delete mode 100644 python/templates/pages/downloads/signatures/index.html delete mode 100644 python/templates/pages/get-involved/become-developer/index.md delete mode 100644 python/templates/pages/get-involved/contribute/index.html delete mode 100644 python/templates/pages/get-involved/discussion-forums/index.html delete mode 100644 python/templates/pages/get-involved/get-code/index.html delete mode 100644 python/templates/pages/get-involved/index.html delete mode 100644 python/templates/pages/get-involved/irc-channels/all-channels.html delete mode 100644 python/templates/pages/get-involved/irc-channels/index.html delete mode 100644 python/templates/pages/get-involved/mailing-lists/all-lists.html delete mode 100644 python/templates/pages/get-involved/mailing-lists/index.html delete mode 100644 python/templates/pages/get-involved/mailing-lists/instructions.md delete mode 100644 python/templates/pages/get-started/about/index.html delete mode 100644 python/templates/pages/get-started/faq/index.html delete mode 100644 python/templates/pages/get-started/index.html delete mode 100644 python/templates/pages/get-started/philosophy/index.md delete mode 100644 python/templates/pages/get-started/philosophy/social-contract.md delete mode 100644 python/templates/pages/get-started/screenshots/index.html delete mode 100644 python/templates/pages/inside-gentoo/artwork/index.html delete mode 100644 python/templates/pages/inside-gentoo/contact/index.html delete mode 100644 python/templates/pages/inside-gentoo/developers/herds.html delete mode 100644 python/templates/pages/inside-gentoo/developers/index.html delete mode 100644 python/templates/pages/inside-gentoo/developers/map.html delete mode 100644 python/templates/pages/inside-gentoo/developers/retired-developers.html delete mode 100644 python/templates/pages/inside-gentoo/developers/unavailable-developers.html delete mode 100644 python/templates/pages/inside-gentoo/foundation/index.md delete mode 100644 python/templates/pages/inside-gentoo/foundation/name-logo-guidelines.md delete mode 100644 python/templates/pages/inside-gentoo/index.html delete mode 100644 python/templates/pages/inside-gentoo/projects/index.html delete mode 100644 python/templates/pages/inside-gentoo/sponsors/former-sponsors.html delete mode 100644 python/templates/pages/inside-gentoo/sponsors/index.html delete mode 100644 python/templates/pages/inside-gentoo/stores/index.md delete mode 100644 python/templates/pages/new/index.html delete mode 100644 python/templates/pages/new/logs/build/index.html delete mode 100644 python/templates/pages/new/logs/index.html delete mode 100644 python/templates/pages/new/repoman/index.html delete mode 100644 python/templates/pages/packages/category/index.html delete mode 100644 python/templates/pages/packages/ebuilds/ebuild/index.html delete mode 100644 python/templates/pages/packages/ebuilds/index.html delete mode 100644 python/templates/pages/packages/index.html delete mode 100644 python/templates/pages/support/documentation/index.html delete mode 100644 python/templates/pages/support/index.html delete mode 100644 python/templates/pages/support/news-items/index.html delete mode 100644 python/templates/pages/support/package-database/index.html delete mode 100644 python/templates/pages/support/rsync-mirrors/index.html delete mode 100644 python/templates/pages/support/security/index.html delete mode 100644 python/templates/pages/support/security/stay-informed.html delete mode 100644 python/templates/pages/support/security/vulnerability-treatment-policy.html create mode 100644 python/templates/registration/bugzillauser.html create mode 100644 python/templates/registration/logged_out.html create mode 100644 python/templates/registration/login.html diff --git a/python/gentoo_www/models.py b/python/gentoo_www/models.py index dd90bb6..2bc345e 100644 --- a/python/gentoo_www/models.py +++ b/python/gentoo_www/models.py @@ -1,4 +1,4 @@ -# Copyright 1998-2015 Gentoo Foundation +# Copyright 1998-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from django.db import models @@ -109,8 +109,16 @@ class Posts(models.Model): title = models.CharField(max_length=200, db_column='title') url = models.CharField(max_length=200, db_column='url') text = models.TextField(db_column='text') - TimeStamp = models.DateTimeField(db_column=u'time_stamp') + TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table='posts' def __str__(self): return '%s %s %s %s %s' % (self.PostId, self.title, self.url, self.text, self.TimeStamp) + +class Bugzilla(models.Model): + Username = models.CharField(max_length=150,db_column='username') + Bugzillaname = models.CharField(max_length=150, db_column='bugzillaname') + class Meta: + db_table='bugzillauser' + def __str__(self): + return '%s %s' % (self.Username, self.Bugzillauser) diff --git a/python/tbc_www/forms.py b/python/tbc_www/forms.py new file mode 100644 index 0000000..0a91b3b --- /dev/null +++ b/python/tbc_www/forms.py @@ -0,0 +1,33 @@ +from django import forms + +class NameForm(forms.Form): + packages_search = forms.CharField(label='Find Packages', max_length=100) + +class BugForm(forms.Form): + ChoicesComponent = (('Application', 'Application'), + ('baselayout', 'baselayout'), + ('Core system', 'Core system'), + ('Eclasses and Profiles', 'Eclasses and Profiles'), + ('Games', 'Games'), + ('GCC Porting', 'GCC Porting'), + ('GNOME', 'GNOME'), + ('Hardened', 'Hardened'), + ('Java', 'Java'), + ('KDE', 'KDE'), + ('SELinux', 'SELinux'), + ('Server', 'Server'), + ('Unspecified', 'Unspecified')) + + Product = forms.CharField(max_length=100, label='Product') + Component = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='Component') + Version = forms.CharField(label='Version') + Summary = forms.CharField(label='Summary') + Description = forms.CharField(widget=forms.Textarea, label='Description') + EmergeInfo = forms.CharField(widget=forms.Textarea, label='emerge --info') + AssigendTo = forms.EmailField(label='Assigned To') + def __unicode__(self): + return u'Product : %s, Component : %s, Version : %s, Summary : %s, Description : %s, EmergeInfo : %s, AssigendTo : %s' % (self.Product, self.Component, self.Version, self.Summary, self.Description, self.EmergeInfo, self.AssigendTo) + +class BugzillaUser(forms.Form): + BugzillaName = forms.CharField(label='Bugzilla Name', max_length=100) + BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index a0a25f3..b54c772 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -1,4 +1,4 @@ -# Copyright 1998-2015 Gentoo Foundation +# Copyright 1998-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from django.db import models @@ -48,10 +48,11 @@ class PackagesMetadata(models.Model): PackageId = models.ForeignKey(Packages, db_column='package_id') Gitlog = models.TextField(db_column='gitlog') Descriptions = models.TextField(db_column='descriptions') + New = models.BooleanField(db_column='new') class Meta: db_table = 'packages_metadata' def __str__(self): - return '%s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions) + return '%s %s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions, self.New) class Ebuilds(models.Model): EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') @@ -68,13 +69,18 @@ class Ebuilds(models.Model): class EbuildsMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') - Commit = models.CharField(max_length=30, db_column='commit') + Commit = models.CharField(max_length=30, db_column='git_commit') + CommitMsg = models.CharField(max_length=100, db_column='git_commit_msg') New = models.BooleanField(db_column='new') + Updated = models.BooleanField(db_column='updated') Descriptions = models.CharField(max_length=200, db_column='descriptions') + Slot = models.CharField(max_length=10, db_column='slot') + Homepage = models.CharField(max_length=200, db_column='homepage') + License = models.CharField(max_length=200, db_column='license') class Meta: db_table = 'ebuilds_metadata' def __str__(self): - return '%s %s %s %s %s' % (self.Id, self.EbuildId, self.Commit, self.New, self.Descriptions) + return '%s %s %s %s %s %s %s %s %s %s' % (self.Id, self.EbuildId, self.Commit, self.CommitMsg, self.New, self.Updated, self.Descriptions, self.Slot, self.Homepage, self.License) class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') @@ -83,11 +89,12 @@ class BuildLogs(models.Model): SummeryText = models.TextField(db_column='summery_text') LogHash = models.CharField(max_length=100, db_column='log_hash') BugId = models.IntegerField( db_column='bug_id') + New = models.BooleanField(db_column='new') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'build_logs' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.TimeStamp) + return '%s %s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.New, self.TimeStamp) class BuildLogsRepoman(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') @@ -218,11 +225,12 @@ class BuildJobs(models.Model): Status = models.CharField(max_length=21, db_column='status') BuildNow = models.BooleanField(db_column='build_now') RemoveBin = models.BooleanField(db_column='removebin') + New = models.BooleanField(db_column='new') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'build_jobs' def __str__(self): - return '%s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) + return '%s %s %s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.SetupId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.New, self.TimeStamp) class BuildJobsUse(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') @@ -278,3 +286,34 @@ class EbuildsRestrictions(models.Model): db_table = 'ebuilds_restrictions' def __str__(self): return '%s %s' % (self.EbuildId, self.RestrictionId) + +class Emails(models.Model): + EmailId = models.IntegerField(primary_key=True, db_column='email_id') + Email = models.CharField(max_length=160, db_column='email') + class Meta: + db_table = 'emails' + def __str__(self): + return '%s %s' % (self.EmailId, self.Email) + +class PackagesEmails(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + PackageId = models.ForeignKey(Packages, db_column='package_id') + EmailId = models.ForeignKey(Emails, db_column='email_id') + class Meta: + db_table = 'packages_emails' + def __str__(self): + return '%s %s' % (self.PackageId, self.EmailId) + +class Jobs(models.Model): + JobId = models.IntegerField(primary_key=True, db_column='job_id') + JobType = models.CharField(max_length=60, db_column='job_type') + Status = models.CharField(max_length=60, db_column='status') + User = models.CharField(max_length=60, db_column='user') + ConfigId = models.ForeignKey(Configs, db_column='config_id') + RunConfigId = models.ForeignKey(Configs, to_field='ConfigId', related_name='RunConfigId', db_column='run_config_id') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'jobs' + def __str__(self): + return '%s %s %s %s %s %s %s' % (self.JobId, self.JobType, self.Status, self.User, self.ConfigId, self.RunConfigId, self.TimeStamp) + diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index ea2db31..dfea3a7 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -1,14 +1,22 @@ from django.conf.urls import url from . import views +from django.contrib.auth import views as auth_views urlpatterns = [ url(r'^home/$', views.home), - url(r'^packages/$', views.categories), - url(r'^categories/(?P\d+)/$', views.packages), - url(r'^packages/(?P\d+)/$', views.ebuilds), - url(r'^ebuild/(?P\d+)/$', views.ebuild), - url(r'^new/logs/build/(?P\d+)/$', views.new_logs_build), - url(r'^new/logs/$', views.new_logs), - url(r'^new/repoman/$', views.new_repoman), - url(r'^new/$', views.new_main), + url(r'^categories/$', views.categories), + url(r'^categories/packages/(?P\d+)/$', views.packages), + url(r'^categories/packages/versions/(?P\d+)/$', views.versions), + url(r'^build_req/$', views.new_build_req), + url(r'^logs/build/(?P\d+)/$', views.new_logs_build, name='new_logs_build'), + url(r'^logs/build/submitlog/(?P\d+)/$', views.buildinfo_bugzilla), + url(r'^logs/$', views.new_logs), + url(r'^logs/all/build/$', views.new_build_logs_all), + url(r'^logs/all/repoman/$', views.new_repoman), + url(r'^user/login/$', auth_views.login, name='login'), + url(r'^user/logout/$', auth_views.logout, {'next_page': '/home/'}, name='logout'), + url(r'^user/password_change/$', auth_views.password_change, name='password_change'), + url(r'^user/password_change/done/$', auth_views.password_change_done, name='password_change_done'), + url(r'^user/password_reset/$', auth_views.password_reset, name='password_reset'), + url(r'^user/bugzillalogin/$', views.set_bugzilla_user), ] diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index b47cd88..305ed8c 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -1,40 +1,93 @@ -# Copyright 1998-2015 Gentoo Foundation +# Copyright 1998-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -from django.shortcuts import render, get_object_or_404, HttpResponseRedirect +from django.shortcuts import render, get_object_or_404, HttpResponseRedirect, redirect +from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.conf import settings - -from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts +from django.urls import reverse +from tbc_www.forms import BugForm, BugzillaUser +from tbc_www.utils.bugzillasubmit import addnewbug +from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts, Bugzilla from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman, \ - BuildLogsConfig, BuildLogsUse, BuildLogsRepoman + BuildLogsConfig, BuildLogsUse, BuildLogsRepoman, PackagesEmails, Jobs import re +import gzip +import os def default_TmpDict(pagerequest): site = get_object_or_404(SiteSettings) page = get_object_or_404(Pages, nav1 = pagerequest) + jobs = get_object_or_404(Jobs, JobType = 'esync') pages = Pages.objects.all() if page.SubMenu: subpages = SubPages.objects.filter(PageId = page.PageId) else: subpages = False - contact = get_object_or_404(SubPages, nav2 = 'contact') TmpDict = {'site' : site} TmpDict['page'] = page TmpDict['pages'] = pages TmpDict['subpages'] = subpages - TmpDict['contact'] = contact TmpDict['smappages'] = SubPages.objects.all() + TmpDict['jobs'] = jobs return TmpDict +def fail_status(buildlog_id): + BU_tmp = BuildLogsUse.objects.filter(BuildLogId = buildlog_id) + Test = False + if BU_tmp != []: + for BU in BU_tmp: + if BU.Status: + if BU.UseId.Flag == 'test': + Test = True + adict = {} + adict['repoman'] = False + adict['qa'] = False + adict['others'] = False + adict['build'] = False + adict['TestRun'] = Test + BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = buildlog_id) + for BE in BE_tmp: + if BE.ErrorId.ErrorId == 1: + adict['repoman'] = True + if BE.ErrorId.ErrorId == 2: + adict['qa'] = True + if BE.ErrorId.ErrorId == 3: + adict['others'] = True + if BE.ErrorId.ErrorId == 4: + adict['test'] = True + if BE.ErrorId.ErrorId >= 5: + adict['build'] = True + adict['builderror'] = BE.ErrorId.ErrorName + if BE.ErrorId.ErrorName != 'install': + adict['TestRun'] = False + return adict + def home(request): pagerequest = 'home' Lines = 10 TmpDict = default_TmpDict(pagerequest) - TmpDict['EM'] = EbuildsMetadata.objects.order_by('-Id')[:Lines] + TmpDict['PM'] = PackagesMetadata.objects.filter(New = True) + alist = [] + for EM in EbuildsMetadata.objects.filter(Updated = True): + adict = {} + adict['EbuildId'] = EM.EbuildId.EbuildId + adict['C'] = EM.EbuildId.PackageId.CategoryId.Category + adict['P'] = EM.EbuildId.PackageId.Package + adict['CId'] = EM.EbuildId.PackageId.CategoryId.CategoryId + adict['PId'] = EM.EbuildId.PackageId.PackageId + adict['V'] = EM.EbuildId.Version + adict['R'] = EM.EbuildId.PackageId.RepoId.Repo + adict['TimeStamp'] = EM.EbuildId.TimeStamp + adict['CommitId'] = EM.Commit + adict['CommitMsg'] = EM.CommitMsg + adict['Descriptions'] = EM.Descriptions + adict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = EM.EbuildId.EbuildId) + alist.append(adict) + TmpDict['EM_list'] = alist alist = [] - for BL in BuildLogs.objects.order_by('-TimeStamp')[:Lines]: + for BL in BuildLogs.objects.filter(New = True): adict2 = {} adict2['BuildLogId'] = BL.BuildLogId adict2['C'] = BL.EbuildId.PackageId.CategoryId.Category @@ -46,9 +99,9 @@ def home(request): if BL.Fail: adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) alist.append(adict2) - TmpDict['BL'] = alist + TmpDict['BL_tmp'] = alist adict = {} - BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp')[:Lines] + BJ_Tmp = BuildJobs.objects.filter(New = True) for BJ in BJ_Tmp: adict2 = {} adict2['EbuildId'] = BJ.EbuildId.EbuildId @@ -56,6 +109,7 @@ def home(request): adict2['P'] = BJ.EbuildId.PackageId.Package adict2['V'] = BJ.EbuildId.Version adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo + adict2['Status'] = BJ.Status adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n" BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) if not BJU == []: @@ -84,178 +138,85 @@ def home(request): def categories(request): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) - alist = [] - for CM in CategoriesMetadata.objects.filter(CategoryId__Active = True).order_by('CategoryId__Category'): - adict = {} - adict['CategoryId'] = CM.CategoryId.CategoryId - adict['Category'] = CM.CategoryId.Category - adict['Descriptions'] = CM.Descriptions - packages = [] - for P in Packages.objects.filter(Active = True).filter(CategoryId_id = CM.CategoryId.CategoryId).order_by('Package'): - packages.append(P.Package + '\n') - adict['Packages'] = packages - alist.append(adict) - TmpDict['CM_tmp'] = alist - return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) + alphabet_list = map(chr, range(97, 123)) + CM_tmp = CategoriesMetadata.objects.filter(CategoryId__Active = True).order_by('CategoryId__Category') + list2 = [] + for a in alphabet_list: + alist = [] + for CM in CM_tmp: + if a == CM.CategoryId.Category[:1]: + adict = {} + adict['CategoryId'] = CM.CategoryId.CategoryId + adict['Category'] = CM.CategoryId.Category + adict['Descriptions'] = CM.Descriptions + alist.append(adict) + adict2 = {} + adict2['letter'] = a + adict2['CM_list'] = alist + if alist != []: + list2.append(adict2) + TmpDict['CM_tmp'] = list2 + return render(request, 'pages/categories/index.html', TmpDict) def packages(request, category_id): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) alist = [] - for PM in PackagesMetadata.objects.filter(PackageId__CategoryId_id = category_id).filter(PackageId__Active = True): - adict = {} - adict['PackageId'] = PM.PackageId.PackageId - adict['Package'] = PM.PackageId.Package - adict['Descriptions'] = PM.Descriptions - adict['Commitlog'] =PM.Gitlog - adict['Repoman'] = False - adict['Qa'] = False - adict['Bl'] = False - adict['Blo'] = False - adict['Blb'] = False - PR = PackagesRepoman.objects.filter(PackageId__PackageId = PM.PackageId.PackageId) - if PR.exists(): - adict['Repoman'] = True - BLQ = BuildLogsQa.objects.filter(BuildLogId__EbuildId__PackageId__PackageId = PM.PackageId.PackageId).filter(BuildLogId__EbuildId__Active = True) - if BLQ.exists(): - adict['Qa'] = True - BL_tmp = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = PM.PackageId.PackageId).filter(EbuildId__Active = True) - if BL_tmp.exists(): - adict['Bl'] = True - if BL_tmp.filter(Fail = True).exists(): - for BL in BL_tmp: - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 3: - adict['Blo'] = True - if BE.ErrorId.ErrorId >= 4: - adict['Blb'] = True - ebuilds = [] - for E in Ebuilds.objects.filter(Active = True).filter(PackageId__Package = PM.PackageId.Package): - ebuilds.append(E.Version + '::' + E.PackageId.RepoId.Repo + '\n') - adict['Ebuilds'] = ebuilds - alist.append(adict) - TmpDict['PM_tmp'] = alist - TmpDict['C'] = get_object_or_404(Categories, CategoryId = category_id) - return render(request, 'pages/' + pagerequest + '/category/index.html', TmpDict) + TmpDict['PM_tmp'] = PackagesMetadata.objects.filter(PackageId__CategoryId_id = category_id).filter(PackageId__Active = True) + TmpDict['C'] = get_object_or_404(CategoriesMetadata, CategoryId__CategoryId = category_id) + return render(request, 'pages/categories/packages/index.html', TmpDict) -def ebuilds(request, package_id): +def versions(request, package_id): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) P = get_object_or_404(PackagesMetadata, PackageId__PackageId = package_id) TmpDict['P'] = P - TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package) - PR = PackagesRepoman.objects.filter(PackageId__PackageId = package_id) - BLQ_tmp = BuildLogsQa.objects.filter(BuildLogId__EbuildId__PackageId__PackageId = package_id).filter(BuildLogId__EbuildId__Active = True) - BL_tmp = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = package_id).filter(EbuildId__Active = True) - TmpDict['BLQ_tmp'] = BLQ_tmp - TmpDict['BL_tmp'] = BL_tmp - if PR.exists(): - TmpDict['PR'] = True - else: - TmpDict['PR'] = False - if BLQ_tmp.exists(): - TmpDict['QA'] = True - else: - TmpDict['QA'] = False - if BL_tmp.exists(): - TmpDict['Bl'] = True - TmpDict['Blf'] = False - if BL_tmp.filter(Fail = True).exists(): - TmpDict['Blf'] = True - else: - TmpDict['Bl'] = False - alist = [] - for EM in TmpDict['EM_tmp']: - BLe = BuildLogs.objects.filter(EbuildId__EbuildId = EM.EbuildId.EbuildId).filter(EbuildId__Active = True) - if BLe.exists(): - adict = {} - adict['EbuildId'] = EM.EbuildId.EbuildId - adict['fail'] = False - adict['Blo'] = False - adict['Blb'] = False - if BLe.filter(Fail = True).exists(): - adict['fail'] = True - for BL in BLe: - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 3: - adict['Blo'] = True - if BE.ErrorId.ErrorId >= 4: - adict['Blb'] = True - adict['repoman'] = False - BLRe = BuildLogsRepoman.objects.filter(BuildLogId__EbuildId__EbuildId = EM.EbuildId.EbuildId).filter(BuildLogId__EbuildId__Active = True) - if BLRe.exists(): - adict['repoman'] = True - adict['qa'] = False - BLQe = BuildLogsQa.objects.filter(BuildLogId__EbuildId__EbuildId = EM.EbuildId.EbuildId).filter(BuildLogId__EbuildId__Active = True) - if BLQe.exists(): - adict['qa'] = True - alist.append(adict) - print(alist) - TmpDict['fi_tmp'] = alist - return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict) - -def ebuild(request, ebuild_id): - pagerequest = 'packages' - TmpDict = default_TmpDict(pagerequest) - TmpDict['E'] = get_object_or_404(Ebuilds, EbuildId = ebuild_id) - TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__EbuildId = ebuild_id) - TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = ebuild_id) - BL_tmp = BuildLogs.objects.filter(EbuildId__EbuildId = ebuild_id) - TmpDict['BL_tmp'] = BL_tmp - alist = [] - for BL in BL_tmp: + alist =[] + EM_tmp = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__PackageId = P.PackageId.PackageId) + for EM in EM_tmp: adict = {} - adict['BuildLogId'] = BL.BuildLogId - adict['repoman'] = False - adict['qa'] = False - adict['Blo'] = False - adict['Blb'] = False - if BL.Fail: - adict['fail'] = True - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = BL.BuildLogId) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 1: - adict['repoman'] = True - if BE.ErrorId.ErrorId == 2: - adict['qa'] = True - if BE.ErrorId.ErrorId == 3: - adict['Blo'] = True - if BE.ErrorId.ErrorId >= 4: - adict['Blb'] = True + ebuild_id = EM.EbuildId.EbuildId + adict['EbuildId'] = ebuild_id + adict['Slot'] = EM.Slot + adict['Version'] = EM.EbuildId.Version + adict['TimeStamp'] = EM.EbuildId.TimeStamp + adict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = ebuild_id) + adict['EU_tmp'] = EbuildsIuse.objects.filter(EbuildId__EbuildId = ebuild_id) + adict['ER_tmp'] = EbuildsRestrictions.objects.filter(EbuildId__EbuildId = ebuild_id) + BL_tmp = BuildLogs.objects.filter(EbuildId__EbuildId = ebuild_id) + adict['BL_tmp'] = BL_tmp + alist2 = [] + for BL in BL_tmp: + adict2 = {} + adict2['BuildLogId'] = BL.BuildLogId + adict2['repoman'] = False + adict2['qa'] = False + adict2['Blo'] = False + adict2['Blb'] = False + if BL.Fail: + adict2['fail'] = True + BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = BL.BuildLogId) + for BE in BE_tmp: + if BE.ErrorId.ErrorId == 1: + adict2['repoman'] = True + if BE.ErrorId.ErrorId == 2: + adict2['qa'] = True + if BE.ErrorId.ErrorId == 3: + adict2['Blo'] = True + if BE.ErrorId.ErrorId >= 4: + adict2['Blb'] = True + adict2['Ble'] = BE.ErrorId.ErrorName + alist2.append(adict2) + adict['fi_tmp'] = alist2 alist.append(adict) - TmpDict['fi_tmp'] = alist - TmpDict['EU_tmp'] = EbuildsIuse.objects.filter(EbuildId__EbuildId = ebuild_id) - TmpDict['ER_tmp'] = EbuildsRestrictions.objects.filter(EbuildId__EbuildId = ebuild_id) - - return render(request, 'pages/' + pagerequest + '/ebuilds/ebuild/index.html', TmpDict) + TmpDict['EM_info'] = alist + return render(request, 'pages/categories/packages/versions/index.html', TmpDict) -def new_main(request): - pagerequest = 'new' - Lines = 30 +def new_build_req(request): + pagerequest = 'build_req' TmpDict = default_TmpDict(pagerequest) - TmpDict['EM'] = EbuildsMetadata.objects.order_by('-Id')[:Lines] - alist = [] - for BL in BuildLogs.objects.order_by('-TimeStamp')[:Lines]: - adict2 = {} - adict2['BuildLogId'] = BL.BuildLogId - adict2['C'] = BL.EbuildId.PackageId.CategoryId.Category - adict2['P'] = BL.EbuildId.PackageId.Package - adict2['V'] = BL.EbuildId.Version - adict2['R'] = BL.EbuildId.PackageId.RepoId.Repo - adict2['Fail'] = BL.Fail - adict2['FailB'] = False - adict2['SummeryText'] = BL.SummeryText - if BL.Fail: - adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - for BE in adict2['BE_tmp']: - if BE.ErrorId.ErrorId >= 3: - adict2['FailB'] = True - alist.append(adict2) - TmpDict['BL'] = alist adict = {} - BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp')[:Lines] + BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp') for BJ in BJ_Tmp: adict2 = {} adict2['EbuildId'] = BJ.EbuildId.EbuildId @@ -286,8 +247,7 @@ def new_main(request): adict2['title'] = adict2['title'] + "\n" adict[BJ.BuildJobId] = adict2 TmpDict['BJ'] = adict - TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines] - return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) + return render(request, 'pages/build_req/index.html', TmpDict) def new_repoman(request): pagerequest = 'new' @@ -297,11 +257,10 @@ def new_repoman(request): return render(request, 'pages/' + pagerequest + '/repoman/index.html', TmpDict) def new_logs(request): - pagerequest = 'new' - Lines = 30 + pagerequest = 'logs' TmpDict = default_TmpDict(pagerequest) alist = [] - for BL in BuildLogs.objects.order_by('-TimeStamp')[:Lines]: + for BL in BuildLogs.objects.order_by('-TimeStamp').filter(New = True): adict2 = {} adict2['BuildLogId'] = BL.BuildLogId adict2['C'] = BL.EbuildId.PackageId.CategoryId.Category @@ -311,20 +270,48 @@ def new_logs(request): adict2['Fail'] = BL.Fail adict2['SummeryText'] = BL.SummeryText if BL.Fail: - adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - try: - PackagesRepomanInfo = PackagesRepoman.objects.get(PackageId__PackageId = BL.EbuildId.PackageId.PackageId) - except PackagesRepoman.DoesNotExist as e: - adict2['PR'] = False - else: - adict2['PR'] = PackagesRepomanInfo.RepomanText + adict['FI'] = fail_status(BL.BuildLogId) alist.append(adict2) TmpDict['BL_tmp'] = alist - return render(request, 'pages/' + pagerequest + '/logs/index.html', TmpDict) + TmpDict['QA_tmp'] = BuildLogsQa.objects.filter(BuildLogId__New = True) + TmpDict['RM_tmp'] = BuildLogsRepoman.objects.filter(BuildLogId__New = True) + return render(request, 'pages/logs/index.html', TmpDict) + +def new_build_logs_all(request): + pagerequest = 'logs' + object_on_page = 50 + TmpDict = default_TmpDict(pagerequest) + BL_tmp = BuildLogs.objects.order_by('-TimeStamp').filter(Fail = True) + alist = [] + for BL in BL_tmp: + adict = {} + adict['BuildLogId'] = BL.BuildLogId + adict['C'] = BL.EbuildId.PackageId.CategoryId.Category + adict['P'] = BL.EbuildId.PackageId.Package + adict['V'] = BL.EbuildId.Version + adict['R'] = BL.EbuildId.PackageId.RepoId.Repo + adict['Fail'] = BL.Fail + adict['SummeryText'] = BL.SummeryText + if BL.Fail: + adict['FI'] = fail_status(BL.BuildLogId) + alist.append(adict) + paginator = Paginator(alist, object_on_page) + page = request.GET.get('page') + try: + BL_tmp = paginator.page(page) + except PageNotAnInteger: + # If page is not an integer, deliver first page. + BL_tmp = paginator.page(1) + except EmptyPage: + # If page is out of range (e.g. 9999), deliver last page of results. + BL_tmp = paginator.page(paginator.num_pages) + TmpDict['BL_tmp'] = BL_tmp + return render(request, 'pages/logs/all/build/index.html', TmpDict) def new_logs_build(request, buildlog_id): - pagerequest = 'new' + pagerequest = 'logs' TmpDict = default_TmpDict(pagerequest) + TmpDict['Bugzillalogin'] = False B = BuildLogs.objects.get(BuildLogId = buildlog_id) EM = EbuildsMetadata.objects.get(EbuildId = B.EbuildId.EbuildId) PM = PackagesMetadata.objects.get(PackageId__PackageId = B.EbuildId.PackageId.PackageId) @@ -346,7 +333,7 @@ def new_logs_build(request, buildlog_id): BLI['BugId'] = B.BugId BC = BuildLogsConfig.objects.get(BuildLogId = buildlog_id) #CEO_tmp = ConfigsEmergeOptions.objects.filter(ConfigId = BC.ConfigId.ConfigId) - BU_tmp = BuildLogsUse.objects.filter(BuildLogId = BC.BuildLogId) + BU_tmp = BuildLogsUse.objects.filter(BuildLogId = buildlog_id) config_eoption = [] BLI['configid'] = BC.ConfigId.ConfigId BLI['hostname'] = BC.ConfigId.HostName @@ -370,22 +357,7 @@ def new_logs_build(request, buildlog_id): BLI['use_enable'] = use_enable if not use_disable == []: BLI['use_disable'] = use_disable - adict = {} - adict['repoman'] = False - adict['qa'] = False - adict['Blo'] = False - adict['Blb'] = False - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId__BuildLogId = buildlog_id) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 1: - adict['repoman'] = True - if BE.ErrorId.ErrorId == 2: - adict['qa'] = True - if BE.ErrorId.ErrorId == 3: - adict['Blo'] = True - if BE.ErrorId.ErrorId >= 4: - adict['Blb'] = True - TmpDict['FI'] = adict + TmpDict['FI'] = fail_status(buildlog_id) try: BRQ = BuildLogsQa.objects.get(BuildLogId = B.BuildLogId) BLI['QA'] = BRQ.SummeryText @@ -397,4 +369,91 @@ def new_logs_build(request, buildlog_id): except BuildLogsRepoman.DoesNotExist as e: BLI['Repoman'] = False TmpDict['BLI'] = BLI - return render(request, 'pages/' + pagerequest + '/logs/build/index.html', TmpDict) \ No newline at end of file + return render(request, 'pages/logs/build/index.html', TmpDict) + +def submit_to_bugzilla(request, form, buildlog_id): + BC = BuildLogsConfig.objects.get(BuildLogId = buildlog_id) + b = Bugzilla.objects.get(Username=request.user.username) + args = {} + args['product'] = form.cleaned_data['Product'] + args['component'] = form.cleaned_data['Component'] + args['version'] = form.cleaned_data['Version'] + args['summary'] = form.cleaned_data['Summary'] + args['description'] = form.cleaned_data['Description'] + args['comment'] = form.cleaned_data['EmergeInfo'] + args['assigned_to'] = form.cleaned_data['AssigendTo'] + args['password'] = request.session['bugzillapassword'] + args['username'] = b.Bugzillaname + LogFile = BC.ConfigId.HostName + '/' + BC.ConfigId.SetupId.Setup + BC.LogName + LogDir = settings.STATIC_ROOT + '/logs/' + Filesize = os.path.getsize(LogDir + LogFile)/1024 + if Filesize > 900: + #FIXME UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8b in position 1: invalid start byte + with open(LogDir + LogFile, 'rb') as orig_file: + with gzip.open('/tmp' + BC.LogName + '.gz', 'wb') as zipped_file: + zipped_file.writelines(orig_file) + args['filename'] = '/tmp' + BC.LogName + '.gz' + args['content_type'] = 'application/gzip' + else: + args['filename'] = LogDir + LogFile + args['content_type'] = 'text/plain' + args['comment_attach'] = 'Build log' + newbug = addnewbug(args) + return newbug + +def buildinfo_bugzilla(request, buildlog_id): + pagerequest = 'logs' + TmpDict = default_TmpDict(pagerequest) + B = get_object_or_404(BuildLogs, BuildLogId = buildlog_id) + C = B.EbuildId.PackageId.CategoryId.Category + P = B.EbuildId.PackageId.Package + V = B.EbuildId.Version + R = B.EbuildId.PackageId.RepoId.Repo + if request.method == 'POST': + form = BugForm(request.POST) + if form.is_valid(): + newbug = submit_to_bugzilla(request, form, buildlog_id) + B.BugId = newbug.id + B.save() + return redirect('new_logs_build', buildlog_id=buildlog_id) + else: + if B.Fail == 'True': + F = get_object_or_404(BuildLogsErrors, BuildLogId = buildlog_id) + FailText = " : " + F.ErrorId.ErrorName + else: + FailText = "" + E = get_object_or_404(BuildLogsConfig, BuildLogId = buildlog_id) + PE = get_object_or_404(PackagesEmails, PackageId__PackageId = B.EbuildId.PackageId.PackageId) + form = BugForm() + form.fields['Product'].initial = 'Gentoo Linux' + form.fields['Version'].initial = 'unspecified' + form.fields['Summary'].initial = '[TEST][Tinderbox-cluster]=' + C + '/' + P + '-' + V + '::' + R + FailText + form.fields['Description'].initial = B.SummeryText + form.fields['EmergeInfo'].initial = E.EInfoId.EmergeInfoText + form.fields['AssigendTo'].initial = PE.EmailId.Email + + TmpDict['form'] = form + TmpDict['B'] = B + return render(request, 'pages/logs/build/submitbug/index.html', TmpDict) + +def set_bugzilla_user(request): + pagerequest = 'home' + TmpDict = default_TmpDict(pagerequest) + if request.method == 'POST': + form = BugzillaUser(request.POST) + if form.is_valid(): + b = Bugzilla.objects.get(Username=request.user.username) + if b == []: + b = Bugzilla(Bugzillaname = form.cleaned_data['BugzillaName'], Username = request.user.username) + b.save() + else: + if b.Bugzillaname != form.cleaned_data['BugzillaName']: + b.Bugzillaname = form.cleaned_data['BugzillaName'] + b.save() + request.session['bugzillapassword'] = form.cleaned_data['BugzillaPassword'] + return HttpResponseRedirect('/home/') + + else: + form = BugzillaUser() + TmpDict['form'] = form + return render(request, 'registration/bugzillauser.html', TmpDict) diff --git a/python/templates/includes/frontpage/new_build_req b/python/templates/includes/frontpage/new_build_req index 3a47530..52a41fe 100644 --- a/python/templates/includes/frontpage/new_build_req +++ b/python/templates/includes/frontpage/new_build_req @@ -1,15 +1,16 @@ - - {% for k, v in BJ.items %} - - - + + - - {% endfor %} -
{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}

{{ v.title|truncatewords:2}}

-
- {% if v.Status == 'Building' %} +{% for k, v in BJ.items %} +
+ + {{ v.C }}//{{ v.P }}-{{ v.V }}::{{ v.R }} + + + {% if v.Status == 'Building' %} {{ v.Status }} {% else %} {{ v.Status }} {% endif %} -
\ No newline at end of file + + +{% endfor %} diff --git a/python/templates/includes/frontpage/new_logs b/python/templates/includes/frontpage/new_logs index bb97536..49db4c3 100644 --- a/python/templates/includes/frontpage/new_logs +++ b/python/templates/includes/frontpage/new_logs @@ -1,11 +1,13 @@ - - {% for B in BL%} - - - + + - - - {% endfor %} -
- {{ B.C }}/{{ B.P }}-{{ B.V }}::{{ B.R }}

{{ B.SummeryText|truncatewords:3 }}

-
- {% if B.Fail %} +{% for BL in BL_tmp %} +
+ + {{ BL.C }}//{{ BL.P }}-{{ BL.V }}::{{ BL.R }} + + +

{{ BL.SummeryText|truncatewords:5 }}

+ {% if BL.Fail %} {% for BE in B.BE_tmp %} {% if BE.BuildLogId.BuildLogId == B.BuildLogId %} {% if BE.ErrorId.ErrorId == 1 or BE.ErrorId.ErrorId == 2 %} @@ -21,11 +23,9 @@ {% if not B.FailB %} BUILD {% endif %} - {% else %} - Ok - {% endif %} -
\ No newline at end of file + {% else %} + Ok + {% endif %} + + +{% endfor %} diff --git a/python/templates/includes/frontpage/new_packages b/python/templates/includes/frontpage/new_packages index 6c845b7..297ca8b 100644 --- a/python/templates/includes/frontpage/new_packages +++ b/python/templates/includes/frontpage/new_packages @@ -1,10 +1,10 @@ - - {% for E in EM %} - - - - - {% endfor %} -
- - {{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}

{{ E.Descriptions }}

\ No newline at end of file +{% for P in PM %} + + + + {{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }} + + + {{ P.Descriptions }} + +{% endfor %} diff --git a/python/templates/includes/frontpage/new_repoman b/python/templates/includes/frontpage/new_repoman index 1e54e2b..e03b095 100644 --- a/python/templates/includes/frontpage/new_repoman +++ b/python/templates/includes/frontpage/new_repoman @@ -1,10 +1,10 @@ - {% for PR in PR_tmp %} + {% for RM in RM_tmp %} - - + {% endfor %}
- {{ PR.PackageId.CategoryId.Category }}/{{ PR.PackageId.Package }}::{{ PR.PackageId.RepoId.Repo }} + + {{ RM.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ RM.BuildLogId.EbuildId.PackageId.Package }}::{{ RM.BuildLogId.EbuildId.PackageId.RepoId.Repo }}

{{ PR.RepomanText|truncatewords:3 }}

{{ RM.SummeryText|truncatewords:3 }}

diff --git a/python/templates/includes/frontpage/updated_packages b/python/templates/includes/frontpage/updated_packages new file mode 100644 index 0000000..78dc027 --- /dev/null +++ b/python/templates/includes/frontpage/updated_packages @@ -0,0 +1,77 @@ +{% for E in EM_list %} +
  • +
    + +
    + + {{ E.TimeStamp|date:"D d b Y G i" }} + +
    +

    {{ E.V }} : {{ E.Slot }} 0

    +

    + {% for K in E.EK_tmp %} + {% if K.EbuildId.EbuildId == E.EbuildId and K.KeywordId.Keyword != '*' and '-' not in K.KeywordId.Keyword %} + {% if K.Status == 'Stable' %}{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Unstable' %}~{{ K.KeywordId.Keyword }}{% endif %} + {% if K.Status == 'Negative' %}-{{ K.KeywordId.Keyword }}{% endif %} + {% endif %} + {% endfor %} +

    +
    +
    +
    +
  • +{% endfor %} diff --git a/python/templates/includes/layout/footer.html b/python/templates/includes/layout/footer.html index a6860e6..6767871 100644 --- a/python/templates/includes/layout/footer.html +++ b/python/templates/includes/layout/footer.html @@ -2,37 +2,30 @@
    - {% if page.footer %}{{ page.footer }}{% endif %} + {% include "includes/layout/footer_db_update.html" %}

    Questions or comments?

    - Please feel free to contact us. + Please feel free to contact us.
    -
    -
    -
    - {% include "includes/layout/footer_sitemap.html" %} -
    -
    -
    -
    +
    -
    +
    © 2001-{% now "Y" %} Gentoo Foundation, Inc.
    Gentoo is a trademark of the Gentoo Foundation, Inc. The contents of this document, unless otherwise expressly stated, are licensed under the - CC-BY-SA-3.0 license. - The Gentoo Name and Logo Usage Guidelines apply. + CC-BY-SA-3.0 license. + The Gentoo Name and Logo Usage Guidelines apply.
    - \ No newline at end of file + diff --git a/python/templates/includes/layout/footer_sitemap.html b/python/templates/includes/layout/footer_sitemap.html deleted file mode 100644 index 3923ce3..0000000 --- a/python/templates/includes/layout/footer_sitemap.html +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/python/templates/includes/layout/head.html b/python/templates/includes/layout/head.html index 22bfa58..8e403ee 100644 --- a/python/templates/includes/layout/head.html +++ b/python/templates/includes/layout/head.html @@ -14,6 +14,10 @@ + + + + {% if page.extracss %}{% for css in page.extracss %}{% endfor %}{% endif %} diff --git a/python/templates/includes/layout/header.html b/python/templates/includes/layout/header.html index 585ea59..4968f1f 100644 --- a/python/templates/includes/layout/header.html +++ b/python/templates/includes/layout/header.html @@ -32,6 +32,7 @@ Gentoo Linux Logo + Tinderbox-cluster
    @@ -51,18 +52,27 @@ - +
    + + +
    - {% if subpage %} + {% if subpages %}