From 40c1169d4cfbd2c1b73b088a05374fb929089fab Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 19 Nov 2011 13:04:46 -0800 Subject: [PATCH] Buildbot: Design for slaves pages --- .../public_html/static/css/vagrant.base.css | 2 + .../buildbot/master/templates/buildslave.html | 72 +++++++++++++++++++ .../master/templates/buildslaves.html | 70 ++++++++++++++++++ .../master/templates/layouts/base.html | 1 + .../master/templates/macros/build_line.html | 4 +- 5 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 test/buildbot/master/templates/buildslave.html create mode 100644 test/buildbot/master/templates/buildslaves.html diff --git a/test/buildbot/master/public_html/static/css/vagrant.base.css b/test/buildbot/master/public_html/static/css/vagrant.base.css index 849f19066..f889315e2 100644 --- a/test/buildbot/master/public_html/static/css/vagrant.base.css +++ b/test/buildbot/master/public_html/static/css/vagrant.base.css @@ -171,12 +171,14 @@ pre > code { background-color: #FDDFDE; } +.Module.buildtable tbody td.success, .Module.waterfall thead th.success, .Module.waterfall tbody td.success { background-color: #D1EED1; border-color: #BFE7BF; } +.Module.buildtable tbody td.failure, .Module.waterfall .BuildStep.failure { background-color: #FDDFDE; } diff --git a/test/buildbot/master/templates/buildslave.html b/test/buildbot/master/templates/buildslave.html new file mode 100644 index 000000000..91b4e565f --- /dev/null +++ b/test/buildbot/master/templates/buildslave.html @@ -0,0 +1,72 @@ +{% import 'macros/forms.html' as forms %} +{% from 'macros/build_line.html' import build_table, build_line %} + +{% extends "layouts/base.html" %} +{% block content %} +

Buildslave: {{ slavename|e }}

+ + + +
+
+ {% if current %} +

Currently building:

+
    + {% for b in current %} +
  • {{ build_line(b, True) }} +
    + + +
    +
  • + {% endfor %} +
+ {% else %} +

No current builds

+ {% endif %} +
+ +
+

Recent builds

+ {{ build_table(recent, True) }} +
+ +
+ {% if access_uri %} + Click to Access Slave + {% endif %} + + {% if admin %} +

Administrator

+

{{ admin|email }}

+ {% endif %} + + {% if host %} +

Slave information

+ Buildbot-Slave {{ slave_version }} +
{{ host|e }}
+ {% endif %} + +

Connection Status

+

+ {{ connect_count }} connection(s) in the last hour + {% if not slave.isConnected() %} + (not currently connected) + {% else %} +

+ {% if authz.advertiseAction('gracefulShutdown') %} +

Graceful Shutdown

+ {% if slave.getGraceful() %} +

Slave will shut down gracefully when it is idle.

+ {% else %} + {{ forms.graceful_shutdown(shutdown_url, authz) }} + {% endif %} + {% endif %} + {% endif %} +
+
+{% endblock %} diff --git a/test/buildbot/master/templates/buildslaves.html b/test/buildbot/master/templates/buildslaves.html new file mode 100644 index 000000000..b557b5e51 --- /dev/null +++ b/test/buildbot/master/templates/buildslaves.html @@ -0,0 +1,70 @@ +{% extends "layouts/base.html" %} + +{% block content %} +

Buildslaves

+ + + + + + {%- if show_builder_column %} + + {%- endif %} + + + + + + + + + + {% for s in slaves %} + + + + {%- if show_builder_column %} + + {%- endif %} + + + + {%- if s.admin -%} + + {%- else -%} + + {%- endif -%} + + + + + {% if s.connected %} + {% if s.running_builds %} + + {% else %} + + {% endif %} + + {% else %} + + {% endif %} + + + {% endfor %} + +
NameBuildersBuildBotAdminLast heard fromConnects/HourStatus
{{ s.name }} + {%- if s.builders %} + {%- for b in s.builders %} + {{ b.name }}
+ {%- endfor %} + {%- else %} + no builders + {%- endif -%} +
{{ (s.version or '-')|e }}{{ s.admin|email }}- + {%- if s.last_heard_from_age -%} + {{ s.last_heard_from_age }} + {%- endif -%} + + {{ s.connectCount }} + Running {{ s.running_builds }} build(s)IdleNot connected
+{% endblock %} diff --git a/test/buildbot/master/templates/layouts/base.html b/test/buildbot/master/templates/layouts/base.html index e76897685..05c452a03 100644 --- a/test/buildbot/master/templates/layouts/base.html +++ b/test/buildbot/master/templates/layouts/base.html @@ -24,6 +24,7 @@
  • home
  • builders
  • waterfall
  • +
  • build slaves
  • vagrant website
  • diff --git a/test/buildbot/master/templates/macros/build_line.html b/test/buildbot/master/templates/macros/build_line.html index 05dcf675a..0c91e2ef0 100644 --- a/test/buildbot/master/templates/macros/build_line.html +++ b/test/buildbot/master/templates/macros/build_line.html @@ -13,7 +13,7 @@ {{ b.time }} {{ b.rev|shortrev(b.rev_repo) }} - {{ b.results }} + {{ b.results }} {%- if include_builder %} {{ b.builder_name }} {% endif %} @@ -24,7 +24,7 @@ {% macro build_table(builds, include_builder=False) %} {% if builds %} - +
    Time