fix(storage): split S3 endpoint input and persist stopped status

Persist exited status across application, database, service, and preview stop paths, and reuse the split host/port/path input for S3 endpoints with linked validation feedback.
This commit is contained in:
Andras Bacsai committed 2026-08-15 11:46:49 +02:00
1 parent ec8a24d178
commit 2677e47138
12 files changed
+132 -30

No files matched your search

@@ -3,6 +3,8 @@
'wire' => true,
'value' => '',
'errorId' => null,
'hostLabel' => 'Domain',
'hostPlaceholder' => 'app.example.com',
])
<div class="grid gap-4 sm:grid-cols-[8rem_minmax(0,1fr)_8rem]" x-data="{
@@ -51,13 +53,24 @@
<div class="min-w-0">
<div class="mb-1.5 flex h-4 w-full items-center gap-1.5">
<label for="{{ $id }}" class="mb-0! flex items-center gap-1.5 leading-4">
Domain <x-highlighted text="*" />
{{ $hostLabel }} <x-highlighted text="*" />
</label>
</div>
<input id="{{ $id }}" type="text" class="input" x-model="host" placeholder="app.example.com"
<input id="{{ $id }}" type="text" class="input" x-model="host" placeholder="{{ $hostPlaceholder }}"
autocomplete="off" required />
@error($errorId ?? $id)
<p class="mt-1 text-[12px] text-red-500">{{ $message }}</p>
@php
preg_match('/(https?:\/\/\S+)$/', $message, $validationLinkMatches);
$validationLink = $validationLinkMatches[1] ?? null;
@endphp
<p class="mt-1 text-[12px] text-red-500">
@if ($validationLink)
{{ str($message)->beforeLast($validationLink)->trim() }}
<a class="font-medium underline" href="{{ $validationLink }}">Set them here.</a>
@else
{{ $message }}
@endif
</p>
@enderror
</div>
@@ -7,18 +7,8 @@
<x-forms.input required label="Name" id="name" />
<x-forms.input label="Description" id="description" />
</div>
<x-forms.input required type="url" label="Endpoint" id="endpoint"
x-on:blur="
let value = $el.value.trim();
const hasScheme = /^https?:/i.test(value) || /^[a-z][a-z0-9+.-]*:\/\//i.test(value);
if (value && !hasScheme) {
value = `https://${value}`;
}
if ($el.value !== value) {
$el.value = value;
$el.dispatchEvent(new Event('input', { bubbles: true }));
}
" />
<x-forms.domain-input id="endpoint" host-label="Host"
host-placeholder="minio.internal or 192.168.1.50" />
<div class="flex gap-2">
<x-forms.input required label="Bucket" id="bucket" />
<x-forms.input required helper="Region only required for AWS. Leave it as-is for other providers."
@@ -16,8 +16,12 @@
<x-forms.input canGate="update" :canResource="$storage" label="Name" id="name" />
<x-forms.input canGate="update" :canResource="$storage" label="Description" id="description" />
<div class="lg:col-span-2">
<x-forms.input canGate="update" :canResource="$storage" required label="Endpoint"
id="endpoint" />
@can('update', $storage)
<x-forms.domain-input id="endpoint" host-label="Host"
host-placeholder="minio.internal or 192.168.1.50" />
@else
<x-forms.input label="Endpoint" :value="$endpoint" disabled />
@endcan
</div>
<x-forms.input canGate="update" :canResource="$storage" required label="Bucket" id="bucket" />
<x-forms.input canGate="update" :canResource="$storage" required label="Region" id="region" />