Skip to content

Commit e28f2f9

Browse files
committed
LOGSTASH-494: use relative URLs
1 parent acfe12c commit e28f2f9

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

lib/logstash/web/public/js/logstash.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@
3030
/* Check for history.pushState */
3131

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

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

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

76-
jQuery.getJSON("/api/histogram", logstash.params, function(histogram, text, jqxhr) {
76+
jQuery.getJSON("api/histogram", logstash.params, function(histogram, text, jqxhr) {
7777
/* Load the data into the graph */
7878
var flot_data = [];
7979
// histogram is an array of { "key": ..., "count": ... }

lib/logstash/web/server.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def initialize(settings)
111111
end # /style.css
112112

113113
get '/' do
114-
redirect "/search"
114+
redirect "search"
115115
end # '/'
116116

117117
get '/*' do

lib/logstash/web/views/header.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.logo
22
logstash.
33
.search
4-
%form.search{ :action => "/search" }
4+
%form.search{ :action => "search" }
55
%label{ :for => "q" } Query:
66
%input.query{ :id => "query", :type => "text", :name => "q", :value => params[:q],
77
:size => 60 }

lib/logstash/web/views/layout.haml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33

44
%head
55
%title= @title || "logstash"
6-
%link{ :rel => "stylesheet", :href => "/style.css", :type => "text/css" }
7-
%link{ :rel => "stylesheet", :href => "/css/smoothness/jquery-ui-1.8.5.custom.css", :type => "text/css" }
8-
%script{ :src => "/js/jquery-1.6.1.min.js", :type => "text/javascript" }
9-
%script{ :src => "/js/jquery-ui-1.8.13.min.js", :type => "text/javascript" }
6+
%link{ :rel => "stylesheet", :href => "style.css", :type => "text/css" }
7+
%link{ :rel => "stylesheet", :href => "css/smoothness/jquery-ui-1.8.5.custom.css", :type => "text/css" }
8+
%script{ :src => "js/jquery-1.6.1.min.js", :type => "text/javascript" }
9+
%script{ :src => "js/jquery-ui-1.8.13.min.js", :type => "text/javascript" }
1010
%script{ :src => "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.5/jquery-ui.min.js",
1111
:type => "text/javascript" }
1212
%script{ :src => "js/jquery.tmpl.min.js", :type => "text/javascript" }

lib/logstash/web/views/main/index.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%form.search{ :action => "/search" }
1+
%form.search{ :action => "search" }
22
%label{ :for => "q" }
33
%input.query{ :type => "text", :name => "q" }
44
%input{ :type => "submit" }

0 commit comments

Comments
 (0)