extras-buildsys/www failed.psp,NONE,1.1 success.psp,NONE,1.1

Seth Vidal (skvidal) fedora-extras-commits at redhat.com
Thu Aug 4 06:51:27 UTC 2005


Author: skvidal

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

Added Files:
	failed.psp success.psp 
Log Message:

check in www changes for failed and success pages



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

<%
import socket, xmlrpclib
try:
    args = {}
    args['status'] = 'failed'
    args['maxrows'] = 100
    (e, msg, these_jobs) = server.list_jobs(args)
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:  <%=msg%></p>
<%
else:
    i = 1
%>

<center>
<table class="jobs" cellspacing="0" cellpadding="0">
<colgroup>
    <col align="left">
    <col align="left">
    <col align="left">
</colgroup>
<thead><tr>
    <th class="jobs" width="5%">JOB ID</th>
    <th class="jobs" width="10%">PACKAGE NAME</th>
    <th class="jobs" width="20%">SOURCE</th>
    <th class="jobs" width="10%">STATUS</th>
    <th class="jobs" width="10%">TARGET</th>
    <th class="jobs" width="10%">SUBMITTER</th>
</tr></thead>
<tbody>

<%
    i = 1
    for job in these_jobs:
        top = ''
        if i == 1:
            top = '-top'
        col_mod = ''
        if int(i / 2.0) == (i / 2.0):
            col_mod = '-alt'

        source = job['source']
        if '/' in source:
            import os
            source = os.path.basename(source)
        # endif

        joblink = job_link(job['uid'])
	despam_user = job['username'].replace('@', ' ')
%>
        <tr>
            <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>
            <td class="job<%=top%><%=col_mod%>"><%=job['target']%></td>
            <td class="job<%=top%><%=col_mod%>"><%=despam_user%></td>
        <tr>
<%
        i = i + 1
    # endfor

    # No jobs...
    if i == 1:
%>
        <tr>
            <td bgcolor="#efefef" colspan="5">No jobs found.</td>
        <tr>
<%
    # endif
%>

</tbody>
</table>
</div>
</center>
<br><br>

<%
# endtry
%>

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

    </body>
</html>


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

<%
import socket, xmlrpclib
try:
    args = {}
    args['status'] = 'needsign'
    args['maxrows'] = 100
    (e, msg, some_jobs) = server.list_jobs(args)
    args['status'] = 'addtorepo'
    (e, msg, other_jobs) = server.list_jobs(args)
    these_jobs = other_jobs + some_jobs
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:  <%=msg%></p>
<%
else:
    i = 1
%>

<center>
<table class="jobs" cellspacing="0" cellpadding="0">
<colgroup>
    <col align="left">
    <col align="left">
    <col align="left">
</colgroup>
<thead><tr>
    <th class="jobs" width="5%">JOB ID</th>
    <th class="jobs" width="10%">PACKAGE NAME</th>
    <th class="jobs" width="20%">SOURCE</th>
    <th class="jobs" width="10%">STATUS</th>
    <th class="jobs" width="10%">TARGET</th>
    <th class="jobs" width="10%">SUBMITTER</th>
</tr></thead>
<tbody>

<%
    i = 1
    for job in these_jobs:
        top = ''
        if i == 1:
            top = '-top'
        col_mod = ''
        if int(i / 2.0) == (i / 2.0):
            col_mod = '-alt'

        source = job['source']
        if '/' in source:
            import os
            source = os.path.basename(source)
        # endif

        joblink = job_link(job['uid'])
	despam_user = job['username'].replace('@', ' ')
%>
        <tr>
            <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>
            <td class="job<%=top%><%=col_mod%>"><%=job['target']%></td>
            <td class="job<%=top%><%=col_mod%>"><%=despam_user%></td>
        <tr>
<%
        i = i + 1
    # endfor

    # No jobs...
    if i == 1:
%>
        <tr>
            <td bgcolor="#efefef" colspan="5">No jobs found.</td>
        <tr>
<%
    # endif
%>

</tbody>
</table>
</div>
</center>
<br><br>

<%
# endtry
%>

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

    </body>
</html>




More information about the fedora-extras-commits mailing list