Sha256: a21231e46cd6e14df5b15fde70f1660aec24360de6a10a02c424d852a6c95d44

Contents?: true

Size: 795 Bytes

Versions: 176

Compression:

Stored size: 795 Bytes

Contents

require 'rbbt/monitor'

module Sinatra
  module RbbtRESTMonitor
    def self.registered(base)
      base.module_eval do

        get '/locks' do
          lock_info = Rbbt.lock_info
          case @format
          when :json
            halt 200, lock_info.to_json
          else
            template_render('monitor/locks', {:lock_info => lock_info}, nil, :cache_type => :none)
          end
        end

        get '/jobs/:workflow' do
          workflow = params[:workflow]
          job_info = Rbbt.job_info(workflow)
          case @format
          when :json
            halt 200, job_info.to_json
          else
            template_render('monitor/jobs', {:workflow => workflow, :job_info => job_info}, nil, :cache_type => :none)
          end
        end
      end
    end
  end
end

Version data entries

176 entries across 176 versions & 1 rubygems

Version Path
rbbt-rest-1.8.103 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.102 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.101 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.100 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.99 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.98 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.97 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.96 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.95 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.94 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.93 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.92 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.91 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.90 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.89 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.88 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.87 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.86 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.85 lib/rbbt/rest/monitor.rb
rbbt-rest-1.8.84 lib/rbbt/rest/monitor.rb