This commit is contained in:
Andras Bacsai
2023-11-07 10:18:28 +01:00
parent 7377e9e415
commit 2976c72e09
8 changed files with 24 additions and 18 deletions

View File

@@ -27,11 +27,15 @@ class Navbar extends Component
$activity = StartService::run($this->service);
$this->emit('newMonitorActivity', $activity->id);
}
public function stop()
public function stop(bool $forceCleanup = false)
{
StopService::run($this->service);
$this->service->refresh();
$this->emit('success', 'Service stopped successfully.');
if ($forceCleanup) {
$this->emit('success', 'Force cleanup service successfully.');
} else {
$this->emit('success', 'Service stopped successfully.');
}
$this->emit('checkStatus');
}
}