Fix styling

This commit is contained in:
Thijmen
2024-06-10 20:43:34 +00:00
committed by github-actions[bot]
parent 41fb6a1fc9
commit d86274cc37
429 changed files with 5307 additions and 2831 deletions

View File

@@ -14,7 +14,6 @@ class ContainerRestarted extends Notification implements ShouldQueue
public $tries = 1;
public function __construct(public string $name, public Server $server, public ?string $url = null)
{
}
@@ -33,30 +32,34 @@ class ContainerRestarted extends Notification implements ShouldQueue
'serverName' => $this->server->name,
'url' => $this->url,
]);
return $mail;
}
public function toDiscord(): string
{
$message = "Coolify: A resource ({$this->name}) has been restarted automatically on {$this->server->name}";
return $message;
}
public function toTelegram(): array
{
$message = "Coolify: A resource ({$this->name}) has been restarted automatically on {$this->server->name}";
$payload = [
"message" => $message,
'message' => $message,
];
if ($this->url) {
$payload['buttons'] = [
[
[
"text" => "Check Proxy in Coolify",
"url" => $this->url
]
]
'text' => 'Check Proxy in Coolify',
'url' => $this->url,
],
],
];
};
}
return $payload;
}
}

View File

@@ -32,30 +32,34 @@ class ContainerStopped extends Notification implements ShouldQueue
'serverName' => $this->server->name,
'url' => $this->url,
]);
return $mail;
}
public function toDiscord(): string
{
$message = "Coolify: A resource ($this->name) has been stopped unexpectedly on {$this->server->name}";
return $message;
}
public function toTelegram(): array
{
$message = "Coolify: A resource ($this->name) has been stopped unexpectedly on {$this->server->name}";
$payload = [
"message" => $message,
'message' => $message,
];
if ($this->url) {
$payload['buttons'] = [
[
[
"text" => "Open Application in Coolify",
"url" => $this->url
]
]
'text' => 'Open Application in Coolify',
'url' => $this->url,
],
],
];
}
return $payload;
}
}