Merge lp:~cprov/launchpad/bug-417159-build-ui-tweaks into lp:launchpad

Proposed by Celso Providelo
Status: Merged
Merged at revision: not available
Proposed branch: lp:~cprov/launchpad/bug-417159-build-ui-tweaks
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~cprov/launchpad/bug-417159-build-ui-tweaks
Reviewer Review Type Date Requested Status
Aaron Bentley (community) Approve
Review via email: mp+11703@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Celso Providelo (cprov) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

= Summary =

This branch fixes 2 trivial UI bugs in Build:+index:

https://bugs.edge.launchpad.net/bugs/417159
https://bugs.edge.launchpad.net/bugs/416365

The first issues was fixes by moving the binary-packages and the binary-files sections to separate rows, it should mitigate the issue with long filenames.

The second issue is easier, we now include a label for the 'retry' action.

== Tests ==

./bin/test -vv -t stories.ppa -t stories.soyuz

== Demo and Q/A ==

https://launchpad.dev/~cprov/+archive/ppa/+build/27

https://launchpad.dev/~cprov/+archive/ppa/+build/26 (logged in as cprov or foo.bar)

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/soyuz/templates/build-index.pt
  lib/lp/soyuz/browser/build.py
  lib/lp/soyuz/stories/soyuz/xx-build-record.txt
  lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkquX/EACgkQ7KBXuXyZSjDqwgCfRhP+sYl6DP1a9uGsPvGJez+r
NwIAoKhO4EvLnlW3PQZmQ2AZvKF6YEhB
=xiy1
-----END PGP SIGNATURE-----

Revision history for this message
Aaron Bentley (abentley) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/soyuz/browser/build.py'
--- lib/lp/soyuz/browser/build.py 2009-08-18 17:52:41 +0000
+++ lib/lp/soyuz/browser/build.py 2009-09-14 14:40:18 +0000
@@ -106,7 +106,7 @@
106 @enabled_with_permission('launchpad.Edit')106 @enabled_with_permission('launchpad.Edit')
107 def retry(self):107 def retry(self):
108 """Only enabled for build records that are active."""108 """Only enabled for build records that are active."""
109 text = 'Retry build'109 text = 'Retry this build'
110 return Link(110 return Link(
111 '+retry', text, icon='retry',111 '+retry', text, icon='retry',
112 enabled=self.context.can_be_retried)112 enabled=self.context.can_be_retried)
113113
=== modified file 'lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt'
--- lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-09-12 06:49:56 +0000
+++ lib/lp/soyuz/stories/ppa/xx-ppa-packages.txt 2009-09-14 14:40:18 +0000
@@ -395,7 +395,7 @@
395 ... "http://launchpad.dev/~cprov/+archive/ppa/+packages")395 ... "http://launchpad.dev/~cprov/+archive/ppa/+packages")
396396
397 >>> cprov_browser.getLink('i386').click()397 >>> cprov_browser.getLink('i386').click()
398 >>> cprov_browser.getLink("Retry build").click()398 >>> cprov_browser.getLink("Retry this build").click()
399 >>> cprov_browser.getControl("Retry Build").click()399 >>> cprov_browser.getControl("Retry Build").click()
400400
401At this point anyone can also visualise that 'cdrkit' source is being401At this point anyone can also visualise that 'cdrkit' source is being
402402
=== modified file 'lib/lp/soyuz/stories/soyuz/xx-build-record.txt'
--- lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2009-09-10 20:12:12 +0000
+++ lib/lp/soyuz/stories/soyuz/xx-build-record.txt 2009-09-14 14:40:18 +0000
@@ -207,19 +207,19 @@
207 >>> print extract_text(207 >>> print extract_text(
208 ... find_tag_by_id(admin_browser.contents, 'status'))208 ... find_tag_by_id(admin_browser.contents, 'status'))
209 Build status209 Build status
210 Failed to upload Retry build on Bob The Builder210 Failed to upload on Bob The Builder Retry this build
211 Started ... ago211 Started ... ago
212 Finished ... (took 1 minute, 0.0 seconds)212 Finished ... (took 1 minute, 0.0 seconds)
213 buildlog (7 bytes)213 buildlog (7 bytes)
214 uploadlog (7 bytes)214 uploadlog (7 bytes)
215215
216 >>> print admin_browser.getLink('Retry build').url216 >>> print admin_browser.getLink('Retry this build').url
217 http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/31/+retry217 http://launchpad.dev/ubuntutest/+source/testing/1.0/+build/31/+retry
218218
219By clicking on the 'Retry build' link, administrators are informed of219By clicking on the 'Retry this build' link, administrators are informed of
220the consequences of this action.220the consequences of this action.
221221
222 >>> admin_browser.getLink('Retry build').click()222 >>> admin_browser.getLink('Retry this build').click()
223 >>> print extract_text(find_main_content(admin_browser.contents))223 >>> print extract_text(find_main_content(admin_browser.contents))
224 Retry i386 build of testing 1.0 in ubuntutest breezy-autotest RELEASE224 Retry i386 build of testing 1.0 in ubuntutest breezy-autotest RELEASE
225 ...225 ...
@@ -238,7 +238,7 @@
238 >>> print extract_text(238 >>> print extract_text(
239 ... find_tag_by_id(admin_browser.contents, 'status'))239 ... find_tag_by_id(admin_browser.contents, 'status'))
240 Build status240 Build status
241 Failed to upload Retry build on Bob The Builder241 Failed to upload on Bob The Builder Retry this build
242 Started ... ago242 Started ... ago
243 Finished ... (took 1 minute, 0.0 seconds)243 Finished ... (took 1 minute, 0.0 seconds)
244 buildlog (7 bytes)244 buildlog (7 bytes)
@@ -248,7 +248,7 @@
248performed, but then the failed build will be pending again and248performed, but then the failed build will be pending again and
249retrying the build is not a possibility anymore.249retrying the build is not a possibility anymore.
250250
251 >>> admin_browser.getLink("Retry build").click()251 >>> admin_browser.getLink("Retry this build").click()
252 >>> admin_browser.getControl("Retry Build").click()252 >>> admin_browser.getControl("Retry Build").click()
253 >>> for text in get_feedback_messages(admin_browser.contents):253 >>> for text in get_feedback_messages(admin_browser.contents):
254 ... print text254 ... print text
@@ -259,7 +259,7 @@
259 Needs building259 Needs building
260 Start in ... (0) Rescore build What's this?260 Start in ... (0) Rescore build What's this?
261261
262 >>> admin_browser.getLink("Retry build").click()262 >>> admin_browser.getLink("Retry this build").click()
263 Traceback (most recent call last):263 Traceback (most recent call last):
264 ...264 ...
265 LinkNotFoundError265 LinkNotFoundError
266266
=== modified file 'lib/lp/soyuz/templates/build-index.pt'
--- lib/lp/soyuz/templates/build-index.pt 2009-08-19 15:12:29 +0000
+++ lib/lp/soyuz/templates/build-index.pt 2009-09-14 14:40:18 +0000
@@ -42,24 +42,16 @@
4242
43 </div> <!-- yui-g -->43 </div> <!-- yui-g -->
4444
45 <div class="yui-g">45 <div id="binaries" class="portlet"
4646 tal:define="uploaded view/has_done_upload;"
47 <div id="binaries" class="yui-u first"47 tal:condition="context/binarypackages">
48 tal:define="uploaded view/has_done_upload;"48 <div metal:use-macro="template/macros/binaries" />
49 tal:condition="context/binarypackages">49 </div>
50 <div class="portlet">50
51 <div metal:use-macro="template/macros/binaries" />51 <div id="files" class="portlet"
52 </div>52 tal:condition="context/binarypackages">
53 </div>53 <div metal:use-macro="template/macros/files" />
5454 </div>
55 <div id="files" class="yui-u"
56 tal:condition="context/binarypackages">
57 <div class="portlet">
58 <div metal:use-macro="template/macros/files" />
59 </div>
60 </div>
61
62 </div> <!-- yui-g -->
6355
64 <div id="buildlog" class="portlet"56 <div id="buildlog" class="portlet"
65 tal:condition="context/buildstate/enumvalue:BUILDING">57 tal:condition="context/buildstate/enumvalue:BUILDING">
@@ -141,10 +133,6 @@
141 <span tal:attributes="133 <span tal:attributes="
142 class string:buildstatus${context/buildstate/name};"134 class string:buildstatus${context/buildstate/name};"
143 tal:content="context/buildstate/title">Fully built</span>135 tal:content="context/buildstate/title">Fully built</span>
144 <tal:retry
145 define="link context/menu:context/retry"
146 condition="link/enabled"
147 replace="structure link/fmt:icon" />
148 <tal:building condition="context/buildstate/enumvalue:BUILDING">136 <tal:building condition="context/buildstate/enumvalue:BUILDING">
149 on <a tal:content="view/buildqueue/builder/title"137 on <a tal:content="view/buildqueue/builder/title"
150 tal:attributes="href view/buildqueue/builder/fmt:url"/>138 tal:attributes="href view/buildqueue/builder/fmt:url"/>
@@ -153,6 +141,9 @@
153 on <a tal:content="context/builder/title"141 on <a tal:content="context/builder/title"
154 tal:attributes="href context/builder/fmt:url"/>142 tal:attributes="href context/builder/fmt:url"/>
155 </tal:built>143 </tal:built>
144 <tal:retry define="link context/menu:context/retry"
145 condition="link/enabled"
146 replace="structure link/fmt:link" />
156 </p>147 </p>
157148
158 <ul>149 <ul>