Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Unified Diff: master/webstatus/buildstatus.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « master/webstatus/builder_statuses.py ('k') | master/webstatus/console.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: master/webstatus/buildstatus.py
diff --git a/master/webstatus/buildstatus.py b/master/webstatus/buildstatus.py
deleted file mode 100644
index b389e0f36a48b10c0596c740ad26a3f881b9110d..0000000000000000000000000000000000000000
--- a/master/webstatus/buildstatus.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# This file is part of Buildbot. Buildbot is free software: you can
-# redistribute it and/or modify it under the terms of the GNU General Public
-# License as published by the Free Software Foundation, version 2.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
-# details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, write to the Free Software Foundation, Inc., 51
-# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Copyright Buildbot Team Members
-
-from buildbot.status.web.base import HtmlResource, IBox
-
-class BuildStatusStatusResource(HtmlResource):
- def __init__(self, categories=None):
- HtmlResource.__init__(self)
-
- def content(self, request, ctx):
- """Display a build in the same format as the waterfall page.
- The HTTP GET parameters are the builder name and the build
- number."""
-
- status = self.getStatus(request)
- request.setHeader('Cache-Control', 'no-cache')
-
- # Get the parameters.
- name = request.args.get("builder", [None])[0]
- number = request.args.get("number", [None])[0]
- if not name or not number:
- return "builder and number parameter missing"
- number = int(number)
-
- # Check if the builder in parameter exists.
- try:
- builder = status.getBuilder(name)
- except:
- return "unknown builder"
-
- # Check if the build in parameter exists.
- build = builder.getBuild(int(number))
- if not build:
- return "unknown build %s" % number
-
- rows = ctx['rows'] = []
-
- # Display each step, starting by the last one.
- for i in range(len(build.getSteps()) - 1, -1, -1):
- step = build.getSteps()[i]
- if step.isStarted() and step.getText() and not step.isHidden():
- rows.append(IBox(step).getBox(request).td(align="center"))
-
- # Display the bottom box with the build number in it.
- ctx['build'] = IBox(build).getBox(request).td(align="center")
-
- template = request.site.buildbot_service.templates.get_template("buildstatus.html")
- data = template.render(**ctx)
-
- # We want all links to display in a new tab/window instead of in the
- # current one.
- # TODO: Move to template
- data = data.replace('<a ', '<a target="_blank"')
- return data
« no previous file with comments | « master/webstatus/builder_statuses.py ('k') | master/webstatus/console.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698