- Refactored DockerImage component to use separate properties for image name, tag, and SHA256 digest. - Introduced DockerImageFormat validation rule to enforce correct image format. - Updated DockerImageParser to handle new parsing logic for image tags and SHA256 hashes. - Enhanced UI to separate input fields for image name, tag, and SHA256 digest, improving user experience. - Added comprehensive tests for DockerImageParser to ensure accurate parsing and validation of image formats.
29 lines
1.7 KiB
PHP
29 lines
1.7 KiB
PHP
<div x-data x-init="$nextTick(() => { if ($refs.autofocusInput) $refs.autofocusInput.focus(); })">
|
|
<h1>Create a new Application</h1>
|
|
<div class="pb-4">You can deploy an existing Docker Image from any Registry.</div>
|
|
<form wire:submit="submit">
|
|
<div class="flex gap-2 pt-4 pb-1">
|
|
<h2>Docker Image</h2>
|
|
<x-forms.button type="submit">Save</x-forms.button>
|
|
</div>
|
|
<div class="space-y-4">
|
|
<x-forms.input id="imageName" label="Image Name" placeholder="nginx or ghcr.io/user/app"
|
|
helper="Enter the Docker image name with optional registry. Examples: nginx, ghcr.io/user/app, localhost:5000/myapp"
|
|
required autofocus />
|
|
<div class="relative grid grid-cols-1 gap-4 md:grid-cols-2">
|
|
<x-forms.input id="imageTag" label="Tag (optional)" placeholder="latest"
|
|
helper="Enter a tag like 'latest' or 'v1.2.3'. Leave empty if using SHA256." />
|
|
<div
|
|
class="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2 hidden md:flex items-center justify-center z-10">
|
|
<div
|
|
class="px-2 py-1 bg-white dark:bg-coolgray-100 border border-neutral-300 dark:border-coolgray-300 rounded text-xs font-bold text-neutral-500 dark:text-neutral-400">
|
|
OR
|
|
</div>
|
|
</div>
|
|
<x-forms.input id="imageSha256" label="SHA256 Digest (optional)"
|
|
placeholder="59e02939b1bf39f16c93138a28727aec520bb916da021180ae502c61626b3cf0"
|
|
helper="Enter only the 64-character hex digest (without 'sha256:' prefix)" />
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|