Ticket #1919: 1919.patch

File 1919.patch, 1.5 KB (added by cpeyer, 2 years ago)

Updated patch uses shortrev filter to prevent column width overflow

  • master/buildbot/status/web/templates/box_macros.html

    diff --git a/master/buildbot/status/web/templates/box_macros.html b/master/buildbot/status/web/templates/box_macros.html
    index 849842f..2446f64 100644
    a b  
    1616 
    1717{# this is currently just the text part of the boxes #} 
    1818 
    19 {% macro build_box(reason, url, number) -%} 
     19{% macro build_box(reason, url, number, ss) -%} 
    2020  <a title="Reason: {{ reason|e }}" href="{{ url }}">Build {{ number }}</a> 
     21  {%- if ss.revision %} 
     22    <br>{{ ss.revision|shortrev(ss.repository) }} 
     23  {%- endif %} 
    2124{%- endmacro %} 
    2225 
    2326{% macro step_box(text, logs, urls) -%} 
  • master/buildbot/status/web/waterfall.py

    diff --git a/master/buildbot/status/web/waterfall.py b/master/buildbot/status/web/waterfall.py
    index 0e898e3..6a2cc62 100644
    a b class BuildBox(components.Adapter): 
    147147    def getBox(self, req): 
    148148        b = self.original 
    149149        number = b.getNumber() 
     150        ss = b.getSourceStamp() 
    150151        url = path_to_build(req, b) 
    151152        reason = b.getReason() 
    152153        template = req.site.buildbot_service.templates.get_template("box_macros.html") 
    153         text = template.module.build_box(reason=reason,url=url,number=number) 
     154        text = template.module.build_box(reason=reason,url=url,number=number, ss=ss) 
    154155        class_ = "start" 
    155156        if b.isFinished() and not b.getSteps(): 
    156157            # the steps have been pruned, so there won't be any indication