* [gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/tbc_www/
@ 2015-07-16 22:49 Magnus Granberg
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Granberg @ 2015-07-16 22:49 UTC (permalink / raw
To: gentoo-commits
commit: b064d9675554a6ea3d518a2891b4c1495f26011c
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 16 22:41:57 2015 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Thu Jul 16 22:41:57 2015 +0000
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 b/python/templates/includes/frontpage/new_build_req
index 23b6f2d..53a3fcb 100644
--- a/python/templates/includes/frontpage/new_build_req
+++ b/python/templates/includes/frontpage/new_build_req
@@ -1,8 +1,8 @@
<table class="table table-striped frontpage-table">
- {% for J in BJ %}
+ {% for k, v in BJ.items %}
<tr>
- <td class="frontpage-table-package-atom"><a href="/new_build_req/{{ J.EbuildId.EbuildId }}" title="{{ J.EbuildId.PackageId.CategoryId.Category }}/{{ J.EbuildId.PackageId.Package }}-{{ J.EbuildId.Version }}::{{ J.EbuildId.PackageId.RepoId.Repo }}">{{ J.EbuildId.PackageId.CategoryId.Category }}/{{ J.EbuildId.PackageId.Package }}-{{ J.EbuildId.Version }}::{{ J.EbuildId.PackageId.RepoId.Repo }}</a></td>
- <td></td>
+ <td class="frontpage-table-package-atom"><a href="/new_build_req/{{ k }}" title="{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}">{{ v.C }}/{{ v.P }}-{{ v.V }}::{{ v.R }}</a></td>
+ <td><p title="{{ v.title }}">{{ v.title|truncatewords:2}}</p></td>
</tr>
{% endfor %}
</table>
\ No newline at end of file
diff --git a/python/templates/includes/frontpage/new_logs b/python/templates/includes/frontpage/new_logs
index 9480155..6534201 100644
--- a/python/templates/includes/frontpage/new_logs
+++ b/python/templates/includes/frontpage/new_logs
@@ -3,7 +3,7 @@
<tr>
<td class="frontpage-table-package-atom"><a href="/new_logs/{{ B.BuildLogId }}/" title="{{ B.EbuildId.PackageId.CategoryId.Category }}/{{ B.EbuildId.PackageId.Package }}-{{ B.EbuildId.Version }}::{{ B.EbuildId.PackageId.RepoId.Repo }}">
{{ B.EbuildId.PackageId.CategoryId.Category }}/{{ B.EbuildId.PackageId.Package }}-{{ B.EbuildId.Version }}::{{ B.EbuildId.PackageId.RepoId.Repo }}</a></td>
- <td><p title="{{ B.SummeryText }}">{{ B.SummeryText|truncatewords:3 }}</p></td>
+ <td><p title="{{ B.SummeryText }}">{{ B.SummeryText|truncatewords:3 }}</p><td class="text-right">{% if B.Fail %}<span class="label label-danger">Fail</span>{% endif %}</td></td>
</tr>
{% endfor %}
</table>
\ No newline at end of file
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/tbc_www/
@ 2016-02-04 22:53 Magnus Granberg
0 siblings, 0 replies; 2+ messages in thread
From: Magnus Granberg @ 2016-02-04 22:53 UTC (permalink / raw
To: gentoo-commits
commit: 42327597334a2350d1c3de4270790dfad984086d
Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 4 22:54:33 2016 +0000
Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Thu Feb 4 22:54:33 2016 +0000
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' %}
<span class="label label-info">{{ B.FailCode }}</span>
{% else %}
- <span class="label label-info">{{ B.FailCode }}</span>
+ <span class="label label-danger">{{ B.FailCode }}</span>
{% endif %}
{% else %}
<span class="label label-success">Build</span>
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-04 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-16 22:49 [gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/templates/includes/frontpage/, python/tbc_www/ Magnus Granberg
-- strict thread matches above, loose matches on Subject: below --
2016-02-04 22:53 Magnus Granberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox