mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 10:51:36 +00:00
update composer (#84)
* update composer log viewer code style format * fix composer
This commit is contained in:
parent
551f1ce40e
commit
fd2244d382
@ -15,13 +15,13 @@ public function create(
|
|||||||
?int $siteId = null
|
?int $siteId = null
|
||||||
): void;
|
): void;
|
||||||
|
|
||||||
public function delete(int $id, int $siteId = null): void;
|
public function delete(int $id, ?int $siteId = null): void;
|
||||||
|
|
||||||
public function restart(int $id, int $siteId = null): void;
|
public function restart(int $id, ?int $siteId = null): void;
|
||||||
|
|
||||||
public function stop(int $id, int $siteId = null): void;
|
public function stop(int $id, ?int $siteId = null): void;
|
||||||
|
|
||||||
public function start(int $id, int $siteId = null): void;
|
public function start(int $id, ?int $siteId = null): void;
|
||||||
|
|
||||||
public function getLogs(string $logPath): string;
|
public function getLogs(string $logPath): string;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ public function credentialData(array $input): array;
|
|||||||
|
|
||||||
public function data(array $input): array;
|
public function data(array $input): array;
|
||||||
|
|
||||||
public function connect(array $credentials = null): bool;
|
public function connect(?array $credentials = null): bool;
|
||||||
|
|
||||||
public function plans(): array;
|
public function plans(): array;
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ interface SourceControlProvider
|
|||||||
{
|
{
|
||||||
public function connect(): bool;
|
public function connect(): bool;
|
||||||
|
|
||||||
public function getRepo(string $repo = null): mixed;
|
public function getRepo(?string $repo = null): mixed;
|
||||||
|
|
||||||
public function fullRepoUrl(string $repo, string $key): string;
|
public function fullRepoUrl(string $repo, string $key): string;
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class SourceControlIsNotConnected extends Exception
|
class SourceControlIsNotConnected extends Exception
|
||||||
{
|
{
|
||||||
public function __construct(protected SourceControl|string|null $sourceControl, string $message = null)
|
public function __construct(protected SourceControl|string|null $sourceControl, ?string $message = null)
|
||||||
{
|
{
|
||||||
parent::__construct($message ?? 'Source control is not connected');
|
parent::__construct($message ?? 'Source control is not connected');
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ class SSH
|
|||||||
|
|
||||||
protected PrivateKey $privateKey;
|
protected PrivateKey $privateKey;
|
||||||
|
|
||||||
public function init(Server $server, string $asUser = null): self
|
public function init(Server $server, ?string $asUser = null): self
|
||||||
{
|
{
|
||||||
$this->connection = null;
|
$this->connection = null;
|
||||||
$this->log = null;
|
$this->log = null;
|
||||||
@ -87,7 +87,7 @@ public function connect(bool $sftp = false): void
|
|||||||
/**
|
/**
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function exec(string|array|SSHCommand $commands, string $log = '', int $siteId = null): string
|
public function exec(string|array|SSHCommand $commands, string $log = '', ?int $siteId = null): string
|
||||||
{
|
{
|
||||||
if ($log) {
|
if ($log) {
|
||||||
$this->setLog($log, $siteId);
|
$this->setLog($log, $siteId);
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
|
|
||||||
class AutoDeployment extends Component
|
class AutoDeployment extends Component
|
||||||
{
|
{
|
||||||
use RefreshComponentOnBroadcast;
|
|
||||||
use HasToast;
|
use HasToast;
|
||||||
|
use RefreshComponentOnBroadcast;
|
||||||
|
|
||||||
public Site $site;
|
public Site $site;
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
class Deploy extends Component
|
class Deploy extends Component
|
||||||
{
|
{
|
||||||
use RefreshComponentOnBroadcast;
|
|
||||||
use HasToast;
|
use HasToast;
|
||||||
|
use RefreshComponentOnBroadcast;
|
||||||
|
|
||||||
public Site $site;
|
public Site $site;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
class DeploymentsList extends Component
|
class DeploymentsList extends Component
|
||||||
{
|
{
|
||||||
use RefreshComponentOnBroadcast;
|
|
||||||
use HasCustomPaginationView;
|
use HasCustomPaginationView;
|
||||||
|
use RefreshComponentOnBroadcast;
|
||||||
|
|
||||||
public Site $site;
|
public Site $site;
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
class LogsList extends Component
|
class LogsList extends Component
|
||||||
{
|
{
|
||||||
use RefreshComponentOnBroadcast;
|
|
||||||
use HasCustomPaginationView;
|
use HasCustomPaginationView;
|
||||||
|
use RefreshComponentOnBroadcast;
|
||||||
|
|
||||||
public ?int $count = null;
|
public ?int $count = null;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
class SslsList extends Component
|
class SslsList extends Component
|
||||||
{
|
{
|
||||||
use RefreshComponentOnBroadcast;
|
|
||||||
use HasToast;
|
use HasToast;
|
||||||
|
use RefreshComponentOnBroadcast;
|
||||||
|
|
||||||
public Site $site;
|
public Site $site;
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ class Initialize extends InstallationJob
|
|||||||
|
|
||||||
protected ?string $asUser;
|
protected ?string $asUser;
|
||||||
|
|
||||||
public function __construct(Server $server, string $asUser = null)
|
public function __construct(Server $server, ?string $asUser = null)
|
||||||
{
|
{
|
||||||
$this->server = $server->refresh();
|
$this->server = $server->refresh();
|
||||||
$this->asUser = $asUser;
|
$this->asUser = $asUser;
|
||||||
|
@ -233,7 +233,7 @@ public function install(): void
|
|||||||
// $this->team->notify(new ServerInstallationStarted($this));
|
// $this->team->notify(new ServerInstallationStarted($this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ssh(string $user = null): \App\Helpers\SSH|SSHFake
|
public function ssh(?string $user = null): \App\Helpers\SSH|SSHFake
|
||||||
{
|
{
|
||||||
return SSH::init($this, $user);
|
return SSH::init($this, $user);
|
||||||
}
|
}
|
||||||
@ -263,7 +263,7 @@ public function provider(): \App\Contracts\ServerProvider
|
|||||||
return new $providerClass($this);
|
return new $providerClass($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function webserver(string $version = null): ?Service
|
public function webserver(?string $version = null): ?Service
|
||||||
{
|
{
|
||||||
if (! $version) {
|
if (! $version) {
|
||||||
return $this->defaultService('webserver');
|
return $this->defaultService('webserver');
|
||||||
@ -272,7 +272,7 @@ public function webserver(string $version = null): ?Service
|
|||||||
return $this->service('webserver', $version);
|
return $this->service('webserver', $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function database(string $version = null): ?Service
|
public function database(?string $version = null): ?Service
|
||||||
{
|
{
|
||||||
if (! $version) {
|
if (! $version) {
|
||||||
return $this->defaultService('database');
|
return $this->defaultService('database');
|
||||||
@ -281,7 +281,7 @@ public function database(string $version = null): ?Service
|
|||||||
return $this->service('database', $version);
|
return $this->service('database', $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function firewall(string $version = null): ?Service
|
public function firewall(?string $version = null): ?Service
|
||||||
{
|
{
|
||||||
if (! $version) {
|
if (! $version) {
|
||||||
return $this->defaultService('firewall');
|
return $this->defaultService('firewall');
|
||||||
@ -290,7 +290,7 @@ public function firewall(string $version = null): ?Service
|
|||||||
return $this->service('firewall', $version);
|
return $this->service('firewall', $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function processManager(string $version = null): ?Service
|
public function processManager(?string $version = null): ?Service
|
||||||
{
|
{
|
||||||
if (! $version) {
|
if (! $version) {
|
||||||
return $this->defaultService('process_manager');
|
return $this->defaultService('process_manager');
|
||||||
@ -299,7 +299,7 @@ public function processManager(string $version = null): ?Service
|
|||||||
return $this->service('process_manager', $version);
|
return $this->service('process_manager', $version);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function php(string $version = null): ?Service
|
public function php(?string $version = null): ?Service
|
||||||
{
|
{
|
||||||
if (! $version) {
|
if (! $version) {
|
||||||
return $this->defaultService('php');
|
return $this->defaultService('php');
|
||||||
|
@ -33,7 +33,7 @@ public function provider(): SourceControlProvider
|
|||||||
return new $providerClass($this);
|
return new $providerClass($this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRepo(string $repo = null): ?array
|
public function getRepo(?string $repo = null): ?array
|
||||||
{
|
{
|
||||||
return $this->provider()->getRepo($repo);
|
return $this->provider()->getRepo($repo);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ public function data(array $input): array
|
|||||||
/**
|
/**
|
||||||
* @throws CouldNotConnectToProvider
|
* @throws CouldNotConnectToProvider
|
||||||
*/
|
*/
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$this->connectToEc2ClientTest($credentials);
|
$this->connectToEc2ClientTest($credentials);
|
||||||
|
@ -10,7 +10,7 @@ abstract class AbstractProvider implements ServerProvider
|
|||||||
{
|
{
|
||||||
protected ?Server $server;
|
protected ?Server $server;
|
||||||
|
|
||||||
public function __construct(Server $server = null)
|
public function __construct(?Server $server = null)
|
||||||
{
|
{
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public function data(array $input): array
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public function data(array $input): array
|
|||||||
/**
|
/**
|
||||||
* @throws CouldNotConnectToProvider
|
* @throws CouldNotConnectToProvider
|
||||||
*/
|
*/
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
||||||
if (! $connect->ok()) {
|
if (! $connect->ok()) {
|
||||||
|
@ -45,7 +45,7 @@ public function data(array $input): array
|
|||||||
/**
|
/**
|
||||||
* @throws CouldNotConnectToProvider
|
* @throws CouldNotConnectToProvider
|
||||||
*/
|
*/
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/servers');
|
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/servers');
|
||||||
if (! $connect->ok()) {
|
if (! $connect->ok()) {
|
||||||
|
@ -57,7 +57,7 @@ public function data(array $input): array
|
|||||||
/**
|
/**
|
||||||
* @throws CouldNotConnectToProvider
|
* @throws CouldNotConnectToProvider
|
||||||
*/
|
*/
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
||||||
if (! $connect->ok()) {
|
if (! $connect->ok()) {
|
||||||
|
@ -59,7 +59,7 @@ public function data(array $input): array
|
|||||||
/**
|
/**
|
||||||
* @throws CouldNotConnectToProvider
|
* @throws CouldNotConnectToProvider
|
||||||
*/
|
*/
|
||||||
public function connect(array $credentials = null): bool
|
public function connect(?array $credentials = null): bool
|
||||||
{
|
{
|
||||||
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
$connect = Http::withToken($credentials['token'])->get($this->apiUrl.'/account');
|
||||||
if (! $connect->ok()) {
|
if (! $connect->ok()) {
|
||||||
|
@ -16,7 +16,7 @@ public function __construct(Server $server)
|
|||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function progress(int $percentage, string $step = null): Closure
|
protected function progress(int $percentage, ?string $step = null): Closure
|
||||||
{
|
{
|
||||||
return function () use ($percentage, $step) {
|
return function () use ($percentage, $step) {
|
||||||
$this->server->progress = $percentage;
|
$this->server->progress = $percentage;
|
||||||
|
@ -47,7 +47,7 @@ public function create(
|
|||||||
/**
|
/**
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function delete(int $id, int $siteId = null): void
|
public function delete(int $id, ?int $siteId = null): void
|
||||||
{
|
{
|
||||||
$this->service->server->ssh()->exec(
|
$this->service->server->ssh()->exec(
|
||||||
new DeleteWorkerCommand($id),
|
new DeleteWorkerCommand($id),
|
||||||
@ -59,7 +59,7 @@ public function delete(int $id, int $siteId = null): void
|
|||||||
/**
|
/**
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function restart(int $id, int $siteId = null): void
|
public function restart(int $id, ?int $siteId = null): void
|
||||||
{
|
{
|
||||||
$this->service->server->ssh()->exec(
|
$this->service->server->ssh()->exec(
|
||||||
new RestartWorkerCommand($id),
|
new RestartWorkerCommand($id),
|
||||||
@ -71,7 +71,7 @@ public function restart(int $id, int $siteId = null): void
|
|||||||
/**
|
/**
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function stop(int $id, int $siteId = null): void
|
public function stop(int $id, ?int $siteId = null): void
|
||||||
{
|
{
|
||||||
$this->service->server->ssh()->exec(
|
$this->service->server->ssh()->exec(
|
||||||
new StopWorkerCommand($id),
|
new StopWorkerCommand($id),
|
||||||
@ -83,7 +83,7 @@ public function stop(int $id, int $siteId = null): void
|
|||||||
/**
|
/**
|
||||||
* @throws Throwable
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function start(int $id, int $siteId = null): void
|
public function start(int $id, ?int $siteId = null): void
|
||||||
{
|
{
|
||||||
$this->service->server->ssh()->exec(
|
$this->service->server->ssh()->exec(
|
||||||
new StartWorkerCommand($id),
|
new StartWorkerCommand($id),
|
||||||
|
@ -24,7 +24,7 @@ public function connect(): bool
|
|||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRepo(string $repo = null): mixed
|
public function getRepo(?string $repo = null): mixed
|
||||||
{
|
{
|
||||||
$res = Http::withToken($this->sourceControl->access_token)
|
$res = Http::withToken($this->sourceControl->access_token)
|
||||||
->get($this->apiUrl."/repositories/$repo");
|
->get($this->apiUrl."/repositories/$repo");
|
||||||
|
@ -25,7 +25,7 @@ public function connect(): bool
|
|||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRepo(string $repo = null): mixed
|
public function getRepo(?string $repo = null): mixed
|
||||||
{
|
{
|
||||||
if ($repo) {
|
if ($repo) {
|
||||||
$url = $this->apiUrl.'/repos/'.$repo;
|
$url = $this->apiUrl.'/repos/'.$repo;
|
||||||
|
@ -25,7 +25,7 @@ public function connect(): bool
|
|||||||
/**
|
/**
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function getRepo(string $repo = null): mixed
|
public function getRepo(?string $repo = null): mixed
|
||||||
{
|
{
|
||||||
$repository = $repo ? urlencode($repo) : null;
|
$repository = $repo ? urlencode($repo) : null;
|
||||||
$res = Http::withToken($this->sourceControl->access_token)
|
$res = Http::withToken($this->sourceControl->access_token)
|
||||||
|
@ -15,7 +15,7 @@ class SSHFake
|
|||||||
|
|
||||||
protected string $output = '';
|
protected string $output = '';
|
||||||
|
|
||||||
public function init(Server $server, string $asUser = null): self
|
public function init(Server $server, ?string $asUser = null): self
|
||||||
{
|
{
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ public function assertExecuted(array|string $commands): void
|
|||||||
PHPUnit::assertTrue(true, $allExecuted);
|
PHPUnit::assertTrue(true, $allExecuted);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function exec(string|array|SSHCommand $commands, string $log = '', int $siteId = null): string
|
public function exec(string|array|SSHCommand $commands, string $log = '', ?int $siteId = null): string
|
||||||
{
|
{
|
||||||
if (! is_array($commands)) {
|
if (! is_array($commands)) {
|
||||||
$commands = [$commands];
|
$commands = [$commands];
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
"laravel/tinker": "^2.8",
|
"laravel/tinker": "^2.8",
|
||||||
"livewire/livewire": "^2.12",
|
"livewire/livewire": "^2.12",
|
||||||
"phpseclib/phpseclib": "~3.0",
|
"phpseclib/phpseclib": "~3.0",
|
||||||
|
"opcodesio/log-viewer": "^2.5",
|
||||||
"ext-ftp": "*"
|
"ext-ftp": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
@ -24,7 +25,6 @@
|
|||||||
"laravel/sail": "^1.18",
|
"laravel/sail": "^1.18",
|
||||||
"mockery/mockery": "^1.4.4",
|
"mockery/mockery": "^1.4.4",
|
||||||
"nunomaduro/collision": "^7.0",
|
"nunomaduro/collision": "^7.0",
|
||||||
"opcodesio/log-viewer": "^2.5",
|
|
||||||
"phpunit/phpunit": "^10.0",
|
"phpunit/phpunit": "^10.0",
|
||||||
"spatie/laravel-ignition": "^2.0"
|
"spatie/laravel-ignition": "^2.0"
|
||||||
},
|
},
|
||||||
|
2188
composer.lock
generated
2188
composer.lock
generated
File diff suppressed because it is too large
Load Diff
217
config/log-viewer.php
Normal file
217
config/log-viewer.php
Normal file
@ -0,0 +1,217 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Opcodes\LogViewer\Level;
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer can be disabled, so it's no longer accessible via browser.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'enabled' => env('LOG_VIEWER_ENABLED', true),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer Domain
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| You may change the domain where Log Viewer should be active.
|
||||||
|
| If the domain is empty, all domains will be valid.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'route_domain' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer Route
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer will be available under this URL.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'route_path' => 'log-viewer',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Back to system URL
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| When set, displays a link to easily get back to this URL.
|
||||||
|
| Set to `null` to hide this link.
|
||||||
|
|
|
||||||
|
| Optional label to display for the above URL.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'back_to_system_url' => config('app.url', null),
|
||||||
|
|
||||||
|
'back_to_system_label' => null, // Displayed by default: "Back to {{ app.name }}"
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer time zone.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| The time zone in which to display the times in the UI. Defaults to
|
||||||
|
| the application's timezone defined in config/app.php.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timezone' => null,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer route middleware.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Optional middleware to use when loading the initial Log Viewer page.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'middleware' => [
|
||||||
|
'web',
|
||||||
|
\Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class,
|
||||||
|
'auth',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer API middleware.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Optional middleware to use on every API request. The same API is also
|
||||||
|
| used from within the Log Viewer user interface.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'api_middleware' => [
|
||||||
|
\Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||||
|
\Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer Remote hosts.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log Viewer supports viewing Laravel logs from remote hosts. They must
|
||||||
|
| be running Log Viewer as well. Below you can define the hosts you
|
||||||
|
| would like to show in this Log Viewer instance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'hosts' => [
|
||||||
|
'local' => [
|
||||||
|
'name' => ucfirst(env('APP_ENV', 'local')),
|
||||||
|
],
|
||||||
|
|
||||||
|
// 'staging' => [
|
||||||
|
// 'name' => 'Staging',
|
||||||
|
// 'host' => 'https://staging.example.com/log-viewer',
|
||||||
|
// 'auth' => [ // Example of HTTP Basic auth
|
||||||
|
// 'username' => 'username',
|
||||||
|
// 'password' => 'password',
|
||||||
|
// ],
|
||||||
|
// ],
|
||||||
|
//
|
||||||
|
// 'production' => [
|
||||||
|
// 'name' => 'Production',
|
||||||
|
// 'host' => 'https://example.com/log-viewer',
|
||||||
|
// 'auth' => [ // Example of Bearer token auth
|
||||||
|
// 'token' => env('LOG_VIEWER_PRODUCTION_TOKEN'),
|
||||||
|
// ],
|
||||||
|
// 'headers' => [
|
||||||
|
// 'X-Foo' => 'Bar',
|
||||||
|
// ],
|
||||||
|
// ],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Include file patterns
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'include_files' => [
|
||||||
|
'*.log',
|
||||||
|
'**/*.log',
|
||||||
|
// '/absolute/paths/supported',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Exclude file patterns.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| This will take precedence over included files.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'exclude_files' => [
|
||||||
|
// 'my_secret.log'
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shorter stack trace filters.
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Lines containing any of these strings will be excluded from the full log.
|
||||||
|
| This setting is only active when the function is enabled via the user interface.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'shorter_stack_trace_excludes' => [
|
||||||
|
'/vendor/symfony/',
|
||||||
|
'/vendor/laravel/framework/',
|
||||||
|
'/vendor/barryvdh/laravel-debugbar/',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Log matching patterns
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Regexes for matching log files
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'patterns' => [
|
||||||
|
'laravel' => [
|
||||||
|
'log_matching_regex' => '/^\[(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}\.?(\d{6}([\+-]\d\d:\d\d)?)?)\].*/',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This pattern, used for processing Laravel logs, returns these results:
|
||||||
|
* $matches[0] - the full log line being tested.
|
||||||
|
* $matches[1] - full timestamp between the square brackets (includes microseconds and timezone offset)
|
||||||
|
* $matches[2] - timestamp microseconds, if available
|
||||||
|
* $matches[3] - timestamp timezone offset, if available
|
||||||
|
* $matches[4] - contents between timestamp and the severity level
|
||||||
|
* $matches[5] - environment (local, production, etc)
|
||||||
|
* $matches[6] - log severity (info, debug, error, etc)
|
||||||
|
* $matches[7] - the log text, the rest of the text.
|
||||||
|
*/
|
||||||
|
'log_parsing_regex' => '/^\[(\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}:\d{2}\.?(\d{6}([\+-]\d\d:\d\d)?)?)\](.*?(\w+)\.|.*?)('
|
||||||
|
.implode('|', array_filter(Level::caseValues()))
|
||||||
|
.')?: (.*?)( in [\/].*?:[0-9]+)?$/is',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cache driver to use for storing the log indices. Indices are used to speed up
|
||||||
|
| log navigation. Defaults to your application's default cache driver.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'cache_driver' => env('LOG_VIEWER_CACHE_DRIVER', null),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Chunk size when scanning log files lazily
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| The size in MB of files to scan before updating the progress bar when searching across all files.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'lazy_scan_chunk_size_in_mb' => 50,
|
||||||
|
];
|
2
public/vendor/log-viewer/app.css
vendored
2
public/vendor/log-viewer/app.css
vendored
File diff suppressed because one or more lines are too long
2
public/vendor/log-viewer/app.js
vendored
2
public/vendor/log-viewer/app.js
vendored
File diff suppressed because one or more lines are too long
4
public/vendor/log-viewer/mix-manifest.json
vendored
4
public/vendor/log-viewer/mix-manifest.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"/app.js": "/app.js?id=2ca3fa12f273bd645611f1acf3d81355",
|
"/app.js": "/app.js?id=5f574f36f456b103dffcfa21d5612785",
|
||||||
"/app.css": "/app.css?id=93151d8b186ef7758df8582425ff8082",
|
"/app.css": "/app.css?id=b701a4344131bb2c00e9f0b1ef1ab3c1",
|
||||||
"/img/log-viewer-128.png": "/img/log-viewer-128.png?id=d576c6d2e16074d3f064e60fe4f35166",
|
"/img/log-viewer-128.png": "/img/log-viewer-128.png?id=d576c6d2e16074d3f064e60fe4f35166",
|
||||||
"/img/log-viewer-32.png": "/img/log-viewer-32.png?id=f8ec67d10f996aa8baf00df3b61eea6d",
|
"/img/log-viewer-32.png": "/img/log-viewer-32.png?id=f8ec67d10f996aa8baf00df3b61eea6d",
|
||||||
"/img/log-viewer-64.png": "/img/log-viewer-64.png?id=8902d596fc883ca9eb8105bb683568c6"
|
"/img/log-viewer-64.png": "/img/log-viewer-64.png?id=8902d596fc883ca9eb8105bb683568c6"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user