Sha256: cba085aa347fdf7582988995e92583c9b80284d15074c90950e491d799f4d190

Contents?: true

Size: 396 Bytes

Versions: 8

Compression:

Stored size: 396 Bytes

Contents

class Riemann::Dash::App
  get '/' do
    erb :index, :layout => false
  end

  get '/config', :provides => 'json' do
    content_type "application/json"
    config.read_ws_config
  end

  post '/config' do
    # Read update
    request.body.rewind
    config.update_ws_config(request.body.read)

    # Return current config
    content_type "application/json"
    config.read_ws_config
  end
end

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
riemann-dash-0.2.8 lib/riemann/dash/controller/index.rb
riemann-dash-0.2.7 lib/riemann/dash/controller/index.rb
riemann-dash-0.2.6 lib/riemann/dash/controller/index.rb
riemann-dash-0.2.5 lib/riemann/dash/controller/index.rb
riemann-dash-0.2.4 lib/riemann/dash/controller/index.rb
riemann-dash-0.2.3 lib/riemann/dash/controller/index.rb
mindreframer-riemann-dash-0.2.3 lib/riemann/dash/controller/index.rb
mindreframer-reslike-dash-0.2.2 lib/riemann/dash/controller/index.rb