From 963a7a144a5231f07da118cfe4fef0fb210f40c6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 18 Jun 2012 13:45:13 -0700 Subject: watcher: sort index of listener listing 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 --- lib/raindrops/watcher.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 "" \ "" \ "" << - 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 "" \ "
addressactivequeuedreset