Merge lp:~cjwatson/launchpad/builders-styling into lp:launchpad

Proposed by Colin Watson
Status: Merged
Merged at revision: 17414
Proposed branch: lp:~cjwatson/launchpad/builders-styling
Merge into: lp:launchpad
Diff against target: 239 lines (+40/-60)
8 files modified
lib/canonical/launchpad/icing/css/base.css (+6/-1)
lib/lp/buildmaster/browser/builder.py (+1/-1)
lib/lp/buildmaster/model/builder.py (+5/-4)
lib/lp/buildmaster/templates/builder-index.pt (+1/-1)
lib/lp/buildmaster/templates/builders-index.pt (+27/-37)
lib/lp/soyuz/stories/soyuz/xx-builder-page.txt (+0/-2)
lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt (+0/-2)
lib/lp/soyuz/stories/soyuz/xx-private-builds.txt (+0/-12)
To merge this branch: bzr merge lp:~cjwatson/launchpad/builders-styling
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+253945@code.launchpad.net

Commit message

Various small improvements to the layout of /builders.

Description of the change

Various small improvements to the layout of /builders:

 * Drop unnecessary headings.
 * Darken the border below builder clump header rows.
 * Drop excessively-highlighted green colour on "Idle" text.
 * Sort builder processors by name.

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/launchpad/icing/css/base.css'
2--- lib/canonical/launchpad/icing/css/base.css 2012-06-07 18:37:10 +0000
3+++ lib/canonical/launchpad/icing/css/base.css 2015-03-24 11:30:56 +0000
4@@ -384,7 +384,7 @@
5 }
6
7 table.listing tr.category {
8- border-bottom: 1px solid #d2d2d2;
9+ border-bottom: 1px solid #999;
10 }
11
12 table.listing tr.category th,
13@@ -427,6 +427,11 @@
14 border-style: dotted none none none;
15 }
16
17+table.listing tr.category:first-child td {
18+ border-top-style: none;
19+ padding-top: 0;
20+ }
21+
22 table.listing .section-break td {
23 border-width: 1px 0 0 0;
24 border-style: solid;
25
26=== modified file 'lib/lp/buildmaster/browser/builder.py'
27--- lib/lp/buildmaster/browser/builder.py 2015-03-23 11:05:51 +0000
28+++ lib/lp/buildmaster/browser/builder.py 2015-03-24 11:30:56 +0000
29@@ -147,7 +147,7 @@
30 def getBuilderSortKey(builder):
31 return (
32 builder.virtualized,
33- tuple(p.id for p in builder.processors),
34+ tuple(p.name for p in builder.processors),
35 builder.name)
36
37 @cachedproperty
38
39=== modified file 'lib/lp/buildmaster/model/builder.py'
40--- lib/lp/buildmaster/model/builder.py 2015-02-17 04:52:53 +0000
41+++ lib/lp/buildmaster/model/builder.py 2015-03-24 11:30:56 +0000
42@@ -141,7 +141,7 @@
43 return list(Store.of(self).find(
44 Processor,
45 BuilderProcessor.processor_id == Processor.id,
46- BuilderProcessor.builder == self).order_by(Processor.id))
47+ BuilderProcessor.builder == self).order_by(Processor.name))
48
49 def _processors(self):
50 return self._processors_cache
51@@ -344,11 +344,12 @@
52 def _preloadProcessors(self, rows):
53 # Grab (Builder.id, Processor.id) pairs and stuff them into the
54 # Builders' processor caches.
55- store = IStore(Builder)
56- pairs = list(store.find(
57+ store = IStore(BuilderProcessor)
58+ pairs = list(store.using(BuilderProcessor, Processor).find(
59 (BuilderProcessor.builder_id, BuilderProcessor.processor_id),
60+ BuilderProcessor.processor_id == Processor.id,
61 BuilderProcessor.builder_id.is_in([b.id for b in rows])).order_by(
62- BuilderProcessor.builder_id, BuilderProcessor.processor_id))
63+ BuilderProcessor.builder_id, Processor.name))
64 load(Processor, [pid for bid, pid in pairs])
65 for row in rows:
66 get_property_cache(row)._processors_cache = []
67
68=== modified file 'lib/lp/buildmaster/templates/builder-index.pt'
69--- lib/lp/buildmaster/templates/builder-index.pt 2014-06-20 08:42:25 +0000
70+++ lib/lp/buildmaster/templates/builder-index.pt 2015-03-24 11:30:56 +0000
71@@ -102,7 +102,7 @@
72 </tal:cleaning>
73 <tal:clean condition="builder/clean_status/enumvalue:CLEAN">
74 <span class="sortkey" tal:content="string:1" />
75- <span class="sprite yes green">Idle</span>
76+ <span class="sprite yes">Idle</span>
77 </tal:clean>
78 </tal:idle>
79 <tal:manual tal:condition="builder/manual">
80
81=== modified file 'lib/lp/buildmaster/templates/builders-index.pt'
82--- lib/lp/buildmaster/templates/builders-index.pt 2015-03-23 11:05:51 +0000
83+++ lib/lp/buildmaster/templates/builders-index.pt 2015-03-24 11:30:56 +0000
84@@ -43,44 +43,34 @@
85
86 <div class="first yui-u">
87 <div id="builders-list" class="portlet">
88- <h2>Builders</h2>
89 <table class="listing" id="builders-table">
90- <thead>
91- <tr>
92- <th></th>
93- <th>Name</th>
94- <th>Status</th>
95- </tr>
96- </thead>
97- <tbody>
98- <tal:clump tal:repeat="clump view/builder_clumps">
99- <tr class="category">
100- <td class="icon left">
101- <img src="/@@/ppa-icon" alt="[virtual]"
102- title="Virtual builder"
103- tal:condition="clump/virtualized" />
104- <img src="/@@/distribution" alt="[non-virtual]"
105- title="Non-virtual builder"
106- tal:condition="not: clump/virtualized" />
107- </td>
108- <td colspan="2">
109- <tal:processor repeat="processor clump/processors"
110- content="processor/name" />
111- </td>
112- </tr>
113- <tr class="builder-row" tal:repeat="builder clump/builders">
114- <td></td>
115- <td style="width: 9em;">
116- <a tal:attributes="href builder/fmt:url"
117- tal:content="builder/name">Bob</a>
118- </td>
119- <td tal:define="job builder/currentjob">
120- <metal:status-summary
121- use-macro="builder/@@+index/status-summary" />
122- </td>
123- </tr>
124- </tal:clump>
125- </tbody>
126+ <tal:clump tal:repeat="clump view/builder_clumps">
127+ <tr class="category">
128+ <td class="icon left">
129+ <img src="/@@/ppa-icon" alt="[virtual]"
130+ title="Virtual builder"
131+ tal:condition="clump/virtualized" />
132+ <img src="/@@/distribution" alt="[non-virtual]"
133+ title="Non-virtual builder"
134+ tal:condition="not: clump/virtualized" />
135+ </td>
136+ <td colspan="2">
137+ <tal:processor repeat="processor clump/processors"
138+ content="processor/name" />
139+ </td>
140+ </tr>
141+ <tr class="builder-row" tal:repeat="builder clump/builders">
142+ <td></td>
143+ <td style="width: 9em;">
144+ <a tal:attributes="href builder/fmt:url"
145+ tal:content="builder/name">Bob</a>
146+ </td>
147+ <td tal:define="job builder/currentjob">
148+ <metal:status-summary
149+ use-macro="builder/@@+index/status-summary" />
150+ </td>
151+ </tr>
152+ </tal:clump>
153 </table>
154 <p tal:condition="view/user">
155 Updated on
156
157=== modified file 'lib/lp/soyuz/stories/soyuz/xx-builder-page.txt'
158--- lib/lp/soyuz/stories/soyuz/xx-builder-page.txt 2015-03-23 11:05:51 +0000
159+++ lib/lp/soyuz/stories/soyuz/xx-builder-page.txt 2015-03-24 11:30:56 +0000
160@@ -260,8 +260,6 @@
161 Register a new build machine
162 1 available build machine, 1 disabled and 0 building of a total
163 of 2 registered.
164- Builders
165- Name Status
166 386
167 frog Disabled
168 victim Idle
169
170=== modified file 'lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt'
171--- lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt 2015-03-23 11:05:51 +0000
172+++ lib/lp/soyuz/stories/soyuz/xx-buildfarm-index.txt 2015-03-24 11:30:56 +0000
173@@ -17,8 +17,6 @@
174 The Launchpad build farm
175 1 available build machine, 1 disabled and 1 building of a total of
176 2 registered.
177- Builders
178- Name Status
179 386
180 bob Building i386 build of mozilla-firefox 0.9 ...
181 frog Disabled
182
183=== modified file 'lib/lp/soyuz/stories/soyuz/xx-private-builds.txt'
184--- lib/lp/soyuz/stories/soyuz/xx-private-builds.txt 2015-03-23 14:03:33 +0000
185+++ lib/lp/soyuz/stories/soyuz/xx-private-builds.txt 2015-03-24 11:30:56 +0000
186@@ -201,8 +201,6 @@
187 >>> print extract_text(find_main_content(admin_browser.contents))
188 The Launchpad build farm
189 ...
190- Name Status
191- ...
192 bob Building i386 build of mozilla-firefox ...
193 ...
194 frog Building i386 build of privacy-test ... [~cprov/ubuntu/p3a]
195@@ -214,8 +212,6 @@
196 >>> print extract_text(find_main_content(name12_browser.contents))
197 The Launchpad build farm
198 ...
199- Name Status
200- ...
201 bob Building i386 build of mozilla-firefox ...
202 ...
203 frog Building private job
204@@ -227,8 +223,6 @@
205 >>> print extract_text(find_main_content(cprov_browser.contents))
206 The Launchpad build farm
207 ...
208- Name Status
209- ...
210 bob Building i386 build of mozilla-firefox ...
211 ...
212 frog Building i386 build of privacy-test ... [~cprov/ubuntu/p3a]
213@@ -241,8 +235,6 @@
214 The Launchpad build farm
215 2 available build machines, ...
216 ...
217- Name Status
218- ...
219 bob Building i386 build of mozilla-firefox ...
220 ...
221 frog Building private job
222@@ -305,8 +297,6 @@
223 >>> print extract_text(find_main_content(anon_browser.contents))
224 The Launchpad build farm
225 ...
226- Name Status
227- ...
228 bob Building i386 build of mozilla-firefox ...
229 ...
230 frog Building i386 build of privacy-test 666 ... [~cprov/ubuntu/p3a]
231@@ -319,8 +309,6 @@
232 >>> print extract_text(find_main_content(browser.contents))
233 The Launchpad build farm
234 ...
235- Name Status
236- ...
237 bob Building i386 build of mozilla-firefox ...
238 ...
239 frog Building i386 build of privacy-test 666 ... [~cprov/ubuntu/p3a]