commit:     a8fc1c1b6f8201c9165a92147d1e751d0c4436e6
Author:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
AuthorDate: Tue Feb  2 22:44:31 2016 +0000
Commit:     Magnus Granberg <zorry <AT> gentoo <DOT> org>
CommitDate: Tue Feb  2 22:44:31 2016 +0000
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<ebuild_id>\d+)/$', 'ebuild'),
        url(r'^new/logs/build/(?P<buildlog_id>\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'] = PackagesRepoman.objects.order_by('-Id')[:Lines]
        return render(request, 'pages/' + pagerequest + '/index.html', TmpDict)
 
 def categories(request):
@@ -109,12 +108,24 @@ def packages(request, category_id):
                adict['Package'] = PM.PackageId.Package
                adict['Descriptions'] = PM.Descriptions
                adict['Commitlog'] =PM.Gitlog
-               try:
-                       PackagesRepoman.objects.get(PackageId__PackageId = 
PM.PackageId.PackageId)
-               except PackagesRepoman.DoesNotExist as e:
+               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['Repoman'] = True
+                       adict['Qa'] = False
+               BL = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = 
PM.PackageId.PackageId).filter(EbuildId__Active = True)
+               if BL.exists():
+                       adict['Bl'] = True
+                       adict['Blf'] = False
+                       if BL.filter(Fail = True).exists():
+                               adict['Blf'] = True
+               else:
+                       adict['Bl'] = False
                ebuilds = []
                for E in Ebuilds.objects.filter(Active = 
True).filter(PackageId__Package = PM.PackageId.Package):
                        ebuilds.append(E.Version + '::' +  
E.PackageId.RepoId.Repo + '\n')
@@ -130,13 +141,44 @@ def ebuilds(request, 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.PackageId.Package)
-       TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__Active = 
True).filter(EbuildId__PackageId__Package = P.PackageId.Package)
-       try:
-               PackagesRepoman.objects.get(PackageId__PackageId = package_id)
-       except PackagesRepoman.DoesNotExist as e:
+       PR = PackagesRepoman.objects.filter(PackageId__PackageId = package_id)
+       BLQ_tmp = 
BuildLogsQa.objects.filter(BuildLogId__EbuildId__PackageId__PackageId = 
package_id).filter(BuildLogId__EbuildId__Active = True)
+       BL_tmp = BuildLogs.objects.filter(EbuildId__PackageId__PackageId = 
package_id).filter(EbuildId__Active = True)
+       TmpDict['BLQ_tmp'] = BLQ_tmp
+       TmpDict['BL_tmp'] = BL_tmp
+       if PR.exists():
+               TmpDict['PR'] = True
+       else:
                TmpDict['PR'] = False
+       if BLQ_tmp.exists():
+               TmpDict['QA'] = True
        else:
-               TmpDict['PR'] = True
+               TmpDict['QA'] = False
+       if BL_tmp.exists():
+               TmpDict['Bl'] = True
+               TmpDict['Blf'] = False
+               if BL_tmp.filter(Fail = True).exists():
+                       TmpDict['Blf'] = True
+       else:
+               TmpDict['Bl'] = False
+       alist = []
+       for EM in TmpDict['EM_tmp']:
+               adict = {}
+               adict['EbuildId'] = EM.EbuildId.EbuildId
+               adict['fail'] = False
+               BLe = BuildLogs.objects.filter(EbuildId__EbuildId = 
EM.EbuildId.EbuildId).filter(EbuildId__Active = True)
+               if BLe.filter(Fail = True).exists():
+                       adict['fail'] = True
+               adict['repoman'] = False
+               BLRe = 
BuildLogsRepoman.objects.filter(BuildLogId__EbuildId__EbuildId = 
EM.EbuildId.EbuildId).filter(BuildLogId__EbuildId__Active = True)
+               if BLRe.exists():
+                       adict['repoman'] = True
+               adict['qa'] = False
+               BLQe = 
BuildLogsQa.objects.filter(BuildLogId__EbuildId__EbuildId = 
EM.EbuildId.EbuildId).filter(BuildLogId__EbuildId__Active = True)
+               if BLQe.exists():
+                       adict['qa'] = True
+               alist.append(adict)
+       TmpDict['fi_tmp'] = alist
        return render(request, 'pages/' + pagerequest + '/ebuilds/index.html', 
TmpDict)
 
 def ebuild(request, ebuild_id):
@@ -145,9 +187,15 @@ def ebuild(request, ebuild_id):
        TmpDict['E'] = get_object_or_404(Ebuilds,  EbuildId = ebuild_id)
        TmpDict['EM_tmp'] = EbuildsMetadata.objects.filter(EbuildId__EbuildId = 
ebuild_id)
        TmpDict['EK_tmp'] = EbuildsKeywords.objects.filter(EbuildId__EbuildId = 
ebuild_id)
-       TmpDict['BL_tmp'] = BuildLogs.objects.filter(EbuildId__EbuildId = 
ebuild_id)
+       BL_tmp = BuildLogs.objects.filter(EbuildId__EbuildId = ebuild_id)
+       TmpDict['BL_tmp'] = BL_tmp
        TmpDict['EU_tmp'] = EbuildsIuse.objects.filter(EbuildId__EbuildId = 
ebuild_id)
        TmpDict['ER_tmp'] = 
EbuildsRestrictions.objects.filter(EbuildId__EbuildId = ebuild_id)
+       BLQ_tmp = BuildLogsQa.objects.filter(BuildLogId__EbuildId__EbuildId = 
ebuild_id).filter(BuildLogId__EbuildId__Active = True)
+       TmpDict['BLQ_tmp'] = BLQ_tmp
+       BLR_tmp = 
BuildLogsRepoman.objects.filter(BuildLogId__EbuildId__EbuildId = 
ebuild_id).filter(BuildLogId__EbuildId__Active = True)
+       TmpDict['BLR_tmp']= BLR_tmp
+       
        return render(request, 'pages/' + pagerequest + 
'/ebuilds/ebuild/index.html', TmpDict)
 
 def new_main(request):
@@ -200,18 +248,16 @@ def new_main(request):
                                adict2['title'] = adict2['title'] + use + " "
                        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['BJ'] = adict 
+       TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines]
        return render(request, 'pages/' + pagerequest + '/index.html', TmpDict)
 
-def new_repomanqa(request):
+def new_repoman(request):
        pagerequest = 'new'
        Lines = 30
        TmpDict = default_TmpDict(pagerequest)
-       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 + 
'/repomanqa/index.html', TmpDict)
+       TmpDict['PR_tmp'] = PackagesRepoman.objects.order_by('-Id')[:Lines]
+       return render(request, 'pages/' + pagerequest + '/repoman/index.html', 
TmpDict)
 
 def new_logs(request):
        pagerequest = 'new'
@@ -291,9 +337,13 @@ def new_logs_build(request, buildlog_id):
                        BLI['use_disable'] = use_disable
        try: 
                BRQ = BuildLogsQa.objects.get(BuildLogId = B.BuildLogId)
-               BLI['RepomanQA'] = BRQ.SummeryText
+               BLI['QA'] = BRQ.SummeryText
        except BuildLogsQa.DoesNotExist as e:
-                       BLI['RepomanQA'] = False
-       print(BLI)
+                       BLI['QA'] = False
+       try: 
+               BRR = BuildLogsRepoman.objects.get(BuildLogId = B.BuildLogId)
+               BLI['Repoman'] = BRR.SummeryText
+       except BuildLogsRepoman.DoesNotExist as e:
+                       BLI['Repoman'] = False
        TmpDict['BLI'] = BLI
        return render(request, 'pages/' + pagerequest + 
'/logs/build/index.html', TmpDict)
\ No newline at end of file

diff --git a/python/templates/includes/frontpage/new_repoman 
b/python/templates/includes/frontpage/new_repoman
new file mode 100644
index 0000000..1e54e2b
--- /dev/null
+++ b/python/templates/includes/frontpage/new_repoman
@@ -0,0 +1,10 @@
+<table class="table table-striped frontpage-table">
+  {% for PR in PR_tmp %}
+    <tr>
+      <td class="frontpage-table-package-atom"><a href="/repoman/{{ 
PR.PackageId.PackageId }}/"  title="{{ PR.PackageId.CategoryId.Category }}/{{ 
PR.PackageId.Package }}::{{ PR.PackageId.RepoId.Repo }}">
+      {{ PR.PackageId.CategoryId.Category }}/{{ PR.PackageId.Package }}::{{ 
PR.PackageId.RepoId.Repo }}</a>
+      </td>
+      <td><p title="{{ PR.RepomanText }}">{{ PR.RepomanText|truncatewords:3 
}}</p></td>
+    </tr>
+  {% endfor %}
+</table>

diff --git a/python/templates/includes/frontpage/new_repoman_qa 
b/python/templates/includes/frontpage/new_repoman_qa
deleted file mode 100644
index 61ac691..0000000
--- a/python/templates/includes/frontpage/new_repoman_qa
+++ /dev/null
@@ -1,18 +0,0 @@
-<table class="table table-striped frontpage-table">
-  {% for QA in QA_tmp %}
-    <tr>
-      <td class="frontpage-table-package-atom"><a href="/repoman_qa/{{ 
QA.BuildLogId.BuildLogId }}/"  title="{{ 
QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ 
QA.BuildLogId.EbuildId.PackageId.Package }}-{{ QA.BuildLogId.EbuildId.Version 
}}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }}">
-      {{ QA.BuildLogId.EbuildId.PackageId.CategoryId.Category }}/{{ 
QA.BuildLogId.EbuildId.PackageId.Package }}-{{ QA.BuildLogId.EbuildId.Version 
}}::{{ QA.BuildLogId.EbuildId.PackageId.RepoId.Repo }}</a>
-      </td>
-      <td><p title="{{ QA.SummeryText }}">{{ QA.SummeryText|truncatewords:3 
}}</p></td>
-    </tr>
-  {% endfor %}
-  {% for PR in PR_tmp %}
-    <tr>
-      <td class="frontpage-table-package-atom"><a href="/repoman/{{ 
PR.PackageId.PackageId }}/"  title="{{ PR.PackageId.CategoryId.Category }}/{{ 
PR.PackageId.Package }}::{{ PR.PackageId.RepoId.Repo }}">
-      {{ PR.PackageId.CategoryId.Category }}/{{ PR.PackageId.Package }}::{{ 
PR.PackageId.RepoId.Repo }}</a>
-      </td>
-      <td><p title="{{ PR.RepomanText }}">{{ PR.RepomanText|truncatewords:3 
}}</p></td>
-    </tr>
-  {% endfor %}
-</table>
\ No newline at end of file

diff --git a/python/templates/pages/home/index.html 
b/python/templates/pages/home/index.html
index c355c11..570202e 100644
--- a/python/templates/pages/home/index.html
+++ b/python/templates/pages/home/index.html
@@ -18,8 +18,8 @@
     {% include "includes/frontpage/new_build_req" %}
   </div>
   <div class="col-xs-12 col-md-6">
-    <h2>New Repoman or QA's <small>on the <a href="/new/repomanqa/">New 
Repoman or QA's</a></small></h2>
-    {% include "includes/frontpage/new_repoman_qa" %}
+    <h2>New Repoman's <small>on the <a href="/new/repoman/">New 
Repoman's</a></small></h2>
+    {% include "includes/frontpage/new_repoman" %}
   </div>
 </div>
 

diff --git a/python/templates/pages/new/index.html 
b/python/templates/pages/new/index.html
index 608b40e..085f180 100644
--- a/python/templates/pages/new/index.html
+++ b/python/templates/pages/new/index.html
@@ -17,8 +17,8 @@
     {% include "includes/frontpage/new_build_req" %}
   </div>
   <div class="col-xs-12 col-md-6">
-    <h2>New Repoman or QA's <small>on the <a href="/new/repomanqa/">New 
Repoman or QA's</a></small></h2>
-    {% include "includes/frontpage/new_repoman_qa" %}
+    <h2>New Repoman's <small>on the <a href="/new/repoman/">New 
Repoman's</a></small></h2>
+    {% include "includes/frontpage/new_repoman" %}
   </div>
 </div>
 

diff --git a/python/templates/pages/new/logs/build/index.html 
b/python/templates/pages/new/logs/build/index.html
index 487a397..5c2a9b6 100644
--- a/python/templates/pages/new/logs/build/index.html
+++ b/python/templates/pages/new/logs/build/index.html
@@ -54,9 +54,17 @@
  </div>
  <div class="row-fluid">
  <div class=span12>
-       {% if BLI.RepomanQA %}
-               <p class="lead">Repoman QA Summery: </p>
-               {{ BLI.RepomanQA|linebreaks }}
+       {% if BLI.Repoman %}
+               <p class="lead">Repoman Summery: </p>
+               {{ BLI.Repoman|linebreaks }}
+       {% endif %}
+ </div>
+ </div>
+ <div class="row-fluid">
+ <div class=span12>
+       {% if BLI.QA %}
+               <p class="lead">QA Summery: </p>
+               {{ BLI.QA|linebreaks }}
        {% endif %}
  </div>
  </div>

diff --git a/python/templates/pages/new/repomanqa/index.html 
b/python/templates/pages/new/repoman/index.html
similarity index 50%
rename from python/templates/pages/new/repomanqa/index.html
rename to python/templates/pages/new/repoman/index.html
index 637c917..7df33e9 100644
--- a/python/templates/pages/new/repomanqa/index.html
+++ b/python/templates/pages/new/repoman/index.html
@@ -1,25 +1,8 @@
 {% extends "layout/base.html" %}
 {% block content %}
 <div class="row">
-  <h2>New Repoman and QA's</h2>
+  <h2>New Repoman's</h2>
   <div class="panel-group" id="accordion" role="tablist" 
aria-multiselectable="true">
-  {% for QA in QA_tmp %}
-  <div class="panel panel-default">
-    <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{{ 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{{ QA.Id }}" class="panel-collapse collapse in" 
role="tabpanel" aria-labelledby="heading{{ QA.Id }}">
-      <div class="panel-body">
-        {{ 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 }}">
@@ -39,5 +22,4 @@
   {% endfor %}
   </div>
 </div>
-
-{% endblock %}
\ No newline at end of file
+{% endblock %}

diff --git a/python/templates/pages/packages/category/index.html 
b/python/templates/pages/packages/category/index.html
index 7bad0b4..d86b3cb 100644
--- a/python/templates/pages/packages/category/index.html
+++ b/python/templates/pages/packages/category/index.html
@@ -16,6 +16,17 @@
             {% if PM.Repoman %}
               <a class="btn btn-warning btn-xs" href="/repoman/{{PM.PackageId 
}}/">Repoman</a>
             {% endif %}
+            {% if PM.Qa %}
+              <a class="btn btn-warning btn-xs" >Qa</a>
+            {% endif %}
+            {% if PM.Bl %}
+              {% if PM.Blf %}
+                <a class="btn btn-danger btn-xs">
+              {% else %}
+                <a class="btn btn-success btn-xs">
+              {% endif %}
+              Build</a>
+            {% endif %}
             </p>
           </td>
         </tr>

diff --git a/python/templates/pages/packages/ebuilds/ebuild/index.html 
b/python/templates/pages/packages/ebuilds/ebuild/index.html
index e000a53..4752be1 100644
--- a/python/templates/pages/packages/ebuilds/ebuild/index.html
+++ b/python/templates/pages/packages/ebuilds/ebuild/index.html
@@ -9,13 +9,6 @@
           <td class="frontpage-table-package-atom">
             <p" title="{{ E.PackageId.CategoryId.Category }}/{{ 
E.PackageId.Package }}-{{ E.EbuildId.Version }}::{{ E.PackageId.RepoId.Repo 
}}">{{ E.PackageId.Package }}-{{ E.Version }}::{{ E.PackageId.RepoId.Repo }}</p>
             <a class="btn btn-default btn-xs" href="/buildpackage/{{ 
E.EbuildId.EbuildId }}/">Build</a>
-            {% for BL in BL_tmp %}
-               {% if BL.Fail %}
-                 <a class="btn btn-danger btn-xs" href="/buildlog/{{ 
BL.BuildLogId }}/">Fail</a>
-               {% else %}
-                 <a class="btn btn-success btn-xs" href="/buildlog/{{ 
BL.BuildLogId }}/">Success</a>
-               {% endif %}
-              {% endfor %}
           </td>
           <td>
               {% for K in EK_tmp %}
@@ -43,5 +36,31 @@
       {% endfor %}
     </table>
   </div>
+  <div class="col-xs-12 col-md-9">
+  <table class="table table-striped frontpage-table">
+  {% for BL in BL_tmp %}
+  <tr>
+  <td class="frontpage-table-package-atom">
+     {% if BL.Fail %}
+                  <span class="label label-danger">Build</span>
+      {% else %}
+                  <span class="label label-success">Build</span>
+      {% endif %}
+      {% for BLR in BLR_tmp %}
+      {% if BLR.BuildLogId.BuildLogId == BL.BuildLogId%}
+                  <span class="label label-danger">Repoman</span>
+      {% endif %}
+      {% endfor %}
+      {% for BLQ in BLQ_tmp %}
+      {% if BLQ.BuildLogId.BuildLogId == BL.BuildLogId%}
+                  <span class="label label-danger">Qa</span>
+      {% endif %}
+       {% endfor %}
+       <a class="btn btn-default btn-xs" href="/new/logs/build/{{ 
BL.BuildLogId }}/">More info</a>
+ </td>
+ </tr>
+ {% endfor %}
+  </table>
+  </div>
 </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 b941c62..a9cef7d 100644
--- a/python/templates/pages/packages/ebuilds/index.html
+++ b/python/templates/pages/packages/ebuilds/index.html
@@ -11,13 +11,17 @@
           <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>
-              {% 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 
label-warning">{{ K.KeywordId.Keyword }}</span>{% endif %}
-                  {% if K.Status == 'Negative' %}{{ K.KeywordId.Keyword }}{% 
endif %}
-                {% endif %}
-              {% endfor %}
+          {% for FI in fi_tmp %}
+            {% if FI.EbuildId == E.EbuildId.EbuildId %}
+              {% if FI.qa %}<span class="label label-warning">Qa</span>{% 
endif %}
+              {% if FI.repoman %}<span class="label 
label-warning">Repoman</span>{% endif %}
+              {% if FI.fail %}
+                <span class="label label-danger">Build</span>
+              {% else %}
+                <span class="label label-success">Build</span>
+              {% endif %}
+            {% endif %}
+          {% endfor %}
           </td>
         </tr>
       {% endfor %}
@@ -26,5 +30,16 @@
   {% if PR %}
     <a class="btn btn-warning btn-xs" href="/repoman/{{P.PackageId.PackageId 
}}/">Repoman</a>
   {% endif %}
+  {% if QA %}
+    <a class="btn btn-warning btn-xs" href="/qa/{{P.PackageId.PackageId 
}}/">Qa</a>
+  {% endif %}
+  {% if Bl %}
+    {% if Blf %}
+      <a class="btn btn-danger btn-xs">
+    {% else %}
+      <a class="btn btn-success btn-xs">
+    {% endif %}
+    Build</a>
+  {% endif %}
 </div>
 {% endblock %}
\ No newline at end of file

Reply via email to