mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-13 13:35:54 +00:00
wip
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
])));
|
||||
|
||||
@@ -173,6 +173,7 @@ class ControlMessageController implements MessageComponentInterface
|
||||
'message' => config('expose.admin.messages.resolve_connection_message')($connectionInfo, $user),
|
||||
'subdomain' => $connectionInfo->subdomain,
|
||||
'server_host' => $connectionInfo->serverHost,
|
||||
'user' => $user,
|
||||
'client_id' => $connectionInfo->client_id,
|
||||
],
|
||||
]));
|
||||
@@ -202,7 +203,8 @@ class ControlMessageController implements MessageComponentInterface
|
||||
$connection->send(json_encode([
|
||||
'event' => 'authenticated',
|
||||
'data' => [
|
||||
'message' => config('expose.admin.messages.message_of_the_day'),
|
||||
'message' => config('expose.admin.messages.resolve_connection_message')($connectionInfo, $user),
|
||||
'user' => $user,
|
||||
'port' => $connectionInfo->port,
|
||||
'shared_port' => $connectionInfo->shared_port,
|
||||
'client_id' => $connectionInfo->client_id,
|
||||
|
||||
Reference in New Issue
Block a user