Sha256: dace9c71d0fd13d7d3f78337d6b014dd4ed08a880489582e27d4b5aa26901a61

Contents?: true

Size: 740 Bytes

Versions: 3

Compression:

Stored size: 740 Bytes

Contents

module Riemann
  module Dash
    class App < Sinatra::Base
      # A little dashboard sinatra application.

      require 'yaml'
      require 'find'
      require 'erubis'
      require 'sass'

      def self.config
        Riemann::Dash::Config.instance
      end

      def config
        self.class.config
      end

      def self.load(filename)
        filename ||= ENV['RIEMANN_DASH_CONFIG'] || 'config.rb'
        unless config.load_config(filename)
          # Configuration failed; load a default view.
          puts "No configuration loaded; using defaults."
        end

        config.load_controllers
        config.setup_views
        config.setup_public_dir
        config.setup_storage_backend
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
riemann-dash-0.2.14 lib/riemann/dash/app.rb
riemann-dash-0.2.13 lib/riemann/dash/app.rb
riemann-dash-0.2.12 lib/riemann/dash/app.rb