This commit is contained in:
Andras Bacsai 2023-05-25 21:43:24 +02:00
parent 80c63e5701
commit cf0cf13a68
2 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,7 @@ class InstanceAutoUpdateJob implements ShouldQueue
private string $latest_version;
private string $current_version;
private Server $server;
private string $server_name = 'host.docker.internal';
private string $server_name = 'localhost';
public function __construct(private bool $force = false)
{
@ -28,7 +28,7 @@ public function __construct(private bool $force = false)
}
$instance_settings = InstanceSettings::get();
$this->server = Server::where('ip', $this->server_name)->first();
$this->server = Server::whereFirst('name', $this->server_name);
if (!$instance_settings->is_auto_update_enabled || !$this->server) {
return $this->delete();

View File

@ -12,7 +12,11 @@
</div>
<div class="flex flex-col gap-2 xl:flex-row">
<div class="flex flex-col w-96">
<x-forms.input id="server.name" label="Name" required />
@if ($server->id === 0)
<x-forms.input id="server.name" label="Name" readonly />
@else
<x-forms.input id="server.name" label="Name" required />
@endif
<x-forms.input id="server.description" label="Description" />
{{-- <x-forms.checkbox disabled type="checkbox" id="server.settings.is_part_of_swarm"
label="Is it part of a Swarm cluster?" /> --}}