Sha256: d660b41a2096d0f26a3c4ae8199df2fd4f947b8b9cbc6f27d088d087c032112b
Contents?: true
Size: 699 Bytes
Versions: 3
Compression:
Stored size: 699 Bytes
Contents
module RestFtpDaemon module API class Root < Grape::API ####### DASHBOARD - GET / # Server global status get '/' do info "GET /" # Initialize Facter Facter.loadfacts # Detect QS filters only = params["only"].to_s # Get jobs to display jobs = $queue.sorted_by_status(only) # Get workers status @worker_vars = $pool.worker_vars # Compile haml template output = render :dashboard, {jobs: jobs, only: only} # Send response env['api.format'] = :html format "html" status 200 content_type "text/html" body output end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rest-ftp-daemon-0.202.2 | lib/rest-ftp-daemon/api/dashboard.rb |
rest-ftp-daemon-0.202.1 | lib/rest-ftp-daemon/api/dashboard.rb |
rest-ftp-daemon-0.202 | lib/rest-ftp-daemon/api/dashboard.rb |