[Bps-public-commit] r15168 - in Pushmi/trunk: . Pushmi-Admin/lib/Pushmi/Admin Pushmi-Admin/lib/Pushmi/Admin/Model Pushmi-Admin/share/web/static/css Pushmi-Admin/share/web/static/images/silk

alexmv at bestpractical.com alexmv at bestpractical.com
Thu Aug 14 14:53:25 EDT 2008


Author: alexmv
Date: Thu Aug 14 14:53:24 2008
New Revision: 15168

Added:
   Pushmi/trunk/Pushmi-Admin/share/web/static/images/silk/monitor.png   (contents, props changed)
   Pushmi/trunk/Pushmi-Admin/share/web/static/images/silk/server.png   (contents, props changed)
Modified:
   Pushmi/trunk/   (props changed)
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm
   Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm
   Pushmi/trunk/Pushmi-Admin/share/web/static/css/app.css
   Pushmi/trunk/Pushmi-Admin/share/web/static/images/progressbar/bigblue.png
   Pushmi/trunk/Pushmi-Admin/share/web/static/images/progressbar/bigbox.png

Log:
 r35945 at kohr-ah:  chmrr | 2008-08-14 14:53:17 -0400
  * Restyle progressbar to be more similar to glowy lights
  * Prettify the "health status" box


Modified: Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm	(original)
+++ Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/Model/Replica.pm	Thu Aug 14 14:53:24 2008
@@ -249,7 +249,7 @@
 
 sub latency {
     my $self = shift;
-    return sprintf( "%.2f seconds", $self->cache->{latency} );
+    return sprintf( "%.2fs", $self->cache->{latency} );
 }
 
 sub time_delta {

Modified: Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm	(original)
+++ Pushmi/trunk/Pushmi-Admin/lib/Pushmi/Admin/View.pm	Thu Aug 14 14:53:24 2008
@@ -191,19 +191,20 @@
     } elsif ( $replica->status ne "failed" ) {
         h2 {"Replica health"};
         # XXX: Prettify
-        p {
-            "Last local commit: r"
-                . $replica->local_revision . " - "
-                . $replica->last_local;
+        div { {class is 'local health'};
+              div { {class is 'title'}; "Last local commit" };
+              div { { class is 'commit' }; "r".$replica->local_revision };
+              div { { class is 'at' };  $replica->last_local };
         };
         if ( $replica->latency ) {
-            p {
-                "Last master commit: r"
-                    . $replica->remote_revision . " - "
-                    . $replica->last_remote;
-            }
-            p { "Latency to master: " . $replica->latency };
+            div { { class is 'master health'};
+                  div { { class is 'title'}; "Last remote commit" };
+                  div { { class is 'commit' }; "r".$replica->remote_revision };
+                  div { { class is 'at' };  $replica->last_remote };
+                  div { { class is 'latency' }; $replica->latency." latency" };
+            };
         }
+
         if ($replica->status ne "loading") {
             form {
                 my $sync = Jifty->web->new_action( class => "Sync", );

Modified: Pushmi/trunk/Pushmi-Admin/share/web/static/css/app.css
==============================================================================
--- Pushmi/trunk/Pushmi-Admin/share/web/static/css/app.css	(original)
+++ Pushmi/trunk/Pushmi-Admin/share/web/static/css/app.css	Thu Aug 14 14:53:24 2008
@@ -156,6 +156,40 @@
 .status-light.failed  { background-image: url(/static/images/status/red.gif);    }
 .status-light.locked  { background-image: url(/static/images/status/red.gif);    }
 
+/* Health information */
+
+.health {
+  clear: left;
+  background-repeat: no-repeat;
+  background-position: 0 3px;
+}
+
+.health + .health {
+  margin-top: 2.5em;
+  margin-bottom: 1em;
+}
+
+.health.master { background-image: url(/static/images/silk/server.png);  }
+.health.local  { background-image: url(/static/images/silk/monitor.png); }
+
+.health .title {
+  padding-left: 1.5em;
+  border-bottom: 1px solid #334;
+  font-size: 110%;
+}
+
+.health .commit {
+  width: 50%;
+  text-align: center;
+  float: right;
+  margin-top: -1.3em;
+}
+
+.health .at {
+  text-align: right;
+  float: right;
+}
+
 /* Log display */
 
 .logwindow { 

Modified: Pushmi/trunk/Pushmi-Admin/share/web/static/images/progressbar/bigblue.png
==============================================================================
Binary files. No diff available.

Modified: Pushmi/trunk/Pushmi-Admin/share/web/static/images/progressbar/bigbox.png
==============================================================================
Binary files. No diff available.

Added: Pushmi/trunk/Pushmi-Admin/share/web/static/images/silk/monitor.png
==============================================================================
Binary file. No diff available.

Added: Pushmi/trunk/Pushmi-Admin/share/web/static/images/silk/server.png
==============================================================================
Binary file. No diff available.



More information about the Bps-public-commit mailing list