lib/rhoconnect/web-console/server.rb in rhoconnect-3.3.1.beta4 vs lib/rhoconnect/web-console/server.rb in rhoconnect-3.3.1

- old
+ new

@@ -31,11 +31,10 @@ @version = Rhoconnect::VERSION @domain = ENV['RHODES_URL'] || request.host_with_port @domain += "/application" if @domain erb :index end - post "/get_user_graph" do count_graph('timing/usercount', "User Count", "Users", "users") end @@ -44,12 +43,38 @@ end post '/http_timing' do http_timing(params) end + + post '/http_timing_key' do + http_timing_key(params) + end post '/device_count' do count_graph('timing/devicecount', "Device Count", "Devices", "clients") + end + + get '/get_sources' do + sources = App.load(APP_NAME).sources + sources.to_json + end + + get '/get_http_routes' do + keys = get_user_count("http:*:*") + sources = get_sources('all') + + #loop through arrays and remove any regex matches + keysf = keys.inject([]) do |keys_final, element| + found = true + sources.each do |s| + found = false if element.match(s) + end + keys_final << element.strip if found + keys_final + end + + keysf.to_json end end end \ No newline at end of file