mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +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:
@ -3,9 +3,12 @@
|
||||
namespace App\ServerTypes;
|
||||
|
||||
use App\Events\Broadcast;
|
||||
use App\Facades\Notifier;
|
||||
use App\Jobs\Installation\Initialize;
|
||||
use App\Jobs\Installation\InstallRequirements;
|
||||
use App\Jobs\Installation\Upgrade;
|
||||
use App\Notifications\ServerInstallationFailed;
|
||||
use App\Notifications\ServerInstallationSucceed;
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
@ -66,7 +69,7 @@ public function install(): void
|
||||
'server' => $this->server,
|
||||
])
|
||||
);
|
||||
/** @todo notify */
|
||||
Notifier::send($this->server, new ServerInstallationSucceed($this->server));
|
||||
};
|
||||
|
||||
Bus::chain($jobs)
|
||||
@ -79,7 +82,7 @@ public function install(): void
|
||||
'server' => $this->server,
|
||||
])
|
||||
);
|
||||
/** @todo notify */
|
||||
Notifier::send($this->server, new ServerInstallationFailed($this->server));
|
||||
Log::error('server-installation-error', [
|
||||
'error' => (string) $e,
|
||||
]);
|
||||
|
@ -4,12 +4,15 @@
|
||||
|
||||
use App\Enums\ServerStatus;
|
||||
use App\Events\Broadcast;
|
||||
use App\Facades\Notifier;
|
||||
use App\Jobs\Installation\Initialize;
|
||||
use App\Jobs\Installation\InstallCertbot;
|
||||
use App\Jobs\Installation\InstallComposer;
|
||||
use App\Jobs\Installation\InstallNodejs;
|
||||
use App\Jobs\Installation\InstallRequirements;
|
||||
use App\Jobs\Installation\Upgrade;
|
||||
use App\Notifications\ServerInstallationFailed;
|
||||
use App\Notifications\ServerInstallationSucceed;
|
||||
use Illuminate\Support\Facades\Bus;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
@ -88,7 +91,7 @@ public function install(): void
|
||||
'server' => $this->server,
|
||||
])
|
||||
);
|
||||
/** @todo notify */
|
||||
Notifier::send($this->server, new ServerInstallationSucceed($this->server));
|
||||
};
|
||||
|
||||
Bus::chain($jobs)
|
||||
@ -101,7 +104,7 @@ public function install(): void
|
||||
'server' => $this->server,
|
||||
])
|
||||
);
|
||||
/** @todo notify */
|
||||
Notifier::send($this->server, new ServerInstallationFailed($this->server));
|
||||
Log::error('server-installation-error', [
|
||||
'error' => (string) $e,
|
||||
]);
|
||||
|
Reference in New Issue
Block a user