mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
Redirect / to /dashboard
This commit is contained in:
parent
6cd56f40ee
commit
b6c53cd855
2 changed files with 20 additions and 3 deletions
|
|
@ -17,11 +17,19 @@ module Vmpooler
|
|||
end
|
||||
|
||||
get '/' do
|
||||
erb :dashboard, locals: {
|
||||
site_name: $config[:config]['site_name'] || '<b>vmpooler</b>'
|
||||
}
|
||||
redirect to('/dashboard/')
|
||||
end
|
||||
|
||||
# Load dashboard components
|
||||
begin
|
||||
require "dashboard"
|
||||
rescue LoadError
|
||||
require File.expand_path(File.join(File.dirname(__FILE__), 'dashboard'))
|
||||
end
|
||||
|
||||
use Vmpooler::Dashboard
|
||||
|
||||
# Load API components
|
||||
%w( dashboard reroute v1 ).each do |lib|
|
||||
begin
|
||||
require "api/#{lib}"
|
||||
|
|
|
|||
9
lib/vmpooler/dashboard.rb
Normal file
9
lib/vmpooler/dashboard.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
module Vmpooler
|
||||
class Dashboard < Sinatra::Base
|
||||
get '/dashboard/?' do
|
||||
erb :dashboard, locals: {
|
||||
site_name: $config[:config]['site_name'] || '<b>vmpooler</b>'
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue