Sha256: 28cdfd1db7400192f824f3d403aa7bcf7682ba09a1c84e895684e6dbaa1c1851

Contents?: true

Size: 540 Bytes

Versions: 5

Compression:

Stored size: 540 Bytes

Contents

WebAdminApp.get '/logs' do
  get_menu 0
  url = "http://#{get_config.webadmin_ip}:#{get_config.webadmin_port}/api/logs/list.yml"
  raw = RestClient::Request.execute(method: 'GET', url: url,timeout: 10)
  @data = YAML::load(raw)[:data]
  url = "http://#{get_config.webadmin_ip}:#{get_config.webadmin_port}/api/logs/analyse.yml"
  raw = RestClient::Request.execute(method: 'POST', url: url,timeout: 10)
  prov = YAML::load(raw)[:data]
  @result = {}
  prov.each {|item|
    @result[item[:label]] = item
  }
  slim :logs, :format => :html
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
prometheus-splash-0.8.1 lib/splash/webadmin/portal/controllers/logs.rb
prometheus-splash-0.8.0 lib/splash/webadmin/portal/controllers/logs.rb
prometheus-splash-0.7.0 lib/splash/webadmin/portal/controllers/logs.rb
prometheus-splash-0.6.1 lib/splash/webadmin/portal/controllers/logs.rb
prometheus-splash-0.6.0 lib/splash/webadmin/portal/controllers/logs.rb