[jhbuild] [buildbot] add a plain text list of modules, at /modules.txt
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild] [buildbot] add a plain text list of modules, at /modules.txt
- Date: Thu, 9 Dec 2010 23:19:04 +0000 (UTC)
commit b4736a949b06c9e05dea0e9e1f0f2dfdd32aa9ed
Author: Frédéric Péters <fpeters 0d be>
Date: Fri Dec 10 00:17:16 2010 +0100
[buildbot] add a plain text list of modules, at /modules.txt
jhbuild/buildbot/status/web/__init__.py | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/buildbot/status/web/__init__.py b/jhbuild/buildbot/status/web/__init__.py
index 9ad5f3e..6e63146 100644
--- a/jhbuild/buildbot/status/web/__init__.py
+++ b/jhbuild/buildbot/status/web/__init__.py
@@ -43,6 +43,21 @@ def content(self, request):
return data
HtmlResource.content = content
+
+class ListOfModules(resource.Resource):
+ def render(self, request):
+ data = self.content(request)
+ request.setHeader('content-type', 'text/plain')
+ if request.method == 'HEAD':
+ request.setHeader('content-length', len(data))
+ return ''
+ return str(data)
+
+ def content(self, request):
+ parent = request.site.buildbot_service
+ return '\n'.join(parent.modules)
+
+
class ProjectsSummary(HtmlResource):
MAX_PROJECT_NAME = 25
@@ -198,6 +213,9 @@ class JHBuildWebStatus(WebStatus):
self.putChild('builders', JhBuildersResource())
self.putChild('bots', JhBuildbotsResource())
+ # and more pages
+ self.putChild('modules.txt', ListOfModules())
+
def setupSite(self):
WebStatus.setupSite(self)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]