From c4b9358874d053c9c81a74bedcb43f8e21f0b4ba Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 20 Jun 2015 21:15:24 +0200 Subject: [PATCH] Variety of fixes all over the place Makes buildbot more usable, but still tweaks are needed. --- templates/build.html | 64 ++++++++--------- templates/build_line.html | 14 ++-- templates/builder.html | 124 +++++++++++++++++++++++++++++++++ templates/buildslave.html | 4 +- templates/forms.html | 39 ++++++----- templates/grid.html | 31 +++++++++ templates/grid_transposed.html | 30 ++++++++ templates/waterfall.html | 66 ++++++++++++++++++ 8 files changed, 314 insertions(+), 58 deletions(-) create mode 100644 templates/builder.html create mode 100644 templates/grid.html create mode 100644 templates/grid_transposed.html create mode 100644 templates/waterfall.html diff --git a/templates/build.html b/templates/build.html index 684c1ba..38889d6 100644 --- a/templates/build.html +++ b/templates/build.html @@ -5,7 +5,7 @@ {% block content %}
-

+

Builder {{ b.getBuilder().getName() }} Build #{{ b.getNumber() }}

@@ -51,43 +51,42 @@ SourceStamps:

{{ ss.codebase }}

- {% set ss_class = cycler('alt','') %} {% if ss.project %} - + {% endif %} {% if ss.repository %} - + {% endif %} {% if ss.branch %} - + {% endif %} {% if ss.revision %} - + {% endif %} {% if got_revisions[ss.codebase] %} - + {% endif %} {% if ss.patch %} - + {% endif %} {% if ss.changes %} - + {% endif %} {% if not ss.branch and not ss.revision and not ss.patch and not ss.changes %} - + {% endif %}
Project{{ ss.project|projectlink }}
Project{{ ss.project|projectlink }}
Repository{{ ss.repository|repolink }}
Repository{{ ss.repository|repolink }}
Branch{{ ss.branch|e }}
Branch{{ ss.branch|e }}
Revision{{ ss.revision|revlink(ss.repository) }}
Revision{{ ss.revision|revlink(ss.repository) }}
Got Revision{{ got_revisions[ss.codebase]|revlink(ss.repository) }}
Got Revision{{ got_revisions[ss.codebase]|revlink(ss.repository) }}
PatchYES
PatchYES
Changes{{ ss.changes|count }} change{{ 's' if ss.changes|count > 1 else '' }}
Changes{{ ss.changes|count }} change{{ 's' if ss.changes|count > 1 else '' }}
Build of most recent revision
Build of most recent revision
-
+
{% endfor %} {% endfor %} @@ -121,27 +120,28 @@ SourceStamps: # (target, ex_url_class, html.escape(name))) #} +{# TODO(sergey): Move hardcoded span with inline-block into a CSS class. #} +
    {% for s in steps %}
  1. -
    - {{ s.name }} - {{ s.text }}   -{{ '( ' + s.time_to_run + ' )' if s.time_to_run else '' }} -
    - + {{ s.name }} + + {{ s.text }}   {{ '( ' + s.time_to_run + ' )' if s.time_to_run else '' }} + +
      {% set item_class = cycler('alt', '') %} {% for l in s.logs %} -
    1. {{ l.name }}
    2. + {{ l.name }} {% else %} -
    3. - no logs -
    4. + - no logs - {% endfor %} - {% for u in s.urls %} -
    5. {{ u.logname }}
    6. + {{ u.logname }} {% endfor %} -
    +
+ {% endfor %} @@ -151,13 +151,13 @@ SourceStamps:

Build Properties:

- +
{% for p in properties %} {% if p.source != "Force Build Form" %} - + {% if p.short_value %} {% else %} @@ -165,7 +165,7 @@ SourceStamps: {% else %}
NameValueSource
{{ p.name|e }}{{ p.name|e }}{{ p.short_value|e }} .. [property value too long]{{ p.value|e }} - +
{%- for key, value in p.value.items() recursive %} {% endfor %} @@ -179,14 +179,14 @@ SourceStamps: {% endfor %}
{{ key|e }}{{ value|e }}

Forced Build Properties:

- +
{% for p in properties %} {% if p.source == "Force Build Form" %} - - + - + - + {%- if include_builder %} - + {% endif %} - + - + {% endmacro %} {% macro build_table(builds, include_builder=False) %} {% if builds %} -
NameLabelValue
{{ p.name|e }} + {{ p.name|e }} {% if p.label %} {{ p.label }} {% endif %} @@ -215,12 +215,12 @@ SourceStamps:

Timing:

- - +
Start{{ start }}
+ {% if end %} - + {% endif %} - +
Start{{ start }}
End{{ end }}
End{{ end }}
Elapsed{{ elapsed }}
Elapsed{{ elapsed }}
{% if authz.advertiseAction('forceBuild', request) %} diff --git a/templates/build_line.html b/templates/build_line.html index 71be846..63d2117 100644 --- a/templates/build_line.html +++ b/templates/build_line.html @@ -15,31 +15,31 @@ {% macro build_tr(b, include_builder=False, loop=None) %}
{{ b.time }}{{ b.time }} {%- for rev in b.rev_list -%} {%- if not loop.first %}
{% endif -%} {%- if rev.get('codebase', '') %}{{ rev['codebase'] }}: {% endif -%} {{ rev['rev']|shortrev(rev['repo']) }} {%- endfor -%}
{{ b.results }}{{ b.results }}{{ b.builder_name }}{{ b.builder_name }}#{{ b.buildnum }}#{{ b.buildnum }} {{ b.reason|e }} {%- for user in (b.interested_users or []) -%} {%- if not loop.first %}, {% endif -%} {{ user|e }} {%- endfor -%} {{ b.text|capitalize }}{{ b.text|capitalize }}
+
@@ -47,7 +47,7 @@ {%- if include_builder %} {% endif %} - + diff --git a/templates/builder.html b/templates/builder.html new file mode 100644 index 0000000..ec3ea7a --- /dev/null +++ b/templates/builder.html @@ -0,0 +1,124 @@ +{% from 'build_line.html' import build_table %} +{% import 'forms.html' as forms %} + +{% extends "layout.html" %} +{% block content %} + +

Builder {{ name }}

+ +

(view in waterfall)

+ +{% if description %} +
{{ description }}
+{% endif %} + +
+ +{% if current %} +

Current Builds:

+
    + {% for b in current %} +
  • {{ b.num }} + {% if b.when %} + ETA: {{ b.when_time }} [{{ b.when }}] + {% endif %} + + {{ b.current_step }} + + {% if authz.advertiseAction('stopBuild', request) %} + {{ forms.stop_build(b.stop_url, authz, on_all=False, short=True, label='Build') }} + {% endif %} +
  • + {% endfor %} +
+{% else %} +

No current builds

+{% endif %} + +{% if pending %} +

Pending Build Requests:

+
    + {% for b in pending %} +
  • ({{ b.when }}, waiting {{ b.delay }}) + + {% if authz.advertiseAction('cancelPendingBuild', request) %} + {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=True, id=b.id) }} + {% endif %} + + {% if b.num_changes < 4 %} + {% for c in b.changes %}{{ c.revision|shortrev(c.repo) }} + ({{ c.who|email }}){% if not loop.last %},{% endif %} + {% endfor %} + {% else %} + ({{ b.num_changes }} changes) + {% endif %} + + {% if 'owner' in b.properties %} + Forced build + by {{b.properties['owner'][0]}} + {% if 'reason' in b.properties %} + {{b.properties['reason'][0]}} + {% endif %} + {% endif %} +
  • + {% endfor %} +
+ + {% if authz.advertiseAction('cancelPendingBuild', request) %} + {{ forms.cancel_pending_build(builder_url+"/cancelbuild", authz, short=False, id='all') }} + {% endif %} + +{% else %} +

No Pending Build Requests

+{% endif %} + +

Recent Builds:

+ +{{ build_table(recent) }} + +Show more + +
+
+ +

Buildslaves:

+
Time RevisionBuilderBuild #Build # Reason Info
+{% if slaves %} + + + + + +{% endif %} +{% for s in slaves %} + + + {% if s.connected %} + {% if s.paused %} + + {% else %} + + {% endif %} + {% else %} + + {% endif %} + + +{% else %} + +{% endfor %} +
NameStatusAdmin
{{ s.name|e }}pausedconnectedoffline{{ s.admin|email if s.admin else ""}}
no slaves attached
+ +{% if authz.advertiseAction('pingBuilder', request) %} +

Ping slaves

+ {{ forms.ping_builder(builder_url+"/ping", authz) }} +{% endif %} + +{% if authz.advertiseAction('forceBuild', request) and force_schedulers != {} %} +

Force build

+ {{ forms.force_build(builder_url+"/force", authz, request, False, force_schedulers=force_schedulers,default_props=default_props) }} +{% endif %} + + + +{% endblock %} diff --git a/templates/buildslave.html b/templates/buildslave.html index b323a77..c53cab0 100644 --- a/templates/buildslave.html +++ b/templates/buildslave.html @@ -5,7 +5,7 @@ {% block content %}

Buildslave: {{ slavename|e }}

-
+
{% if current %}

Currently building:

@@ -27,7 +27,7 @@ {{ build_table(recent, True) }}
-
+
{% if access_uri %} Click to Access Slave {% endif %} diff --git a/templates/forms.html b/templates/forms.html index 44422aa..5a52975 100644 --- a/templates/forms.html +++ b/templates/forms.html @@ -114,11 +114,13 @@ {% endif %} {% endmacro %} +{# TODO(sergey): Move hardcoded span with inline-block into a CSS class. #} + {% macro force_build_scheduler_parameter(f, authz, request, sch, default_props) %} {% if f and not f.hide and (f.fullName != "username" or not authz.authenticated(request)) %} -
+

{% if 'text' in f.type or 'int' in f.type %} - {{f.label}} + {{f.label}} {% elif 'bool' in f.type%} @@ -127,7 +129,7 @@ {{f.label}} {% elif 'list' in f.type %} - {{f.label}} + {{f.label}} {% elif 'nested' in f.type %} - {% if f.label %}{{f.label}}{% endif %} + {% if f.label %}{{f.label}}{% endif %} {% for subfield in f.fields %} {{ force_build_scheduler_parameter(subfield, authz, request, sch, default_props) }} {% endfor %} {% endif %} -

+

{% endif %} {% endmacro %} @@ -176,15 +178,16 @@ {% for f in sch.all_fields %} {{ force_build_scheduler_parameter(f, authz, request, sch, default_props) }} {% endfor %} - - +
+

{% endmacro %} {% macro force_build(force_url, authz, request, on_all=False, on_selected=False, builders=[], force_schedulers={},default_props={}) %} +
{% for name, sch in force_schedulers.items() | sort %} {{ force_build_one_scheduler(force_url, authz, request, on_all, on_selected, builders, sch, default_props=default_props) }} {% endfor %} - +
{% endmacro %} {% macro graceful_shutdown(shutdown_url, authz) %} @@ -242,26 +245,28 @@ {% macro rebuild_build(rebuild_url, authz, ss) %}
- +
{% if on_all %}

To force a build on all Builders, fill out the following fields and push the 'Force Build' button

{% else %}

To force a build, fill out the following fields and - push the 'Force Build' button

+ push the 'Rebuild' button

{% endif %} -
- Reason for re-running build: +

+ Reason for re-running build: -

-
- Rebuild using: +

+

+ Rebuild using: -

- +

+
+

+
{% endmacro %} diff --git a/templates/grid.html b/templates/grid.html new file mode 100644 index 0000000..e37b59d --- /dev/null +++ b/templates/grid.html @@ -0,0 +1,31 @@ +{% extends "layout.html" %} +{% import 'grid_macros.html' as grid with context %} + +{% block content %} + +

Grid View

+ + + + + + + {% for s in stamps %} + {{ grid.stamp_td(s) }} + {% endfor %} + + +{% for builder in builders %} + + {{ grid.builder_td(builder) }} + {% for build in builder.builds %} + {{ grid.build_td(build) }} + {% endfor %} + +{% endfor %} + +
{{ title }} + {{ grid.category_title() }} +
+ +{% endblock %} diff --git a/templates/grid_transposed.html b/templates/grid_transposed.html new file mode 100644 index 0000000..82655e9 --- /dev/null +++ b/templates/grid_transposed.html @@ -0,0 +1,30 @@ +{% extends "layout.html" %} +{% import 'grid_macros.html' as grid with context %} + +{% block content %} + +

Transposed Grid View

+ + + + + + {% for builder in builders %} + {{ grid.builder_td(builder) }} + {% endfor %} + + +{% for i in range %} + + {{ grid.stamp_td(stamps[i]) }} + {% for b in builder_builds %} + {{ grid.build_td(b[i]) }} + {% endfor %} + +{% endfor %} + +
{{ title }} + {{ grid.category_title() }} +
+ +{% endblock %} diff --git a/templates/waterfall.html b/templates/waterfall.html new file mode 100644 index 0000000..d8738db --- /dev/null +++ b/templates/waterfall.html @@ -0,0 +1,66 @@ +{% extends "layout.html" %} +{% from "box_macros.html" import box %} + +{% block content %} + +
+

Waterfall

+ waterfall help +
+ + + + + + +{% for b in builders %} + +{% endfor %} + + + + + +{% for b in builders %} + +{% endfor %} + + + + + + +{% for b in builders %} + +{% endfor %} + + +{# waterfall contents goes here #} +{% for i in range(gridlen) -%} + + {% for strip in grid -%} + {%- if strip[i] -%}{{ box(**strip[i]) }} + {%- elif no_bubble -%}{{ box() }} + {%- endif -%} + {%- endfor -%} + +{% endfor %} + +
+ last build + + {{ b.name }}
+ {{ " ".join(b.top) }} +
current activity + {{ "
".join(b.status) }} +
{{ tz }}changes{{ b.name }}
+ +{% if nextpage %} + next page +{% endif %} + +{% if no_reload_page %} + Stop Reloading +{% endif %} + +{% endblock %}