From 1655b080c4ea9c3d50c0159b3ba92d03ae923cda Mon Sep 17 00:00:00 2001 From: Jordan Sissel Date: Sun, 13 Feb 2011 02:01:05 -0800 Subject: [PATCH] - Always include first/prev/next/last; otherwise, hiding them makes you have to move the mouse if the next result set has a different list. --- lib/logstash/web/views/search/ajax.haml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/lib/logstash/web/views/search/ajax.haml b/lib/logstash/web/views/search/ajax.haml index eddfca178..81c3cff24 100644 --- a/lib/logstash/web/views/search/ajax.haml +++ b/lib/logstash/web/views/search/ajax.haml @@ -2,7 +2,6 @@ - if (params[:q].strip.length > 0 rescue false) %h1 Search results for '#{params[:q]}' - #querytime= "(query time: %.3f seconds)" % @results.duration - if @total and @result_start and @result_end %small %strong @@ -10,19 +9,28 @@ | - if @first_href %a.pager{ :href => @first_href } first - | + - else + %span.unavailable first + | - if @prev_href %a.pager{ :href => @prev_href } prev - - if @next_href - | + - else + %span.unavailable prev + | - if @next_href %a.pager{ :href => @next_href } next + - else + %span.unavailable next + | - if @last_href - | %a.pager{ :href => @last_href } last + - else + %span.unavailable last + | + %span#querytime= "(%.3f seconds)" % @results.duration - if @results.events.length == 0 - if !params[:q] / We default to a '+2 days' in the future to capture 'today at 00:00'