lots of updates + refactoring
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Environment Variables</h2>
|
||||
<x-forms.button class="btn" onclick="newVariable.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.application.environment-variable.add />
|
||||
</div>
|
||||
<div class="">Environment (secrets) variables for normal deployments.</div>
|
||||
</div>
|
||||
@forelse ($application->environment_variables as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@empty
|
||||
<div class="text-neutral-500">No environment variables found.</div>
|
||||
@endforelse
|
||||
@if ($application->environment_variables_preview->count() > 0)
|
||||
<div>
|
||||
<h3>Preview Deployments</h3>
|
||||
<div class="">Environment (secrets) variables for Preview Deployments.</div>
|
||||
</div>
|
||||
@foreach ($application->environment_variables_preview as $env)
|
||||
<livewire:project.application.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -1,21 +0,0 @@
|
||||
<div>
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Storage">
|
||||
<x-slot:modalBody>
|
||||
<p>This storage will be deleted <span class="font-bold text-warning">({{ $storage->name }})</span>. It is not
|
||||
reversible. <br>Please think again.</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
<x-forms.input id="storage.name" label="Name" required />
|
||||
<x-forms.input id="storage.host_path" label="Source Path" />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required />
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
</x-forms.button>
|
||||
<x-forms.button isError isModal modalId="{{ $modalId }}">
|
||||
Delete
|
||||
</x-forms.button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav>
|
||||
<nav x-init="$wire.check_status" wire:poll.10000ms="check_status">
|
||||
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters" />
|
||||
<x-databases.navbar :database="$database" :parameters="$parameters" />
|
||||
</nav>
|
||||
|
||||
@@ -1,17 +1,33 @@
|
||||
<div>
|
||||
<form wire:submit.prevent="submit">
|
||||
<form wire:submit.prevent="submit" class="flex flex-col gap-2">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>General</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<x-forms.input label="Name" id="database.name" />
|
||||
<x-forms.input label="Description" id="database.description" />
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty, use postgres." />
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" />
|
||||
<x-forms.input label="Database" id="database.postgres_db" placeholder="If empty, use $USERNAME." />
|
||||
<x-forms.input label="Init Args" id="database.postgres_initdb_args" placeholder="If empty, use default." />
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="Name" id="database.name" />
|
||||
<x-forms.input label="Description" id="database.description" />
|
||||
<x-forms.input label="Image" id="database.image" required
|
||||
helper="For all available images, check here:<br><br><a target='_blank' href='https://hub.docker.com/_/postgres'>https://hub.docker.com/_/postgres</a>" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@if ($database->started_at)
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty, use postgres."
|
||||
readonly />
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required readonly />
|
||||
<x-forms.input label="Database" id="database.postgres_db" placeholder="If empty, use $USERNAME."
|
||||
readonly />
|
||||
@else
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty, use postgres." />
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required />
|
||||
<x-forms.input label="Database" id="database.postgres_db" placeholder="If empty, use $USERNAME." />
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<x-forms.input label="Initial Arguments" id="database.postgres_initdb_args"
|
||||
placeholder="If empty, use default." />
|
||||
<x-forms.input label="Host Auth Method" id="database.postgres_host_auth_method"
|
||||
placeholder="If empty, use default." />
|
||||
</form>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<div>
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Application">
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Resource">
|
||||
<x-slot:modalBody>
|
||||
<p>This application will be deleted. It is not reversible. <br>Please think again.</p>
|
||||
<p>This resource will be deleted. It is not reversible. <br>Please think again.</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<h3>Danger Zone</h3>
|
||||
<div class="">Woah. I hope you know what are you doing.</div>
|
||||
<h4 class="pt-4">Delete Application</h4>
|
||||
<h4 class="pt-4">Delete Resource</h4>
|
||||
<div class="pb-4">This will stop your containers, delete all related data, etc. Beware! There is no coming
|
||||
back!
|
||||
</div>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div>
|
||||
<h2>Destination</h2>
|
||||
<div class="">The destination server / network where your application will be deployed to.</div>
|
||||
<div class="py-4 ">
|
||||
<p>Server: {{ data_get($destination, 'server.name') }}</p>
|
||||
<p>Destination Network: {{ $destination->network }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,7 +3,9 @@
|
||||
<h3 class="text-lg font-bold">Add Environment Variable</h3>
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required />
|
||||
<x-forms.input placeholder="production" id="value" label="Value" required />
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?" />
|
||||
@if (data_get($parameters, 'application_uuid'))
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
<x-forms.button onclick="newVariable.close()" type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@@ -0,0 +1,26 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Environment Variables</h2>
|
||||
<x-forms.button class="btn" onclick="newVariable.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.shared.environment-variable.add />
|
||||
</div>
|
||||
<div>Environment (secrets) variables for this resource.</div>
|
||||
</div>
|
||||
@forelse ($resource->environment_variables as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@empty
|
||||
<div class="text-neutral-500">No environment variables found.</div>
|
||||
@endforelse
|
||||
@if ($resource->type() === 'application' && $resource->environment_variables_preview->count() > 0)
|
||||
<div>
|
||||
<h3>Preview Deployments</h3>
|
||||
<div>Environment (secrets) variables for Preview Deployments.</div>
|
||||
</div>
|
||||
@foreach ($resource->environment_variables_preview as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
@@ -8,7 +8,9 @@
|
||||
<form wire:submit.prevent='submit' class="flex flex-col items-center gap-2 xl:flex-row">
|
||||
<x-forms.input id="env.key" />
|
||||
<x-forms.input type="password" id="env.value" />
|
||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" />
|
||||
@if (data_get($parameters, 'application_uuid'))
|
||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
@@ -7,20 +7,20 @@
|
||||
<div class="">Limit your container resources by CPU & memory.</div>
|
||||
<h3 class="pt-4">Limit CPUs</h3>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="1.5" label="Number of CPUs" id="application.limits_cpus" />
|
||||
<x-forms.input placeholder="0-2" label="CPU sets to use" id="application.limits_cpuset" />
|
||||
<x-forms.input placeholder="1024" label="CPU Weight" id="application.limits_cpu_shares" />
|
||||
<x-forms.input placeholder="1.5" label="Number of CPUs" id="resource.limits_cpus" />
|
||||
<x-forms.input placeholder="0-2" label="CPU sets to use" id="resource.limits_cpuset" />
|
||||
<x-forms.input placeholder="1024" label="CPU Weight" id="resource.limits_cpu_shares" />
|
||||
</div>
|
||||
<h3 class="pt-4">Limit Memory</h3>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Soft Memory Limit"
|
||||
id="application.limits_memory_reservation" />
|
||||
id="resource.limits_memory_reservation" />
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Maximum Memory Limit"
|
||||
id="application.limits_memory" />
|
||||
id="resource.limits_memory" />
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Maximum Swap Limit"
|
||||
id="application.limits_memory_swap" />
|
||||
id="resource.limits_memory_swap" />
|
||||
<x-forms.input placeholder="0-100" type="number" min="0" max="100" label="Swappiness"
|
||||
id="application.limits_memory_swappiness" />
|
||||
id="resource.limits_memory_swappiness" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,19 +1,19 @@
|
||||
<div>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Storages </h2>
|
||||
<h2>Storages</h2>
|
||||
<x-helper
|
||||
helper="For Preview Deployments, storage has a <span class='text-helper'>-pr-#PRNumber</span> in their
|
||||
volume
|
||||
name, example: <span class='text-helper'>-pr-1</span>" />
|
||||
<x-forms.button class="btn" onclick="newStorage.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.application.storages.add />
|
||||
<livewire:project.shared.storages.add />
|
||||
</div>
|
||||
<div class="">Persistent storage to preserve data between deployments.</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
@forelse ($application->persistentStorages as $storage)
|
||||
<livewire:project.application.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
@forelse ($resource->persistentStorages as $storage)
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
@empty
|
||||
<div class="text-neutral-500">No storages found.</div>
|
||||
@endforelse
|
||||
@@ -0,0 +1,35 @@
|
||||
<div>
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Storage">
|
||||
<x-slot:modalBody>
|
||||
<p>This storage will be deleted <span class="font-bold text-warning">({{ $storage->name }})</span>. It is not
|
||||
reversible. <br>Please think again.</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
@if ($storage->is_readonly)
|
||||
<x-forms.input id="storage.name" label="Name" required readonly />
|
||||
<x-forms.input id="storage.host_path" label="Source Path" readonly />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required readonly />
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit" disabled>
|
||||
Update
|
||||
</x-forms.button>
|
||||
<x-forms.button isError isModal modalId="{{ $modalId }}" disabled>
|
||||
Delete
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@else
|
||||
<x-forms.input id="storage.name" label="Name" required />
|
||||
<x-forms.input id="storage.host_path" label="Source Path" />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required />
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
</x-forms.button>
|
||||
<x-forms.button isError isModal modalId="{{ $modalId }}">
|
||||
Delete
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user