refactor(server): update dispatch messages and streamline data synchronization
This commit is contained in:
parent
238957132c
commit
69c36e6333
2 changed files with 4 additions and 7 deletions
|
|
@ -271,7 +271,7 @@ public function restartSentinel()
|
|||
$this->authorize('manageSentinel', $this->server);
|
||||
$customImage = isDev() ? $this->sentinelCustomDockerImage : null;
|
||||
$this->server->restartSentinel($customImage);
|
||||
$this->dispatch('success', 'Restarting Sentinel.');
|
||||
$this->dispatch('info', 'Restarting Sentinel.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
|
@ -355,7 +355,7 @@ public function regenerateSentinelToken()
|
|||
public function instantSave()
|
||||
{
|
||||
try {
|
||||
$this->submit();
|
||||
$this->syncData(true);
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
|
@ -365,7 +365,7 @@ public function submit()
|
|||
{
|
||||
try {
|
||||
$this->syncData(true);
|
||||
$this->dispatch('success', 'Server updated.');
|
||||
$this->dispatch('success', 'Server settings updated.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,6 @@ class="w-full input opacity-50 cursor-not-allowed"
|
|||
@endif
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
|
||||
<div class="w-96">
|
||||
<x-forms.checkbox canGate="update" :canResource="$server" wire:model.live="isSentinelEnabled"
|
||||
label="Enable Sentinel" />
|
||||
|
|
@ -267,9 +266,7 @@ class="w-full input opacity-50 cursor-not-allowed"
|
|||
$wire.set('sentinelCustomDockerImage', this.customImage);
|
||||
}
|
||||
}" x-init="$wire.set('sentinelCustomDockerImage', customImage)">
|
||||
<x-forms.input
|
||||
x-model="customImage"
|
||||
@input.debounce.500ms="saveCustomImage()"
|
||||
<x-forms.input x-model="customImage" @input.debounce.500ms="saveCustomImage()"
|
||||
placeholder="e.g., sentinel:latest or myregistry/sentinel:dev"
|
||||
label="Custom Sentinel Docker Image (Dev Only)"
|
||||
helper="Override the default Sentinel Docker image for testing. Leave empty to use the default." />
|
||||
|
|
|
|||
Loading…
Reference in a new issue