mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-20 02:17:09 +00:00
Refactor Livewire server show view to remove redundant code
This commit is contained in:
1 parent
0a3b5cc4e3
commit
77a019405a
1 file changed
+5
-8
@@ -187,29 +187,26 @@ class Show extends Component
|
|||||||
|
|
||||||
public function updatedIsSentinelDebugEnabled($value)
|
public function updatedIsSentinelDebugEnabled($value)
|
||||||
{
|
{
|
||||||
$this->server->settings->is_sentinel_debug_enabled = $value;
|
$this->submit();
|
||||||
$this->server->settings->save();
|
|
||||||
$this->restartSentinel();
|
$this->restartSentinel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatedIsMetricsEnabled($value)
|
public function updatedIsMetricsEnabled($value)
|
||||||
{
|
{
|
||||||
$this->server->settings->is_metrics_enabled = $value;
|
$this->submit();
|
||||||
$this->server->settings->save();
|
|
||||||
$this->restartSentinel();
|
$this->restartSentinel();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatedIsSentinelEnabled($value)
|
public function updatedIsSentinelEnabled($value)
|
||||||
{
|
{
|
||||||
$this->server->settings->is_sentinel_enabled = $value;
|
|
||||||
if ($value === true) {
|
if ($value === true) {
|
||||||
StartSentinel::run($this->server, true);
|
StartSentinel::run($this->server, true);
|
||||||
} else {
|
} else {
|
||||||
$this->server->settings->is_metrics_enabled = false;
|
$this->isMetricsEnabled = false;
|
||||||
$this->server->settings->is_sentinel_debug_enabled = false;
|
$this->isSentinelDebugEnabled = false;
|
||||||
StopSentinel::dispatch($this->server);
|
StopSentinel::dispatch($this->server);
|
||||||
}
|
}
|
||||||
$this->server->settings->save();
|
$this->submit();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user