fix(Status): conditionally check proxy status and refresh button based on force_stop state
This commit is contained in:
parent
3176106222
commit
68c2c7fb81
2 changed files with 4 additions and 5 deletions
|
|
@ -34,9 +34,6 @@ public function proxyStatusUpdated()
|
||||||
public function checkProxy(bool $notification = false)
|
public function checkProxy(bool $notification = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($this->server->proxy->force_stop) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ($this->polling) {
|
if ($this->polling) {
|
||||||
if ($this->numberOfPolls >= 10) {
|
if ($this->numberOfPolls >= 10) {
|
||||||
$this->polling = false;
|
$this->polling = false;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<div x-init="$wire.checkProxy()" class="flex gap-2">
|
<div @if (data_get($server, 'proxy.force_stop', false) === false) x-init="$wire.checkProxy()" @endif class="flex gap-2">
|
||||||
<x-forms.button wire:click='checkProxy(true)' :showLoadingIndicator="false">Refresh</x-forms.button>
|
@if (data_get($server, 'proxy.force_stop', false) === false)
|
||||||
|
<x-forms.button wire:click='checkProxy(true)' :showLoadingIndicator="false">Refresh</x-forms.button>
|
||||||
|
@endif
|
||||||
@if (data_get($server, 'proxy.status') === 'running')
|
@if (data_get($server, 'proxy.status') === 'running')
|
||||||
<x-status.running status="Proxy Running" />
|
<x-status.running status="Proxy Running" />
|
||||||
@elseif (data_get($server, 'proxy.status') === 'restarting')
|
@elseif (data_get($server, 'proxy.status') === 'restarting')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue