Sha256: 69d1a4359ea1caa77dffac711437b3ff465296133165eb68ea6626460e88b53d

Contents?: true

Size: 893 Bytes

Versions: 1

Compression:

Stored size: 893 Bytes

Contents

require 'modules/helpers'
require 'modules/controllers'

module RedisMonitor
  module Router
    include RedisMonitor::Controllers

    def self.included(server)
      server.get('/'){ redirect '/info' }
      server.get('/info'){ InfoController.new(context: self).execute(:index, params) }

      server.get('/content'){ ContentController.new(context: self).execute(:index, params) }
      server.get('/content/search'){ ContentController.new(context: self).execute(:search, params) }
      server.post('/content/delete'){ ContentController.new(context: self).execute(:delete, params) }

      server.get('/performance'){ redirect '/performance/warning' }
      server.get('/performance/warning'){ PerformanceController.new(context: self).execute(:warning, params) }
      server.get('/performance/check'){ PerformanceController.new(context: self).execute(:check, params) }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
redis_monitor-0.0.6 lib/modules/router.rb