From 4ee6feb6a654a7ceea8a6ca6a7b7097fa0ecc876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 20 Apr 2017 11:17:08 +0200 Subject: [PATCH] Fixed some layout issues on builders page The text in the rightmost column had duplications (next build ETA was mentioned twice), and too many newlines to be nicely readable. Hacked around that to fix both. I also made the builders table wider and tweaked some padding & spacing, so that it's nicer to read and click on. --- public_html/assets/sass/main.sass | 13 ++++++++ templates/builders.html | 52 +++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 templates/builders.html diff --git a/public_html/assets/sass/main.sass b/public_html/assets/sass/main.sass index c8c6926..5845f75 100644 --- a/public_html/assets/sass/main.sass +++ b/public_html/assets/sass/main.sass @@ -5,3 +5,16 @@ .table td.success background-color: #dff0d8 !important + +table.builders + width: 100% + +table.builders td.LastBuild + padding: 0.5ex 2ex + +table.builders td.Activity + padding-left: 2ex + +table.builders td a + display: block + padding: 0.5ex 2ex diff --git a/templates/builders.html b/templates/builders.html new file mode 100644 index 0000000..a3892ee --- /dev/null +++ b/templates/builders.html @@ -0,0 +1,52 @@ +{% extends 'layout.html' %} +{% import 'forms.html' as forms %} +{% from "box_macros.html" import box %} + +{% block content %} +

Builders: {{ branches|join(', ')|e }}

+ + +{% for b in builders %} + + + {% if b.build_url %} + + {% else %} + + {% endif %} + {# Sybren: The following removes the last 'next in', because it's always duplicated, + # and removes some newlines (box() adds a
after every list item). #} + {{ box(text='
next in '.join(' '.join(b.current_box['text']).split('next in')[:-1]), class_=b.current_box['class']) }} + +{% endfor %} +
{{ b.name|e }} + {{ b.build_label }} +
{{ b.build_text }} +
no build
+ +{% if num_building > 0 %} + {% if authz.advertiseAction('stopAllBuilds', request) or authz.advertiseAction('stopBuild', request) %} +

Stop Selected Builds

+ {{ forms.stop_build(path_to_root+"builders/_selected/stopselected", authz, on_selected=True, builders=builders, label='Selected Builds') }} +

Stop All Builds

+ {{ forms.stop_build(path_to_root+"builders/_all/stopall", authz, on_all=True, label='All Builds') }} + {% endif %} +{% endif %} + +{% if authz.advertiseAction('cancelAllPendingBuilds', request) %} +

Cancel Selected Pending Builds

+ {{ forms.cancel_build(path_to_root+"builders/_selected/cancelpendingselected", authz, on_selected=True, builders=builders, label='Selected Pending Builds') }} +

Cancel All Pending Builds

+ {{ forms.cancel_build(path_to_root+"builders/_all/cancelpendingall", authz, on_all=True, label='All Pending Builds') }} +{% endif %} + +{% if num_online > 0 %} + {% if authz.advertiseAction('forceAllBuilds', request) or authz.advertiseAction('forceBuild', request) %} +

Force Selected Builds

+ {{ forms.force_build(path_to_root+"builders/_selected/forceselected", authz, request, on_selected=True, builders=builders, force_schedulers=force_schedulers, default_props=default_props) }} +

Force All Builds

+ {{ forms.force_build(path_to_root+"builders/_all/forceall", authz,request, on_all=True, force_schedulers=force_schedulers, default_props=default_props) }} + {% endif %} +{% endif %} + +{% endblock %}