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