Add simple web interface

This commit is contained in:
Dzmitry Plashchynski
2015-03-07 23:44:37 +02:00
parent c0b25b2a7c
commit bb03a562cc
5 changed files with 112 additions and 21 deletions

18
lib/crono/web.rb Normal file
View File

@@ -0,0 +1,18 @@
require 'haml'
require 'sinatra/base'
module Crono
class Web < Sinatra::Base
def app
Sinatra::Application
end
set :root, File.expand_path(File.dirname(__FILE__) + "/../../web")
set :public_folder, Proc.new { "#{root}/assets" }
set :views, Proc.new { "#{root}/views" }
get '/' do
@jobs = Crono::CronoJob.all
haml :dashboard, format: :html5
end
end
end