Permalink
Browse files

LOGSTASH-259 Changed the width of the search box. Also changed the de…

…fault date range to today instead of multi-day range
  • Loading branch information...
1 parent c22df1c commit 74c39158b1f48a799fbb0e5f55c0f188c0ba891c @HakanL committed Dec 7, 2011
Showing with 3 additions and 5 deletions.
  1. +1 −1 lib/logstash/web/views/header.haml
  2. +2 −4 lib/logstash/web/views/search/ajax.haml
@@ -4,6 +4,6 @@
%form.search{ :action => "/search" }
%label{ :for => "q" } Query:
%input.query{ :id => "query", :type => "text", :name => "q", :value => params[:q],
- :size => 60 }
+ :size => 150 }
%input{ :id => "searchbutton", :type => "submit", :value => "Search" }
%input{ :id => "clearbutton", :type => "reset", :value => "Clear" }
@@ -36,10 +36,8 @@
%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'
- / plus tomorrow, inclusive, in case you are 23 hours behind the international
- / dateline.
- %h3#querystatus No query given. How about <a href="?q=* @timestamp:[#{(Time.now - 7*24*60*60).strftime("%Y-%m-%d")} TO #{(Time.now + 2*24*60*60).strftime("%Y-%m-%d")}]" class="querychanger">this?</a>
+ / We default to today
+ %h3#querystatus No query given. How about <a href="?q=* @timestamp:[#{(Time.now - 1*24*60*60).strftime("%Y-%m-%d")} TO #{(Time.now + 0*24*60*60).strftime("%Y-%m-%d")}]" class="querychanger">this?</a>
- else
%h3#querystatus No results for query '#{params[:q]}'
- else

0 comments on commit 74c3915

Please sign in to comment.