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

Side by Side Diff: third_party/buildbot_8_4p1/buildbot/status/web/build.py

Issue 1812163002: Add log and link aliasing to BuildBot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Unused variable. Created 4 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # This file is part of Buildbot. Buildbot is free software: you can 1 # This file is part of Buildbot. Buildbot is free software: you can
2 # redistribute it and/or modify it under the terms of the GNU General Public 2 # redistribute it and/or modify it under the terms of the GNU General Public
3 # License as published by the Free Software Foundation, version 2. 3 # License as published by the Free Software Foundation, version 2.
4 # 4 #
5 # This program is distributed in the hope that it will be useful, but WITHOUT 5 # This program is distributed in the hope that it will be useful, but WITHOUT
6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
8 # details. 8 # details.
9 # 9 #
10 # You should have received a copy of the GNU General Public License along with 10 # You should have received a copy of the GNU General Public License along with
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 step['time_to_run'] = "" 114 step['time_to_run'] = ""
115 115
116 cxt['steps'].append(step) 116 cxt['steps'].append(step)
117 117
118 step['link'] = req.childLink("steps/%s" % urllib.quote(s.getName(), 118 step['link'] = req.childLink("steps/%s" % urllib.quote(s.getName(),
119 safe='')) 119 safe=''))
120 step['text'] = " ".join(s.getText()) 120 step['text'] = " ".join(s.getText())
121 step['urls'] = map(lambda x:dict(url=x[1],logname=x[0]), s.getURLs() .items()) 121 step['urls'] = map(lambda x:dict(url=x[1],logname=x[0]), s.getURLs() .items())
122 step['nest_level'] = s.getNestLevel() 122 step['nest_level'] = s.getNestLevel()
123 123
124 step['aliases'] = {}
125 for base, aliases in s.getAliases().iteritems():
126 step['aliases'][base] = [{
127 'text': a[0],
128 'url': a[1],
129 } for a in aliases]
130
124 step['logs']= [] 131 step['logs']= []
125 132
126 for l in s.getLogs(): 133 for l in s.getLogs():
127 logname = l.getName() 134 logname = l.getName()
128 step['logs'].append({ 'link': req.childLink("steps/%s/logs/%s" % 135 step['logs'].append({ 'link': req.childLink("steps/%s/logs/%s" %
129 (urllib.quote(s.getName(), safe=''), 136 (urllib.quote(s.getName(), safe=''),
130 urllib.quote(logname, safe=''))), 137 urllib.quote(logname, safe=''))),
131 'name': logname }) 138 'name': logname })
132 139
133 ps = cxt['properties'] = [] 140 ps = cxt['properties'] = []
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 try: 262 try:
256 num = int(path) 263 num = int(path)
257 except ValueError: 264 except ValueError:
258 num = None 265 num = None
259 if num is not None: 266 if num is not None:
260 build_status = self.builder_status.getBuild(num) 267 build_status = self.builder_status.getBuild(num)
261 if build_status: 268 if build_status:
262 return StatusResourceBuild(build_status) 269 return StatusResourceBuild(build_status)
263 270
264 return HtmlResource.getChild(self, path, req) 271 return HtmlResource.getChild(self, path, req)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698