Sha256: a4c670d6d4f853341e2bda7c2724422192a638479b413a667adeb6975a9f931b
Contents?: true
Size: 824 Bytes
Versions: 1
Compression:
Stored size: 824 Bytes
Contents
# Server.api4 :stats, :get, "/rc/#{Rhoconnect::API_VERSION}/system/stats", \ # true, {:verb => :post, :url => ['/api/stats', '/api/admin/stats']} do |params,user| # if Rhoconnect.stats == true # names = params[:names] # if names # Rhoconnect::Stats::Record.keys(names).to_json # else # metric = params[:metric] # rtype = Rhoconnect::Stats::Record.rtype(metric) # if rtype == 'zset' # # returns [] if no results # Rhoconnect::Stats::Record.range(metric,params[:start],params[:finish]).to_json # elsif rtype == 'string' # Rhoconnect::Stats::Record.get_value(metric) || '' # else # raise ApiException.new(404, "Unknown metric") # end # end # else # raise ApiException.new(500, "Stats not enabled") # end # end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rhoconnect-4.0.0.beta.10 | lib/rhoconnect/api/system/stats.rb |