mirror of
https://github.com/plashchynski/crono.git
synced 2026-05-01 21:24:25 +02:00
Add simple web interface
This commit is contained in:
18
lib/crono/web.rb
Normal file
18
lib/crono/web.rb
Normal 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
|
||||
Reference in New Issue
Block a user