Sha256: c128d9886f63cf862bf39a144e8942da58d665074bec58cfc38b16e46d01e1cb

Contents?: true

Size: 1.41 KB

Versions: 51

Compression:

Stored size: 1.41 KB

Contents

# Copyright (c) 2012 National ICT Australia Limited (NICTA).
# This software may be used and distributed solely under the terms of the MIT license (License).
# You should find a copy of the License in LICENSE.TXT or at http://opensource.org/licenses/MIT.
# By downloading or using this software you accept the terms and the liability disclaimer in the License.


require 'omf_common'
require 'omf_common/lobject'
# require 'yaml'
# require 'log4r'

OMF::Common::Loggable.init_log 'garage_monitor', searchPath: File.dirname(__FILE__)


omf_opts = {
  communication: {
    url: 'amqp://0.0.0.0',
    auth: {}

  },
  eventloop: { type: :em},
  logging: {
    level: 'info'
  }
}

# Configure the web server
#
opts = {
  app_name: 'garage_monitor',
  page_title: 'Garage',
  layout: "#{File.dirname(__FILE__)}/layout.yaml",
  footer_right: 'git:mytestbed/omf',
  static_dirs_pre: ["#{File.dirname(__FILE__)}/htdocs"],
  handlers: {
    # delay connecting to databases to AFTER we may run as daemon
    pre_rackup: lambda do
      load("#{File.dirname(__FILE__)}/garage_monitor.rb")
      GarageMonitor.new(omf_opts)
    end,
    pre_parse: lambda do |p|
      p.separator ""
      p.separator "GARAGE options:"
      p.on '--comms-url URL', "URL to communication layer [#{omf_opts[:communication][:url]}]" do |url|
        omf_opts[:communication][:url] = url
      end
      p.separator ""
    end
  }
}
require 'omf_web'
OMF::Web.start(opts)

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
omf_common-6.2.3 example/viz/garage_viz.rb
omf_common-6.2.2 example/viz/garage_viz.rb
omf_common-6.2.1 example/viz/garage_viz.rb
omf_common-6.2.0 example/viz/garage_viz.rb
omf_common-6.2.0.pre.2 example/viz/garage_viz.rb
omf_common-6.2.0.pre.1 example/viz/garage_viz.rb
omf_common-6.1.14.pre.2 example/viz/garage_viz.rb
omf_common-6.1.14.pre.1 example/viz/garage_viz.rb
omf_common-6.1.12 example/viz/garage_viz.rb
omf_common-6.1.11 example/viz/garage_viz.rb
omf_common-6.1.10 example/viz/garage_viz.rb
omf_common-6.1.9 example/viz/garage_viz.rb
omf_common-6.1.9.pre.4 example/viz/garage_viz.rb
omf_common-6.1.9.pre.3 example/viz/garage_viz.rb
omf_common-6.1.9.pre.2 example/viz/garage_viz.rb
omf_common-6.1.8 example/viz/garage_viz.rb
omf_common-6.1.7 example/viz/garage_viz.rb
omf_common-6.1.6 example/viz/garage_viz.rb
omf_common-6.1.6.pre.2 example/viz/garage_viz.rb
omf_common-6.1.6.pre.1 example/viz/garage_viz.rb