mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-18 15:20:40 +00:00
This completes the migration from Livewire's legacy `id="model.property"` pattern to explicit properties with manual synchronization. This allows disabling the `legacy_model_binding` feature flag. **Components Migrated (Final Session - 9 components):** - Server/Proxy.php (1 field) - Service/EditDomain.php (1 field) - Fixed Collection/string bug & parent sync - Application/Previews.php (2 fields - array handling) - Service/EditCompose.php (4 fields) - Service/FileStorage.php (6 fields) - Service/Database.php (7 fields) - Service/ServiceApplicationView.php (10 fields) - Application/General.php (53 fields) - LARGEST migration - Application/PreviewsCompose.php (1 field) **Total Migration Summary:** - 25+ components migrated across all phases - 150+ explicit properties added - 0 legacy bindings remaining (verified via grep) - All wire:model, id, @entangle bindings updated - All updater hooks renamed (updatedApplicationX → updatedX) **Technical Changes:** - Added explicit public properties (camelCase) - Implemented syncData(bool $toModel) bidirectional sync - Updated validation rules (removed model. prefix) - Updated all action methods (mount, submit, instantSave) - Fixed updater hooks: updatedBuildPack, updatedBaseDirectory, updatedIsStatic - Updated Blade views (id & wire:model bindings) - Applied Collection/string confusion fixes - Added model refresh + re-sync pattern **Critical Fixes:** - EditDomain.php Collection/string confusion (use intermediate variables) - EditDomain.php parent component sync (refresh + re-sync after save) - General.php domain field empty (syncData at end of mount) - General.php wire:model bindings (application.* → property) - General.php updater hooks (wrong naming convention) **Files Modified:** 34 files - 17 PHP Livewire components - 17 Blade view templates - 1 MIGRATION_REPORT.md (documentation) **Ready to disable legacy_model_binding flag in config/livewire.php** 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
52 lines
3.6 KiB
PHP
52 lines
3.6 KiB
PHP
<form wire:submit='submit' class="flex flex-col">
|
|
<div class="flex items-center gap-2">
|
|
<h2>Healthchecks</h2>
|
|
<x-forms.button canGate="update" :canResource="$resource" type="submit">Save</x-forms.button>
|
|
@if (!$healthCheckEnabled)
|
|
<x-modal-confirmation title="Confirm Healthcheck Enable?" buttonTitle="Enable Healthcheck"
|
|
submitAction="toggleHealthcheck" :actions="['Enable healthcheck for this resource.']"
|
|
warningMessage="If the health check fails, your application will become inaccessible. Please review the <a href='https://coolify.io/docs/knowledge-base/health-checks' target='_blank' class='underline text-white'>Health Checks</a> guide before proceeding!"
|
|
step2ButtonText="Enable Healthcheck" :confirmWithText="false" :confirmWithPassword="false"
|
|
isHighlightedButton>
|
|
</x-modal-confirmation>
|
|
@else
|
|
<x-forms.button canGate="update" :canResource="$resource" wire:click="toggleHealthcheck">Disable Healthcheck</x-forms.button>
|
|
@endif
|
|
</div>
|
|
<div class="mt-1 pb-4">Define how your resource's health should be checked.</div>
|
|
<div class="flex flex-col gap-4">
|
|
@if ($customHealthcheckFound)
|
|
<x-callout type="warning" title="Caution">
|
|
<p>A custom health check has been detected. If you enable this health check, it will disable the custom one and use this instead.</p>
|
|
</x-callout>
|
|
@endif
|
|
<div class="flex gap-2">
|
|
<x-forms.select canGate="update" :canResource="$resource" id="healthCheckMethod" label="Method" required>
|
|
<option value="GET">GET</option>
|
|
<option value="POST">POST</option>
|
|
</x-forms.select>
|
|
<x-forms.select canGate="update" :canResource="$resource" id="healthCheckScheme" label="Scheme" required>
|
|
<option value="http">http</option>
|
|
<option value="https">https</option>
|
|
</x-forms.select>
|
|
<x-forms.input canGate="update" :canResource="$resource" id="healthCheckHost" placeholder="localhost" label="Host" required />
|
|
<x-forms.input canGate="update" :canResource="$resource" type="number" id="healthCheckPort"
|
|
helper="If no port is defined, the first exposed port will be used." placeholder="80" label="Port" />
|
|
<x-forms.input canGate="update" :canResource="$resource" id="healthCheckPath" placeholder="/health" label="Path" required />
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<x-forms.input canGate="update" :canResource="$resource" type="number" id="healthCheckReturnCode" placeholder="200" label="Return Code"
|
|
required />
|
|
<x-forms.input canGate="update" :canResource="$resource" id="healthCheckResponseText" placeholder="OK" label="Response Text" />
|
|
</div>
|
|
<div class="flex gap-2">
|
|
<x-forms.input canGate="update" :canResource="$resource" min="1" type="number" id="healthCheckInterval" placeholder="30"
|
|
label="Interval (s)" required />
|
|
<x-forms.input canGate="update" :canResource="$resource" type="number" id="healthCheckTimeout" placeholder="30" label="Timeout (s)"
|
|
required />
|
|
<x-forms.input canGate="update" :canResource="$resource" type="number" id="healthCheckRetries" placeholder="3" label="Retries" required />
|
|
<x-forms.input canGate="update" :canResource="$resource" min=1 type="number" id="healthCheckStartPeriod" placeholder="30"
|
|
label="Start Period (s)" required />
|
|
</div>
|
|
</div>
|
|
</form> |