Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

LOGSTASH-494: use relative URLs

  • Loading branch information...
commit e28f2f950e29a89c1222bcf298d3bc1b0e0bacc9 1 parent acfe12c
Pete Fritchman fetep authored
8 lib/logstash/web/public/js/logstash.js
View
@@ -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 */
@@ -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();
@@ -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": ... }
2  lib/logstash/web/server.rb
View
@@ -111,7 +111,7 @@ def initialize(settings)
end # /style.css
get '/' do
- redirect "/search"
+ redirect "search"
end # '/'
get '/*' do
2  lib/logstash/web/views/header.haml
View
@@ -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 }
8 lib/logstash/web/views/layout.haml
View
@@ -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" }
2  lib/logstash/web/views/main/index.haml
View
@@ -1,4 +1,4 @@
-%form.search{ :action => "/search" }
+%form.search{ :action => "search" }
%label{ :for => "q" }
%input.query{ :type => "text", :name => "q" }
%input{ :type => "submit" }
Please sign in to comment.
Something went wrong with that request. Please try again.