Ticket #423 (closed task: fixed)
Duplicate code for rendering Buildbot/project links at the bottom of every web status page
| Reported by: | gward | Owned by: | gward |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.8.0 |
| Version: | 0.7.9 | Keywords: | web |
| Cc: |
Description
I just noticed that code like this:
bburl = "http://buildbot.net/?bb-ver=%s" % urllib.quote(version)
data += '<a href="%s">Buildbot-%s</a> ' % (bburl, version)
if projectName:
data += "working for the "
if projectURL:
data += '<a href="%s">%s</a> project.' % (projectURL,
projectName)
else:
data += "%s project." % projectName
is repeated in several modules in buildbot.status.web:
- builder.py (twice)
- build.py
- grid.py
- slaves.py
- waterfall.py
As a result, the display is:
- inconsistent (most of them still link to buildbot.sourceforge.net, but the waterfall has been updated to point to buildbot.net)
- difficult to customize (e.g. I want to add a note in our local version that it's 0.7.9 plus local patches with a link to our wiki)
I'll try to come up with a patch for this.
Change History
comment:2 Changed 4 years ago by nhemingway
In nhemingway/bug420 branch, I've already consolidated the two instances from builder into webbase's HtmlResource? (which could be used for the rest) - I noticed the duplication whilst working on #420 and fixed it not realising there was a ticket for this. sorry!
It might make sense to define the main buildbot url in buildbot/init.py just like the version, then it's in the one place (just my 2p or 2¢)
comment:3 Changed 4 years ago by dustin
- Status changed from new to closed
- Resolution set to fixed
Neil's changes (in #420) are merged.
Note: See
TracTickets for help on using
tickets.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
That'd be cool. The version *is* taken from buildbot.version, at least.
If you can get this patched quickly, I'll make sure it's in 0.7.10.