fix: no sentinel for swarm yet
This commit is contained in:
parent
c338eef57b
commit
d7efe8a6d1
3 changed files with 8 additions and 3 deletions
|
|
@ -11,6 +11,9 @@ class StartSentinel
|
||||||
|
|
||||||
public function handle(Server $server, $version = 'next', bool $restart = false)
|
public function handle(Server $server, $version = 'next', bool $restart = false)
|
||||||
{
|
{
|
||||||
|
if ($server->isSwarm()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ($restart) {
|
if ($restart) {
|
||||||
StopSentinel::run($server);
|
StopSentinel::run($server);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ public function __construct(public Server $server, public $data)
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
// TODO: Swarm is not supported yet
|
||||||
try {
|
try {
|
||||||
if (! $this->data) {
|
if (! $this->data) {
|
||||||
throw new \Exception('No data provided');
|
throw new \Exception('No data provided');
|
||||||
|
|
|
||||||
|
|
@ -158,17 +158,18 @@ class="px-4 py-2 text-gray-800 cursor-pointer hover:bg-gray-100 dark:hover:bg-co
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@if (isDev())
|
@if (!$server->isSwarm())
|
||||||
<div class="flex gap-2 items-center pt-4 pb-2">
|
<div class="flex gap-2 items-center pt-4 pb-2">
|
||||||
<h3>Sentinel</h3>
|
<h3>Sentinel</h3>
|
||||||
@if ($server->isSentinelEnabled())
|
@if ($server->isSentinelEnabled())
|
||||||
<div class="flex gap-2 items-center"
|
<div class="flex gap-2 items-center"
|
||||||
wire:poll.{{ $server->settings->sentinel_push_interval_seconds }}s="checkSyncStatus">
|
wire:poll.{{ $server->settings->sentinel_push_interval_seconds }}s="checkSyncStatus">
|
||||||
@if ($server->isSentinelLive())
|
@if ($server->isSentinelLive())
|
||||||
<x-status.running status="In sync" noLoading title="{{$server->sentinel_updated_at}}" />
|
<x-status.running status="In sync" noLoading title="{{ $server->sentinel_updated_at }}" />
|
||||||
<x-forms.button wire:click='restartSentinel'>Restart</x-forms.button>
|
<x-forms.button wire:click='restartSentinel'>Restart</x-forms.button>
|
||||||
@else
|
@else
|
||||||
<x-status.stopped status="Out of sync" noLoading title="{{$server->sentinel_updated_at}}" />
|
<x-status.stopped status="Out of sync" noLoading
|
||||||
|
title="{{ $server->sentinel_updated_at }}" />
|
||||||
<x-forms.button wire:click='restartSentinel'>Sync</x-forms.button>
|
<x-forms.button wire:click='restartSentinel'>Sync</x-forms.button>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue