extras-buildsys/www job.psp, NONE, 1.1 builders.psp, 1.2, 1.3 index.psp, 1.2, 1.3 indiv.psp, 1.2, 1.3

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Sat Jul 23 00:55:33 UTC 2005


Author: dcbw

Update of /cvs/fedora/extras-buildsys/www
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30232/www

Modified Files:
	builders.psp index.psp indiv.psp 
Added Files:
	job.psp 
Log Message:
2005-07-22  Dan Williams <dcbw at redhat.com>

    * server/UserInterface.py
        - Fix traceback in job detail code

    * www/*
        - Add an individual job view
        - Cleanups for Safari




--- NEW FILE job.psp ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%
curpage = 'job'
%>
<%@ include file="template/main.psp"%>
<%@ include file="template/head.psp"%>

<center>
<br>
<br>

<%
if not form.has_key('uid') or not form['uid'] or not len(str(form['uid'])):
    i = 1
%>
        <p><h2>Please enter a Job ID.</h2></p>
<%
else:
    uid = str(form['uid'])
    import socket, xmlrpclib

    try:
        (e, msg, job) = server.detail_job('', uid)
    except socket.error, e:
        msg = str(e)
%>
        <p><h2>Could not contact the server.</h2><br>Error was:<%=msg%></p>
<%
    except xmlrpclib.Fault, fault:
        msg = "XMLRPC Fault"
        e = -1

    if e == -1:
%>
        <p><h2>The server could not process the request.</h2><br>Error was:&nbsp;&nbsp;<%=msg%></p>
<%
    else:
        if job.has_key('version') and job.has_key('release'):
            title = "%s-%s-%s" % (job['package'], job['version'], job['release'])
        else:
            title = job['package']
        # endif
%>

    <table class="jobdetail" cellspacing="0" cellpadding="0">
        <tr>
            <td class="jobdetail-side"></td>
            <td class="jobdetail-info" align="left">
                <table cellspacing="0" cellpadding="0" width="100%">
                    <tr><td colspan="2" class="jobdetail-title"><font class="jobdetail-title"><%=str(job['uid'])%>:&nbsp;<%=title%>&nbsp;&nbsp;(<%=job['status']%>)</td></tr>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Target:</font></td><td class="jobdetail-text"><%=str(job['target'])%></td></tr>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Submitter:</font></td><td class="jobdetail-text"><%=str(job['username'])%></td></tr>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Source:</font></td><td class="jobdetail-text"><%=str(job['source'])%></td></tr>
<%
        if job['endtime'] != 0:
            total_time = (int(job['endtime']) - int(job['starttime'])) / 60
%>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Build Time:</font></td><td class="jobdetail-text"><%=str(total_time)%> minutes</td></tr>
<%
        # endif
        if job.has_key('log_url') and job['log_url'] and len(job['log_url']):
            log_url = str(job['log_url'])
%>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Logs:</font></td><td class="jobdetail-text"><a href="<%=log_url%>"><%=log_url%></a></td></tr>
<%
        # endif
        if job.has_key('result_msg') and job['result_msg'] and len(job['result_msg']):
            import urllib
            result_msg = urllib.unquote(str(job['result_msg']))
%>
                    <tr><td class="jobdetail-tag"><font class="jobdetail-tag">Result:</font></td><td class="jobdetail-text">"<%=result_msg%>"</td></tr>
<%
        # endif
%>
                </table>
            </td>
            <td class="jobdetail-side"></td>
        </tr>
    </table>
    <br>
    <table class="jobdetail" cellspacing="0" cellpadding="0">
<%
        for aj in job['archjobs']:
            i = 1
%>
        <tr>
            <td colspan="2" align="left">
                <table class="archjobs" cellspacing="0" cellpadding="0">
                    <tr>
                        <td width="20" class="archjobs"></td>
                        <td class="archjobs">
                            <font class="archjobtag"><%=aj['arch']%>:</font>
                            <font class="archjob">&nbsp;<%=aj['builder_addr']%></font>
                        </td>
<%
            colspan = ''
            if aj['endtime'] == 0:
                colspan = 'colspan="2"'
            #endif
%>
                        <td class="archjobs" <%=colspan%>>
                            <font class="archjobtag">Status:</font>
                            <font class="archjob">&nbsp;<%=aj['status']%>/<%=aj['builder_status']%></font>
                        </td>
<%
            if aj['endtime'] != 0:
                aj_time = (int(aj['endtime']) - int(aj['starttime'])) / 60
%>
                        <td class="archjobs">
                            <font class="archjobtag">Build Time:</font>
                            <font class="archjob">&nbsp;<%=aj_time%> minutes</font>
                        </td>
<%
            # endif
%>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
<%
        # endfor
%>
    </table>
    <br><br>

<%
    # endif
# endif
%>

</center>

<%@ include file="template/foot.psp"%>

    </body>
</html>


Index: builders.psp
===================================================================
RCS file: /cvs/fedora/extras-buildsys/www/builders.psp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- builders.psp	22 Jul 2005 05:39:19 -0000	1.2
+++ builders.psp	23 Jul 2005 00:55:31 -0000	1.3
@@ -65,9 +65,9 @@
             archjobs = job['archjobs']
             if not archjobs:
                 continue
-            job_text = 'Jobs:'
             for aj in archjobs:
                 if aj['builder_addr'] == addr:
+                    joblink = job_link(job['uid'])
 %>
         <tr>
             <td colspan="2" align="left">
@@ -76,7 +76,7 @@
                         <td width="10" class="archjobs"></td>
                         <td class="archjobs">
                             <font class="archjobtag">Job:</font>
-                            <font class="archjob">&nbsp;<%=aj['parent_uid']%>&nbsp;(<%=job['package']%>/<%=aj['arch']%>)&nbsp;&nbsp;&nbsp;</font>
+                            <font class="archjob">&nbsp;<a href="job.psp<%=joblink%>"><%=aj['parent_uid']%></a>&nbsp;(<%=job['package']%>/<%=aj['arch']%>)&nbsp;&nbsp;&nbsp;</font>
                             <font class="archjobtag">Status:</font>
                             <font class="archjob">&nbsp;<%=aj['status']%>/<%=aj['builder_status']%></font>
                         </td>
@@ -86,7 +86,6 @@
         </tr>
 <%
                 # endif
-                job_text = ''
             # endfor
         # endfor
 %>


Index: index.psp
===================================================================
RCS file: /cvs/fedora/extras-buildsys/www/index.psp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- index.psp	22 Jul 2005 05:39:19 -0000	1.2
+++ index.psp	23 Jul 2005 00:55:31 -0000	1.3
@@ -10,6 +10,7 @@
 try:
     args = {}
     args['status'] = 'waiting'
+    args['maxrows'] = 30
     (e, msg, waiting_jobs) = server.list_jobs(args)
     args['status'] = 'building'
     (e, msg, building_jobs) = server.list_jobs(args)
@@ -62,9 +63,11 @@
             import os
             source = os.path.basename(source)
         # endif
+
+        joblink = job_link(job['uid'])
 %>
         <tr>
-            <td class="job<%=top%><%=col_mod%>"><%=job['uid']%></td>
+            <td class="job<%=top%><%=col_mod%>"><a href="job.psp<%=joblink%>"><%=job['uid']%></a></td>
             <td class="job<%=top%><%=col_mod%>"><%=job['package']%></td>
             <td class="job<%=top%><%=col_mod%>"><%=source%></td>
             <td class="job<%=top%><%=col_mod%>"><font class="status-<%=job['status']%>"><%=job['status']%></font></td>
@@ -90,7 +93,7 @@
         # endif
 %>
         <tr>
-            <td class="job<%=top%><%=col_mod%>"><%=job['uid']%></td>
+            <td class="job<%=top%><%=col_mod%>"><a href="job.psp<%=joblink%>"><%=job['uid']%></a></td>
             <td class="job<%=top%><%=col_mod%>"><%=job['package']%></td>
             <td class="job<%=top%><%=col_mod%>"><%=source%></td>
             <td class="job<%=top%><%=col_mod%>"><font class="status-<%=job['status']%>"><%=job['status']%></font></td>
@@ -115,6 +118,7 @@
 </table>
 </div>
 </center>
+<br><br>
 
 <%
 # endtry


Index: indiv.psp
===================================================================
RCS file: /cvs/fedora/extras-buildsys/www/indiv.psp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- indiv.psp	22 Jul 2005 05:39:19 -0000	1.2
+++ indiv.psp	23 Jul 2005 00:55:31 -0000	1.3
@@ -8,10 +8,12 @@
 <%
 if not len(user_email):
 %>
+<center>
 <form method="POST" action="indiv.psp">
     Email Address:&nbsp;&nbsp;<input type="text" name="email">
     <input type="submit" value="Show...">
 </form>
+</center>
 <%
 else:
     import socket, xmlrpclib
@@ -134,9 +136,11 @@
                 import os
                 source = os.path.basename(source)
             # endif
+
+            joblink = job_link(job['uid'])
 %>
         <tr>
-            <td class="job<%=top%><%=col_mod%>"><%=job['uid']%></td>
+            <td class="job<%=top%><%=col_mod%>"><a href="job.psp<%=joblink%>"><%=job['uid']%></a></td>
             <td class="job<%=top%><%=col_mod%>"><%=job['package']%></td>
             <td class="job<%=top%><%=col_mod%>"><%=source%></td>
             <td class="job<%=top%><%=col_mod%>"><font class="status-<%=job['status']%>"><%=job['status']%></font></td>
@@ -160,6 +164,7 @@
 </tbody>
 </table>
 </center>
+<br><br>
 
 <%
 # endif




More information about the scm-commits mailing list