Sha256: d969456c335c0a371d026a971e4054459c0e8d4d93bb0171cdbafb043e10a289
Contents?: true
Size: 853 Bytes
Versions: 14
Compression:
Stored size: 853 Bytes
Contents
require 'omf-common/mobject2' OMF::Common::Loggable.init_log 'demo' require 'omf_oml/table' require 'omf-web/widget/code/code' require 'omf-web/widget/graph/graph' Dir.glob("#{File.dirname(__FILE__)}/data_sources/*.rb").each do |fn| load fn end require 'yaml' Dir.glob("#{File.dirname(__FILE__)}/*.yaml").each do |fn| MObject.info "Loading '#{fn}'" h = YAML.load_file(fn) if w = h['widget'] OMF::Web.register_widget w elsif t = h['tab'] OMF::Web.register_tab t OMF::Web.use_tab t['id'] else MObject.error "Don't know what to do with '#{fn}'" end end # Configure the web server # opts = { :page_title => 'Loading Analysis', :use_tabs => [:graph] # :tabs => { # :foo => {:name => 'Foo', :order => 1, :class => Foo}, # :goo => {:name => 'Goo', :order => 3} # } } require 'omf_web' OMF::Web.start(opts)
Version data entries
14 entries across 14 versions & 1 rubygems