- Add 'refresh' link to searches

This commit is contained in:
Jordan Sissel 2011-02-13 02:42:58 -08:00
parent cc0b0565cd
commit f021fd72be
2 changed files with 6 additions and 0 deletions

View file

@ -200,6 +200,9 @@ class LogStash::Web::Server < Sinatra::Base
end end
end end
# TODO(sissel): make a helper function taht goes hash -> cgi querystring
@refresh_href = "?" + params.collect { |k,v| [URI.escape(k.to_s), URI.escape(v.to_s)].join("=") }.join("&")
case format case format
when "html" when "html"
headers({"Content-Type" => "text/html" }) headers({"Content-Type" => "text/html" })

View file

@ -30,6 +30,9 @@
- else - else
%span.unavailable last %span.unavailable last
| |
%a.pager{ :href => @refresh_href }
refresh
|
%span#querytime= "(%.3f seconds)" % @results.duration %span#querytime= "(%.3f seconds)" % @results.duration
- if @results.events.length == 0 - if @results.events.length == 0
- if !params[:q] - if !params[:q]