mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-29 14:20:39 +00:00
Fix restart initiated duplicate and restore activity logs
- Add restartInitiated flag to prevent duplicate "Proxy restart initiated" messages - Restore ProxyStatusChangedUI dispatch with activityId in RestartProxyJob - This allows the UI to open the activity monitor and show logs during restart - Simplified restart message (removed redundant "Monitor progress" text) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,8 @@ class Navbar extends Component
|
||||
|
||||
public ?string $lastNotifiedStatus = null;
|
||||
|
||||
public bool $restartInitiated = false;
|
||||
|
||||
public function getListeners()
|
||||
{
|
||||
$teamId = auth()->user()->currentTeam()->id;
|
||||
@@ -65,11 +67,22 @@ class Navbar extends Component
|
||||
try {
|
||||
$this->authorize('manageProxy', $this->server);
|
||||
|
||||
// Prevent duplicate restart messages (e.g., from double-click or re-render)
|
||||
if ($this->restartInitiated) {
|
||||
return;
|
||||
}
|
||||
$this->restartInitiated = true;
|
||||
|
||||
// Always use background job for all servers
|
||||
RestartProxyJob::dispatch($this->server);
|
||||
$this->dispatch('info', 'Proxy restart initiated. Monitor progress in activity logs.');
|
||||
$this->dispatch('info', 'Proxy restart initiated.');
|
||||
|
||||
// Reset the flag after a short delay to allow future restarts
|
||||
$this->restartInitiated = false;
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
$this->restartInitiated = false;
|
||||
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user