Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/tinderbox-cluster-www:master commit in: python/tbc_www/, python/templates/includes/frontpage/
Date: Thu, 23 Jul 2015 14:57:58
Message-Id: 1437663399.84e661c69c15decbcc40d56939361169100d9b1d.zorry@gentoo
1 commit: 84e661c69c15decbcc40d56939361169100d9b1d
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jul 23 14:56:39 2015 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Thu Jul 23 14:56:39 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster-www.git/commit/?id=84e661c6
7
8 add the main new page
9
10 python/tbc_www/urls.py | 1 +
11 python/tbc_www/views.py | 5 +++--
12 python/templates/includes/frontpage/new_build_req | 9 ++++++++-
13 python/templates/includes/frontpage/new_packages | 2 +-
14 4 files changed, 13 insertions(+), 4 deletions(-)
15
16 diff --git a/python/tbc_www/urls.py b/python/tbc_www/urls.py
17 index 82e9336..193443f 100644
18 --- a/python/tbc_www/urls.py
19 +++ b/python/tbc_www/urls.py
20 @@ -5,4 +5,5 @@ urlpatterns = patterns('tbc_www.views',
21 url(r'^packages/$', 'categories'),
22 url(r'^categories/(?P<category_id>\d+)/$', 'packages'),
23 url(r'^package/(?P<package_id>\d+)/$', 'ebuilds'),
24 + url(r'^new/$', 'new_main'),
25 )
26
27 diff --git a/python/tbc_www/views.py b/python/tbc_www/views.py
28 index 84ff9e6..2559f8d 100644
29 --- a/python/tbc_www/views.py
30 +++ b/python/tbc_www/views.py
31 @@ -112,9 +112,9 @@ def ebuilds(request, package_id):
32 TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__Active = True).filter(EbuildId__PackageId__Package = P.PackageId.Package)
33 return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', TmpDict)
34
35 -def new(request):
36 +def new_main(request):
37 pagerequest = 'new'
38 - Lines = 20
39 + Lines = 30
40 adict = {}
41 TmpDict = default_TmpDict(pagerequest)
42 TmpDict['EM'] = EbuildsMetadata.objects.filter(Revision = '1.1').order_by('-Id')[:Lines]
43 @@ -127,6 +127,7 @@ def new(request):
44 adict2['P'] = BJ.EbuildId.PackageId.Package
45 adict2['V'] = BJ.EbuildId.Version
46 adict2['R'] = BJ.EbuildId.PackageId.RepoId.Repo
47 + adict2['Status'] = BJ.Status
48 adict2['title'] = "Setup: " + BJ.SetupId.Setup + "\n" + "Profile: " + BJ.SetupId.Profile + "\n"
49 BJU = BuildJobsUse.objects.filter(BuildJobId = BJ.BuildJobId)
50 if not BJU == []:
51
52 diff --git a/python/templates/includes/frontpage/new_build_req b/python/templates/includes/frontpage/new_build_req
53 index 53a3fcb..3a47530 100644
54 --- a/python/templates/includes/frontpage/new_build_req
55 +++ b/python/templates/includes/frontpage/new_build_req
56 @@ -2,7 +2,14 @@
57 {% for k, v in BJ.items %}
58 <tr>
59 <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>
60 - <td><p title="{{ v.title }}">{{ v.title|truncatewords:2}}</p></td>
61 + <td><p title="{{ v.title }}">{{ v.title|truncatewords:2}}</p>
62 + <td class="text-right">
63 + {% if v.Status == 'Building' %}
64 + <span class="label label-primary">{{ v.Status }}</span>
65 + {% else %}
66 + <span class="label label-default">{{ v.Status }}</span>
67 + {% endif %}
68 + </td></td>
69 </tr>
70 {% endfor %}
71 </table>
72 \ No newline at end of file
73
74 diff --git a/python/templates/includes/frontpage/new_packages b/python/templates/includes/frontpage/new_packages
75 index 7de11c0..6c845b7 100644
76 --- a/python/templates/includes/frontpage/new_packages
77 +++ b/python/templates/includes/frontpage/new_packages
78 @@ -4,7 +4,7 @@
79 <td class="frontpage-table-package-atom">
80 <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 }}">
81 {{ E.EbuildId.PackageId.CategoryId.Category }}/{{ E.EbuildId.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.EbuildId.PackageId.RepoId.Repo }}</a></td>
82 - <td><p>{{ E.Descriptions }}</p></td>
83 + <td><p title="{{ E.Descriptions }}">{{ E.Descriptions }}</p></td>
84 </tr>
85 {% endfor %}
86 </table>
87 \ No newline at end of file