Improved name creation

This commit is contained in:
Thijmen Stavenuiter 2024-06-22 10:41:15 +02:00
parent 4acdd8df12
commit 76a0659335
52 changed files with 151 additions and 51 deletions

View File

@ -11,5 +11,6 @@ class ServerMetadata extends Data
public function __construct(
public ?ProxyTypes $type,
public ?ProxyStatus $status
) {}
) {
}
}

View File

@ -10,5 +10,7 @@ class ProxyStarted
{
use Dispatchable, InteractsWithSockets, SerializesModels;
public function __construct(public $data) {}
public function __construct(public $data)
{
}
}

View File

@ -4,4 +4,6 @@
use Exception;
class ProcessException extends Exception {}
class ProcessException extends Exception
{
}

View File

@ -25,7 +25,8 @@ public function __construct(
public ApplicationPreview $preview,
public ProcessStatus $status,
public ?string $deployment_uuid = null
) {}
) {
}
public function handle()
{

View File

@ -19,7 +19,9 @@ class CheckLogDrainContainerJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function middleware(): array
{

View File

@ -14,7 +14,9 @@ class CheckResaleLicenseJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct() {}
public function __construct()
{
}
public function handle(): void
{

View File

@ -15,7 +15,9 @@ class CleanupHelperContainersJob implements ShouldBeEncrypted, ShouldBeUnique, S
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function handle(): void
{

View File

@ -16,7 +16,9 @@ class CleanupInstanceStuffsJob implements ShouldBeEncrypted, ShouldBeUnique, Sho
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct() {}
public function __construct()
{
}
// public function uniqueId(): string
// {

View File

@ -23,7 +23,9 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function middleware(): array
{

View File

@ -23,7 +23,8 @@ public function __construct(
public bool $ignore_errors = false,
public $call_event_on_finish = null,
public $call_event_data = null
) {}
) {
}
/**
* Execute the job.

View File

@ -18,7 +18,9 @@ class DatabaseBackupStatusJob implements ShouldBeEncrypted, ShouldQueue
public $tries = 1;
public function __construct() {}
public function __construct()
{
}
public function handle()
{

View File

@ -28,7 +28,9 @@ class DeleteResourceJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $resource, public bool $deleteConfigurations = false) {}
public function __construct(public Application|Service|StandalonePostgresql|StandaloneRedis|StandaloneMongodb|StandaloneMysql|StandaloneMariadb|StandaloneKeydb|StandaloneDragonfly|StandaloneClickhouse $resource, public bool $deleteConfigurations = false)
{
}
public function handle()
{

View File

@ -22,7 +22,9 @@ class DockerCleanupJob implements ShouldBeEncrypted, ShouldQueue
public ?int $usageBefore = null;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function handle(): void
{

View File

@ -23,7 +23,9 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public GithubApp $github_app) {}
public function __construct(public GithubApp $github_app)
{
}
public function middleware(): array
{

View File

@ -19,7 +19,9 @@ class InstanceAutoUpdateJob implements ShouldBeEncrypted, ShouldBeUnique, Should
public $tries = 1;
public function __construct() {}
public function __construct()
{
}
public function handle(): void
{

View File

@ -19,7 +19,9 @@ class PullCoolifyImageJob implements ShouldBeEncrypted, ShouldQueue
public $timeout = 1000;
public function __construct() {}
public function __construct()
{
}
public function handle(): void
{

View File

@ -27,7 +27,9 @@ public function uniqueId(): string
return $this->server->uuid;
}
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function handle(): void
{

View File

@ -28,7 +28,9 @@ public function uniqueId(): string
return $this->server->uuid;
}
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function handle(): void
{

View File

@ -17,7 +17,9 @@ class PullTemplatesFromCDN implements ShouldBeEncrypted, ShouldQueue
public $timeout = 10;
public function __construct() {}
public function __construct()
{
}
public function handle(): void
{

View File

@ -17,7 +17,9 @@ class PullVersionsFromCDN implements ShouldBeEncrypted, ShouldQueue
public $timeout = 10;
public function __construct() {}
public function __construct()
{
}
public function handle(): void
{

View File

@ -14,7 +14,9 @@ class SendConfirmationForWaitlistJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public string $email, public string $uuid) {}
public function __construct(public string $email, public string $uuid)
{
}
public function handle()
{

View File

@ -31,7 +31,8 @@ class SendMessageToDiscordJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public string $text,
public string $webhookUrl
) {}
) {
}
/**
* Execute the job.

View File

@ -33,7 +33,8 @@ public function __construct(
public string $token,
public string $chatId,
public ?string $topicId = null,
) {}
) {
}
/**
* Execute the job.

View File

@ -16,7 +16,9 @@ class ServerFilesFromServerJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource) {}
public function __construct(public ServiceApplication|ServiceDatabase|Application $resource)
{
}
public function handle()
{

View File

@ -24,7 +24,9 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Team $team) {}
public function __construct(public Team $team)
{
}
public function middleware(): array
{

View File

@ -25,7 +25,9 @@ public function backoff(): int
return isDev() ? 1 : 3;
}
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function middleware(): array
{

View File

@ -14,7 +14,9 @@ class ServerStorageSaveJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(public LocalFileVolume $localFileVolume) {}
public function __construct(public LocalFileVolume $localFileVolume)
{
}
public function handle()
{

View File

@ -15,7 +15,9 @@ class SubscriptionInvoiceFailedJob implements ShouldBeEncrypted, ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
public function __construct(protected Team $team) {}
public function __construct(protected Team $team)
{
}
public function handle()
{

View File

@ -17,7 +17,8 @@ class SubscriptionTrialEndedJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public Team $team
) {}
) {
}
public function handle(): void
{

View File

@ -17,7 +17,8 @@ class SubscriptionTrialEndsSoonJob implements ShouldBeEncrypted, ShouldQueue
public function __construct(
public Team $team
) {}
) {
}
public function handle(): void
{

View File

@ -9,7 +9,9 @@
class MaintenanceModeDisabledNotification
{
public function __construct() {}
public function __construct()
{
}
public function handle(EventsMaintenanceModeDisabled $event): void
{

View File

@ -9,7 +9,9 @@ class ProxyStartedNotification
{
public Server $server;
public function __construct() {}
public function __construct()
{
}
public function handle(ProxyStarted $event): void
{

View File

@ -47,4 +47,14 @@ public function getRecepients($notification)
return explode(',', $recipients);
}
public function getTitleDisplayName(): string
{
$instanceName = $this->instance_name;
if (! $instanceName) {
return '';
}
return "[{$instanceName}]";
}
}

View File

@ -2,4 +2,6 @@
namespace App\Models;
class Kubernetes extends BaseModel {}
class Kubernetes extends BaseModel
{
}

View File

@ -14,7 +14,9 @@ class ContainerRestarted extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
public function __construct(public string $name, public Server $server, public ?string $url = null)
{
}
public function via(object $notifiable): array
{

View File

@ -14,7 +14,9 @@ class ContainerStopped extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $name, public Server $server, public ?string $url = null) {}
public function __construct(public string $name, public Server $server, public ?string $url = null)
{
}
public function via(object $notifiable): array
{

View File

@ -16,7 +16,9 @@ class DailyBackup extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public $databases) {}
public function __construct(public $databases)
{
}
public function via(object $notifiable): array
{

View File

@ -14,7 +14,9 @@ class GeneralNotification extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $message) {}
public function __construct(public string $message)
{
}
public function via(object $notifiable): array
{

View File

@ -15,7 +15,9 @@ class DockerCleanup extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server, public string $message) {}
public function __construct(public Server $server, public string $message)
{
}
public function via(object $notifiable): array
{

View File

@ -17,7 +17,9 @@ class ForceDisabled extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function via(object $notifiable): array
{

View File

@ -17,7 +17,9 @@ class ForceEnabled extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function via(object $notifiable): array
{

View File

@ -17,7 +17,9 @@ class HighDiskUsage extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server, public int $disk_usage, public int $cleanup_after_percentage) {}
public function __construct(public Server $server, public int $disk_usage, public int $cleanup_after_percentage)
{
}
public function via(object $notifiable): array
{

View File

@ -17,7 +17,9 @@ class Unreachable extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public Server $server) {}
public function __construct(public Server $server)
{
}
public function via(object $notifiable): array
{

View File

@ -13,7 +13,9 @@ class Test extends Notification implements ShouldQueue
public $tries = 5;
public function __construct(public ?string $emails = null) {}
public function __construct(public ?string $emails = null)
{
}
public function via(object $notifiable): array
{

View File

@ -22,7 +22,9 @@ public function via(): array
return [TransactionalEmailChannel::class];
}
public function __construct(public User $user) {}
public function __construct(public User $user)
{
}
public function toMail(): MailMessage
{

View File

@ -14,7 +14,9 @@ class Test extends Notification implements ShouldQueue
public $tries = 5;
public function __construct(public string $emails) {}
public function __construct(public string $emails)
{
}
public function via(): array
{

View File

@ -9,7 +9,9 @@
class AppServiceProvider extends ServiceProvider
{
public function register(): void {}
public function register(): void
{
}
public function boot(): void
{

View File

@ -22,7 +22,8 @@ public function __construct(
public bool $allowToPeak = true,
public bool $isMultiline = false,
public string $defaultClass = 'input',
) {}
) {
}
public function render(): View|Closure|string
{

View File

@ -16,7 +16,8 @@ public function __construct(
public ?string $logo = null,
public ?string $documentation = null,
public bool $upgrade = false,
) {}
) {
}
/**
* Get the view / contents that represent the component.

View File

@ -14,7 +14,8 @@ class Index extends Component
public function __construct(
public $resource = null,
public bool $showRefreshButton = true,
) {}
) {
}
/**
* Get the view / contents that represent the component.

View File

@ -9,5 +9,7 @@ class EnvironmentSeeder extends Seeder
/**
* Run the database seeds.
*/
public function run(): void {}
public function run(): void
{
}
}

View File

@ -22,7 +22,7 @@
$name = null;
if($instanceSettings) {
$name = strlen($instanceSettings->instance_name) > 0 ? "[{$instanceSettings->instance_name}] " : '';
$name = $instanceSettings->getTitleDisplayName() . ' ';
}
@endphp
<title>{{ $name }}{{ $title ?? 'Coolify' }}</title>