diff --git a/app/Livewire/Server/Form.php b/app/Livewire/Server/Form.php index 0e4263e53..335b17396 100644 --- a/app/Livewire/Server/Form.php +++ b/app/Livewire/Server/Form.php @@ -174,7 +174,8 @@ class Form extends Component $this->server->settings->refresh(); return handleError($e, $this); - } finally {} + } finally { + } } public function restartSentinel($notification = true) diff --git a/app/Models/Server.php b/app/Models/Server.php index 4ad034d7e..1c6692041 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -131,11 +131,11 @@ class Server extends BaseModel protected $guarded = []; - public function type() { return 'server'; } + public static function isReachable() { return Server::ownedByCurrentTeam()->whereRelation('settings', 'is_reachable', true); @@ -575,7 +575,6 @@ $schema://$host { return $this->settings->is_sentinel_enabled; } - public function checkSentinel() { // ray("Checking sentinel on server: {$this->name}"); @@ -1273,11 +1272,12 @@ $schema://$host { public function restartSentinel() { try { - StartSentinel::dispatch($this,true); + StartSentinel::dispatch($this, true); } catch (\Throwable $e) { loggy('Error restarting Sentinel: '.$e->getMessage()); } } + public function url() { return base_url().'/server/'.$this->uuid; diff --git a/app/Notifications/Server/HighDiskUsage.php b/app/Notifications/Server/HighDiskUsage.php index 3a01aabe4..e373abc03 100644 --- a/app/Notifications/Server/HighDiskUsage.php +++ b/app/Notifications/Server/HighDiskUsage.php @@ -3,9 +3,6 @@ namespace App\Notifications\Server; use App\Models\Server; -use App\Notifications\Channels\DiscordChannel; -use App\Notifications\Channels\EmailChannel; -use App\Notifications\Channels\TelegramChannel; use App\Notifications\Dto\DiscordMessage; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php index a92b682d7..d658be125 100644 --- a/bootstrap/helpers/shared.php +++ b/bootstrap/helpers/shared.php @@ -651,7 +651,7 @@ function queryResourcesByUuid(string $uuid) return $resource; } -function generatTagDeployWebhook($tag_name) +function generateTagDeployWebhook($tag_name) { $baseUrl = base_url(); $api = Url::fromString($baseUrl).'/api/v1'; diff --git a/resources/views/livewire/settings/index.blade.php b/resources/views/livewire/settings/index.blade.php index 91084bff9..8eba94681 100644 --- a/resources/views/livewire/settings/index.blade.php +++ b/resources/views/livewire/settings/index.blade.php @@ -142,22 +142,23 @@ helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers." /> @else -
Warning!
+Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases + the + risk of accidental actions. This is not recommended for production servers.
+Warning!
-Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases the - risk of accidental actions. This is not recommended for production servers.
-