This will become a rails application as client for LXD.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
459 B

class DashboardController < ApplicationController
def index
check_cert
@lxd_hosts = LxdHost.all
@lxd_hosts.map { |host|
host.cert = @cert
if host.config.auth == 'untrusted'
session[:return_to] = request.env["REQUEST_URI"]
redirect_to controller: 'lxd_hosts', action: 'auth', id: host.id
return
end
}
@certificates = Lxd::Certificate.all @lxd_hosts.first.api
end
end
# vim: set et ts=2 sw=2: