Fix styling
This commit is contained in:
committed by
github-actions[bot]
parent
41fb6a1fc9
commit
d86274cc37
@@ -16,10 +16,13 @@ class StatusChanged extends Notification implements ShouldQueue
|
||||
public $tries = 1;
|
||||
|
||||
public string $resource_name;
|
||||
|
||||
public string $project_uuid;
|
||||
|
||||
public string $environment_name;
|
||||
|
||||
public ?string $resource_url = null;
|
||||
|
||||
public ?string $fqdn;
|
||||
|
||||
public function __construct(public Application $resource)
|
||||
@@ -31,7 +34,7 @@ class StatusChanged extends Notification implements ShouldQueue
|
||||
if (Str::of($this->fqdn)->explode(',')->count() > 1) {
|
||||
$this->fqdn = Str::of($this->fqdn)->explode(',')->first();
|
||||
}
|
||||
$this->resource_url = base_url() . "/project/{$this->project_uuid}/" . urlencode($this->environment_name) . "/application/{$this->resource->uuid}";
|
||||
$this->resource_url = base_url()."/project/{$this->project_uuid}/".urlencode($this->environment_name)."/application/{$this->resource->uuid}";
|
||||
}
|
||||
|
||||
public function via(object $notifiable): array
|
||||
@@ -49,27 +52,31 @@ class StatusChanged extends Notification implements ShouldQueue
|
||||
'fqdn' => $fqdn,
|
||||
'resource_url' => $this->resource_url,
|
||||
]);
|
||||
|
||||
return $mail;
|
||||
}
|
||||
|
||||
public function toDiscord(): string
|
||||
{
|
||||
$message = 'Coolify: ' . $this->resource_name . ' has been stopped.
|
||||
$message = 'Coolify: '.$this->resource_name.' has been stopped.
|
||||
|
||||
';
|
||||
$message .= '[Open Application in Coolify](' . $this->resource_url . ')';
|
||||
$message .= '[Open Application in Coolify]('.$this->resource_url.')';
|
||||
|
||||
return $message;
|
||||
}
|
||||
|
||||
public function toTelegram(): array
|
||||
{
|
||||
$message = 'Coolify: ' . $this->resource_name . ' has been stopped.';
|
||||
$message = 'Coolify: '.$this->resource_name.' has been stopped.';
|
||||
|
||||
return [
|
||||
"message" => $message,
|
||||
"buttons" => [
|
||||
'message' => $message,
|
||||
'buttons' => [
|
||||
[
|
||||
"text" => "Open Application in Coolify",
|
||||
"url" => $this->resource_url
|
||||
]
|
||||
'text' => 'Open Application in Coolify',
|
||||
'url' => $this->resource_url,
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user