Remove internal dashboard link for performance reasons

This commit is contained in:
Marcel Pociot
2022-03-17 11:58:10 +01:00
parent c828c3c0d2
commit e079a6320c
3 changed files with 5 additions and 8 deletions

View File

@@ -126,10 +126,10 @@ class Client
$this->configuration->setServerHost($host); $this->configuration->setServerHost($host);
$this->logger->info($data->message); $this->logger->info($data->message);
$this->logger->info("Local-URL:\t\t<options=bold>{$sharedUrl}</>"); $this->logger->info("Shared URL:\t\t<options=bold>{$sharedUrl}</>");
$this->logger->info("Dashboard-URL:\t\t<options=bold>http://127.0.0.1:".config()->get('expose.dashboard_port').'</>'); $this->logger->info("Dashboard:\t\t<options=bold>http://127.0.0.1:".config()->get('expose.dashboard_port').'</>');
$this->logger->info("Expose-URL:\t\t<options=bold>http://{$data->subdomain}.{$host}{$httpPort}</>"); $this->logger->info("Public HTTP:\t\t<options=bold>http://{$data->subdomain}.{$host}{$httpPort}</>");
$this->logger->info("Expose-URL:\t\t<options=bold>https://{$data->subdomain}.{$host}</>"); $this->logger->info("Public HTTPS:\t\t<options=bold>https://{$data->subdomain}.{$host}</>");
$this->logger->line(''); $this->logger->line('');
static::$subdomains[] = "{$httpProtocol}://{$data->subdomain}.{$host}"; static::$subdomains[] = "{$httpProtocol}://{$data->subdomain}.{$host}";

View File

@@ -107,7 +107,6 @@ class CliRequestLogger extends Logger
'time' => $loggedRequest->getStartTime()->isToday() ? $loggedRequest->getStartTime()->toTimeString() : $loggedRequest->getStartTime()->toDateTimeString(), 'time' => $loggedRequest->getStartTime()->isToday() ? $loggedRequest->getStartTime()->toTimeString() : $loggedRequest->getStartTime()->toDateTimeString(),
'color' => $this->getRequestColor($loggedRequest), 'color' => $this->getRequestColor($loggedRequest),
'status' => optional($loggedRequest->getResponse())->getStatusCode(), 'status' => optional($loggedRequest->getResponse())->getStatusCode(),
'dashboardUrl' => $dashboardUrl.'/#'.$loggedRequest->id(),
]; ];
}); });
@@ -123,7 +122,6 @@ class CliRequestLogger extends Logger
$durationSpaces = str_repeat(' ', max($maxDuration + 2 - mb_strlen($duration), 0)); $durationSpaces = str_repeat(' ', max($maxDuration + 2 - mb_strlen($duration), 0));
$color = $loggedRequest['color']; $color = $loggedRequest['color'];
$status = $loggedRequest['status']; $status = $loggedRequest['status'];
$dashboardUrl = $loggedRequest['dashboardUrl'];
$dots = str_repeat('.', max($terminalWidth - strlen($method.$spaces.$url.$time.$durationSpaces.$duration) - 16, 0)); $dots = str_repeat('.', max($terminalWidth - strlen($method.$spaces.$url.$time.$durationSpaces.$duration) - 16, 0));
@@ -134,13 +132,12 @@ class CliRequestLogger extends Logger
} }
return sprintf( return sprintf(
' <fg=%s;options=bold>%s </> <fg=%s;options=bold>%s%s</> <href=%s;options=bold>%s</><fg=#6C7280> %s%s%s%s ms</>', ' <fg=%s;options=bold>%s </> <fg=%s;options=bold>%s%s</> %s<fg=#6C7280> %s%s%s%s ms</>',
$color, $color,
$status, $status,
$this->verbColors[$method] ?? 'default', $this->verbColors[$method] ?? 'default',
$method, $method,
$spaces, $spaces,
$dashboardUrl,
$url, $url,
$dots, $dots,
$time, $time,

Binary file not shown.