Skip to content

Commit

Permalink
LOGSTASH-494: use relative URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
fetep committed Jun 22, 2012
1 parent acfe12c commit e28f2f9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions lib/logstash/web/public/js/logstash.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@
/* Check for history.pushState */

var display_query = query.replace("<", "&lt;").replace(">", "&gt;")
$("#querystatus, #results h1").html("Loading query '" + display_query + "' (offset:" + logstash.params.offset + ", count:" + logstash.params.count + ") <img class='throbber' src='/media/throbber.gif'>")
$("#querystatus, #results h1").html("Loading query '" + display_query + "' (offset:" + logstash.params.offset + ", count:" + logstash.params.count + ") <img class='throbber' src='media/throbber.gif'>")
//console.log(logstash.params)
logstash.params.q = query;

/* Load the search results */
$("#results").load("/api/search?format=html", logstash.params,
$("#results").load("api/search?format=html", logstash.params,
function(response, status, xhr) {
if (status == "error") {
/* We still return HTML on error, it's just an error message */
Expand Down Expand Up @@ -64,7 +64,7 @@
* This won't likely survive 1.0, but it's fun for now...
* TODO(sissel): Replace with a 'loading' or something icon. */

var throbber = $("<center><img src='/media/throbber.gif'><center>")
var throbber = $("<center><img src='media/throbber.gif'><center>")
throbber.attr("id", "throbber")
throbber.css("margin", "-100px");
$("#visual #throbber").remove();
Expand All @@ -73,7 +73,7 @@
tries = 4; /* default tries */
}

jQuery.getJSON("/api/histogram", logstash.params, function(histogram, text, jqxhr) {
jQuery.getJSON("api/histogram", logstash.params, function(histogram, text, jqxhr) {
/* Load the data into the graph */
var flot_data = [];
// histogram is an array of { "key": ..., "count": ... }
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/web/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def initialize(settings)
end # /style.css

get '/' do
redirect "/search"
redirect "search"
end # '/'

get '/*' do
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/web/views/header.haml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.logo
logstash.
.search
%form.search{ :action => "/search" }
%form.search{ :action => "search" }
%label{ :for => "q" } Query:
%input.query{ :id => "query", :type => "text", :name => "q", :value => params[:q],
:size => 60 }
Expand Down
8 changes: 4 additions & 4 deletions lib/logstash/web/views/layout.haml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

%head
%title= @title || "logstash"
%link{ :rel => "stylesheet", :href => "/style.css", :type => "text/css" }
%link{ :rel => "stylesheet", :href => "/css/smoothness/jquery-ui-1.8.5.custom.css", :type => "text/css" }
%script{ :src => "/js/jquery-1.6.1.min.js", :type => "text/javascript" }
%script{ :src => "/js/jquery-ui-1.8.13.min.js", :type => "text/javascript" }
%link{ :rel => "stylesheet", :href => "style.css", :type => "text/css" }
%link{ :rel => "stylesheet", :href => "css/smoothness/jquery-ui-1.8.5.custom.css", :type => "text/css" }
%script{ :src => "js/jquery-1.6.1.min.js", :type => "text/javascript" }
%script{ :src => "js/jquery-ui-1.8.13.min.js", :type => "text/javascript" }
%script{ :src => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js",
:type => "text/javascript" }
%script{ :src => "js/jquery.tmpl.min.js", :type => "text/javascript" }
Expand Down
2 changes: 1 addition & 1 deletion lib/logstash/web/views/main/index.haml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
%form.search{ :action => "/search" }
%form.search{ :action => "search" }
%label{ :for => "q" }
%input.query{ :type => "text", :name => "q" }
%input{ :type => "submit" }
Expand Down

0 comments on commit e28f2f9

Please sign in to comment.