format muhahaha
This commit is contained in:
parent
c762195c8a
commit
82a01b4483
@ -66,8 +66,8 @@ public static function decodeOutput(?Activity $activity = null): string
|
||||
}
|
||||
|
||||
return collect($decoded)
|
||||
->sortBy(fn($i) => $i['order'])
|
||||
->map(fn($i) => $i['output'])
|
||||
->sortBy(fn ($i) => $i['order'])
|
||||
->map(fn ($i) => $i['output'])
|
||||
->implode("");
|
||||
}
|
||||
|
||||
|
@ -134,15 +134,15 @@ private function generate_environment_variables()
|
||||
$environment_variables->push("$env->key=$env->value");
|
||||
}
|
||||
|
||||
if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_USER'))->isEmpty()) {
|
||||
if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_USER'))->isEmpty()) {
|
||||
$environment_variables->push("POSTGRES_USER={$this->database->postgres_user}");
|
||||
}
|
||||
|
||||
if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_PASSWORD'))->isEmpty()) {
|
||||
if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_PASSWORD'))->isEmpty()) {
|
||||
$environment_variables->push("POSTGRES_PASSWORD={$this->database->postgres_password}");
|
||||
}
|
||||
|
||||
if ($environment_variables->filter(fn($env) => Str::of($env)->contains('POSTGRES_DB'))->isEmpty()) {
|
||||
if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('POSTGRES_DB'))->isEmpty()) {
|
||||
$environment_variables->push("POSTGRES_DB={$this->database->postgres_db}");
|
||||
}
|
||||
return $environment_variables->all();
|
||||
|
@ -29,8 +29,10 @@ public function update(User $user, array $input): void
|
||||
],
|
||||
])->validateWithBag('updateProfileInformation');
|
||||
|
||||
if ($input['email'] !== $user->email &&
|
||||
$user instanceof MustVerifyEmail) {
|
||||
if (
|
||||
$input['email'] !== $user->email &&
|
||||
$user instanceof MustVerifyEmail
|
||||
) {
|
||||
$this->updateVerifiedUser($user, $input);
|
||||
} else {
|
||||
$user->forceFill([
|
||||
|
@ -22,5 +22,4 @@ public function __invoke(Server $server, bool $reset = false)
|
||||
|
||||
return $proxy_configuration;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,15 +43,16 @@ private function showHelp()
|
||||
style('coolify')->color('#9333EA');
|
||||
style('title-box')->apply('mt-1 px-2 py-1 bg-coolify');
|
||||
|
||||
render(<<<'HTML'
|
||||
render(
|
||||
<<<'HTML'
|
||||
<div>
|
||||
<div class="title-box">
|
||||
Coolify
|
||||
</div>
|
||||
<p class="ml-1 mt-1 ">
|
||||
<p class="mt-1 ml-1 ">
|
||||
Demo Notify <strong class="text-coolify">=></strong> Send a demo notification to a given channel.
|
||||
</p>
|
||||
<p class="ml-1 mt-1 bg-coolify px-1">
|
||||
<p class="px-1 mt-1 ml-1 bg-coolify">
|
||||
php artisan app:demo-notify {channel}
|
||||
</p>
|
||||
<div class="my-1">
|
||||
|
@ -64,7 +64,7 @@ public function handle()
|
||||
]);
|
||||
});
|
||||
try {
|
||||
Http::pool(fn(Pool $pool) => [
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->storage(file: "$parent_dir/$compose_file")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file"),
|
||||
$pool->storage(file: "$parent_dir/$compose_file_prod")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$compose_file_prod"),
|
||||
$pool->storage(file: "$parent_dir/$production_env")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$production_env"),
|
||||
@ -73,7 +73,7 @@ public function handle()
|
||||
$pool->storage(file: "$parent_dir/$versions")->put("/$bunny_cdn_storage_name/$bunny_cdn_path/$versions"),
|
||||
]);
|
||||
ray("{$bunny_cdn}/{$bunny_cdn_path}");
|
||||
Http::pool(fn(Pool $pool) => [
|
||||
Http::pool(fn (Pool $pool) => [
|
||||
$pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file"),
|
||||
$pool->purge("$bunny_cdn/$bunny_cdn_path/$compose_file_prod"),
|
||||
$pool->purge("$bunny_cdn/$bunny_cdn_path/$production_env"),
|
||||
|
@ -17,7 +17,7 @@ class Kernel extends ConsoleKernel
|
||||
{
|
||||
protected function schedule(Schedule $schedule): void
|
||||
{
|
||||
// $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds();
|
||||
// $schedule->call(fn() => $this->check_scheduled_backups($schedule))->everyTenSeconds();
|
||||
if (is_dev()) {
|
||||
$schedule->command('horizon:snapshot')->everyMinute();
|
||||
$schedule->job(new InstanceApplicationsStatusJob)->everyMinute();
|
||||
@ -54,7 +54,6 @@ private function check_scheduled_backups($schedule)
|
||||
backup: $scheduled_backup
|
||||
))->cron($scheduled_backup->frequency);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected function commands(): void
|
||||
|
@ -22,7 +22,6 @@ public function __construct(
|
||||
public ?Model $model = null,
|
||||
public string $status = ProcessStatus::QUEUED->value,
|
||||
public bool $ignore_errors = false,
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ class ServerMetadata extends Data
|
||||
public function __construct(
|
||||
public ?ProxyTypes $type,
|
||||
public ?ProxyStatus $status
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public function subscription()
|
||||
abort(404);
|
||||
}
|
||||
return view('subscription', [
|
||||
'settings' => InstanceSettings::get()
|
||||
'settings' => InstanceSettings::get(),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public function license()
|
||||
abort(404);
|
||||
}
|
||||
return view('settings.license', [
|
||||
'settings' => InstanceSettings::get()
|
||||
'settings' => InstanceSettings::get(),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -63,13 +63,11 @@ public function settings()
|
||||
$settings = InstanceSettings::get();
|
||||
$database = StandalonePostgresql::whereName('coolify-db')->first();
|
||||
if ($database) {
|
||||
$backup = $database->scheduledBackups->first();
|
||||
$s3s = S3Storage::whereTeamId(0)->get();
|
||||
}
|
||||
return view('settings.configuration', [
|
||||
'settings' => $settings,
|
||||
'database' => $database,
|
||||
'backup' => $backup ?? null,
|
||||
's3s' => $s3s ?? [],
|
||||
]);
|
||||
} else {
|
||||
|
@ -31,7 +31,6 @@ public function save()
|
||||
} catch (\Throwable $th) {
|
||||
return general_error_handler($th, $this, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function get_files()
|
||||
|
@ -54,18 +54,13 @@ public function instantSave()
|
||||
} catch (\Exception $e) {
|
||||
$this->emit('error', $e->getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function custom_validate()
|
||||
{
|
||||
// if ($this->backup->save_s3) {
|
||||
// if (!is_numeric($this->selected_storage_id)) {
|
||||
// throw new \Exception('Invalid S3 Storage');
|
||||
// } else {
|
||||
// $this->backup->s3_storage_id = $this->selected_storage_id;
|
||||
// }
|
||||
// }
|
||||
if (!is_numeric($this->backup->s3_storage_id)) {
|
||||
$this->backup->s3_storage_id = null;
|
||||
}
|
||||
$isValid = validate_cron_expression($this->backup->frequency);
|
||||
if (!$isValid) {
|
||||
throw new \Exception('Invalid Cron / Human expression');
|
||||
|
@ -11,7 +11,6 @@ class BackupExecution extends Component
|
||||
|
||||
public function download()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function delete(): void
|
||||
|
18
app/Http/Livewire/Project/Database/BackupNow.php
Normal file
18
app/Http/Livewire/Project/Database/BackupNow.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project\Database;
|
||||
|
||||
use App\Jobs\DatabaseBackupJob;
|
||||
use Livewire\Component;
|
||||
|
||||
class BackupNow extends Component
|
||||
{
|
||||
public $backup;
|
||||
public function backup_now()
|
||||
{
|
||||
dispatch(new DatabaseBackupJob(
|
||||
backup: $this->backup
|
||||
));
|
||||
$this->emit('success', 'Backup queued. It will be available in a few minutes');
|
||||
}
|
||||
}
|
@ -42,7 +42,7 @@ class General extends Component
|
||||
|
||||
public function save_init_script($script)
|
||||
{
|
||||
$this->database->init_scripts = filter($this->database->init_scripts, fn($s) => $s['filename'] !== $script['filename']);
|
||||
$this->database->init_scripts = filter($this->database->init_scripts, fn ($s) => $s['filename'] !== $script['filename']);
|
||||
$this->database->init_scripts = array_merge($this->database->init_scripts, [$script]);
|
||||
$this->database->save();
|
||||
$this->emit('success', 'Init script saved successfully.');
|
||||
@ -53,8 +53,8 @@ public function delete_init_script($script)
|
||||
$collection = collect($this->database->init_scripts);
|
||||
$found = $collection->firstWhere('filename', $script['filename']);
|
||||
if ($found) {
|
||||
ray($collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray());
|
||||
$this->database->init_scripts = $collection->filter(fn($s) => $s['filename'] !== $script['filename'])->toArray();
|
||||
ray($collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray());
|
||||
$this->database->init_scripts = $collection->filter(fn ($s) => $s['filename'] !== $script['filename'])->toArray();
|
||||
$this->database->save();
|
||||
$this->refresh();
|
||||
$this->emit('success', 'Init script deleted successfully.');
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
namespace App\Http\Livewire\Settings;
|
||||
|
||||
use App\Jobs\DatabaseBackupJob;
|
||||
use App\Models\InstanceSettings;
|
||||
use App\Models\S3Storage;
|
||||
use App\Models\ScheduledDatabaseBackup;
|
||||
use App\Models\Server;
|
||||
use App\Models\StandalonePostgresql;
|
||||
use App\Jobs\DatabaseBackupJob;
|
||||
use Livewire\Component;
|
||||
|
||||
class Backup extends Component
|
||||
@ -16,6 +16,7 @@ class Backup extends Component
|
||||
public $s3s;
|
||||
public StandalonePostgresql|null $database = null;
|
||||
public ScheduledDatabaseBackup|null $backup = null;
|
||||
public $executions = [];
|
||||
|
||||
protected $rules = [
|
||||
'database.uuid' => 'required',
|
||||
@ -33,9 +34,13 @@ class Backup extends Component
|
||||
'database.postgres_password' => 'postgres password',
|
||||
];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->backup = $this->database->scheduledBackups->first();
|
||||
$this->executions = $this->backup->executions;
|
||||
}
|
||||
public function add_coolify_database()
|
||||
{
|
||||
ray('add_coolify_database');
|
||||
$server = Server::find(0);
|
||||
$out = instant_remote_process(['docker inspect coolify-db'], $server);
|
||||
$envs = format_docker_envs_to_json($out);
|
||||
@ -68,7 +73,8 @@ public function add_coolify_database()
|
||||
$this->s3s = S3Storage::whereTeamId(0)->get();
|
||||
}
|
||||
|
||||
public function backup_now() {
|
||||
public function backup_now()
|
||||
{
|
||||
dispatch(new DatabaseBackupJob(
|
||||
backup: $this->backup
|
||||
));
|
||||
@ -78,5 +84,4 @@ public function submit()
|
||||
{
|
||||
$this->emit('success', 'Backup updated successfully');
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -70,7 +70,6 @@ public function submit()
|
||||
} catch (\Throwable $th) {
|
||||
return general_error_handler($th, $this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function test_s3_connection()
|
||||
|
@ -434,7 +434,7 @@ private function generate_environment_variables($ports)
|
||||
}
|
||||
}
|
||||
// Add PORT if not exists, use the first port as default
|
||||
if ($environment_variables->filter(fn($env) => Str::of($env)->contains('PORT'))->isEmpty()) {
|
||||
if ($environment_variables->filter(fn ($env) => Str::of($env)->contains('PORT'))->isEmpty()) {
|
||||
$environment_variables->push("PORT={$ports[0]}");
|
||||
}
|
||||
return $environment_variables->all();
|
||||
|
@ -25,8 +25,7 @@ public function __construct(
|
||||
public int $pull_request_id,
|
||||
public string $deployment_uuid,
|
||||
public string $status
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
public function handle()
|
||||
|
@ -20,8 +20,7 @@ class CoolifyTask implements ShouldQueue
|
||||
public function __construct(
|
||||
public Activity $activity,
|
||||
public bool $ignore_errors = false,
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -157,7 +157,7 @@ private function upload_to_s3(): void
|
||||
}
|
||||
$key = $this->s3->key;
|
||||
$secret = $this->s3->secret;
|
||||
// $region = $this->s3->region;
|
||||
// $region = $this->s3->region;
|
||||
$bucket = $this->s3->bucket;
|
||||
$endpoint = $this->s3->endpoint;
|
||||
|
||||
@ -183,6 +183,5 @@ private function save_backup_logs(): void
|
||||
'message' => $this->backup_output,
|
||||
'size' => $this->size,
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -28,8 +28,7 @@ class SendMessageToDiscordJob implements ShouldQueue
|
||||
public function __construct(
|
||||
public string $text,
|
||||
public string $webhookUrl
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,7 +41,7 @@ public function type()
|
||||
public function publishDirectory(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn($value) => $value ? '/' . ltrim($value, '/') : null,
|
||||
set: fn ($value) => $value ? '/' . ltrim($value, '/') : null,
|
||||
);
|
||||
}
|
||||
|
||||
@ -71,14 +71,14 @@ public function gitCommits(): Attribute
|
||||
public function baseDirectory(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn($value) => '/' . ltrim($value, '/'),
|
||||
set: fn ($value) => '/' . ltrim($value, '/'),
|
||||
);
|
||||
}
|
||||
|
||||
public function portsMappings(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn($value) => $value === "" ? null : $value,
|
||||
set: fn ($value) => $value === "" ? null : $value,
|
||||
);
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ public function portsMappings(): Attribute
|
||||
public function portsMappingsArray(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn() => is_null($this->ports_mappings)
|
||||
get: fn () => is_null($this->ports_mappings)
|
||||
? []
|
||||
: explode(',', $this->ports_mappings),
|
||||
|
||||
@ -97,7 +97,7 @@ public function portsMappingsArray(): Attribute
|
||||
public function portsExposesArray(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn() => is_null($this->ports_exposes)
|
||||
get: fn () => is_null($this->ports_exposes)
|
||||
? []
|
||||
: explode(',', $this->ports_exposes)
|
||||
);
|
||||
|
@ -45,7 +45,7 @@ public function services()
|
||||
protected function name(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn(string $value) => strtolower($value),
|
||||
set: fn (string $value) => strtolower($value),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -34,8 +34,8 @@ protected static function booted()
|
||||
protected function value(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn(string $value) => $this->get_environment_variables($value),
|
||||
set: fn(string $value) => $this->set_environment_variables($value),
|
||||
get: fn (string $value) => $this->get_environment_variables($value),
|
||||
set: fn (string $value) => $this->set_environment_variables($value),
|
||||
);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ private function set_environment_variables(string $environment_variable): string
|
||||
protected function key(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn(string $value) => Str::of($value)->trim(),
|
||||
set: fn (string $value) => Str::of($value)->trim(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@ -23,14 +23,14 @@ public function standalone_postgresql()
|
||||
protected function name(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn(string $value) => Str::of($value)->trim()->value,
|
||||
set: fn (string $value) => Str::of($value)->trim()->value,
|
||||
);
|
||||
}
|
||||
|
||||
protected function mountPath(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn(string $value) => Str::of($value)->trim()->start('/')->value
|
||||
set: fn (string $value) => Str::of($value)->trim()->start('/')->value
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ protected static function booted()
|
||||
public function portsMappings(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
set: fn($value) => $value === "" ? null : $value,
|
||||
set: fn ($value) => $value === "" ? null : $value,
|
||||
);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ public function portsMappings(): Attribute
|
||||
public function portsMappingsArray(): Attribute
|
||||
{
|
||||
return Attribute::make(
|
||||
get: fn() => is_null($this->ports_mappings)
|
||||
get: fn () => is_null($this->ports_mappings)
|
||||
? []
|
||||
: explode(',', $this->ports_mappings),
|
||||
|
||||
|
@ -23,7 +23,7 @@ public function send(SendsEmail $notifiable, Notification $notification): void
|
||||
Mail::send(
|
||||
[],
|
||||
[],
|
||||
fn(Message $message) => $message
|
||||
fn (Message $message) => $message
|
||||
->from(
|
||||
data_get($notifiable, 'smtp_from_address'),
|
||||
data_get($notifiable, 'smtp_from_name'),
|
||||
|
@ -25,7 +25,7 @@ public function send(User $notifiable, Notification $notification): void
|
||||
Mail::send(
|
||||
[],
|
||||
[],
|
||||
fn(Message $message) => $message
|
||||
fn (Message $message) => $message
|
||||
->from(
|
||||
data_get($settings, 'smtp_from_address'),
|
||||
data_get($settings, 'smtp_from_name')
|
||||
|
@ -49,7 +49,6 @@ public function via($notifiable)
|
||||
return ['mail'];
|
||||
}
|
||||
throw new \Exception('SMTP is not enabled');
|
||||
|
||||
}
|
||||
|
||||
public function toMail($notifiable)
|
||||
|
@ -23,7 +23,8 @@ class FortifyServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
$this->app->instance(RegisterResponse::class, new class implements RegisterResponse {
|
||||
$this->app->instance(RegisterResponse::class, new class implements RegisterResponse
|
||||
{
|
||||
public function toResponse($request)
|
||||
{
|
||||
// First user (root) will be redirected to /settings instead of / on registration.
|
||||
|
@ -17,8 +17,7 @@ public function __construct(
|
||||
public bool $noStyle = false,
|
||||
public string|null $modalId = null,
|
||||
public string $defaultClass = "btn btn-primary btn-sm font-normal text-white normal-case no-animation rounded border-none"
|
||||
)
|
||||
{
|
||||
) {
|
||||
if ($this->noStyle) {
|
||||
$this->defaultClass = "";
|
||||
}
|
||||
|
@ -20,8 +20,7 @@ public function __construct(
|
||||
public bool $instantSave = false,
|
||||
public bool $disabled = false,
|
||||
public string $defaultClass = "toggle toggle-xs toggle-warning rounded disabled:bg-coolgray-200 disabled:opacity-50 placeholder:text-neutral-700"
|
||||
)
|
||||
{
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -21,8 +21,7 @@ public function __construct(
|
||||
public string|null $helper = null,
|
||||
public bool $allowToPeak = true,
|
||||
public string $defaultClass = "input input-sm bg-coolgray-200 rounded text-white w-full disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50"
|
||||
)
|
||||
{
|
||||
) {
|
||||
}
|
||||
|
||||
public function render(): View|Closure|string
|
||||
|
@ -20,8 +20,7 @@ public function __construct(
|
||||
public string|null $helper = null,
|
||||
public bool $required = false,
|
||||
public string $defaultClass = "select select-sm w-full rounded text-white text-sm bg-coolgray-200 font-normal disabled:bg-coolgray-200/50 disabled:border-none"
|
||||
)
|
||||
{
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -25,8 +25,7 @@ public function __construct(
|
||||
public bool $readonly = false,
|
||||
public string|null $helper = null,
|
||||
public string $defaultClass = "textarea bg-coolgray-200 rounded text-white scrollbar disabled:bg-coolgray-200/50 disabled:border-none placeholder:text-coolgray-500 read-only:text-neutral-500 read-only:bg-coolgray-200/50"
|
||||
)
|
||||
{
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,7 @@ public function __construct(
|
||||
public string|null $modalSubmit = null,
|
||||
public bool $yesOrNo = false,
|
||||
public string $action = 'delete'
|
||||
)
|
||||
{
|
||||
) {
|
||||
//
|
||||
}
|
||||
|
||||
|
@ -8,8 +8,8 @@ function format_docker_command_output_to_json($rawOutput): Collection
|
||||
$outputLines = explode(PHP_EOL, $rawOutput);
|
||||
|
||||
return collect($outputLines)
|
||||
->reject(fn($line) => empty($line))
|
||||
->map(fn($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR));
|
||||
->reject(fn ($line) => empty($line))
|
||||
->map(fn ($outputLine) => json_decode($outputLine, true, flags: JSON_THROW_ON_ERROR));
|
||||
}
|
||||
|
||||
function format_docker_labels_to_json($rawOutput): Collection
|
||||
@ -17,7 +17,7 @@ function format_docker_labels_to_json($rawOutput): Collection
|
||||
$outputLines = explode(PHP_EOL, $rawOutput);
|
||||
|
||||
return collect($outputLines)
|
||||
->reject(fn($line) => empty($line))
|
||||
->reject(fn ($line) => empty($line))
|
||||
->map(function ($outputLine) {
|
||||
$outputArray = explode(',', $outputLine);
|
||||
return collect($outputArray)
|
||||
|
@ -27,8 +27,7 @@ function remote_process(
|
||||
?string $type_uuid = null,
|
||||
?Model $model = null,
|
||||
bool $ignore_errors = false,
|
||||
): Activity
|
||||
{
|
||||
): Activity {
|
||||
|
||||
$command_string = implode("\n", $command);
|
||||
if (auth()->user()) {
|
||||
@ -141,10 +140,10 @@ function decode_remote_command_output(?ApplicationDeploymentQueue $application_d
|
||||
}
|
||||
$formatted = collect($decoded);
|
||||
if (!$is_debug_enabled) {
|
||||
$formatted = $formatted->filter(fn($i) => $i['hidden'] === false ?? false);
|
||||
$formatted = $formatted->filter(fn ($i) => $i['hidden'] === false ?? false);
|
||||
}
|
||||
$formatted = $formatted
|
||||
->sortBy(fn($i) => $i['order'])
|
||||
->sortBy(fn ($i) => $i['order'])
|
||||
->map(function ($i) {
|
||||
$i['timestamp'] = Carbon::parse($i['timestamp'])->format('Y-M-d H:i:s.u');
|
||||
return $i;
|
||||
|
@ -178,5 +178,3 @@ function validate_cron_expression($expression_to_validate): bool
|
||||
}
|
||||
return $isValid;
|
||||
}
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ public function definition(): array
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn(array $attributes) => [
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -5,7 +5,8 @@
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Laravel\Fortify\Fortify;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -6,7 +6,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('scheduled_database_backups', function (Blueprint $table) {
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('scheduled_database_backup_executions', function (Blueprint $table) {
|
||||
|
@ -4,7 +4,8 @@
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('teams', function (Blueprint $table) {
|
||||
|
@ -11,11 +11,11 @@ class EnvironmentVariableSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// EnvironmentVariable::create([
|
||||
// 'key' => 'NODE_ENV',
|
||||
// 'value' => 'production',
|
||||
// 'is_build_time' => true,
|
||||
// 'application_id' => 1,
|
||||
// ]);
|
||||
// EnvironmentVariable::create([
|
||||
// 'key' => 'NODE_ENV',
|
||||
// 'value' => 'production',
|
||||
// 'is_build_time' => true,
|
||||
// 'application_id' => 1,
|
||||
// ]);
|
||||
}
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ class ProjectSettingSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// $first_project = Project::find(1);
|
||||
// $first_project = Project::find(1);
|
||||
// $first_project->settings->wildcard_domain = 'wildcard.example.com';
|
||||
// $first_project->settings->save();
|
||||
// $first_project->settings->save();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
@if ($pull_request_id !== 0)
|
||||
Pull Request #{{ $pull_request_id }} of {{ $name }} (<a target="_blank"
|
||||
href="{{ $fqdn }}">{{ $fqdn }}</a>) deployment failed:
|
||||
Pull Request #{{ $pull_request_id }} of {{ $name }} (<a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a>) deployment failed:
|
||||
@else
|
||||
Deployment failed of {{ $name }} (<a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a>):
|
||||
@endif
|
||||
|
@ -1,8 +1,7 @@
|
||||
@if ($pull_request_id === 0)
|
||||
A new version of <a target="_blank" href="{{ $fqdn }}">{{ $fqdn }}</a> is available:
|
||||
@else
|
||||
Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: <a target="_blank"
|
||||
href="{{ $fqdn }}">Application Link</a> |
|
||||
Pull request #{{ $pull_request_id }} of {{ $name }} deployed successfully: <a target="_blank" href="{{ $fqdn }}">Application Link</a> |
|
||||
@endif
|
||||
<a target="_blank" href="{{ $deployment_url }}">View
|
||||
Deployment Logs</a><br><br>
|
@ -4,6 +4,7 @@
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
<livewire:project.database.backup-now :backup="$backup" />
|
||||
@if ($backup->database_id !== 0)
|
||||
<x-forms.button isError wire:click="delete">Delete</x-forms.button>
|
||||
@endif
|
||||
|
@ -1,5 +1,6 @@
|
||||
<div class="flex gap-2">
|
||||
<div class="flex-1"></div>
|
||||
|
||||
{{-- @if (data_get($execution, 'status') !== 'failed') --}}
|
||||
{{-- <x-forms.button class="bg-coollabs-100 hover:bg-coollabs" wire:click="download">Download</x-forms.button> --}}
|
||||
{{-- @endif --}}
|
||||
|
@ -0,0 +1 @@
|
||||
<x-forms.button wire:click='backup_now'>Backup Now</x-forms.button>
|
@ -6,7 +6,6 @@
|
||||
<x-forms.button type="submit" wire:click="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
<x-forms.button wire:click="backup_now">Backup Now</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="pb-4">Backup your Coolify instance settings</div>
|
||||
@ -30,5 +29,9 @@
|
||||
<x-forms.button wire:click="add_coolify_database">Add Database</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="py-4">
|
||||
<h2 class="pb-4">Executions</h2>
|
||||
<livewire:project.database.backup-executions :backup="$backup" :executions="$executions" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<livewire:settings.configuration :settings="$settings" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'backup'" class="h-full">
|
||||
<livewire:settings.backup :settings="$settings" :database="$database" :backup="$backup" :s3s="$s3s" />
|
||||
<livewire:settings.backup :settings="$settings" :database="$database" :s3s="$s3s" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'smtp'" class="h-full">
|
||||
<livewire:settings.email :settings="$settings" />
|
||||
|
@ -68,23 +68,23 @@
|
||||
});
|
||||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/servers', fn() => view('server.all', [
|
||||
Route::get('/servers', fn () => view('server.all', [
|
||||
'servers' => Server::ownedByCurrentTeam()->get()
|
||||
]))->name('server.all');
|
||||
Route::get('/server/new', fn() => view('server.create', [
|
||||
Route::get('/server/new', fn () => view('server.create', [
|
||||
'private_keys' => PrivateKey::ownedByCurrentTeam()->get(),
|
||||
]))->name('server.create');
|
||||
Route::get('/server/{server_uuid}', fn() => view('server.show', [
|
||||
Route::get('/server/{server_uuid}', fn () => view('server.show', [
|
||||
'server' => Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),
|
||||
]))->name('server.show');
|
||||
Route::get('/server/{server_uuid}/proxy', fn() => view('server.proxy', [
|
||||
Route::get('/server/{server_uuid}/proxy', fn () => view('server.proxy', [
|
||||
'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(),
|
||||
]))->name('server.proxy');
|
||||
Route::get('/server/{server_uuid}/private-key', fn() => view('server.private-key', [
|
||||
Route::get('/server/{server_uuid}/private-key', fn () => view('server.private-key', [
|
||||
'server' => Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->firstOrFail(),
|
||||
'privateKeys' => PrivateKey::ownedByCurrentTeam()->get(),
|
||||
]))->name('server.private-key');
|
||||
Route::get('/server/{server_uuid}/destinations', fn() => view('server.destinations', [
|
||||
Route::get('/server/{server_uuid}/destinations', fn () => view('server.destinations', [
|
||||
'server' => Server::ownedByCurrentTeam(['name', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail()
|
||||
]))->name('server.destinations');
|
||||
});
|
||||
@ -95,32 +95,32 @@
|
||||
Route::get('/subscription', [Controller::class, 'subscription'])->name('subscription');
|
||||
Route::get('/settings', [Controller::class, 'settings'])->name('settings.configuration');
|
||||
Route::get('/settings/license', [Controller::class, 'license'])->name('settings.license');
|
||||
Route::get('/profile', fn() => view('profile', ['request' => request()]))->name('profile');
|
||||
Route::get('/profile', fn () => view('profile', ['request' => request()]))->name('profile');
|
||||
Route::get('/team', [Controller::class, 'team'])->name('team.show');
|
||||
Route::get('/team/new', fn() => view('team.create'))->name('team.create');
|
||||
Route::get('/team/notifications', fn() => view('team.notifications'))->name('team.notifications');
|
||||
Route::get('/team/new', fn () => view('team.create'))->name('team.create');
|
||||
Route::get('/team/notifications', fn () => view('team.notifications'))->name('team.notifications');
|
||||
Route::get('/team/storages', [Controller::class, 'storages'])->name('team.storages.all');
|
||||
Route::get('/team/storages/new', fn() => view('team.storages.create'))->name('team.storages.new');
|
||||
Route::get('/team/storages/new', fn () => view('team.storages.create'))->name('team.storages.new');
|
||||
Route::get('/team/storages/{storage_uuid}', [Controller::class, 'storages_show'])->name('team.storages.show');
|
||||
Route::get('/team/members', [Controller::class, 'members'])->name('team.members');
|
||||
Route::get('/command-center', fn() => view('command-center', ['servers' => Server::isReachable()->get()]))->name('command-center');
|
||||
Route::get('/command-center', fn () => view('command-center', ['servers' => Server::isReachable()->get()]))->name('command-center');
|
||||
Route::get('/invitations/{uuid}', [Controller::class, 'acceptInvitation'])->name('team.invitation.accept');
|
||||
Route::get('/invitations/{uuid}/revoke', [Controller::class, 'revokeInvitation'])->name('team.invitation.revoke');
|
||||
});
|
||||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/private-keys', fn() => view('private-key.all', [
|
||||
Route::get('/private-keys', fn () => view('private-key.all', [
|
||||
'privateKeys' => PrivateKey::ownedByCurrentTeam(['name', 'uuid', 'is_git_related'])->where('is_git_related', false)->get()
|
||||
]))->name('private-key.all');
|
||||
Route::get('/private-key/new', fn() => view('private-key.new'))->name('private-key.new');
|
||||
Route::get('/private-key/{private_key_uuid}', fn() => view('private-key.show', [
|
||||
Route::get('/private-key/new', fn () => view('private-key.new'))->name('private-key.new');
|
||||
Route::get('/private-key/{private_key_uuid}', fn () => view('private-key.show', [
|
||||
'private_key' => PrivateKey::ownedByCurrentTeam(['name', 'description', 'private_key', 'is_git_related'])->whereUuid(request()->private_key_uuid)->firstOrFail()
|
||||
]))->name('private-key.show');
|
||||
});
|
||||
|
||||
|
||||
Route::middleware(['auth'])->group(function () {
|
||||
Route::get('/source/new', fn() => view('source.new'))->name('source.new');
|
||||
Route::get('/source/new', fn () => view('source.new'))->name('source.new');
|
||||
Route::get('/sources', function () {
|
||||
$sources = auth()->user()->currentTeam()->sources();
|
||||
return view('source.all', [
|
||||
|
@ -41,7 +41,8 @@ protected function driver(): RemoteWebDriver
|
||||
return RemoteWebDriver::create(
|
||||
$_ENV['DUSK_DRIVER_URL'] ?? 'http://localhost:9515',
|
||||
DesiredCapabilities::chrome()->setCapability(
|
||||
ChromeOptions::CAPABILITY, $options
|
||||
ChromeOptions::CAPABILITY,
|
||||
$options
|
||||
)
|
||||
);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
uses(
|
||||
Tests\TestCase::class,
|
||||
// Illuminate\Foundation\Testing\RefreshDatabase::class,
|
||||
// Illuminate\Foundation\Testing\RefreshDatabase::class,
|
||||
)->in('Feature');
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user