Merge lp:~jpds/launchpad/fix_50580 into lp:launchpad

Proposed by Jonathan Davies
Status: Merged
Merged at revision: 10042
Proposed branch: lp:~jpds/launchpad/fix_50580
Merge into: lp:launchpad
Diff against target: 66 lines (+20/-3)
3 files modified
lib/canonical/launchpad/icing/style-3-0.css (+10/-0)
lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt (+4/-0)
lib/lp/registry/templates/distributionmirror-macros.pt (+6/-3)
To merge this branch: bzr merge lp:~jpds/launchpad/fix_50580
Reviewer Review Type Date Requested Status
Michael Nelson (community) ui Approve
Abel Deuring (community) code Approve
Guilherme Salgado code Pending
Brad Crittenden Pending
Review via email: mp+15892@code.launchpad.net

Commit message

Use coloured mirror statuses on +archivemirrors and archive mirror pages.

To post a comment you must log in.
Revision history for this message
Jonathan Davies (jpds) wrote :

= Summary =

Use different font colours for the statuses of mirrored releases.

This branch fixes bug #50580.

Revision history for this message
Abel Deuring (adeuring) wrote :

Hi Jonathan,

nice work, thanks for for this branch, and esepcially for adding the tests.
Since this is a UI change, I'll ask one of the UI reviewer to have a look too.

review: Approve (code)
Revision history for this message
Michael Nelson (michael.nelson) wrote :

> Hi Jonathan,
>
> nice work, thanks for for this branch, and esepcially for adding the tests.
> Since this is a UI change, I'll ask one of the UI reviewer to have a look too.

Hi Jonathan,

Thanks for doing this! I've just merged it and taken a look locally, but there's only one mirror there with a known lastupdate. Just a thought for next time, it's helpful to either provide a script that populates the local db with suitable data to demo, or a screenshot etc.

Great!

review: Approve (ui)
Revision history for this message
Guilherme Salgado (salgado) wrote :

On Fri, 2009-12-11 at 12:32 +0000, Michael Nelson wrote:
> Review: Approve ui
> > Hi Jonathan,
> >
> > nice work, thanks for for this branch, and esepcially for adding the tests.
> > Since this is a UI change, I'll ask one of the UI reviewer to have a look too.
>
> Hi Jonathan,
>
> Thanks for doing this! I've just merged it and taken a look locally,
> but there's only one mirror there with a known lastupdate. Just a
> thought for next time, it's helpful to either provide a script that
> populates the local db with suitable data to demo, or a screenshot
> etc.

Even better would be to add mirrors to the -dev sampledata. To do that
you can just create the mirrors on https://launchpad.dev and follow the
instructions on database/sampledata/README

--
Guilherme Salgado <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/canonical/launchpad/icing/style-3-0.css'
--- lib/canonical/launchpad/icing/style-3-0.css 2009-12-07 13:53:47 +0000
+++ lib/canonical/launchpad/icing/style-3-0.css 2009-12-11 00:13:18 +0000
@@ -967,3 +967,13 @@
967.codeimportREVIEWED {color: green;}967.codeimportREVIEWED {color: green;}
968.codeimportSUSPENDED {color: red;}968.codeimportSUSPENDED {color: red;}
969.codeimportFAILING {color: red;}969.codeimportFAILING {color: red;}
970
971.distromirrorstatusUP {color: green;}
972.distromirrorstatusONEHOURBEHIND {color: green;}
973.distromirrorstatusTWOHOURSBEHIND {color: green;}
974.distromirrorstatusFOURHOURSBEHIND {color: green;}
975.distromirrorstatusSIXHOURSBEHIND {color: #f60;}
976.distromirrorstatusONEDAYBEHIND {color: #f60;}
977.distromirrorstatusTWODAYSBEHIND {color: red;}
978.distromirrorstatusONEWEEKBEHIND {color: red;}
979.distromirrorstatusUNKNOWN {color: grey;}
970980
=== modified file 'lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt'
--- lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2009-11-22 15:43:16 +0000
+++ lib/lp/registry/stories/distributionmirror/xx-distribution-mirrors.txt 2009-12-11 00:13:18 +0000
@@ -47,6 +47,10 @@
47 (u'Archive-mirror', u'http', u'128 Kbps', u'Last update unknown')]47 (u'Archive-mirror', u'http', u'128 Kbps', u'Last update unknown')]
48 United Kingdom:48 United Kingdom:
49 [(u'Canonical-archive', u'http', u'100 Mbps', u'Last update unknown')]49 [(u'Canonical-archive', u'http', u'100 Mbps', u'Last update unknown')]
50 >>> find_tags_by_class(browser.contents, 'distromirrorstatusSIXHOURSBEHIND')
51 [<span class="distromirrorstatusSIXHOURSBEHIND">Six hours behind</span>]
52 >>> find_tags_by_class(browser.contents, 'distromirrorstatusUNKNOWN')[0]
53 <span class="distromirrorstatusUNKNOWN">Last update unknown</span>
5054
51Freshness doesn't make sense for CD mirrors so it is not shown for them.55Freshness doesn't make sense for CD mirrors so it is not shown for them.
5256
5357
=== modified file 'lib/lp/registry/templates/distributionmirror-macros.pt'
--- lib/lp/registry/templates/distributionmirror-macros.pt 2009-10-26 18:40:04 +0000
+++ lib/lp/registry/templates/distributionmirror-macros.pt 2009-12-11 00:13:18 +0000
@@ -50,7 +50,8 @@
50 </td>50 </td>
51 <td tal:condition="show_freshness"51 <td tal:condition="show_freshness"
52 tal:define="freshness mirror/getOverallFreshness">52 tal:define="freshness mirror/getOverallFreshness">
53 <span tal:replace="freshness/title" />53 <span tal:content="freshness/title"
54 tal:attributes="class string:distromirrorstatus${freshness/name}" />
54 </td>55 </td>
55 </tr>56 </tr>
5657
@@ -110,7 +111,8 @@
110 <tr tal:repeat="arch_series arch_series">111 <tr tal:repeat="arch_series arch_series">
111 <td tal:content="arch_series/distro_arch_series/distroseries/title" />112 <td tal:content="arch_series/distro_arch_series/distroseries/title" />
112 <td tal:content="arch_series/distro_arch_series/architecturetag" />113 <td tal:content="arch_series/distro_arch_series/architecturetag" />
113 <td tal:content="arch_series/freshness/title" />114 <td tal:content="arch_series/freshness/title"
115 tal:attributes="class string:distromirrorstatus${arch_series/freshness/name}" />
114 </tr>116 </tr>
115 </tbody>117 </tbody>
116 </table>118 </table>
@@ -132,7 +134,8 @@
132 <tbody>134 <tbody>
133 <tr tal:repeat="source_series source_series">135 <tr tal:repeat="source_series source_series">
134 <td tal:content="source_series/distroseries/title" />136 <td tal:content="source_series/distroseries/title" />
135 <td tal:content="source_series/freshness/title" />137 <td tal:content="source_series/freshness/title"
138 tal:attributes="class string:distromirrorstatus${source_series/freshness/name}" />
136 </tr>139 </tr>
137 </tbody>140 </tbody>
138 </table>141 </table>