- Move web to lib/logstash/web
6
bin/logstash-web
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
|
||||
$: << File.dirname($0) + "/../lib"
|
||||
|
||||
require "rubygems"
|
||||
require "logstash/web/server"
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 180 B |
Before Width: | Height: | Size: 178 B After Width: | Height: | Size: 178 B |
Before Width: | Height: | Size: 120 B After Width: | Height: | Size: 120 B |
Before Width: | Height: | Size: 105 B After Width: | Height: | Size: 105 B |
Before Width: | Height: | Size: 111 B After Width: | Height: | Size: 111 B |
Before Width: | Height: | Size: 110 B After Width: | Height: | Size: 110 B |
Before Width: | Height: | Size: 119 B After Width: | Height: | Size: 119 B |
Before Width: | Height: | Size: 101 B After Width: | Height: | Size: 101 B |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.3 KiB |
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 891 B After Width: | Height: | Size: 891 B |
Before Width: | Height: | Size: 897 B After Width: | Height: | Size: 897 B |
Before Width: | Height: | Size: 916 B After Width: | Height: | Size: 916 B |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
@ -2,6 +2,7 @@
|
|||
##rackup -Ilib:../lib -s thin
|
||||
|
||||
$:.unshift("%s/../lib" % File.dirname(__FILE__))
|
||||
$:.unshift(File.dirname(__FILE__))
|
||||
|
||||
require "rubygems"
|
||||
require "json"
|
||||
|
@ -9,14 +10,15 @@ require "eventmachine"
|
|||
require "rack"
|
||||
require "sinatra/async"
|
||||
require "lib/elasticsearch"
|
||||
require "logstash/namespace"
|
||||
|
||||
class EventMachine::ConnectionError < RuntimeError; end
|
||||
|
||||
class LogStashWeb < Sinatra::Base
|
||||
class LogStash::Web::Server < Sinatra::Base
|
||||
register Sinatra::Async
|
||||
set :haml, :format => :html5
|
||||
set :logging, true
|
||||
set :public, "./public"
|
||||
set :public, "#{File.dirname(__FILE__)}/public"
|
||||
elasticsearch = LogStash::Web::ElasticSearch.new
|
||||
|
||||
aget '/style.css' do
|
||||
|
@ -70,5 +72,5 @@ end # class LogStashWeb
|
|||
Rack::Handler::Thin.run(
|
||||
Rack::CommonLogger.new( \
|
||||
Rack::ShowExceptions.new( \
|
||||
LogStashWeb.new)),
|
||||
LogStash::Web::Server.new)),
|
||||
:Port => 9292)
|