[Buildbot-commits] buildbot/buildbot/status/web slaves.py,1.5,1.6
Brian Warner
warner at users.sourceforge.net
Wed Jun 25 23:52:43 UTC 2008
Update of /cvsroot/buildbot/buildbot/buildbot/status/web
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26409/buildbot/status/web
Modified Files:
slaves.py
Log Message:
[project @ #278:enhancedBuildSlavesPage-v2.diff]
short patch by Ben Hearsum to make the /buildslaves WebStatus? page
a little more useful. It does do things: 1) bolds the 'slave is NOT
connected' line to make it more visible 2) shows whether each slave
is busy (building) or not
Original author: dustin at v.igoro.us
Date: 2008-06-01 17:34:09+00:00
Index: slaves.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/status/web/slaves.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- slaves.py 16 Oct 2007 16:34:26 -0000 1.5
+++ slaves.py 25 Jun 2008 23:52:41 -0000 1.6
@@ -28,6 +28,8 @@
data += "<ol>\n"
for name in s.getSlaveNames():
slave = s.getSlave(name)
+ slave_status = s.botmaster.slaves[name].slave_status
+ isBusy = len(slave_status.getRunningBuilds())
data += " <li>%s:\n" % name
data += " <ul>\n"
builder_links = ['<a href="%s">%s</a>'
@@ -53,8 +55,12 @@
data += " <li>Last heard from: %s " % age
data += '<font size="-1">(%s)</font>' % lt
data += "</li>\n"
+ if isBusy:
+ data += "<li>Slave is currently building.</li>"
+ else:
+ data += "<li>Slave is idle.</li>"
else:
- data += " <li>Slave is NOT currently connected</li>\n"
+ data += " <li><b>Slave is NOT currently connected</b></li>\n"
data += " </ul>\n"
data += " </li>\n"
More information about the Commits
mailing list