[gentoo-commits] proj/tinderbox-cluster-www:master commit in: /
commit: 50e585855726e1d79ab7f21b2c5494321e79b7d2 Author: Magnus Granberg gentoo org> AuthorDate: Tue Sep 28 21:01:56 2021 + Commit: Magnus Granberg gentoo org> CommitDate: Tue Sep 28 21:01:56 2021 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=50e58585 Add TODO list Signed-off-by: Magnus Granberg gentoo.org> TODO.txt | 26 ++ 1 file changed, 26 insertions(+) diff --git a/TODO.txt b/TODO.txt new file mode 100644 index 000..8a6fdee --- /dev/null +++ b/TODO.txt @@ -0,0 +1,26 @@ +* Project ++ List Project ++ Add Project (User) (Admins enable project) ++ Add workers (Project creator), (Admins enable worker) ++ List builds ++ List build requests ++ List issues ++ Add issues (User) ++ Add,change,remove settings (User, Group Member of the project) ++ Add repository (Project creator), (Admins enable repository) +* Repository ++ Mix of Gitlab, Github, Gitweb view ++ Request builds (User, Group Member of the projects) +* Issues ++ List ++ Add issues (User) ++ Support for PR's (User creator) ++ Support for Bugzilla (User creator) ++ Support Bumps (User) ++ Support Patches (User) ++ Support Attachment (User) +* REST ++ List Workers ++ List Workers with password (authentication needed) ++ List Repository ++ List Repository with ssh keys (authentication needed)
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/ebuilds/ebuild/, ...
commit: 5e84cbca6ca8f525703c062f7e824f2c60ed4bc7 Author: Magnus Granberg gentoo org> AuthorDate: Sun May 30 23:16:54 2021 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Sep 24 02:22:49 2021 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=5e84cbca Restart Signed-off-by: Magnus Granberg gentoo.org> .gitignore | 8 - htdoc/index.html | 8 - python/gosbs/__init__.py | 0 python/gosbs/settings.py.conf | 144 --- python/gosbs/urls.py | 9 - python/gosbs/wsgi.py | 16 - python/gosbs_auth/__init__.py | 0 python/gosbs_auth/admin.py | 3 - python/gosbs_auth/apps.py | 5 - python/gosbs_auth/migrations/__init__.py | 0 python/gosbs_auth/models.py| 3 - python/gosbs_auth/tests.py | 3 - python/gosbs_auth/urls.py | 11 - python/gosbs_auth/views.py | 3 - python/manage.py | 11 - python/packages/__init__.py| 0 python/packages/admin.py | 3 - python/packages/apps.py| 5 - python/packages/migrations/__init__.py | 0 python/packages/models.py | 188 python/packages/tests.py | 3 - python/packages/urls.py| 7 - python/packages/views.py | 3 - python/projects/__init__.py| 0 python/projects/admin.py | 3 - python/projects/apps.py| 5 - python/projects/forms.py | 7 - python/projects/migrations/__init__.py | 0 python/projects/models.py | 53 --- python/projects/tests.py | 3 - python/projects/urls.py| 11 - python/projects/views.py | 86 python/templates/includes/layout/footer.html | 38 -- .../templates/includes/layout/footer_sitemap.html | 12 - python/templates/includes/layout/head.html | 25 -- python/templates/includes/layout/header.html | 90 python/templates/includes/layout/sponsor.html | 9 - python/templates/layout/base.html | 34 -- .../templates/pages/packages/category/index.html | 33 -- .../pages/packages/ebuilds/ebuild/index.html | 47 -- python/templates/pages/packages/ebuilds/index.html | 30 -- python/templates/pages/packages/index.html | 28 -- python/templates/pages/projects/add/index.html | 8 - python/templates/pages/projects/detail/index.html | 4 - python/templates/pages/projects/index.html | 19 - python/templates/pages/projects/repos/index.html | 31 -- python/templates/pages/www/index.html | 49 --- python/templates/registration/bugzillauser.html| 10 - python/templates/registration/logged_out.html | 5 - python/templates/registration/login.html | 12 - .../registration/password_change_form.html | 13 - python/www/__init__.py | 0 python/www/admin.py| 7 - python/www/apps.py | 5 - python/www/migrations/0001_initial.py | 64 --- python/www/migrations/__init__.py | 0 python/www/models.py | 74 python/www/router.py | 31 -- python/www/tests.py| 3 - python/www/urls.py | 7 - python/www/utils.py| 34 -- python/www/views.py| 19 - sql/gosbs-www.sql | 475 - static/foo.txt | 0 64 files changed, 1817 deletions(-) diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 7be3859..000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Backup files -*~ -__pycache__ -# log dir -static/logs -# Python compiled files -*.pyc -python/gosbs/settings.py diff --git a/htdoc/index.html b/htdoc/index.html deleted file mode 100644 index c217ab3..000 --- a/htdoc/index.html +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/python/gosbs/__init__.py b/python/gosbs/__init__.py deleted file mode 100644 index e69de29..000 diff --git a/python/gosbs/settings.py.conf b/python/gosbs/settings.py.conf deleted file mode 100644 index a2e4330..000 ---
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/bb_dashboard/, python/templates/includes/container/, ...
commit: 3fb5065d4b67af1df11cec4e7a3e888c9598b9d1 Author: Magnus Granberg gentoo org> AuthorDate: Fri Sep 24 01:54:59 2021 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Sep 24 02:22:49 2021 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=3fb5065d Add Buildbot Dashboard for Gentoo Ci Signed-off-by: Magnus Granberg gentoo.org> .gitignore | 5 + python/bb_dashboard/bb_dashboard/__init__.py | 0 python/bb_dashboard/bb_dashboard/asgi.py | 16 +++ .../bb_dashboard/bb_dashboard/settings.py.sample | 149 + python/bb_dashboard/bb_dashboard/urls.py | 9 ++ python/bb_dashboard/bb_dashboard/wsgi.py | 16 +++ python/bb_dashboard/manage.py | 22 +++ python/bb_dashboard/projects/__init__.py | 0 python/bb_dashboard/projects/admin.py | 3 + python/bb_dashboard/projects/apps.py | 6 + .../bb_dashboard/projects/migrations/__init__.py | 0 python/bb_dashboard/projects/models.py | 3 + python/bb_dashboard/projects/tests.py | 3 + python/bb_dashboard/projects/views.py | 3 + python/bb_dashboard/repository/__init__.py | 0 python/bb_dashboard/repository/admin.py| 3 + python/bb_dashboard/repository/apps.py | 6 + .../bb_dashboard/repository/migrations/__init__.py | 0 python/bb_dashboard/repository/models.py | 45 +++ python/bb_dashboard/repository/tests.py| 3 + python/bb_dashboard/repository/views.py| 3 + python/bb_dashboard/static/screen.css | 3 + .../templates/includes/container/end | 0 .../templates/includes/container/start | 3 + .../templates/includes/layout/footer.html | 43 ++ .../templates/includes/layout/head.html| 26 .../templates/includes/layout/header.html | 89 .../templates/includes/navigation/primary | 0 .../templates/includes/navigation/secondary| 0 python/bb_dashboard/templates/layout/base.html | 20 +++ python/bb_dashboard/www/__init__.py| 0 python/bb_dashboard/www/admin.py | 7 + python/bb_dashboard/www/apps.py| 6 + python/bb_dashboard/www/migrations/0001_initial.py | 95 + python/bb_dashboard/www/migrations/__init__.py | 0 python/bb_dashboard/www/models.py | 74 ++ python/bb_dashboard/www/router.py | 31 + python/bb_dashboard/www/templates/www/index.html | 42 ++ .../www/templates/www/news.html} | 9 +- python/bb_dashboard/www/tests.py | 3 + python/bb_dashboard/www/urls.py| 7 + python/bb_dashboard/www/utils.py | 55 python/bb_dashboard/www/views.py | 16 +++ python/templates/includes/container/start | 3 - python/templates/includes/frontpage/new_build_req | 15 --- python/templates/includes/frontpage/new_logs | 27 python/templates/includes/frontpage/new_packages | 10 -- python/templates/includes/frontpage/new_repoman_qa | 18 --- .../includes/navigation/sitemap_secondary | 5 - 49 files changed, 823 insertions(+), 79 deletions(-) diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..ddf3b02 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# Backup files +*~ +__pycache__ +python/bb_dashboard/bb_dashboard/settings.py + diff --git a/python/bb_dashboard/bb_dashboard/__init__.py b/python/bb_dashboard/bb_dashboard/__init__.py new file mode 100644 index 000..e69de29 diff --git a/python/bb_dashboard/bb_dashboard/asgi.py b/python/bb_dashboard/bb_dashboard/asgi.py new file mode 100644 index 000..1e2115c --- /dev/null +++ b/python/bb_dashboard/bb_dashboard/asgi.py @@ -0,0 +1,16 @@ +""" +ASGI config for bb_dashboard project. + +It exposes the ASGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/ +""" + +import os + +from django.core.asgi import get_asgi_application + +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bb_dashboard.settings') + +application = get_asgi_application() diff --git a/python/bb_dashboard/bb_dashboard/settings.py.sample b/python/bb_dashboard/bb_dashboard/settings.py.sample new file mode 100644 index 000..079368e --- /dev/null +++ b/python/bb_dashboard/bb_dashboard/settings.py.sample @@ -0,0 +1,149 @@ +""" +Django settings for bb_dashboard project. + +Generated by 'django-admin startproject' using Django 3.2.3. + +For more information on this file, see +https://docs.djangoproject.com/en/3.2/topics/settings/ + +For the full list of settings and their values, see
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/cluster/, python/templates/pages/logs/build/, ...
commit: 5270ca757656869bc05f5de9ef7e772b0d0ab68a Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 15 19:44:38 2017 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 15 19:44:38 2017 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=5270ca75 update logs and add password change python/tbc_www/forms.py| 16 ++- python/tbc_www/models.py | 37 +-- python/tbc_www/urls.py | 5 +- python/tbc_www/utils/bugzillasubmit.py | 3 - python/tbc_www/views.py| 60 --- python/templates/pages/cluster/index.html | 26 + python/templates/pages/logs/build/index.html | 40 ++- python/templates/pages/logs/index.html | 117 - .../registration/password_change_form.html | 13 +++ 9 files changed, 252 insertions(+), 65 deletions(-) diff --git a/python/tbc_www/forms.py b/python/tbc_www/forms.py index 0a91b3b..40d1669 100644 --- a/python/tbc_www/forms.py +++ b/python/tbc_www/forms.py @@ -30,4 +30,18 @@ class BugForm(forms.Form): class BugzillaUser(forms.Form): BugzillaName = forms.CharField(label='Bugzilla Name', max_length=100) -BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100) +BugzillaPassword = forms.CharField(label='Bugzilla Password', max_length=100, widget=forms.PasswordInput) + +class LogsViews(forms.Form): + ChoicesComponent = ( + ('All', 'All'), + ('Fail', 'Fail'), + ('Repoman', 'Repoman'), + ('Qa', 'Qa'), + ('Others', 'Others'), + ('Test', 'Test'), + ('Build', 'Build'), + ) + LogView = forms.ChoiceField(widget=forms.Select, choices=ChoicesComponent, label='View') + def __str__(self): + return '%s' % (self.LogView) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index b54c772..73b0413 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -144,13 +144,21 @@ class BuildLogsErrors(models.Model): return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId) class EmergeInfo(models.Model): - EInfoId = models.IntegerField(primary_key=True, db_column='einfo_id') + EInfoId = models.AutoField(primary_key=True, db_column='einfo_id') EmergeInfoText = models.TextField(db_column='emerge_info_text') class Meta: db_table = 'emerge_info' def __str__(self): return '%s %s %s' % (self.EInfoId, self.Checksum, self.EmergeInfoText) +class Keywords(models.Model): + KeywordId = models.AutoField(primary_key=True, db_column='keyword_id') + Keyword = models.CharField(max_length=40, db_column='keyword') + class Meta: + db_table = 'keywords' + def __str__(self): + return '%s %s' % (self.KeywordId, self.keyword) + class Setups(models.Model): SetupId = models.AutoField(primary_key=True, db_column='setup_id') Setup = models.CharField(max_length=100, db_column='setup') @@ -170,6 +178,25 @@ class Configs(models.Model): def __str__(self): return '%s %s %s %s' % (self.ConfigId, self.HostName, self.SetupId, self.DefaultConfig) +class ConfigsMetaData(models.Model): + Id = models.AutoField(primary_key=True, db_column='id') + ConfigId = models.ForeignKey(Configs, db_column='config_id') + KeywordId = models.ForeignKey(Keywords, db_column='keyword_id') + MakeConfText = models.TextField(db_column='make_conf_text') + Checksum = models.CharField(max_length=100, db_column='checksum') + ConfigSync = models.BooleanField(db_column='configsync') + Active = models.BooleanField(db_column='active') + ConfigErrorText = models.TextField(db_column='config_error_text') + Updateing = models.CharField(max_length=100, db_column='updateing') + Status = models.CharField(max_length=100, db_column='status') + Auto = models.BooleanField(db_column='auto') + RepoPath = models.CharField(max_length=200, db_column='repo_path') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'configs_metadata' + def __str__(self): + return '%s %s %s %s %s %s %s %s %s %s %s %s' % (self.ConfigId, self.KeywordId, self.MakeConfText, self.Checksum, self.ConfigSync, self.Active, self.ConfigErrorText, self.Updateing, self.Status, self.Auto, self.RepoPath, self.TimeStamp) + class BuildLogsConfig(models.Model): LogId = models.IntegerField(primary_key=True, db_column='log_id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') @@ -242,14 +269,6 @@ class BuildJobsUse(models.Model): def __str__(self): return '%s %s %s %s' %
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/
commit: 11d166a0b90d591b1e18efac99d1b729c6d30678 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jan 6 18:04:01 2017 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Jan 6 18:04:01 2017 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=11d166a0 fix ame 'adict' is not defined line 273 python/tbc_www/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 305ed8c..c272c50 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -270,7 +270,7 @@ def new_logs(request): adict2['Fail'] = BL.Fail adict2['SummeryText'] = BL.SummeryText if BL.Fail: - adict['FI'] = fail_status(BL.BuildLogId) + adict2['FI'] = fail_status(BL.BuildLogId) alist.append(adict2) TmpDict['BL_tmp'] = alist TmpDict['QA_tmp'] = BuildLogsQa.objects.filter(BuildLogId__New = True)
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/categories/packages/versions/ebuild/, ...
commit: b7a478c798f525b39fc52b4b69d3863565cac377 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jan 6 18:00:35 2017 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Jan 6 18:00:35 2017 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=b7a478c7 add categories, logs and build_req python/templates/includes/frontpage/new_qa | 10 + python/templates/pages/build_req/index.html| 16 ++ python/templates/pages/categories/index.html | 61 ++ .../templates/pages/categories/packages/index.html | 63 ++ .../categories/packages/versions/ebuild/index.html | 75 +++ .../pages/categories/packages/versions/index.html | 233 + python/templates/pages/logs/all/build/index.html | 103 + python/templates/pages/logs/build/index.html | 114 ++ .../pages/logs/build/submitbug/index.html | 8 + python/templates/pages/logs/index.html | 42 10 files changed, 725 insertions(+) diff --git a/python/templates/includes/frontpage/new_qa b/python/templates/includes/frontpage/new_qa new file mode 100644 index 000..5b3607b --- /dev/null +++ b/python/templates/includes/frontpage/new_qa @@ -0,0 +1,10 @@ + + {% for QA in QA_tmp %} + + + {{ QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ QA.BuildLogId.EbuildId.PackageId.Package }}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }} + + {{ QA.SummeryText|truncatewords:3 }} + + {% endfor %} + diff --git a/python/templates/pages/build_req/index.html b/python/templates/pages/build_req/index.html new file mode 100644 index 000..979921c --- /dev/null +++ b/python/templates/pages/build_req/index.html @@ -0,0 +1,16 @@ +{% extends "layout/base.html" %} +{% block content %} + + + + + New Build Requst On Packages + + + + + {% include "includes/frontpage/new_build_req" %} + + + +{% endblock %} diff --git a/python/templates/pages/categories/index.html b/python/templates/pages/categories/index.html new file mode 100644 index 000..f9463e9 --- /dev/null +++ b/python/templates/pages/categories/index.html @@ -0,0 +1,61 @@ +{% extends "layout/base.html" %} +{% block content %} + + + + + Home + Packages + + +Packages + + + + + +Browse Categories + + + +{% for C_list in CM_tmp %} + {{ C_list.letter }} + {% for CM in C_list.CM_list %} + {{CM.Category }} + {% endfor %} + {% endfor %} + + + + + + + +Update Feeds + + + + + Added Packages + + + + Updated Packages + + + + Newly Stable Packages + + + + Keyworded Packages + + + + + + + + + +{% endblock %} diff --git a/python/templates/pages/categories/packages/index.html b/python/templates/pages/categories/packages/index.html new file mode 100644 index 000..0e5678d --- /dev/null +++ b/python/templates/pages/categories/packages/index.html @@ -0,0 +1,63 @@ +{% extends "layout/base.html" %} +{% block content %} + + + + + Home + Packages + {{ C.CategoryId.Category }} + + + + + + + {{ C.CategoryId.Category }} + + + + + {{ C.Descriptions }} + + + + + + + + + + + +All packages + + +{% for PM in PM_tmp %} + + {{ PM.PackageId.Package }} + {{ PM.Descriptions }} + +{% endfor %} + + + + + + + +Statistics + + +{{ PM_tmp|length }} Packages + + + + + + + + +{% endblock %} diff --git a/python/templates/pages/categories/packages/versions/ebuild/index.html b/python/templates/pages/categories/packages/versions/ebuild/index.html new file mode 100644 index 000..49ad3e5 --- /dev/null +++ b/python/templates/pages/categories/packages/versions/ebuild/index.html @@ -0,0 +1,75 @@ +{% extends "layout/base.html" %} +{% block content %} + + +{{ E.PackageId.CategoryId.Category }}/{{ E.PackageId.Package }} + + {% for EM in EM_tmp %} + + +{{ E.PackageId.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }} +Build + + + {% for K in EK_tmp %} +{% if K.EbuildId.EbuildId == E.EbuildId and 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 %} +{%
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/layout/
commit: 59354f60f0bc0be1ac29a1550c96055c44d66b81 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jan 6 17:55:47 2017 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Jan 6 17:55:47 2017 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=59354f60 add footer db updater python/templates/includes/layout/footer_db_update.html | 10 ++ 1 file changed, 10 insertions(+) diff --git a/python/templates/includes/layout/footer_db_update.html b/python/templates/includes/layout/footer_db_update.html new file mode 100644 index 000..60284a5 --- /dev/null +++ b/python/templates/includes/layout/footer_db_update.html @@ -0,0 +1,10 @@ +Gentoo Packages Database + + + Data currrent as of{{ jobs.TimeStamp|date:"D d b Y G i" }} + + + + + +
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/utils/
commit: 9f7bd0adcc9d549f97f421a3d3b589e7ec39fd10 Author: Magnus Granberg gentoo org> AuthorDate: Fri Jan 6 17:50:49 2017 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Jan 6 17:50:49 2017 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=9f7bd0ad add utils python/tbc_www/utils/__init__.py | 0 python/tbc_www/utils/bugzillasubmit.py | 27 +++ 2 files changed, 27 insertions(+) diff --git a/python/tbc_www/utils/__init__.py b/python/tbc_www/utils/__init__.py new file mode 100644 index 000..e69de29 diff --git a/python/tbc_www/utils/bugzillasubmit.py b/python/tbc_www/utils/bugzillasubmit.py new file mode 100644 index 000..d8160dc --- /dev/null +++ b/python/tbc_www/utils/bugzillasubmit.py @@ -0,0 +1,27 @@ +from __future__ import print_function + +import bugzilla + +URL = "https://bugs.gentoo.org/xmlrpc.cgi; +def addnewbug(args): + bzapi = bugzilla.Bugzilla(URL) + print(args['username']) + print(args['password']) + bzapi.login(user=args['username'], password=args['password']) + createinfo = bzapi.build_createbug( + product=args['product'], + version=args['version'], + component=args['component'], + summary=args['summary'], + description=args['description'], + assigned_to=args['assigned_to']) + newbug = bzapi.createbug(createinfo) + print("Created new bug id=%s url=%s" % (newbug.id, newbug.weburl)) + update = bzapi.build_update(comment=args['comment']) + bzapi.update_bugs(newbug.id, update) + kwards = { + 'contenttype': args['content_type'], + } + attchment_id = bzapi.attachfile(newbug.id, args['filename'], args['comment_attach'], **kwards) + bzapi.logout() + return newbug
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/layout/, python/templates/layout/, python/tbc_www/, ...
commit: 7999e14da3190d9f44e70a5dfbe1b2cedf55a5df Author: Magnus Granberg gentoo org> AuthorDate: Tue Nov 22 22:05:38 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Tue Nov 22 22:05:38 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=7999e14d Update for django 1.10 and fix links for css and js python/gentoo_main/urls.py | 3 ++- python/tbc_www/models.py | 2 +- python/tbc_www/router.py | 4 ++-- python/tbc_www/urls.py | 25 + python/templates/includes/layout/head.html | 6 +++--- python/templates/includes/layout/header.html | 6 +++--- python/templates/layout/base.html| 4 ++-- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/python/gentoo_main/urls.py b/python/gentoo_main/urls.py index 1eb5179..ff710c4 100644 --- a/python/gentoo_main/urls.py +++ b/python/gentoo_main/urls.py @@ -1,7 +1,8 @@ # Copyright 1998-2015 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -from django.conf.urls import patterns, include, url +from django.conf.urls import url +from . import views urlpatterns = [ url(r'^home/$', views.home), diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 0d58bc1..a0a25f3 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -74,7 +74,7 @@ class EbuildsMetadata(models.Model): 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' % (self.Id, self.EbuildId, self.Commit, self.New, self.Descriptions) class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') diff --git a/python/tbc_www/router.py b/python/tbc_www/router.py index 7a512fd..bac2a30 100644 --- a/python/tbc_www/router.py +++ b/python/tbc_www/router.py @@ -23,8 +23,8 @@ class TBCRouter(object): return True return False - def allow_migrate(self, db, model): - if db == 'tbc' or model._meta.app_label == "tbc_www": + def allow_migrate(self, db, app_label, model_name=None, **hints): + if db == 'tbc' or app_label == "tbc_www": return False # we're not using syncdb on our legacy database else: # but all other models/databases are fine return True diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 5be267f..ea2db31 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -1,13 +1,14 @@ -from django.conf.urls import patterns, include, url +from django.conf.urls import url +from . import views -urlpatterns = patterns('tbc_www.views', - url(r'^home/$', 'home'), - url(r'^packages/$', 'categories'), - url(r'^categories/(?P\d+)/$', 'packages'), - url(r'^packages/(?P\d+)/$', 'ebuilds'), - url(r'^ebuild/(?P\d+)/$', 'ebuild'), - url(r'^new/logs/build/(?P\d+)/$', 'new_logs_build'), - url(r'^new/logs/$', 'new_logs'), - url(r'^new/repoman/$', 'new_repoman'), - url(r'^new/$', 'new_main'), -) +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), +] diff --git a/python/templates/includes/layout/head.html b/python/templates/includes/layout/head.html index d8ed708..22bfa58 100644 --- a/python/templates/includes/layout/head.html +++ b/python/templates/includes/layout/head.html @@ -11,8 +11,8 @@ https://www.gentoo.org/assets/img/logo/gentoo-g.png;> https://www.gentoo.org/assets/img/logo/icon-192.png;> https://www.gentoo.org/assets/img/logo/icon-192.png;> - - + https://assets.gentoo.org/tyrian/bootstrap.min.css; rel="stylesheet" media="screen"> + https://assets.gentoo.org/tyrian/tyrian.min.css; rel="stylesheet" media="screen"> https://www.gentoo.org/assets/css/screen.css; rel="stylesheet" media="screen"> {% if page.extracss %}{% for css in page.extracss %}https://www.gentoo.org/assets/css/{{ css }}" rel="stylesheet" media="screen">{% endfor %}{% endif %} @@ -22,4 +22,4 @@ https://www.gentoo.org/search/packages-gentoo-org.xml; title="Gentoo Packages"> https://www.gentoo.org/search/archives-gentoo-org.xml; title="Gentoo List Archives"> {% if page.meta %}{{ page.meta|safe|escape }}{% endif %} - \ No newline at end of file + diff --git
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/gentoo_main/
commit: 35e83d9030bb9bdd6c81edae66036a7a3f323b74 Author: Magnus Granberg gentoo org> AuthorDate: Wed Feb 17 16:11:15 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Wed Feb 17 16:11:15 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=35e83d90 update conf files database python/gentoo_main/settings.py.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/gentoo_main/settings.py.conf b/python/gentoo_main/settings.py.conf index f6847ce..573d178 100644 --- a/python/gentoo_main/settings.py.conf +++ b/python/gentoo_main/settings.py.conf @@ -21,7 +21,7 @@ DATABASES = { 'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. }, -'zobcs': { +'tbc': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'tbc', # Or path to database file if using sqlite3. 'USER': 'tbc', # Not used with sqlite3.
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/gentoo_main/, python/tbc_www/
commit: d3a4d698ce53ff3fc98f44481b1d25c7e3b5677a Author: Magnus Granberg gentoo org> AuthorDate: Tue Feb 16 16:20:21 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Tue Feb 16 16:20:21 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=d3a4d698 update conf files python/gentoo_main/settings.py.conf | 37 + python/gentoo_main/wsgi.py.conf | 2 +- python/tbc_www/router.py| 14 +++--- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/python/gentoo_main/settings.py.conf b/python/gentoo_main/settings.py.conf index 77f7621..f6847ce 100644 --- a/python/gentoo_main/settings.py.conf +++ b/python/gentoo_main/settings.py.conf @@ -1,36 +1,36 @@ import os ROOT_PATH = os.path.dirname(__file__) -# Django settings for tinderbox project. +# Django settings for tinderbox-cluster project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( -# ('Magnus Granberg', 'zo...@ume.nu'), +# ('Magnus Granberg', 'zo...@gentoo.org'), ) MANAGERS = ADMINS DATABASES = { 'default': { -'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. -'NAME': 'www_zobcs', # Or path to database file if using sqlite3. -'USER': 'www_zobcs', # Not used with sqlite3. +'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. +'NAME': 'gentoo-www', # Or path to database file if using sqlite3. +'USER': 'tbc_www', # Not used with sqlite3. 'PASSWORD': 'fooo', # Not used with sqlite3. -'HOST': '192.168.0.5', # Set to empty string for localhost. Not used with sqlite3. +'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. }, 'zobcs': { -'ENGINE': 'mysql.connector.django', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. -'NAME': 'zobcs', # Or path to database file if using sqlite3. -'USER': 'zobcs', # Not used with sqlite3. +'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. +'NAME': 'tbc', # Or path to database file if using sqlite3. +'USER': 'tbc', # Not used with sqlite3. 'PASSWORD': 'fo.', # Not used with sqlite3. -'HOST': '192.168.0.5', # Set to empty string for localhost. Not used with sqlite3. +'HOST': '', # Set to empty string for localhost. Not used with sqlite3. 'PORT': '', # Set to empty string for default. Not used with sqlite3. } } -DATABASE_ROUTERS = ['zobcs.router.ZobcsRouter'] +DATABASE_ROUTERS = ['tbc_www.router.TBCRouter'] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be available on all operating systems. @@ -71,7 +71,7 @@ STATIC_ROOT = os.path.join(ROOT_PATH, '../../static/') # URL prefix for static files. # Example: "http://media.lawrence.com/static/; -STATIC_URL = 'http://127.0.0.1/static/' +STATIC_URL = '/static/' # Additional locations of static files STATICFILES_DIRS = ( @@ -106,16 +106,16 @@ MIDDLEWARE_CLASSES = ( 'django.middleware.clickjacking.XFrameOptionsMiddleware', ) -ROOT_URLCONF = 'tinderbox.urls' +ROOT_URLCONF = 'tbc_www.urls' # Python dotted path to the WSGI application used by Django's runserver. -WSGI_APPLICATION = 'tinderbox.wsgi.application' +WSGI_APPLICATION = 'gentoo_main.wsgi.application' TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. -os.path.join(ROOT_PATH, '../zobcs/templates/'), +os.path.join(ROOT_PATH, '../templates/'), ) INSTALLED_APPS = ( @@ -129,7 +129,8 @@ INSTALLED_APPS = ( # 'django.contrib.admin', # Uncomment the next line to enable admin documentation: # 'django.contrib.admindocs', -'zobcs', +'tbc_www', +'gentoo_www', ) # A sample logging configuration. The only tangible logging @@ -160,7 +161,3 @@ LOGGING = { }, } } -LOGIN_REDIRECT_URL='/' -BUGZILLA_USER='foo...@gooo.org' -BUGZILLA_PASS='password' -BUGZILLA_URL='https://bugs.gentoo.org/xmlrpc.cgi' diff --git a/python/gentoo_main/wsgi.py.conf b/python/gentoo_main/wsgi.py.conf index 8a289b8..f3b7191 100644 --- a/python/gentoo_main/wsgi.py.conf +++ b/python/gentoo_main/wsgi.py.conf @@ -16,7 +16,7 @@ framework. import os
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: sql/
commit: 674eb6c38dd1b4ed0fabf901173c9cd97afd0919 Author: Magnus Granberg gentoo org> AuthorDate: Mon Feb 15 16:37:01 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Mon Feb 15 16:37:01 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=674eb6c3 add full db of the web sql/gentoo-www_full.sql | 651 1 file changed, 651 insertions(+) diff --git a/sql/gentoo-www_full.sql b/sql/gentoo-www_full.sql new file mode 100644 index 000..b8f7ae0 --- /dev/null +++ b/sql/gentoo-www_full.sql @@ -0,0 +1,651 @@ +-- phpMyAdmin SQL Dump +-- version 4.2.13 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Feb 15, 2016 at 03:53 PM +-- Server version: 10.0.22-MariaDB-log +-- PHP Version: 5.6.16-pl0-gentoo + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `gentoo-www` +-- + +-- + +-- +-- Table structure for table `auth_group` +-- + +CREATE TABLE IF NOT EXISTS `auth_group` ( +`id` int(11) NOT NULL, + `name` varchar(80) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `auth_group_permissions` +-- + +CREATE TABLE IF NOT EXISTS `auth_group_permissions` ( +`id` int(11) NOT NULL, + `group_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `auth_permission` +-- + +CREATE TABLE IF NOT EXISTS `auth_permission` ( +`id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `content_type_id` int(11) NOT NULL, + `codename` varchar(100) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `auth_permission` +-- + +INSERT INTO `auth_permission` (`id`, `name`, `content_type_id`, `codename`) VALUES +(1, 'Can add permission', 1, 'add_permission'), +(2, 'Can change permission', 1, 'change_permission'), +(3, 'Can delete permission', 1, 'delete_permission'), +(4, 'Can add group', 2, 'add_group'), +(5, 'Can change group', 2, 'change_group'), +(6, 'Can delete group', 2, 'delete_group'), +(7, 'Can add user', 3, 'add_user'), +(8, 'Can change user', 3, 'change_user'), +(9, 'Can delete user', 3, 'delete_user'), +(10, 'Can add content type', 4, 'add_contenttype'), +(11, 'Can change content type', 4, 'change_contenttype'), +(12, 'Can delete content type', 4, 'delete_contenttype'), +(13, 'Can add session', 5, 'add_session'), +(14, 'Can change session', 5, 'change_session'), +(15, 'Can delete session', 5, 'delete_session'), +(16, 'Can add site', 6, 'add_site'), +(17, 'Can change site', 6, 'change_site'), +(18, 'Can delete site', 6, 'delete_site'); + +-- + +-- +-- Table structure for table `auth_user` +-- + +CREATE TABLE IF NOT EXISTS `auth_user` ( +`id` int(11) NOT NULL, + `password` varchar(128) NOT NULL, + `last_login` datetime DEFAULT NULL, + `is_superuser` tinyint(1) NOT NULL, + `username` varchar(30) NOT NULL, + `first_name` varchar(30) NOT NULL, + `last_name` varchar(30) NOT NULL, + `email` varchar(254) NOT NULL, + `is_staff` tinyint(1) NOT NULL, + `is_active` tinyint(1) NOT NULL, + `date_joined` datetime NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `auth_user_groups` +-- + +CREATE TABLE IF NOT EXISTS `auth_user_groups` ( +`id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `group_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `auth_user_user_permissions` +-- + +CREATE TABLE IF NOT EXISTS `auth_user_user_permissions` ( +`id` int(11) NOT NULL, + `user_id` int(11) NOT NULL, + `permission_id` int(11) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `django_content_type` +-- + +CREATE TABLE IF NOT EXISTS `django_content_type` ( +`id` int(11) NOT NULL, + `app_label` varchar(100) NOT NULL, + `model` varchar(100) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `django_content_type` +-- + +INSERT INTO `django_content_type` (`id`, `app_label`, `model`) VALUES +(2, 'auth', 'group'), +(1, 'auth', 'permission'), +(3, 'auth', 'user'), +(4, 'contenttypes', 'contenttype'), +(5, 'sessions', 'session'), +(6, 'sites', 'site'); + +-- + +-- +-- Table structure
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/ebuilds/, ...
commit: fb308a94d6fd8690d3e82f8fe833bbe93791ec39 Author: Magnus Granberg gentoo org> AuthorDate: Fri Feb 12 22:41:24 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Fri Feb 12 22:41:24 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=fb308a94 redo the add buildinfo to packages python/tbc_www/views.py| 114 + python/templates/includes/frontpage/new_logs | 26 +++-- python/templates/pages/new/logs/build/index.html | 28 ++--- .../templates/pages/packages/category/index.html | 13 ++- .../pages/packages/ebuilds/ebuild/index.html | 39 --- python/templates/pages/packages/ebuilds/index.html | 5 +- 6 files changed, 136 insertions(+), 89 deletions(-) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index c1124ff..b47cd88 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -44,20 +44,7 @@ def home(request): adict2['SummeryText'] = BL.SummeryText adict2['Fail'] = BL.Fail if BL.Fail: - BE_tmp = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - for BE in BE_tmp: - if BE.ErrorId.ErrorId == 3: - adict2['FailCode'] = 'OTHERS' - if BE.ErrorId.ErrorId >= 4: - adict2['FailCode'] = BE.ErrorId.ErrorName - adict2['Repoman'] = False - BLRe = BuildLogsRepoman.objects.filter(BuildLogId = BL.BuildLogId) - if BLRe.exists(): - adict2['Repoman'] = True - adict2['Qa'] = False - BLQe = BuildLogsQa.objects.filter(BuildLogId = BL.BuildLogId) - if BLQe.exists(): - adict2['Qa'] = True + adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) alist.append(adict2) TmpDict['BL'] = alist adict = {} @@ -121,24 +108,28 @@ def packages(request, category_id): 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 - else: - adict['Repoman'] = False BLQ = BuildLogsQa.objects.filter(BuildLogId__EbuildId__PackageId__PackageId = PM.PackageId.PackageId).filter(BuildLogId__EbuildId__Active = True) if BLQ.exists(): adict['Qa'] = True - else: - adict['Qa'] = False - BL = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = PM.PackageId.PackageId).filter(EbuildId__Active = True) - if BL.exists(): + BL_tmp = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = PM.PackageId.PackageId).filter(EbuildId__Active = True) + if BL_tmp.exists(): adict['Bl'] = True - adict['Blf'] = False - if BL.filter(Fail = True).exists(): - adict['Blf'] = True - else: - adict['Bl'] = False + 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') @@ -181,8 +172,17 @@ def ebuilds(request, package_id): 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: +
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/tbc_www/
commit: 42327597334a2350d1c3de4270790dfad984086d Author: Magnus Granberg gentoo org> AuthorDate: Thu Feb 4 22:54:33 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Thu Feb 4 22:54:33 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=42327597 update buildinfo to packages typo fix python/tbc_www/views.py | 2 +- python/templates/includes/frontpage/new_logs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index e5b92a0..c1124ff 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -233,7 +233,7 @@ def new_main(request): if BE.ErrorId.ErrorId == 3: adict2['FailCode'] = 'OTHERS' if BE.ErrorId.ErrorId >= 4: - adict2['FailCode'] = BE.ErrorId.Error + adict2['FailCode'] = BE.ErrorId.ErrorName adict2['Repoman'] = False BLRe = BuildLogsRepoman.objects.filter(BuildLogId = BL.BuildLogId) if BLRe.exists(): diff --git a/python/templates/includes/frontpage/new_logs b/python/templates/includes/frontpage/new_logs index 3b0310c..1acbbc2 100644 --- a/python/templates/includes/frontpage/new_logs +++ b/python/templates/includes/frontpage/new_logs @@ -9,7 +9,7 @@ {% if B.FailCode == 'OTHERS' %} {{ B.FailCode }} {% else %} -{{ B.FailCode }} +{{ B.FailCode }} {% endif %} {% else %} Build
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/new/repoman/, python/tbc_www/, ...
commit: a8fc1c1b6f8201c9165a92147d1e751d0c4436e6 Author: Magnus Granberg gentoo org> AuthorDate: Tue Feb 2 22:44:31 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Tue Feb 2 22:44:31 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=a8fc1c1b add buildinfo to packages python/tbc_www/models.py | 15 +++- python/tbc_www/urls.py | 2 +- python/tbc_www/views.py| 96 -- python/templates/includes/frontpage/new_repoman| 10 +++ python/templates/includes/frontpage/new_repoman_qa | 18 python/templates/pages/home/index.html | 4 +- python/templates/pages/new/index.html | 4 +- python/templates/pages/new/logs/build/index.html | 14 +++- .../pages/new/{repomanqa => repoman}/index.html| 22 + .../templates/pages/packages/category/index.html | 11 +++ .../pages/packages/ebuilds/ebuild/index.html | 33 ++-- python/templates/pages/packages/ebuilds/index.html | 29 +-- 12 files changed, 172 insertions(+), 86 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 81f7c59..0d58bc1 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -41,7 +41,7 @@ class Packages(models.Model): class Meta: db_table = 'packages' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp) + return '%s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp) class PackagesMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') @@ -74,7 +74,7 @@ class EbuildsMetadata(models.Model): class Meta: db_table = 'ebuilds_metadata' def __str__(self): - return '%s %s %s %s' % (self.Id, self.EbuildId, self,Commit, self.New, self.Descriptions) + return '%s %s %s %s %s' % (self.Id, self.EbuildId, self,Commit, self.New, self.Descriptions) class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') @@ -89,12 +89,21 @@ class BuildLogs(models.Model): 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) +class BuildLogsRepoman(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') + SummeryText = models.TextField(db_column='summery_text') + class Meta: + db_table = 'build_logs_repoman' + def __str__(self): + return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) + class BuildLogsQa(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') SummeryText = models.TextField(db_column='summery_text') class Meta: - db_table = 'build_logs_repoman_qa' + db_table = 'build_logs_qa' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 6198beb..5be267f 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -8,6 +8,6 @@ urlpatterns = patterns('tbc_www.views', url(r'^ebuild/(?P\d+)/$', 'ebuild'), url(r'^new/logs/build/(?P\d+)/$', 'new_logs_build'), url(r'^new/logs/$', 'new_logs'), - url(r'^new/repomanqa/$', 'new_repomanqa'), + url(r'^new/repoman/$', 'new_repoman'), url(r'^new/$', 'new_main'), ) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 29e561d..29fb520 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -8,7 +8,7 @@ from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, P from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman, \ - BuildLogsConfig, BuildLogsUse, BuildLogsQa + BuildLogsConfig, BuildLogsUse, BuildLogsRepoman import re def default_TmpDict(pagerequest): @@ -78,8 +78,7 @@ def home(request): adict2['title'] = adict2['title'] + "\n" adict[BJ.BuildJobId] = adict2 TmpDict['BJ'] = adict - TmpDict['QA_tmp'] = BuildLogsQa.objects.order_by('-Id')[:Lines/2] - TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines/2] + TmpDict['PR_tmp'] =
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/category/
commit: 455fd80beeb8859f808f3826c49b4bf4b1b4d97a Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 31 15:39:31 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 31 15:39:31 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=455fd80b fix a typo for package link python/templates/pages/packages/category/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/templates/pages/packages/category/index.html b/python/templates/pages/packages/category/index.html index f986599..7bad0b4 100644 --- a/python/templates/pages/packages/category/index.html +++ b/python/templates/pages/packages/category/index.html @@ -7,7 +7,7 @@ -{{ C.Category }}/{{ PM.Package }} +{{ C.Category }}/{{ PM.Package }} Changlog
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/
commit: a0a2a79a1d270562a219a0a3d2ff7c40df42ea44 Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 31 15:02:20 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 31 15:02:20 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=a0a2a79a remove mtime in the package model python/tbc_www/models.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index dda8c3b..81f7c59 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -36,13 +36,12 @@ class Packages(models.Model): CategoryId = models.ForeignKey(Categories, db_column='category_id') Package = models.CharField(max_length=150, db_column='package') RepoId = models.ForeignKey(Repos, db_column='repo_id') - Mtime = models.DateTimeField(db_column='mtime') Active = models.BooleanField(db_column='active') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'packages' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Mtime, self.Active, self.TimeStamp) + return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Active, self.TimeStamp) class PackagesMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id')
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/category/, python/templates/pages/home/, ...
commit: c1fd22d07af4dc9022ef7e68489d8aa8e38c9e60 Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 31 15:05:21 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 31 15:05:21 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=c1fd22d0 update changelogs python/templates/layout/base.html | 2 +- python/templates/pages/home/index.html | 4 ++-- python/templates/pages/packages/category/index.html | 2 +- python/templates/pages/packages/ebuilds/index.html | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/templates/layout/base.html b/python/templates/layout/base.html index 1c1f2cf..eaa86f3 100644 --- a/python/templates/layout/base.html +++ b/python/templates/layout/base.html @@ -6,7 +6,7 @@ - + {% block content %}{% endblock %} diff --git a/python/templates/pages/home/index.html b/python/templates/pages/home/index.html index 08b4b1d..c355c11 100644 --- a/python/templates/pages/home/index.html +++ b/python/templates/pages/home/index.html @@ -3,11 +3,11 @@ -New Packages more at the New Packages +New or updated packagesmore at theNew packages {% include "includes/frontpage/new_packages" %} -New Logs more at the New Logs +New Logs more at the New logs {% include "includes/frontpage/new_logs" %} diff --git a/python/templates/pages/packages/category/index.html b/python/templates/pages/packages/category/index.html index 8cc402d..f986599 100644 --- a/python/templates/pages/packages/category/index.html +++ b/python/templates/pages/packages/category/index.html @@ -8,7 +8,7 @@ {{ C.Category }}/{{ PM.Package }} -Changlog +Changlog {{ PM.Descriptions }} diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html index 10cca76..b941c62 100644 --- a/python/templates/pages/packages/ebuilds/index.html +++ b/python/templates/pages/packages/ebuilds/index.html @@ -4,7 +4,7 @@ {{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }} Changlog -{{ P.Changlog|linebreaksbr }} +{{ P.Gitlog|linebreaksbr }} {% for E in EM_tmp %}
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/new/logs/build/
commit: 6858ef16fd91285c26b6df082cc40da2a4463244 Author: Magnus Granberg gentoo org> AuthorDate: Mon Jan 11 16:52:56 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Mon Jan 11 16:52:56 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=6858ef16 add emerge info python/templates/pages/new/logs/build/index.html | 6 ++ 1 file changed, 6 insertions(+) diff --git a/python/templates/pages/new/logs/build/index.html b/python/templates/pages/new/logs/build/index.html index 9ae0656..487a397 100644 --- a/python/templates/pages/new/logs/build/index.html +++ b/python/templates/pages/new/logs/build/index.html @@ -61,6 +61,12 @@ + + Emerge Info: + {{ BLI.emerge_info_text|linebreaks }} + + + {% if BLI.logname %}
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/
commit: cb322ccb29e1a6dd74c0381628f749ca7d5f9de6 Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 10 16:35:44 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 10 16:35:44 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=cb322ccb change from checksum to mtime on Manifest python/tbc_www/models.py | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index e864cf8..dda8c3b 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -36,13 +36,13 @@ class Packages(models.Model): CategoryId = models.ForeignKey(Categories, db_column='category_id') Package = models.CharField(max_length=150, db_column='package') RepoId = models.ForeignKey(Repos, db_column='repo_id') - Checksum = models.CharField(max_length=100, db_column='checksum') + Mtime = models.DateTimeField(db_column='mtime') Active = models.BooleanField(db_column='active') TimeStamp = models.DateTimeField(db_column='time_stamp') class Meta: db_table = 'packages' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Checksum, self.Active, self.TimeStamp) + return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Mtime, self.Active, self.TimeStamp) class PackagesMetadata(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') @@ -52,7 +52,7 @@ class PackagesMetadata(models.Model): class Meta: db_table = 'packages_metadata' def __str__(self): - return '%s %s %s %s' % (self.Id, self.PackageId, self.Changlog, self.Descriptions) + return '%s %s %s %s' % (self.Id, self.PackageId, self.Gitlog, self.Descriptions) class Ebuilds(models.Model): EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') @@ -75,7 +75,7 @@ class EbuildsMetadata(models.Model): class Meta: db_table = 'ebuilds_metadata' def __str__(self): - return '%s %s %s %s' % (self.Id, self.EbuildId, self.Revision, self.Descriptions) + return '%s %s %s %s' % (self.Id, self.EbuildId, self,Commit, self.New, self.Descriptions) class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id')
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/new/logs/, python/templates/pages/new/logs/build/, ...
commit: 971c89f68b859e56663fb1940beb3c94ba64e02c Author: Magnus Granberg gentoo org> AuthorDate: Sun Jan 10 17:49:39 2016 + Commit: Magnus Granberg gentoo org> CommitDate: Sun Jan 10 17:49:39 2016 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=971c89f6 add build page python/tbc_www/urls.py | 3 +- python/tbc_www/views.py | 62 +++- python/templates/includes/frontpage/new_logs | 2 +- python/templates/pages/new/logs/build/index.html | 72 python/templates/pages/new/logs/index.html | 46 +++ 5 files changed, 182 insertions(+), 3 deletions(-) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 60f00d4..6198beb 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -4,8 +4,9 @@ urlpatterns = patterns('tbc_www.views', url(r'^home/$', 'home'), url(r'^packages/$', 'categories'), url(r'^categories/(?P\d+)/$', 'packages'), - url(r'^package/(?P\d+)/$', 'ebuilds'), + url(r'^packages/(?P\d+)/$', 'ebuilds'), url(r'^ebuild/(?P\d+)/$', 'ebuild'), + url(r'^new/logs/build/(?P\d+)/$', 'new_logs_build'), url(r'^new/logs/$', 'new_logs'), url(r'^new/repomanqa/$', 'new_repomanqa'), url(r'^new/$', 'new_main'), diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index df2af96..29e561d 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -7,7 +7,8 @@ from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman + Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman, \ + BuildLogsConfig, BuildLogsUse, BuildLogsQa import re def default_TmpDict(pagerequest): @@ -237,3 +238,62 @@ def new_logs(request): alist.append(adict2) TmpDict['BL_tmp'] = alist return render(request, 'pages/' + pagerequest + '/logs/index.html', TmpDict) + +def new_logs_build(request, buildlog_id): + pagerequest = 'new' + TmpDict = default_TmpDict(pagerequest) + 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) + BLI = {} + BLI['BuildLogId'] = buildlog_id + BLI['EbuildId'] = B.EbuildId.EbuildId + BLI['C'] = B.EbuildId.PackageId.CategoryId.Category + BLI['P'] = B.EbuildId.PackageId.Package + BLI['V'] = B.EbuildId.Version + BLI['R'] = B.EbuildId.PackageId.RepoId.Repo + BLI['EC'] = EM.Commit + BLI['PD'] = EM.Descriptions + BLI['PC'] = PM.Gitlog + BLI['Fail'] = B.Fail + if B.Fail: + BLI['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = buildlog_id) + BLI['Summery_text'] = B.SummeryText + if B.BugId == "0": + BLI['BugId'] = False + else: + 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) + config_eoption = [] + BLI['configid'] = BC.ConfigId.ConfigId + BLI['hostname'] = BC.ConfigId.HostName + BLI['config'] = BC.ConfigId.SetupId.Setup + BLI['profile'] = BC.ConfigId.SetupId.Profile + BLI['logid'] = BC.LogId + BLI['logname'] = BC.LogName[1:] + BLI['emerge_info_text'] = BC.EInfoId.EmergeInfoText + #for CEO in CEO_tmp: + # config_eoption.append(CEO.EmergeOptionId.EOption) + #BLI['emerge_option'] = config_eoption + if not BU_tmp == []: + use_enable = [] + use_disable = [] + for BU in BU_tmp: + if BU.Status: + use_enable.append(BU.UseId.Flag) + else: + use_disable.append(BU.UseId.Flag) + if not use_enable == []: + BLI['use_enable'] = use_enable + if not use_disable == []: + BLI['use_disable'] = use_disable + try: + BRQ = BuildLogsQa.objects.get(BuildLogId = B.BuildLogId) + BLI['RepomanQA'] = BRQ.SummeryText + except BuildLogsQa.DoesNotExist as e: + BLI['RepomanQA'] = False + print(BLI) + TmpDict['BLI'] = BLI + return render(request, 'pages/' + pagerequest +
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/new/repomanqa/
commit: 3a0f050105a610e1c4030471356916c96537d775 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Sat Aug 1 23:15:22 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Sat Aug 1 23:15:22 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=3a0f0501 fix new repoman qa to show repoman full python/templates/pages/new/repomanqa/index.html | 31 +++-- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/python/templates/pages/new/repomanqa/index.html b/python/templates/pages/new/repomanqa/index.html index d634b67..637c917 100644 --- a/python/templates/pages/new/repomanqa/index.html +++ b/python/templates/pages/new/repomanqa/index.html @@ -3,19 +3,36 @@ div class=row h2New Repoman and QA's/h2 div class=panel-group id=accordion role=tablist aria-multiselectable=true - {% for RM in RM_tmp %} + {% for QA in QA_tmp %} div class=panel panel-default -div class=panel-heading role=tab id=heading{{ RM.Id }} +div class=panel-heading role=tab id=heading{{ QA.Id }} h4 class=panel-title -a role=button data-toggle=collapse data-parent=#accordion href=#collapse{{ RM.Id }} aria-expanded=false aria-controls=collapse{{ RM.Id }} - {{ RM.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ RM.BuildLogId.EbuildId.PackageId.Package }}-{{ RM.BuildLogId.EbuildId.Version }}::{{ RM.BuildLogId.EbuildId.PackageId.RepoId.Repo }} - {{ RM.SummeryText|truncatewords:6 }} +a role=button data-toggle=collapse data-parent=#accordion href=#collapse{{ QA.Id }} aria-expanded=false aria-controls=collapse{{ Qa.Id }} + {{ QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ QA.BuildLogId.EbuildId.PackageId.Package }}-{{ QA.BuildLogId.EbuildId.Version }}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }} + {{ QA.SummeryText|truncatewords:6 }} /a /h4 /div -div id=collapse{{ RM.Id }} class=panel-collapse collapse in role=tabpanel aria-labelledby=heading{{ RM.Id }} +div id=collapse{{ QA.Id }} class=panel-collapse collapse in role=tabpanel aria-labelledby=heading{{ QA.Id }} div class=panel-body -{{ RM.SummeryText|linebreaksbr }} +{{ QA.SummeryText|linebreaksbr }} + /div +/div + /div + {% endfor %} + {% for PR in PR_tmp %} + div class=panel panel-default +div class=panel-heading role=tab id=heading{{ PR.Id }} + h4 class=panel-title +a role=button data-toggle=collapse data-parent=#accordion href=#collapse{{ PR.Id }} aria-expanded=false aria-controls=collapse{{ PR.Id }} + {{ PR.PackageId.CategoryId.Category }}/{{ PR.PackageId.Package }}::{{ PR.PackageId.RepoId.Repo }} + {{ PR.RepomanText|truncatewords:6 }} +/a + /h4 +/div +div id=collapse{{ PR.Id }} class=panel-collapse collapse in role=tabpanel aria-labelledby=heading{{ PR.Id }} + div class=panel-body +{{ PR.RepomanText|linebreaksbr }} /div /div /div
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/templates/pages/packages/ebuilds/, ...
commit: 96969fe37a3f589bbd0a9688979c7cd332cf5c1d Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Sat Aug 1 23:02:22 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Sat Aug 1 23:02:22 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=96969fe3 add repoman full support python/tbc_www/models.py | 13 +- python/tbc_www/views.py| 30 -- python/templates/includes/frontpage/new_repoman_qa | 16 +--- .../templates/pages/packages/category/index.html | 6 - python/templates/pages/packages/ebuilds/index.html | 3 +++ 5 files changed, 54 insertions(+), 14 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 2cb327a..efdc13a 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -89,7 +89,7 @@ class BuildLogs(models.Model): 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) -class BuildLogsRepomanQa(models.Model): +class BuildLogsQa(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') SummeryText = models.TextField(db_column='summery_text') @@ -98,6 +98,17 @@ class BuildLogsRepomanQa(models.Model): def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) +class PackagesRepoman(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + PackageId = models.ForeignKey(Packages, db_column='package_id') + RepomanText = models.TextField(db_column='repoman_text') + RepomanHash = models.CharField(max_length=100, db_column='repoman_hash') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'packages_repoman' + def __str__(self): + return '%s %s %s %s %s' % (self.Id, self.PackageId, self.RepomanText, self.RepomanHash, self.TimeStamp) + class ErrorsInfo(models.Model): ErrorId = models.IntegerField(primary_key=True, db_column='error_id') ErrorName = models.CharField(max_length=20, db_column='error_name') diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 7e99671..ff9a201 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -5,9 +5,9 @@ from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts -from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ +from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse + Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse, PackagesRepoman import re def default_TmpDict(pagerequest): @@ -29,7 +29,7 @@ def default_TmpDict(pagerequest): def home(request): pagerequest = 'home' - Lines = 5 + Lines = 10 TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] alist = [] @@ -77,7 +77,8 @@ def home(request): adict2['title'] = adict2['title'] + \n adict[BJ.BuildJobId] = adict2 TmpDict['BJ'] = adict - TmpDict['RM'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines] + TmpDict['QA_tmp'] = BuildLogsQa.objects.order_by('-Id')[:Lines/2] + TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines/2] return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) def categories(request): @@ -107,6 +108,12 @@ def packages(request, category_id): adict['Package'] = PM.PackageId.Package adict['Descriptions'] = PM.Descriptions adict['Changlog'] =PM.Changlog + try: + PackagesRepoman.objects.get(PackageId__PackageId = PM.PackageId.PackageId) + except PackagesRepoman.DoesNotExist as e: + adict['Repoman'] = False + else: + adict['Repoman'] = 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') @@ -119,11 +126,16 @@ def packages(request, category_id): def ebuilds(request, package_id): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) -
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/ebuilds/ebuild/, ...
commit: 65c8b3dcce64f5c865baa472c0307a07c1f9872b Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Sun Jul 26 14:37:39 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Sun Jul 26 14:37:39 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=65c8b3dc add ebuild info and fix listing of packages python/tbc_www/models.py | 27 + python/tbc_www/urls.py | 1 + python/tbc_www/views.py| 40 -- python/templates/includes/frontpage/new_logs | 8 ++-- .../templates/pages/packages/category/index.html | 6 +-- .../pages/packages/ebuilds/ebuild/index.html | 47 ++ python/templates/pages/packages/index.html | 6 +-- 7 files changed, 112 insertions(+), 23 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 621a7dc..2cb327a 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -175,6 +175,14 @@ class Keywords(models.Model): def __str__(self): return '%s %s' % (self.KeywordId, self.Keyword) +class Restrictions(models.Model): + RestrictionId = models.IntegerField(primary_key=True, db_column='restriction_id') + Restriction = models.CharField(max_length=150, db_column='restriction') + class Meta: + db_table = 'restrictions' + def __str__(self): + return '%s %s' % (self.RestrictionId, self.Restriction) + class EbuildsKeywords(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') @@ -184,3 +192,22 @@ class EbuildsKeywords(models.Model): db_table = 'ebuilds_keywords' def __str__(self): return '%s %s %s' % (self.EbuildId, self.KeywordId, self.Status) + +class EbuildsIuse(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + UseId = models.ForeignKey(Uses, db_column='use_id') + Status =models.BooleanField(db_column='status') + class Meta: + db_table = 'ebuilds_iuse' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.EbuildId, self.UseId, self.Status) + +class EbuildsRestrictions(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + RestrictionId = models.ForeignKey(Restrictions, db_column='restriction_id') + class Meta: + db_table = 'ebuilds_restrictions' + def __str__(self): + return '%s %s' % (self.EbuildId, self.RestrictionId) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 193443f..4d50f40 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -5,5 +5,6 @@ urlpatterns = patterns('tbc_www.views', url(r'^packages/$', 'categories'), url(r'^categories/(?Pcategory_id\d+)/$', 'packages'), url(r'^package/(?Ppackage_id\d+)/$', 'ebuilds'), + url(r'^ebuild/(?Pebuild_id\d+)/$', 'ebuild'), url(r'^new/$', 'new_main'), ) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index f68a706..5b719aa 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -7,7 +7,7 @@ from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos, EbuildsKeywords, BuildLogsErrors + Repos, EbuildsKeywords, BuildLogsErrors, EbuildsRestrictions, EbuildsIuse import re def default_TmpDict(pagerequest): @@ -32,9 +32,10 @@ def home(request): Lines = 5 TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] - adict = {} + 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 @@ -43,8 +44,8 @@ def home(request): adict2['SummeryText'] = BL.SummeryText if BL.Fail: adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) - adict[BL.BuildLogId] = adict2 - TmpDict['BL'] = adict + alist.append(adict2) + TmpDict['BL'] = alist adict = {} BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp')[:Lines]
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/, python/templates/pages/home/, python/templates/pages/new/, ...
commit: 2b49668f127b3be24be722ffdd00dd819b1f1acf Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Mon Jul 27 00:41:09 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Mon Jul 27 00:41:09 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=2b49668f add repoman and qa page on new python/tbc_www/urls.py | 1 + python/tbc_www/views.py | 7 +++ python/templates/pages/home/index.html | 2 +- python/templates/pages/new/index.html | 2 +- python/templates/pages/new/repomanqa/index.html | 26 + 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 4d50f40..55fbca9 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -6,5 +6,6 @@ urlpatterns = patterns('tbc_www.views', url(r'^categories/(?Pcategory_id\d+)/$', 'packages'), url(r'^package/(?Ppackage_id\d+)/$', 'ebuilds'), url(r'^ebuild/(?Pebuild_id\d+)/$', 'ebuild'), + url(r'^new/repomanqa/$', 'new_repomanqa'), url(r'^new/$', 'new_main'), ) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 5b719aa..7e99671 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -190,3 +190,10 @@ def new_main(request): TmpDict['BJ'] = adict TmpDict['RM'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines] return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) + +def new_repomanqa(request): + pagerequest = 'new' + Lines = 30 + TmpDict = default_TmpDict(pagerequest) + TmpDict['RM_tmp'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines] + return render(request, 'pages/' + pagerequest + '/repomanqa/index.html', TmpDict) diff --git a/python/templates/pages/home/index.html b/python/templates/pages/home/index.html index d2b0ff7..9a75c4e 100644 --- a/python/templates/pages/home/index.html +++ b/python/templates/pages/home/index.html @@ -18,7 +18,7 @@ {% include includes/frontpage/new_build_req %} /div div class=col-xs-12 col-md-6 -h2New Repoman or QA's smallon the a href=/new_repoman_qa/New Repoman or QA's/a/small/h2 +h2New Repoman or QA's smallon the a href=/new/repomanqa/New Repoman or QA's/a/small/h2 {% include includes/frontpage/new_repoman_qa %} /div /div diff --git a/python/templates/pages/new/index.html b/python/templates/pages/new/index.html index 5195584..93cf42f 100644 --- a/python/templates/pages/new/index.html +++ b/python/templates/pages/new/index.html @@ -17,7 +17,7 @@ {% include includes/frontpage/new_build_req %} /div div class=col-xs-12 col-md-6 -h2New Repoman or QA's smallon the a href=/new_repoman_qa/New Repoman or QA's/a/small/h2 +h2New Repoman or QA's smallon the a href=/new/repomanqa/New Repoman or QA's/a/small/h2 {% include includes/frontpage/new_repoman_qa %} /div /div diff --git a/python/templates/pages/new/repomanqa/index.html b/python/templates/pages/new/repomanqa/index.html new file mode 100644 index 000..d634b67 --- /dev/null +++ b/python/templates/pages/new/repomanqa/index.html @@ -0,0 +1,26 @@ +{% extends layout/base.html %} +{% block content %} +div class=row + h2New Repoman and QA's/h2 + div class=panel-group id=accordion role=tablist aria-multiselectable=true + {% for RM in RM_tmp %} + div class=panel panel-default +div class=panel-heading role=tab id=heading{{ RM.Id }} + h4 class=panel-title +a role=button data-toggle=collapse data-parent=#accordion href=#collapse{{ RM.Id }} aria-expanded=false aria-controls=collapse{{ RM.Id }} + {{ RM.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ RM.BuildLogId.EbuildId.PackageId.Package }}-{{ RM.BuildLogId.EbuildId.Version }}::{{ RM.BuildLogId.EbuildId.PackageId.RepoId.Repo }} + {{ RM.SummeryText|truncatewords:6 }} +/a + /h4 +/div +div id=collapse{{ RM.Id }} class=panel-collapse collapse in role=tabpanel aria-labelledby=heading{{ RM.Id }} + div class=panel-body +{{ RM.SummeryText|linebreaksbr }} + /div +/div + /div + {% endfor %} + /div +/div + +{% endblock %} \ No newline at end of file
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/, python/templates/includes/frontpage/
commit: f1d51cfa2fe8f8a781dc31e3f6ca7ad6436b8563 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Fri Jul 24 00:17:26 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Fri Jul 24 00:17:26 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=f1d51cfa fix error, repoman, qa view in new logs python/tbc_www/models.py | 22 +++--- python/tbc_www/views.py | 34 python/templates/includes/frontpage/new_logs | 26 + 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 9827583..621a7dc 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -80,8 +80,6 @@ class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') Fail = models.BooleanField(db_column='fail') - RmQa = models.BooleanField(db_column='rmqa') - Others = models.BooleanField(db_column='others') SummeryText = models.TextField(db_column='summery_text') LogHash = models.CharField(max_length=100, db_column='log_hash') BugId = models.IntegerField( db_column='bug_id') @@ -89,7 +87,7 @@ class BuildLogs(models.Model): class Meta: db_table = 'build_logs' def __str__(self): - return '%s %s %s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.RmQa, self.Others, self.SummeryText, self.LogHash, self.BugId, self.TimeStamp) + return '%s %s %s %s %s %s %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.SummeryText, self.LogHash, self.BugId, self.TimeStamp) class BuildLogsRepomanQa(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') @@ -100,6 +98,24 @@ class BuildLogsRepomanQa(models.Model): def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) +class ErrorsInfo(models.Model): + ErrorId = models.IntegerField(primary_key=True, db_column='error_id') + ErrorName = models.CharField(max_length=20, db_column='error_name') + ErrorSearch = models.CharField(max_length=30, db_column='error_search') + class Meta: + db_table = 'errors_info' + def __str__(self): + return '%s %s %s' % (self.ErrorId, self.ErrorName, self.ErrorSearch) + +class BuildLogsErrors(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') + ErrorId = models.ForeignKey(ErrorsInfo, db_column='error_id') + class Meta: + db_table = 'build_logs_errors' + def __str__(self): + return '%s %s %s' % (self.Id, self.BuildLogId, self.ErrorId) + class Setups(models.Model): SetupId = models.AutoField(primary_key=True, db_column='setup_id') Setup = models.CharField(max_length=100, db_column='setup') diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 2559f8d..f68a706 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -7,7 +7,7 @@ from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos, EbuildsKeywords + Repos, EbuildsKeywords, BuildLogsErrors import re def default_TmpDict(pagerequest): @@ -30,10 +30,22 @@ def default_TmpDict(pagerequest): def home(request): pagerequest = 'home' Lines = 5 - adict = {} TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] - TmpDict['BL'] = BuildLogs.objects.order_by('-TimeStamp')[:Lines] + adict = {} + for BL in BuildLogs.objects.order_by('-TimeStamp')[:Lines]: + adict2 = {} + 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['SummeryText'] = BL.SummeryText + if BL.Fail: + adict2['BE_tmp'] = BuildLogsErrors.objects.filter(BuildLogId = BL.BuildLogId) + adict[BL.BuildLogId] = adict2 + TmpDict['BL'] = adict + adict = {} BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp')[:Lines] for BJ in BJ_Tmp: adict2 = {} @@ -115,10 +127,22 @@ def ebuilds(request, package_id): def
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/ebuilds/, python/templates/pages/packages/, ...
commit: 9a6e27cb6c11138eee1af77491d4ac3cd42b3afd Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Thu Jul 23 13:55:46 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Thu Jul 23 13:55:46 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=9a6e27cb fix more rows for packages .../templates/pages/packages/category/index.html | 40 +- python/templates/pages/packages/ebuilds/index.html | 2 -- python/templates/pages/packages/index.html | 37 3 files changed, 45 insertions(+), 34 deletions(-) diff --git a/python/templates/pages/packages/category/index.html b/python/templates/pages/packages/category/index.html index 34c1426..edc7cc9 100644 --- a/python/templates/pages/packages/category/index.html +++ b/python/templates/pages/packages/category/index.html @@ -1,23 +1,29 @@ {% extends layout/base.html %} {% block content %} div class=row - div class=col-xs-12 col-md-6 -h2Packages in {{ C.Category }}/h2 -table class=table table-striped frontpage-table - {% for key, PM in PM_tmp.items %} -tr - td class=frontpage-table-package-atom -a href=/package/{{ PM.PackageId }}/ title={{ C.Category }}/{{ key }}{{ C.Category }}/{{ key }}/a -p title={{ PM.Changlog }}Changlog/p - /td - td -p title={{ PM.Descriptions }}{{ PM.Descriptions }}/p -p title={% for P in PM.Ebuilds %}{{ key }}/{{ P }}{% endfor %}Versions/p - /td -/tr - {% endfor %} -/table - /div + h2Packages in {{ C.Category }}/h2 + div class=col-xs-12 col-md-5 +{% for key, PM in PM_tmp.items %} + table class=table table-striped frontpage-table +tr + td class=frontpage-table-package-atom +a href=/package/{{ PM.PackageId }}/ title={{ C.Category }}/{{ key }}{{ C.Category }}/{{ key }}/a +p title={{ PM.Changlog }}Changlog/p + /td + td +p title={{ PM.Descriptions }}{{ PM.Descriptions }}/p +p title={% for P in PM.Ebuilds %}{{ key }}/{{ P }}{% endfor %}Versions/p + /td +/tr + /table + {% if forloop.last %} +/div + {% else %} +{% if forloop.counter|divisibleby:2 %} + /divdiv class=col-xs-12 col-md-5 +{% endif %} + {% endif %} +{% endfor %} /div {% endblock %} \ No newline at end of file diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html index 1e034d4..f8e1b4e 100644 --- a/python/templates/pages/packages/ebuilds/index.html +++ b/python/templates/pages/packages/ebuilds/index.html @@ -11,7 +11,6 @@ td class=frontpage-table-package-atom a href=/ebuild/{{ E.EbuildId.EbuildId }}/ title={{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}/a/td td - td class=text-right {% for K in EK_tmp %} {% if K.EbuildId.EbuildId == E.EbuildId.EbuildId and K.KeywordId.Keyword != '*' %} {% if K.Status == 'Stable' %}span class=label label-success{{ K.KeywordId.Keyword }}/span{% endif %} @@ -19,7 +18,6 @@ {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% endif %} {% endif %} {% endfor %} -/td /td /tr {% endfor %} diff --git a/python/templates/pages/packages/index.html b/python/templates/pages/packages/index.html index 82ccf59..5e02552 100644 --- a/python/templates/pages/packages/index.html +++ b/python/templates/pages/packages/index.html @@ -1,21 +1,28 @@ {% extends layout/base.html %} {% block content %} div class=row - div class=col-xs-12 col-md-6 -h2Categories/h2 -table class=table table-striped frontpage-table - {% for key, CM in CM_tmp.items %} -tr - td class=frontpage-table-package-atom - a href=/categories/{{ CM.CategoryId }}/ title={{ key }}{{ key }}/a/td - td - p title={{ CM.Descriptions }}{{ CM.Descriptions }}/p - p title={% for P in CM.Packages %}{{ key }}/{{ P }}{% endfor %}Packages/p - /td -/tr - {% endfor %} -/table - /div +h2Categories/h2 + div class=col-xs-8 col-md-4 +{% for key, CM in CM_tmp.items %} + table class=table table-striped frontpage-table +tr + td class=frontpage-table-package-atom +a href=/categories/{{ CM.CategoryId }}/ title={{ key }}{{ key }}/a + /td + td +p title={{ CM.Descriptions }}{{ CM.Descriptions }}/p +p title={% for P in CM.Packages %}{{ key }}/{{ P }}{% endfor %}Packages/p + /td +/tr + /table + {% if forloop.last %} +/div + {% else %} +{% if
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/, python/templates/includes/frontpage/
commit: 84e661c69c15decbcc40d56939361169100d9b1d Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Thu Jul 23 14:56:39 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Thu Jul 23 14:56:39 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=84e661c6 add the main new page python/tbc_www/urls.py| 1 + python/tbc_www/views.py | 5 +++-- python/templates/includes/frontpage/new_build_req | 9 - python/templates/includes/frontpage/new_packages | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py index 82e9336..193443f 100644 --- a/python/tbc_www/urls.py +++ b/python/tbc_www/urls.py @@ -5,4 +5,5 @@ urlpatterns = patterns('tbc_www.views', url(r'^packages/$', 'categories'), url(r'^categories/(?Pcategory_id\d+)/$', 'packages'), url(r'^package/(?Ppackage_id\d+)/$', 'ebuilds'), + url(r'^new/$', 'new_main'), ) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 84ff9e6..2559f8d 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -112,9 +112,9 @@ def ebuilds(request, package_id): TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package) return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict) -def new(request): +def new_main(request): pagerequest = 'new' - Lines = 20 + Lines = 30 adict = {} TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] @@ -127,6 +127,7 @@ def new(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 == []: diff --git a/python/templates/includes/frontpage/new_build_req b/python/templates/includes/frontpage/new_build_req index 53a3fcb..3a47530 100644 --- a/python/templates/includes/frontpage/new_build_req +++ b/python/templates/includes/frontpage/new_build_req @@ -2,7 +2,14 @@ {% for k, v in BJ.items %} tr td class=frontpage-table-package-atoma href=/new_build_req/{{ k }} title={{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}/a/td - tdp title={{ v.title }}{{ v.title|truncatewords:2}}/p/td + tdp title={{ v.title }}{{ v.title|truncatewords:2}}/p + td class=text-right + {% if v.Status == 'Building' %} +span class=label label-primary{{ v.Status }}/span + {% else %} +span class=label label-default{{ v.Status }}/span + {% endif %} + /td/td /tr {% endfor %} /table \ No newline at end of file diff --git a/python/templates/includes/frontpage/new_packages b/python/templates/includes/frontpage/new_packages index 7de11c0..6c845b7 100644 --- a/python/templates/includes/frontpage/new_packages +++ b/python/templates/includes/frontpage/new_packages @@ -4,7 +4,7 @@ td class=frontpage-table-package-atom a href=/packages/{{ E.EbuildId.PackageId.PackageId }}/ title={{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }} {{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}/a/td -tdp{{ E.Descriptions }}/p/td +tdp title={{ E.Descriptions }}{{ E.Descriptions }}/p/td /tr {% endfor %} /table \ No newline at end of file
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/packages/ebuilds/, python/tbc_www/
commit: 539bfb87b96725eb415f6b8afb5262b87b8828d7 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Wed Jul 22 13:38:20 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Wed Jul 22 13:38:20 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=539bfb87 include all repos in packages python/tbc_www/views.py| 10 ++ python/templates/pages/packages/ebuilds/index.html | 16 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 252998e..a025cbf 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -95,8 +95,8 @@ def packages(request, category_id): adict['Descriptions'] = PM.Descriptions adict['Changlog'] =PM.Changlog ebuilds = [] - for E in Ebuilds.objects.filter(Active = True).filter(PackageId_id = PM.PackageId.PackageId): - ebuilds.append(E.Version + '::' + E.PackageId.RepoId.Repo + '\n') + 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 adict2[PM.PackageId.Package] = adict TmpDict['PM_tmp'] = adict2 @@ -106,8 +106,10 @@ def packages(request, category_id): def ebuilds(request, package_id): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) - TmpDict['EB_tmp'] = Ebuilds.objects.filter(PackageId_id = package_id) - TmpDict['P'] = get_object_or_404(Packages, PackageId = package_id) + P = get_object_or_404(Packages, PackageId = package_id) + TmpDict['P'] = P + TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.Package) + print(TmpDict) return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict) def new(request): diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html index a5ed0d6..73f45f2 100644 --- a/python/templates/pages/packages/ebuilds/index.html +++ b/python/templates/pages/packages/ebuilds/index.html @@ -4,14 +4,14 @@ div class=col-xs-12 col-md-6 h2{{ P.CategoryId.Category }}/{{ P.Package }}/h2 table class=table table-striped frontpage-table - {% for E in EB_tmp %} -tr - td class=frontpage-table-package-atom - a href=/ebuild/{{ E.EbuildId }}/ title={{ P.CategoryId.Category }}/{{ P.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}{{ P.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}/a/td -tdp/p/td -/tr - {% endfor %} -/table + {% for E in EM_tmp %} +tr + td class=frontpage-table-package-atom +a href=/ebuild/{{ E.EbuildId.EbuildId }}/ title={{ P.CategoryId.Category }}/{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}/a/td + tdp/p/td +/tr + {% endfor %} +/table /div /div {% endblock %} \ No newline at end of file
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/, python/templates/pages/packages/ebuilds/
commit: f66e4386ffe1b5f48a8f7986d6cc4371d7862b85 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Wed Jul 22 21:24:44 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Wed Jul 22 21:24:44 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=f66e4386 add keywords to version view python/tbc_www/models.py | 18 ++ python/tbc_www/views.py| 8 python/templates/pages/packages/ebuilds/index.html | 20 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 3d284c2..9827583 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -150,3 +150,21 @@ class BuildJobsUse(models.Model): db_table = 'build_jobs_use' def __str__(self): return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status) + +class Keywords(models.Model): + KeywordId = models.IntegerField(primary_key=True, db_column='keyword_id') + Keyword = models.CharField(max_length=45, db_column='keyword') + class Meta: + db_table = 'keywords' + def __str__(self): + return '%s %s' % (self.KeywordId, self.Keyword) + +class EbuildsKeywords(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + KeywordId = models.ForeignKey(Keywords, db_column='keyword_id') + Status = models.CharField(max_length=24, db_column='status') + class Meta: + db_table = 'ebuilds_keywords' + def __str__(self): + return '%s %s %s' % (self.EbuildId, self.KeywordId, self.Status) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index a025cbf..84ff9e6 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -7,7 +7,7 @@ from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ BuildJobsUse, Categories, CategoriesMetadata, Packages, PackagesMetadata, Ebuilds, \ - Repos + Repos, EbuildsKeywords import re def default_TmpDict(pagerequest): @@ -106,10 +106,10 @@ def packages(request, category_id): def ebuilds(request, package_id): pagerequest = 'packages' TmpDict = default_TmpDict(pagerequest) - P = get_object_or_404(Packages, PackageId = package_id) + 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.Package) - print(TmpDict) + TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package) + TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package) return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict) def new(request): diff --git a/python/templates/pages/packages/ebuilds/index.html b/python/templates/pages/packages/ebuilds/index.html index 73f45f2..1e034d4 100644 --- a/python/templates/pages/packages/ebuilds/index.html +++ b/python/templates/pages/packages/ebuilds/index.html @@ -1,14 +1,26 @@ {% extends layout/base.html %} {% block content %} div class=row - div class=col-xs-12 col-md-6 -h2{{ P.CategoryId.Category }}/{{ P.Package }}/h2 + div class=col-xs-12 col-md-9 +h2{{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}/h2 +pChanglog/p +p{{ P.Changlog|linebreaksbr }}/p table class=table table-striped frontpage-table {% for E in EM_tmp %} tr td class=frontpage-table-package-atom -a href=/ebuild/{{ E.EbuildId.EbuildId }}/ title={{ P.CategoryId.Category }}/{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}{{ P.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}/a/td - tdp/p/td +a href=/ebuild/{{ E.EbuildId.EbuildId }}/ title={{ P.PackageId.CategoryId.Category }}/{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}{{ P.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}/a/td + td + td class=text-right + {% for K in EK_tmp %} +{% if K.EbuildId.EbuildId == E.EbuildId.EbuildId and K.KeywordId.Keyword != '*' %} + {% if K.Status == 'Stable' %}span class=label label-success{{ K.KeywordId.Keyword }}/span{% endif %} + {% if K.Status == 'Unstable' %}span class=label
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/gentoo_main/, python/templates/pages/packages/ebuilds/, python/tbc_www/, ...
commit: 2251b1ad2020d70c58d01fdcefb087dd8838db1c Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Tue Jul 21 22:57:00 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Tue Jul 21 22:57:00 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=2251b1ad add package and new to menu python/gentoo_main/urls.py | 7 +- python/tbc_www/models.py | 26 ++- python/tbc_www/urls.py | 8 ++ python/tbc_www/views.py| 89 +- python/templates/pages/new/index.html | 25 ++ .../templates/pages/packages/category/index.html | 23 ++ python/templates/pages/packages/ebuilds/index.html | 17 + python/templates/pages/packages/index.html | 21 + 8 files changed, 208 insertions(+), 8 deletions(-) diff --git a/python/gentoo_main/urls.py b/python/gentoo_main/urls.py index 6cead02..1eb5179 100644 --- a/python/gentoo_main/urls.py +++ b/python/gentoo_main/urls.py @@ -3,6 +3,7 @@ from django.conf.urls import patterns, include, url -urlpatterns = patterns('tbc_www.views', - (r'^home/$', 'home'), -) +urlpatterns = [ + url(r'^home/$', views.home), + url(r'^packages/$', views.packages), +] diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index 04a3bb8..3d284c2 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -13,6 +13,16 @@ class Categories(models.Model): def __str__(self): return '%s %s %s %s' % (self.CategoryId, self.Category, self.Active, self.TimeStamp) +class CategoriesMetadata(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + CategoryId = models.ForeignKey(Categories, db_column='category_id') + Checksum = models.CharField(max_length=100, db_column='checksum') + Descriptions = models.TextField(db_column='descriptions') + class Meta: + db_table = 'categories_metadata' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.CategoryId, self.Checksum, self.Descriptions) + class Repos(models.Model): RepoId = models.IntegerField(primary_key=True, db_column='repo_id') Repo = models.CharField(max_length=100, db_column='repo') @@ -34,6 +44,16 @@ class Packages(models.Model): def __str__(self): return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Checksum, self.Active, self.TimeStamp) +class PackagesMetadata(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + PackageId = models.ForeignKey(Packages, db_column='package_id') + Changlog = models.TextField(db_column='changlog') + Descriptions = models.TextField(db_column='descriptions') + class Meta: + db_table = 'packages_metadata' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.PackageId, self.Changlog, self.Descriptions) + class Ebuilds(models.Model): EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') PackageId = models.ForeignKey(Packages, db_column='package_id') @@ -60,6 +80,8 @@ class BuildLogs(models.Model): BuildLogId = models.IntegerField(primary_key=True, db_column='build_log_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') Fail = models.BooleanField(db_column='fail') + RmQa = models.BooleanField(db_column='rmqa') + Others = models.BooleanField(db_column='others') SummeryText = models.TextField(db_column='summery_text') LogHash = models.CharField(max_length=100, db_column='log_hash') BugId = models.IntegerField( db_column='bug_id') @@ -67,14 +89,14 @@ class BuildLogs(models.Model): 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 %s' % (self.BuildLogId, self.EbuildId, self.Fail, self.RmQa, self.Others, self.SummeryText, self.LogHash, self.BugId, self.TimeStamp) class BuildLogsRepomanQa(models.Model): Id = models.IntegerField(primary_key=True, db_column='id') BuildLogId = models.ForeignKey(BuildLogs, db_column='build_log_id') SummeryText = models.TextField(db_column='summery_text') class Meta: - db_table = 'build_logs_repoman' + db_table = 'build_logs_repoman_qa' def __str__(self): return '%s %s %s' % (self.Id, self.BuildLogId, self.SummeryText) diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py new file mode 100644 index 000..82e9336 --- /dev/null +++ b/python/tbc_www/urls.py @@ -0,0 +1,8 @@ +from
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/
commit: 58736e935b2ece00e47cb380481c5a935f340c82 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Fri Jul 17 06:20:12 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Fri Jul 17 06:20:12 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=58736e93 fix a error to display setup/profiles in new build requests in home python/tbc_www/models.py | 3 ++- python/tbc_www/views.py | 6 ++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index fc91a8b..04a3bb8 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -100,6 +100,7 @@ class Configs(models.Model): class BuildJobs(models.Model): BuildJobId = models.AutoField(primary_key=True, db_column='build_job_id') EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + SetupId = models.ForeignKey(Setups, db_column='setup_id') ConfigId = models.ForeignKey(Configs, db_column='config_id') Status = models.CharField(max_length=21, db_column='status') BuildNow = models.BooleanField(db_column='build_now') @@ -108,7 +109,7 @@ class BuildJobs(models.Model): class Meta: db_table = 'build_jobs' def __str__(self): - return '%s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) + 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) class Uses(models.Model): UseId = models.IntegerField(primary_key=True, db_column='use_id') diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 108a653..dcc89d4 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -5,7 +5,7 @@ from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts -from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ +from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ BuildJobsUse import re @@ -42,9 +42,7 @@ def home(request): adict2['P'] = BJ.EbuildId.PackageId.Package adict2['V'] = BJ.EbuildId.Version adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo - adict2['Profile'] = BJ.ConfigId.SetupId.Profile - adict2['Setup'] = BJ.ConfigId.SetupId.Setup - adict2['title'] = Setup: + BJ.ConfigId.SetupId.Setup + \n + Profile: + BJ.ConfigId.SetupId.Profile + \n + adict2['title'] = Setup: + BJ.SetupId.Setup + \n + Profile: + BJ.SetupId.Profile + \n BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) if not BJU == []: use_enable = []
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/tbc_www/
commit: b064d9675554a6ea3d518a2891b4c1495f26011c Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Thu Jul 16 22:41:57 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Thu Jul 16 22:41:57 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=b064d967 add more info for new build request and new build logs on home python/tbc_www/models.py | 18 +++ python/tbc_www/views.py | 37 +-- python/templates/includes/frontpage/new_build_req | 6 ++-- python/templates/includes/frontpage/new_logs | 2 +- 4 files changed, 57 insertions(+), 6 deletions(-) diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py index b51e154..fc91a8b 100644 --- a/python/tbc_www/models.py +++ b/python/tbc_www/models.py @@ -109,3 +109,21 @@ class BuildJobs(models.Model): db_table = 'build_jobs' def __str__(self): return '%s %s %s %s %s %s %s' % (self.BuildJobId, self.EbuildId, self.ConfigId, self.Status, self.BuildNow, self.RemoveBin, self.TimeStamp) + +class Uses(models.Model): + UseId = models.IntegerField(primary_key=True, db_column='use_id') + Flag = models.CharField(max_length=150, db_column='flag') + class Meta: + db_table = 'uses' + def __str__(self): + return '%s %s' % (self.UseId, self.Flag) + +class BuildJobsUse(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + BuildJobId = models.ForeignKey(BuildJobs, db_column='build_job_id') + UseId = models.ForeignKey(Uses, db_column='use_id') + Status = models.BooleanField(db_column='status') + class Meta: + db_table = 'build_jobs_use' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.BuildJobId, self.UseId, self.Status) diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py index 58f186e..108a653 100644 --- a/python/tbc_www/views.py +++ b/python/tbc_www/views.py @@ -5,7 +5,8 @@ from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.conf import settings from gentoo_www.models import SiteSettings, Layout, Pages, SubPages, Sponsors, Posts -from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa +from tbc_www.models import EbuildsMetadata, BuildLogs, BuildJobs, BuildLogsRepomanQa, \ + BuildJobsUse import re @@ -29,9 +30,41 @@ def default_TmpDict(pagerequest): def home(request): pagerequest = 'home' Lines = 10 + adict = {} TmpDict = default_TmpDict(pagerequest) TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines] TmpDict['BL'] = BuildLogs.objects.order_by('-TimeStamp')[:Lines] - TmpDict['BJ'] = BuildJobs.objects.order_by('-TimeStamp')[:Lines] + BJ_Tmp = BuildJobs.objects.order_by('-TimeStamp')[:Lines] + for BJ in BJ_Tmp: + adict2 = {} + adict2['EbuildId'] = BJ.EbuildId.EbuildId + adict2['C'] = BJ.EbuildId.PackageId.CategoryId.Category + adict2['P'] = BJ.EbuildId.PackageId.Package + adict2['V'] = BJ.EbuildId.Version + adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo + adict2['Profile'] = BJ.ConfigId.SetupId.Profile + adict2['Setup'] = BJ.ConfigId.SetupId.Setup + adict2['title'] = Setup: + BJ.ConfigId.SetupId.Setup + \n + Profile: + BJ.ConfigId.SetupId.Profile + \n + BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId) + if not BJU == []: + use_enable = [] + use_disable = [] + for BU in BJU: + if BU.Status: + use_enable.append(BU.UseId.Flag) + else: + use_disable.append(BU.UseId.Flag) + if not use_enable == []: + adict2['title'] = adict2['title'] + Enable: + for use in use_enable: + adict2['title'] = adict2['title'] + use + + adict2['title'] = adict2['title'] + \n + if not use_disable == []: + adict2['title'] = adict2['title'] + Disable: + for use in use_disable: + adict2['title'] = adict2['title'] + use + + adict2['title'] = adict2['title'] + \n + adict[BJ.BuildJobId] = adict2 + TmpDict['BJ'] = adict TmpDict['RM'] = BuildLogsRepomanQa.objects.order_by('-Id')[:Lines] return render(request, 'pages/' + pagerequest + '/index.html', TmpDict) diff --git a/python/templates/includes/frontpage/new_build_req
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/gentoo_main/, python/tbc_www/, ...
commit: 5b42b2fda7afb18c8893bd1b2627f6631e8caba5 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Thu Jul 16 13:45:08 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Thu Jul 16 13:45:08 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=5b42b2fd add the new home page for tbc python/gentoo_main/urls.py | 3 +- python/tbc_www/__init__.py | 0 python/tbc_www/models.py | 111 + python/tbc_www/router.py | 30 ++ python/tbc_www/views.py| 37 +++ python/templates/includes/frontpage/glsa | 17 python/templates/includes/frontpage/new_build_req | 8 ++ python/templates/includes/frontpage/new_logs | 9 ++ python/templates/includes/frontpage/new_packages | 10 ++ python/templates/includes/frontpage/new_repoman_qa | 10 ++ python/templates/includes/frontpage/packages | 8 -- python/templates/includes/frontpage/planet | 8 -- python/templates/includes/frontpage/wiki | 8 -- python/templates/pages/home/index.html | 42 ++-- 14 files changed, 224 insertions(+), 77 deletions(-) diff --git a/python/gentoo_main/urls.py b/python/gentoo_main/urls.py index 5380bea..6cead02 100644 --- a/python/gentoo_main/urls.py +++ b/python/gentoo_main/urls.py @@ -3,7 +3,6 @@ from django.conf.urls import patterns, include, url -urlpatterns = patterns('gentoo_www.views', +urlpatterns = patterns('tbc_www.views', (r'^home/$', 'home'), - (r'^downloads/$', 'downloads'), ) diff --git a/python/tbc_www/__init__.py b/python/tbc_www/__init__.py new file mode 100644 index 000..e69de29 diff --git a/python/tbc_www/models.py b/python/tbc_www/models.py new file mode 100644 index 000..b51e154 --- /dev/null +++ b/python/tbc_www/models.py @@ -0,0 +1,111 @@ +# Copyright 1998-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +from django.db import models + +class Categories(models.Model): + CategoryId = models.IntegerField(primary_key=True, db_column='category_id') + Category = models.CharField(max_length=150, db_column='category') + Active = models.BooleanField(db_column='active') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'categories' + def __str__(self): + return '%s %s %s %s' % (self.CategoryId, self.Category, self.Active, self.TimeStamp) + +class Repos(models.Model): + RepoId = models.IntegerField(primary_key=True, db_column='repo_id') + Repo = models.CharField(max_length=100, db_column='repo') + class Meta: + db_table = 'repos' + def __str__(self): + return '%s %s' % (self.RepoId, self.Repo) + +class Packages(models.Model): + PackageId = models.IntegerField(primary_key=True, db_column='package_id') + CategoryId = models.ForeignKey(Categories, db_column='category_id') + Package = models.CharField(max_length=150, db_column='package') + RepoId = models.ForeignKey(Repos, db_column='repo_id') + Checksum = models.CharField(max_length=100, db_column='checksum') + Active = models.BooleanField(db_column='active') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'packages' + def __str__(self): + return '%s %s %s %s %s %s %s' % (self.PackageId, self.CategoryId, self.Package, self.RepoId, self.Checksum, self.Active, self.TimeStamp) + +class Ebuilds(models.Model): + EbuildId = models.IntegerField(primary_key=True, db_column='ebuild_id') + PackageId = models.ForeignKey(Packages, db_column='package_id') + Version = models.CharField(max_length=150, db_column='version') + Checksum = models.CharField(max_length=100, db_column='checksum') + Active = models.BooleanField(db_column='active') + TimeStamp = models.DateTimeField(db_column='time_stamp') + class Meta: + db_table = 'ebuilds' + def __str__(self): + return '%s %s %s %s %s %s' % (self.EbuildId, self.PackageId, self.Version, self.Checksum, self.Active, self.TimeStamp) + +class EbuildsMetadata(models.Model): + Id = models.IntegerField(primary_key=True, db_column='id') + EbuildId = models.ForeignKey(Ebuilds, db_column='ebuild_id') + Revision = models.CharField(max_length=30, db_column='revision') + Descriptions = models.CharField(max_length=200, db_column='descriptions') + class Meta: + db_table = 'ebuilds_metadata' + def __str__(self): + return '%s %s %s %s' % (self.Id, self.EbuildId, self.Revision, self.Descriptions) + +class BuildLogs(models.Model): + BuildLogId =
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: htdoc/
commit: fdb0f171a86820cf0941794ccd4514b57050b783 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Tue Jul 14 13:10:57 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Tue Jul 14 13:10:57 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=fdb0f171 add htdoc and cgi-bin htdoc/index.html | 8 1 file changed, 8 insertions(+) diff --git a/htdoc/index.html b/htdoc/index.html new file mode 100644 index 000..c217ab3 --- /dev/null +++ b/htdoc/index.html @@ -0,0 +1,8 @@ +html + head +title/title +meta content= +style/style + /head + body/body +/html \ No newline at end of file
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/gentoo_www/
commit: 694be3a20d84aeaf8437de2ae02668219e3263ac Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Tue Jul 14 14:29:16 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Tue Jul 14 14:29:16 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=694be3a2 add __init__.py to gentoo_www python/gentoo_www/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/python/gentoo_www/__init__.py b/python/gentoo_www/__init__.py new file mode 100644 index 000..e69de29
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/pages/get-started/philosophy/, ...
commit: 9fcbdba5877a0858d5dcfc3aec939ccd23347353 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Tue Jul 14 17:02:11 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Tue Jul 14 17:02:11 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=9fcbdba5 renname tamplates to templates .../{tamplates/includes/hero-section = templates/includes/container}/end | 0 python/{tamplates = templates}/includes/container/start | 0 python/{tamplates = templates}/includes/downloads/alpha.html | 0 python/{tamplates = templates}/includes/downloads/amd64.html | 0 python/{tamplates = templates}/includes/downloads/arch-default.html | 0 python/{tamplates = templates}/includes/downloads/arch-main.html | 0 python/{tamplates = templates}/includes/downloads/arm.html | 0 python/{tamplates = templates}/includes/downloads/experimental.html | 0 python/{tamplates = templates}/includes/downloads/hppa.html | 0 python/{tamplates = templates}/includes/downloads/ia64.html | 0 python/{tamplates = templates}/includes/downloads/ppc.html | 0 python/{tamplates = templates}/includes/downloads/s390.html | 0 python/{tamplates = templates}/includes/downloads/sh.html| 0 python/{tamplates = templates}/includes/downloads/sparc.html | 0 python/{tamplates = templates}/includes/downloads/warnings.html | 0 python/{tamplates = templates}/includes/downloads/x86-default.html | 0 python/{tamplates = templates}/includes/downloads/x86.html | 0 python/{tamplates = templates}/includes/frontpage/glsa | 0 python/{tamplates = templates}/includes/frontpage/news | 0 python/{tamplates = templates}/includes/frontpage/packages | 0 python/{tamplates = templates}/includes/frontpage/planet | 0 python/{tamplates = templates}/includes/frontpage/wiki | 0 .../{tamplates/includes/container = templates/includes/hero-section}/end | 0 python/{tamplates = templates}/includes/hero-section/start | 0 python/{tamplates = templates}/includes/layout/footer.html | 0 python/{tamplates = templates}/includes/layout/footer_sitemap.html | 0 python/{tamplates = templates}/includes/layout/head.html | 0 python/{tamplates = templates}/includes/layout/header.html | 0 python/{tamplates = templates}/includes/navigation/primary | 0 python/{tamplates = templates}/includes/navigation/secondary | 0 python/{tamplates = templates}/includes/navigation/sitemap_secondary | 0 python/{tamplates = templates}/includes/navigation/tertiary | 0 python/{tamplates = templates}/includes/partials/download-link-raw.html | 0 python/{tamplates = templates}/includes/partials/download-link.html | 0 python/{tamplates = templates}/includes/partials/irc-channel.html| 0 python/{tamplates = templates}/includes/partials/mailinglist.html| 0 python/{tamplates = templates}/includes/partials/sponsor.html| 0 python/{tamplates = templates}/layout/base.html | 0 python/{tamplates = templates}/pages/donate/cancel.html | 0 python/{tamplates = templates}/pages/donate/index.html | 0 python/{tamplates = templates}/pages/donate/thanks.html | 0 python/{tamplates = templates}/pages/downloads/index.html| 0 python/{tamplates = templates}/pages/downloads/mirrors/index.html| 0 python/{tamplates = templates}/pages/downloads/signatures/index.html | 0 .../{tamplates = templates}/pages/get-involved/become-developer/index.md | 0 python/{tamplates = templates}/pages/get-involved/contribute/index.html | 0 .../pages/get-involved/discussion-forums/index.html | 0 python/{tamplates = templates}/pages/get-involved/get-code/index.html| 0 python/{tamplates = templates}/pages/get-involved/index.html | 0 .../pages/get-involved/irc-channels/all-channels.html | 0 .../{tamplates = templates}/pages/get-involved/irc-channels/index.html | 0 .../pages/get-involved/mailing-lists/all-lists.html | 0 .../{tamplates = templates}/pages/get-involved/mailing-lists/index.html | 0 .../pages/get-involved/mailing-lists/instructions.md | 0 python/{tamplates = templates}/pages/get-started/about/index.html| 0 python/{tamplates = templates}/pages/get-started/faq/index.html | 0 python/{tamplates = templates}/pages/get-started/index.html | 0 python/{tamplates = templates}/pages/get-started/philosophy/index.md | 0 .../pages/get-started/philosophy/social-contract.md | 0 python/{tamplates =
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: sql/
commit: b925e8fe2fd13bb5ad8abbaa5299d74413a2704b Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Tue Jul 14 19:00:04 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Tue Jul 14 19:00:04 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=b925e8fe add sql structur and data sql/gentoo-www.sql | 244 sql/gentoo-www_data.sql | 106 + 2 files changed, 350 insertions(+) diff --git a/sql/gentoo-www.sql b/sql/gentoo-www.sql new file mode 100644 index 000..9c1d758 --- /dev/null +++ b/sql/gentoo-www.sql @@ -0,0 +1,244 @@ +-- phpMyAdmin SQL Dump +-- version 4.2.13 +-- http://www.phpmyadmin.net +-- +-- Host: localhost +-- Generation Time: Jul 14, 2015 at 04:57 PM +-- Server version: 10.0.15-MariaDB-log +-- PHP Version: 5.6.10-pl0-gentoo + +SET SQL_MODE = NO_AUTO_VALUE_ON_ZERO; +SET time_zone = +00:00; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Database: `gentoo-www` +-- + +-- + +-- +-- Table structure for table `layout` +-- + +CREATE TABLE IF NOT EXISTS `layout` ( +`layout_id` int(11) NOT NULL, + `layout` varchar(20) NOT NULL, + `layout_file` varchar(20) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `pages` +-- + +CREATE TABLE IF NOT EXISTS `pages` ( +`page_id` int(11) NOT NULL, + `nav_title` varchar(200) NOT NULL, + `title` varchar(200) NOT NULL, + `description` varchar(200) NOT NULL, + `nav1` varchar(100) NOT NULL, + `nav1_show` tinyint(1) NOT NULL, + `nav1_weight` int(11) NOT NULL, + `meta` varchar(200) NOT NULL, + `url` varchar(200) NOT NULL, + `inlinejs` varchar(200) NOT NULL, + `body_class` varchar(20) NOT NULL, + `layout_id` int(11) NOT NULL, + `sub_menu` tinyint(1) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `posts` +-- + +CREATE TABLE IF NOT EXISTS `posts` ( +`post_id` int(11) NOT NULL, + `title` varchar(200) NOT NULL, + `url` varchar(200) NOT NULL, + `text` text NOT NULL, + `time_stamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `site_settings` +-- + +CREATE TABLE IF NOT EXISTS `site_settings` ( +`site_id` int(11) NOT NULL, + `site` varchar(20) NOT NULL, + `title` varchar(50) NOT NULL, + `email` varchar(50) NOT NULL, + `description` varchar(100) NOT NULL, + `url` varchar(50) NOT NULL, + `contact` varchar(50) NOT NULL, + `cdnurl` varchar(100) NOT NULL, + `layout_path` varchar(11) NOT NULL, + `download_url` varchar(100) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `sponsors` +-- + +CREATE TABLE IF NOT EXISTS `sponsors` ( +`sponsors_id` int(11) NOT NULL, + `name` varchar(200) NOT NULL, + `ads_name` varchar(100) NOT NULL, + `img` varchar(100) NOT NULL, + `ads_img` varchar(100) NOT NULL, + `link` varchar(100) NOT NULL, + `ads_link` varchar(100) NOT NULL, + `blurb` text NOT NULL, + `ads_blure` varchar(200) NOT NULL, + `ads_alt_name` varchar(200) NOT NULL, + `weight` int(11) NOT NULL, + `active` tinyint(1) NOT NULL, + `ads_active` tinyint(1) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `subsub_pages` +-- + +CREATE TABLE IF NOT EXISTS `subsub_pages` ( +`subsub_page_id` int(11) NOT NULL, + `nav_title` varchar(200) NOT NULL, + `title` varchar(200) NOT NULL, + `description` varchar(200) NOT NULL, + `sub_page_id` int(11) NOT NULL, + `nav3` varchar(100) NOT NULL, + `nav3_show` tinyint(1) NOT NULL, + `nav3_weight` int(11) NOT NULL, + `meta` varchar(200) NOT NULL, + `url` varchar(200) NOT NULL, + `inlinejs` varchar(200) NOT NULL, + `layout_id` varchar(100) NOT NULL, + `body_class` varchar(20) NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- + +-- +-- Table structure for table `sub_pages` +-- + +CREATE TABLE IF NOT EXISTS `sub_pages` ( +`sub_page_id` int(11) NOT NULL, + `nav_title` varchar(200) NOT NULL, + `title` varchar(200) NOT NULL, + `description` varchar(200) NOT NULL, + `page_id` int(11) NOT NULL, + `nav2` varchar(100) NOT NULL, + `nav2_show` tinyint(1) NOT NULL, + `nav2_weight` int(11) NOT NULL, + `meta` varchar(200) NOT NULL,
[gentoo-commits] proj/tinderbox-cluster-www:master commit in: /
commit: 3f1c4c95d59f3499b91fc8f8d1f114e9e99b1876 Author: Magnus Granberg zorry AT gentoo DOT org AuthorDate: Thu Jul 9 21:43:58 2015 + Commit: Magnus Granberg zorry AT gentoo DOT org CommitDate: Thu Jul 9 21:43:58 2015 + URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=3f1c4c95 add gitignore .gitignore | 9 + 1 file changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore new file mode 100644 index 000..d778590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Backup files +*~ +__pycache__ +# log dir +static/logs +# Python compiled files +*.pyc +python//gentoo_main/settings.py +python/gentoo_main/wsgi.py