This commit is contained in:
Marcel Pociot
2021-06-17 17:56:12 +02:00
parent 5ad9f01e55
commit 520a5afb1f
4 changed files with 13 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ class Client
/** @var int */
protected $timeConnected = 0;
public static $user = [];
public static $subdomains = [];
public function __construct(LoopInterface $loop, Configuration $configuration, CliRequestLogger $logger)
@@ -119,6 +120,7 @@ class Client
$this->logger->line('');
static::$subdomains[] = "{$httpProtocol}://{$data->subdomain}.{$host}";
static::$user = $data->user;
$deferred->resolve($data);
});

View File

@@ -12,6 +12,7 @@ class DashboardController extends Controller
public function handle(Request $request, ConnectionInterface $httpConnection)
{
$httpConnection->send(respond_html($this->getView($httpConnection, 'client.dashboard', [
'user' => Client::$user,
'subdomains' => Client::$subdomains,
'max_logs'=> config()->get('expose.max_logged_requests', 10),
])));