Ticket #423 (closed task: fixed)

Opened 4 years ago

Last modified 3 years ago

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:1 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.10

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.

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.

comment:4 Changed 4 years ago by nhemingway

  • Status changed from closed to reopened
  • Resolution fixed deleted

I only fixed two of the duplicate instances, not the other four.

comment:5 Changed 4 years ago by dustin

  • Milestone changed from 0.7.10 to 0.7.+

comment:6 Changed 3 years ago by dustin

  • Keywords web added
  • Status changed from reopened to closed
  • Resolution set to fixed
  • Milestone changed from 0.8.+ to 0.8.0

Marcus fixed this with the templates.

Note: See TracTickets for help on using tickets.