refactor(proxy): streamline proxy status handling and improve dashboard availability checks

This commit is contained in:
Andras Bacsai
2025-06-11 12:02:39 +02:00
parent 23d5ada3b8
commit 9ad2304229
20 changed files with 459 additions and 559 deletions

View File

@@ -5,7 +5,6 @@ namespace App\Livewire\Server;
use App\Actions\Proxy\CheckConfiguration;
use App\Actions\Proxy\SaveConfiguration;
use App\Models\Server;
use App\Services\ProxyDashboardCacheService;
use Livewire\Component;
class Proxy extends Component
@@ -43,9 +42,6 @@ class Proxy extends Component
$this->server->proxy = null;
$this->server->save();
// Clear Traefik dashboard cache when proxy type changes
ProxyDashboardCacheService::clearCache($this->server);
$this->dispatch('reloadWindow');
}
@@ -55,9 +51,6 @@ class Proxy extends Component
$this->server->changeProxy($proxy_type, async: false);
$this->selectedProxy = $this->server->proxy->type;
// Clear Traefik dashboard cache when proxy type is selected
ProxyDashboardCacheService::clearCache($this->server);
$this->dispatch('reloadWindow');
} catch (\Throwable $e) {
return handleError($e, $this);