about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-06-18 13:45:13 -0700
committerEric Wong <normalperson@yhbt.net>2012-06-18 13:49:47 -0700
commit963a7a144a5231f07da118cfe4fef0fb210f40c6 (patch)
tree66c9f62948334543f33f7092d68087146df3a74a
parente893686157a1abb9c6943d1c42c9cbdae1b76cd4 (diff)
downloadraindrops-963a7a144a5231f07da118cfe4fef0fb210f40c6.tar.gz
For hosts with many listeners, it should be easier to read the
index page if the results are shown in a consistent order.

Requested privately via email to raindrops@bogomips.org
-rw-r--r--lib/raindrops/watcher.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/raindrops/watcher.rb b/lib/raindrops/watcher.rb
index 869fa17..5493374 100644
--- a/lib/raindrops/watcher.rb
+++ b/lib/raindrops/watcher.rb
@@ -337,7 +337,9 @@ class Raindrops::Watcher
       "<table><tr>" \
         "<th>address</th><th>active</th><th>queued</th><th>reset</th>" \
       "</tr>" <<
-      all.map do |addr,stats|
+      all.sort do |a,b|
+        a[0] <=> b[0] # sort by addr
+      end.map do |addr,stats|
         e_addr = escape addr
         "<tr>" \
           "<td><a href='/tail/#{e_addr}.txt' " \