[Xfce4-commits] <xfce-buildbot-scripts:master> Don't pass more information to detail sites than necessary

Enrico Tröger noreply at xfce.org
Sun Oct 11 21:38:01 CEST 2009


Updating branch refs/heads/master
         to 7bb2bafaa8b2de99b705bb774f8af5af7676e83f (commit)
       from bb29c2ab4d07a1089fbf8d745a62e90a2d9ddda2 (commit)

commit 7bb2bafaa8b2de99b705bb774f8af5af7676e83f
Author: Enrico Tröger <enrico.troeger at uvena.de>
Date:   Sun Oct 11 21:25:42 2009 +0200

    Don't pass more information to detail sites than necessary
    
    We don't need to know the exact build number when querying the detail status as we always want to see the latest build.
    Instead display the build number in the list of build details.

 xfcebuildstatus.py |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/xfcebuildstatus.py b/xfcebuildstatus.py
index 393ac89..66e2589 100644
--- a/xfcebuildstatus.py
+++ b/xfcebuildstatus.py
@@ -321,7 +321,7 @@ def get_build_status_html(html, url, input):
         for name in PLATFORM_NAMES:
             try:
                 if status[name][0] == 'success':
-                    link_url = '%s/detail/s/%s/%d' % (url, status[name][6], status[name][3])
+                    link_url = '%s/detail/%s' % (url, status[name][6])
                     title = 'Built revision %s on %s' % (status[name][2][:7], status[name][1])
                     html.open_tag('td', attribs={'class': 'status_success'})
                     html.add_element('a', status[name][0], attribs={'href':link_url, 'title':title, 'class': 'status_link'})
@@ -333,7 +333,7 @@ def get_build_status_html(html, url, input):
                         (module_name, steps, status[name][1], reasons)
                     if status[name][2]:
                         desc += ' Revision %s' % (status[name][2][:7])
-                    link_url = '%s/detail/f/%s/%d' % (url, status[name][6], status[name][3])
+                    link_url = '%s/detail/%s' % (url, status[name][6])
 
                     html.open_tag('td', {'class': 'status_failed'})
                     html.add_element('a', status[name][0], attribs={'href':link_url, 'title':desc, 'class': 'status_link'})
@@ -348,7 +348,7 @@ def get_build_status_html(html, url, input):
     html.close_tag('table')
 
 #----------------------------------------------------------------------
-def get_detail_status(url, args):
+def get_detail_status(url, module):
     """
     Query the buildbot at url for the detailed build status as specified in args
 
@@ -360,10 +360,7 @@ def get_detail_status(url, args):
 
     server = ServerProxy(url)
     try:
-        if args[1] == 's':
-            builder = server.getBuild(args[2], int(args[3]))
-        else:
-            builder = server.getBuild(args[2], -1)
+        builder = server.getBuild(module, -1)
     except Exception, e:
         return { }
 
@@ -458,6 +455,9 @@ def get_detail_status_html(html, url, input):
         html.add_element('span', 'Build revision:', attribs={'class':'item'})
         html.add_cdata(' %s' % input['revision'])
         html.close_tag('p')
+        html.add_element('span', 'Build number:', attribs={'class':'item'})
+        html.add_cdata(' %s' % input['number'])
+        html.close_tag('p')
         html.add_element('p', 'Build steps:', attribs={'class':'item'})
 
         html.open_tag('p')
@@ -571,8 +571,8 @@ def main():
     html = HtmlGen(url, layout)
     if args:
         args_len = len(args)
-        if args[0] == 'detail' and args_len == 4:
-            status = get_detail_status(XMLRPC_URL, args)
+        if args[0] == 'detail' and args_len == 2:
+            status = get_detail_status(XMLRPC_URL, args[1])
             get_detail_status_html(html, url, status)
 
     # fallback to overview page



More information about the Xfce4-commits mailing list