mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 06:56:15 +00:00
WIP notifications and other refactors (#88)
* WIP notifications and other refactors - refactor notification channels - send notifications on events related to the servers and sites - delete server log files on server deletion - add telegram notification channel - add new icons - cache configs and icons on installation and updates - new navbar for dark mode and settings * discord channel * build assets * pint
This commit is contained in:
30
app/Notifications/SiteInstallationFailed.php
Normal file
30
app/Notifications/SiteInstallationFailed.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Notifications;
|
||||
|
||||
use App\Models\Site;
|
||||
use Illuminate\Notifications\Messages\MailMessage;
|
||||
|
||||
class SiteInstallationFailed extends AbstractNotification
|
||||
{
|
||||
public function __construct(protected Site $site)
|
||||
{
|
||||
}
|
||||
|
||||
public function rawText(): string
|
||||
{
|
||||
return __("Installation failed for site [:site] \nCheck your server's logs \n:logs", [
|
||||
'site' => $this->site->domain,
|
||||
'logs' => url('/servers/'.$this->site->server_id.'/logs'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function toMail(object $notifiable): MailMessage
|
||||
{
|
||||
return (new MailMessage)
|
||||
->subject(__('Site installation failed!'))
|
||||
->line('Your site\'s ['.$this->site->domain.'] installation has been failed.')
|
||||
->line('Check your server logs')
|
||||
->action('View Logs', url('/servers/'.$this->site->server_id.'/logs'));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user