mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-04 20:52:05 +00:00
Refactor code and update UI components
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre>
|
||||
</div>
|
||||
@else
|
||||
@if (isset($showWaiting))
|
||||
@if ($showWaiting)
|
||||
<x-loading text="Waiting..." />
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -16,48 +16,51 @@
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="pb-4">Projects</h3>
|
||||
|
||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||
@forelse ($projects as $project)
|
||||
<div class="gap-2 border border-transparent cursor-pointer box group">
|
||||
@if (data_get($project, 'environments')->count() === 1)
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<div class="box-title">{{ $project->name }}</div>
|
||||
<div class="box-description">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
@else
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<div class="box-title">{{ $project->name }}</div>
|
||||
<div class="box-description">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
@endif
|
||||
<div class="flex items-center group">
|
||||
<a class="mx-4 rounded hover:no-underline"
|
||||
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<span
|
||||
class="p-2 font-bold group-hover:dark:text-white group-hover:text-black dark:hover:bg-coollabs hover:bg-neutral-300">+
|
||||
Add Resource</span>
|
||||
</a>
|
||||
<a class="mx-4 rounded group-hover:dark:text-white group-hover:text-black"
|
||||
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:bg-coollabs" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
|
||||
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
||||
</svg>
|
||||
</a>
|
||||
@if ($projects->count() > 0)
|
||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||
@foreach ($projects as $project)
|
||||
<div class="gap-2 border border-transparent cursor-pointer box group">
|
||||
@if (data_get($project, 'environments')->count() === 1)
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.resource.index', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<div class="box-title">{{ $project->name }}</div>
|
||||
<div class="box-description">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
@else
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<div class="box-title">{{ $project->name }}</div>
|
||||
<div class="box-description">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
@endif
|
||||
<div class="flex items-center group">
|
||||
<a class="mx-4 rounded hover:no-underline"
|
||||
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||
<span
|
||||
class="p-2 font-bold group-hover:dark:text-white group-hover:text-black dark:hover:bg-coollabs hover:bg-neutral-300">+
|
||||
Add Resource</span>
|
||||
</a>
|
||||
<a class="mx-4 rounded group-hover:dark:text-white group-hover:text-black"
|
||||
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:bg-coollabs" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
|
||||
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div class="flex gap-1">
|
||||
<span class='font-bold text-warning'>No projects found.</span> Add your first project
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class='font-bold text-warning'>No projects found.</div>
|
||||
<div class="flex gap-1">Add your first project
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Project</x-slot:title>
|
||||
@@ -70,41 +73,46 @@
|
||||
</div> or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a> page.
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<h3 class="py-4">Servers</h3>
|
||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||
@forelse ($servers as $server)
|
||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||
@class([
|
||||
'gap-2 border cursor-pointer box group',
|
||||
'border-transparent' => $server->settings->is_reachable,
|
||||
'border-red-500' => !$server->settings->is_reachable,
|
||||
])>
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="box-title">
|
||||
{{ $server->name }}
|
||||
@if ($servers->count() > 0)
|
||||
<div class="grid grid-cols-1 gap-2 xl:grid-cols-2">
|
||||
@foreach ($servers as $server)
|
||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||
@class([
|
||||
'gap-2 border cursor-pointer box group',
|
||||
'border-transparent' => $server->settings->is_reachable,
|
||||
'border-red-500' => !$server->settings->is_reachable,
|
||||
])>
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="box-title">
|
||||
{{ $server->name }}
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $server->description }}</div>
|
||||
<div class="flex gap-1 text-xs text-error">
|
||||
@if (!$server->settings->is_reachable)
|
||||
<span>Not reachable</span>
|
||||
@endif
|
||||
@if (!$server->settings->is_reachable && !$server->settings->is_usable)
|
||||
&
|
||||
@endif
|
||||
@if (!$server->settings->is_usable)
|
||||
<span>Not usable by Coolify</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $server->description }}</div>
|
||||
<div class="flex gap-1 text-xs text-error">
|
||||
@if (!$server->settings->is_reachable)
|
||||
<span>Not reachable</span>
|
||||
@endif
|
||||
@if (!$server->settings->is_reachable && !$server->settings->is_usable)
|
||||
&
|
||||
@endif
|
||||
@if (!$server->settings->is_usable)
|
||||
<span>Not usable by Coolify</span>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-1"></div>
|
||||
</a>
|
||||
@empty
|
||||
@if ($private_keys->count() === 0)
|
||||
<div class="flex gap-1">
|
||||
<span class='font-bold text-warning'>No private keys found.</span> Before you can add your server, first add a private key
|
||||
<div class="flex-1"></div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
@if ($private_keys->count() === 0)
|
||||
<div class="flex flex-col gap-1">
|
||||
<div class='font-bold text-warning'>No private keys found.</div>
|
||||
<div class="flex gap-1">Before you can add your server, first add a private key
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Private Key</x-slot:title>
|
||||
@@ -118,25 +126,25 @@
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||
page.
|
||||
</div>
|
||||
@else
|
||||
<div class="flex gap-1">
|
||||
<span class='font-bold text-warning'>No servers found.</span> Add your first server
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Server</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:server.create />
|
||||
</x-slot:content>
|
||||
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
|
||||
</div>
|
||||
</x-slide-over>
|
||||
</div> or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||
page.
|
||||
</div>
|
||||
@endif
|
||||
@endforelse
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="flex gap-1">
|
||||
<span class='font-bold text-warning'>No servers found.</span> Add your first server
|
||||
<div>
|
||||
<x-slide-over fullScreen closeWithX>
|
||||
<x-slot:title>New Server</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:server.create />
|
||||
</x-slot:content>
|
||||
<div class="underline cursor-pointer dark:text-white" @click="slideOverOpen=true">here
|
||||
</div>
|
||||
</x-slide-over>
|
||||
</div> or
|
||||
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||
page.
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
<div class="flex items-center gap-2">
|
||||
<h3 class="py-4">Deployments</h3>
|
||||
@if (count($deployments_per_server) > 0)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<div>
|
||||
<h1>Create a new Destination</h1>
|
||||
<div class="subtitle ">Destinations are used to segregate resources by network.</div>
|
||||
<div class="subtitle">Destinations are used to segregate resources by network.</div>
|
||||
<form class="flex flex-col gap-4" wire:submit='submit'>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input id="name" label="Name" required />
|
||||
<x-forms.input id="network" label="Network" required />
|
||||
</div>
|
||||
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
||||
<option disabled>Select a server</option>
|
||||
@foreach ($servers as $server)
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
{{-- <x-forms.checkbox type="checkbox" id="is_swarm" label="Is it a Swarm network?" /> --}}
|
||||
@if ($server_id)
|
||||
<x-forms.select id="server_id" label="Select a server" required wire:change="generate_name">
|
||||
<option disabled>Select a server</option>
|
||||
@foreach ($servers as $server)
|
||||
<option value="{{ $server->id }}">{{ $server->name }}</option>
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
@endif
|
||||
<x-forms.button type="submit">
|
||||
Continue
|
||||
</x-forms.button>
|
||||
|
||||
@@ -2,24 +2,28 @@
|
||||
@if ($server->isFunctional())
|
||||
<div class="flex items-end gap-2">
|
||||
<h2>Destinations</h2>
|
||||
<a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
|
||||
<x-forms.button>Add a new destination</x-forms.button>
|
||||
</a>
|
||||
<x-forms.button wire:click='scan'>Scan destinations on the server</x-forms.button>
|
||||
<x-slide-over>
|
||||
<x-slot:title>New Destination</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:destination.new.docker :server_id="$server->id" />
|
||||
</x-slot:content>
|
||||
<button @click="slideOverOpen=true" class="button">+
|
||||
Add</button>
|
||||
</x-slide-over>
|
||||
|
||||
<x-forms.button wire:click='scan'>Scan Destinations</x-forms.button>
|
||||
</div>
|
||||
<div class="pt-2 pb-6 ">Destinations are used to segregate resources by network.</div>
|
||||
<div class="flex gap-2 ">
|
||||
Available for using:
|
||||
@forelse ($server->standaloneDockers as $docker)
|
||||
<a
|
||||
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
||||
<a href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
||||
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
||||
</a>
|
||||
@empty
|
||||
@endforelse
|
||||
@forelse ($server->swarmDockers as $docker)
|
||||
<a
|
||||
href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
||||
<a href="{{ route('destination.show', ['destination_uuid' => data_get($docker, 'uuid')]) }}">
|
||||
<button class="text-white btn-link">{{ data_get($docker, 'network') }} </button>
|
||||
</a>
|
||||
@empty
|
||||
@@ -31,12 +35,9 @@
|
||||
@endif
|
||||
<div class="flex flex-wrap gap-2 ">
|
||||
@foreach ($networks as $network)
|
||||
<div>
|
||||
<a
|
||||
href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
|
||||
<x-forms.button>+<x-highlighted text="{{ data_get($network, 'Name') }}" />
|
||||
</x-forms.button>
|
||||
</a>
|
||||
<div class="min-w-fit">
|
||||
<x-forms.button wire:click="add('{{ data_get($network, 'Name') }}')">Add
|
||||
{{ data_get($network, 'Name') }}</x-forms.button>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,22 @@
|
||||
<div>
|
||||
@if (data_get(auth()->user(), 'is_notification_sponsorship_enabled'))
|
||||
<div x-data="{
|
||||
popups: {
|
||||
sponsorship: true,
|
||||
notification: true
|
||||
},
|
||||
init() {
|
||||
this.popups.sponsorship = localStorage.getItem('popupSponsorship') !== 'false';
|
||||
this.popups.notification = localStorage.getItem('popupNotification') !== 'false';
|
||||
}
|
||||
}">
|
||||
<span x-show="popups.sponsorship">
|
||||
<x-popup>
|
||||
<x-slot:title>
|
||||
Love Coolify as we do?
|
||||
</x-slot:title>
|
||||
<x-slot:icon>
|
||||
<img src="https://cdn-icons-png.flaticon.com/512/8236/8236748.png"
|
||||
class="w-8 h-8 sm:w-12 sm:h-12 lg:w-16 lg:h-16">
|
||||
</x-slot:icon>
|
||||
<x-slot:description>
|
||||
<span>Please
|
||||
consider donating on <a href="https://github.com/sponsors/coollabsio"
|
||||
@@ -12,23 +25,11 @@
|
||||
<span>It enables us to keep creating features without paywalls, ensuring our work remains free and
|
||||
open.</span>
|
||||
</x-slot:description>
|
||||
<x-slot:button-text wire:click='disableSponsorship'>
|
||||
<x-slot:button-text @click="disableSponsorship()">
|
||||
Disable This Popup
|
||||
</x-slot:button-text>
|
||||
</x-popup>
|
||||
{{-- <div class="toast">
|
||||
<div class="flex flex-col text-white rounded alert-error bg-coolgray-200">
|
||||
<span>Love Coolify as we do? <a href="https://coolify.io/sponsorships"
|
||||
class="underline text-warning">Please
|
||||
consider donating!</a>💜</span>
|
||||
<span>It enables us to keep creating features without paywalls, ensuring our work remains free and
|
||||
open.</span>
|
||||
<x-forms.button class="bg-coolgray-400" wire:click='disableSponsorship'>Disable This
|
||||
Popup</x-forms.button>
|
||||
</div>
|
||||
</div> --}}
|
||||
@endif
|
||||
{{-- <x-popup /> --}}
|
||||
</span>
|
||||
@if (currentTeam()->serverOverflow())
|
||||
<x-banner :closable=false>
|
||||
<div><span class="font-bold text-red-500">WARNING:</span> The number of active servers exceeds the limit
|
||||
@@ -39,17 +40,38 @@
|
||||
</x-banner>
|
||||
@endif
|
||||
@if (!currentTeam()->isAnyNotificationEnabled())
|
||||
<div class="toast">
|
||||
<div class="flex flex-col text-white rounded alert-error bg-coolgray-200">
|
||||
<span><span class="font-bold text-red-500">WARNING:</span> No notifications enabled.<br><br> It is
|
||||
<span x-show="popups.notification">
|
||||
<x-popup>
|
||||
<x-slot:title>
|
||||
No notifications enabled.
|
||||
</x-slot:title>
|
||||
<x-slot:icon>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="text-red-500 stroke-current w-14 h-14 shrink-0"
|
||||
fill="none" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
||||
</svg>
|
||||
</x-slot:icon>
|
||||
<x-slot:description>
|
||||
It is
|
||||
highly recommended to enable at least
|
||||
one
|
||||
notification channel to receive important alerts.<br>Visit <a
|
||||
href="{{ route('notification.index') }}" class="text-white underline">/notification</a> to
|
||||
enable notifications.</span>
|
||||
<x-forms.button class="bg-coolgray-400" wire:click='disableNotifications'>Disable This
|
||||
Popup</x-forms.button>
|
||||
</div>
|
||||
</div>
|
||||
</x-slot:description>
|
||||
<x-slot:button-text @click="disableNotification()">
|
||||
Accept and Close
|
||||
</x-slot:button-text>
|
||||
</x-popup>
|
||||
</span>
|
||||
@endif
|
||||
<script>
|
||||
function disableSponsorship() {
|
||||
localStorage.setItem('popupSponsorship', false);
|
||||
}
|
||||
function disableNotification() {
|
||||
localStorage.setItem('popupNotification', false);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -5,20 +5,20 @@
|
||||
href="{{ route('project.application.configuration', $parameters) }}">
|
||||
<button>Configuration</button>
|
||||
</a>
|
||||
@if (!$application->destination->server->isSwarm())
|
||||
<a class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.command', $parameters) }}">
|
||||
<button>Execute Command</button>
|
||||
</a>
|
||||
@endif
|
||||
<a class="{{ request()->routeIs('project.application.logs') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.logs', $parameters) }}">
|
||||
<button>Logs</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('project.application.deployment.index') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.deployment.index', $parameters) }}">
|
||||
<button>Deployments</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('project.application.logs') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.logs', $parameters) }}">
|
||||
<button>Logs</button>
|
||||
</a>
|
||||
@if (!$application->destination->server->isSwarm())
|
||||
<a class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.command', $parameters) }}">
|
||||
<button>Command</button>
|
||||
</a>
|
||||
@endif
|
||||
<x-applications.links :application="$application" />
|
||||
<div class="flex-1"></div>
|
||||
@if ($application->build_pack === 'dockercompose' && is_null($application->docker_compose_raw))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div>
|
||||
<form wire:submit="submit">
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input id="filename" label="Filename" />
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button isError wire:click.prevent="delete">Delete</x-forms.button>
|
||||
</div>
|
||||
<x-forms.textarea id="content" label="Content" />
|
||||
</form>
|
||||
</div>
|
||||
<form wire:submit="submit">
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input id="filename" label="Filename" />
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
||||
This script will be deleted. It is not reversible. <br>Please think again.
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
<x-forms.textarea id="content" label="Content" />
|
||||
</form>
|
||||
|
||||
@@ -82,7 +82,21 @@
|
||||
<div class="pb-16">
|
||||
<div class="flex gap-2 pt-4 pb-2">
|
||||
<h3>Initialization scripts</h3>
|
||||
<x-forms.button onclick="newInitScript.showModal()">+ Add</x-forms.button>
|
||||
<x-slide-over>
|
||||
<x-slot:title>New Init Script</x-slot:title>
|
||||
<x-slot:content>
|
||||
<form class="flex flex-col gap-2 rounded modal-box" wire:submit='save_new_init_script'>
|
||||
<x-forms.input placeholder="create_test_db.sql" id="new_filename" label="Filename" required />
|
||||
<x-forms.textarea placeholder="CREATE DATABASE test;" id="new_content" label="Content"
|
||||
required />
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</form>
|
||||
</x-slot:content>
|
||||
<button @click="slideOverOpen=true" class="button">+
|
||||
Add</button>
|
||||
</x-slide-over>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2">
|
||||
@forelse(data_get($database,'init_scripts', []) as $script)
|
||||
|
||||
@@ -11,47 +11,41 @@
|
||||
</x-slide-over>
|
||||
</div>
|
||||
<div class="subtitle">All your projects are here.</div>
|
||||
<div class="grid gap-2 lg:grid-cols-2">
|
||||
@if ($servers === 0)
|
||||
<div>
|
||||
<div>No servers found. Without a server, you won't be able to do much.</div>
|
||||
<x-use-magic-bar link="/servers" />
|
||||
</div>
|
||||
@else
|
||||
@forelse ($projects as $project)
|
||||
<div class="gap-2 border border-transparent cursor-pointer box group" x-data
|
||||
x-on:click="goto('{{ $project->uuid }}')">
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<div class="font-bold text-white">{{ $project->name }}</div>
|
||||
<div class="description ">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
<div class="flex items-center">
|
||||
<a class="mx-4 rounded group-hover:text-white"
|
||||
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
|
||||
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div>
|
||||
<div>No project found.</div>
|
||||
</div>
|
||||
@endforelse
|
||||
@endif
|
||||
|
||||
<script>
|
||||
function goto(uuid) {
|
||||
window.location.href = '/project/' + uuid;
|
||||
}
|
||||
</script>
|
||||
<div class="grid gap-2 lg:grid-cols-2">
|
||||
@forelse ($projects as $project)
|
||||
<div class="gap-2 border border-transparent cursor-pointer box group" x-data
|
||||
x-on:click="goto('{{ $project->uuid }}')">
|
||||
<a class="flex flex-col flex-1 mx-6 hover:no-underline"
|
||||
href="{{ route('project.show', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<div class="font-bold text-white">{{ $project->name }}</div>
|
||||
<div class="description ">
|
||||
{{ $project->description }}</div>
|
||||
</a>
|
||||
<div class="flex items-center">
|
||||
<a class="mx-4 rounded group-hover:text-white"
|
||||
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-warning" viewBox="0 0 24 24"
|
||||
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
|
||||
stroke-linejoin="round">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path
|
||||
d="M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z" />
|
||||
<path d="M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0" />
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<div>
|
||||
<div>No project found.</div>
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function goto(uuid) {
|
||||
window.location.href = '/project/' + uuid;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
<div class="pb-4 ">Deploy resources, like Applications, Databases, Services...</div>
|
||||
<div class="flex flex-col gap-4 pt-10">
|
||||
@if ($current_step === 'type')
|
||||
{{-- <ul class="pb-10 steps">
|
||||
<li class="step step-secondary">Select Resource Type</li>
|
||||
<li class="step">Select a Server</li>
|
||||
<li class="step">Select a Destination</li>
|
||||
</ul> --}}
|
||||
<h2>Applications</h2>
|
||||
<div class="grid justify-start grid-cols-1 gap-4 text-left xl:grid-cols-3">
|
||||
<x-resource-view wire="setType('public')">
|
||||
@@ -252,20 +247,8 @@
|
||||
companies, and use of them does not imply any affiliation or endorsement.</div>
|
||||
@endif
|
||||
@if ($current_step === 'servers')
|
||||
{{-- <ul class="pb-10 steps">
|
||||
<li class="step step-secondary">Select Resource Type</li>
|
||||
<li class="step step-secondary">Select a Server</li>
|
||||
<li class="step">Select a Destination</li>
|
||||
</ul> --}}
|
||||
|
||||
{{-- @if ($isDatabase)
|
||||
<div class="flex items-center justify-center pt-4">
|
||||
<x-forms.checkbox instantSave wire:model="includeSwarm"
|
||||
helper="Swarm clusters are excluded from this list by default. For database, services or complex compose deployments with databases to work with Swarm,
|
||||
you need to set a few things on the server. Read more <a class='text-white underline' href='https://coolify.io/docs/docker/swarm#database-requirements' target='_blank'>here</a>."
|
||||
label="Include Swarm Clusters" />
|
||||
</div>
|
||||
@endif --}}
|
||||
<h2>Select a server</h2>
|
||||
<div class="pb-5"></div>
|
||||
<div class="flex flex-col justify-center gap-4 text-left xl:flex-row xl:flex-wrap">
|
||||
@forelse($servers as $server)
|
||||
<div class="w-64 box group" wire:click="setServer({{ $server }})">
|
||||
@@ -282,8 +265,6 @@
|
||||
<div>No validated & reachable servers found. <a class="text-white underline" href="/servers">
|
||||
Go to servers page
|
||||
</a></div>
|
||||
|
||||
<x-use-magic-bar link="/servers" />
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
@@ -293,12 +274,9 @@
|
||||
@endif --}}
|
||||
@endif
|
||||
@if ($current_step === 'destinations')
|
||||
{{-- <ul class="pb-10 steps">
|
||||
<li class="step step-secondary">Select Resource Type</li>
|
||||
<li class="step step-secondary">Select a Server</li>
|
||||
<li class="step step-secondary">Select a Destination</li>
|
||||
</ul> --}}
|
||||
|
||||
<h2>Select a destination</h2>
|
||||
<div>Destinations are used to segregate resources by network. If you are unsure, select the default
|
||||
Standalone Docker (coolify).</div>
|
||||
<div class="flex flex-col justify-center gap-4 text-left xl:flex-row xl:flex-wrap">
|
||||
@if ($server->isSwarm())
|
||||
@foreach ($swarmDockers as $swarmDocker)
|
||||
@@ -323,14 +301,6 @@
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
<a href="{{ route('destination.new', ['server_id' => $server_id]) }}"
|
||||
class="items-center justify-center text-center box-without-bg group bg-coollabs hover:bg-coollabs-100">
|
||||
<div class="flex flex-col mx-6 ">
|
||||
<div class="font-bold text-white">
|
||||
+ Add New
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@if ($current_step === 'existing-postgresql')
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
</x-slot:content>
|
||||
<button @click="slideOverOpen=true" class="button">+ Add</button>
|
||||
</x-slide-over>
|
||||
{{-- <x-forms.button onclick="newStorage.showModal()">+ Add</x-forms.button> --}}
|
||||
</div>
|
||||
<div class="pb-4">Persistent storage to preserve data between deployments.</div>
|
||||
@if ($resource->persistentStorages()->get()->count() === 0 && $resource->fileStorages()->get()->count() == 0)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<form class="flex flex-col gap-2 rounded" wire:submit='submit'>
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required />
|
||||
<x-forms.textarea x-show="$wire.is_multiline === true" x-cloak id="value" label="Value" required />
|
||||
<x-forms.input x-show="$wire.is_multiline === false" x-cloak placeholder="production" id="value" x-bind:label="$wire.is_multiline === false && 'Value'" required />
|
||||
<x-forms.input x-show="$wire.is_multiline === false" x-cloak placeholder="production" id="value"
|
||||
x-bind:label="$wire.is_multiline === false && 'Value'" required />
|
||||
@if (data_get($parameters, 'application_uuid'))
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
<x-forms.checkbox id="is_multiline" label="Is Multiline?" />
|
||||
@endif
|
||||
<x-forms.checkbox id="is_multiline" label="Is Multiline?" />
|
||||
<x-forms.button type="submit" @click="slideOverOpen=false">
|
||||
Save
|
||||
</x-forms.button>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-col gap-4">
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Environment Variables</h2>
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<div>
|
||||
<form wire:submit='submit'
|
||||
class="flex flex-col gap-2 p-4 m-2 border lg:items-center border-coolgray-300 lg:m-0 lg:p-0 lg:border-0 lg:flex-row">
|
||||
<form wire:submit='submit' class="flex flex-col items-center gap-4 p-4 border lg:items-start border-coolgray-300">
|
||||
@if ($isLocked)
|
||||
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2">
|
||||
<path d="M5 13a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6z" />
|
||||
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0-2 0m-3-5V7a4 4 0 1 1 8 0v4" />
|
||||
</g>
|
||||
</svg>
|
||||
<x-forms.input disabled id="env.key" />
|
||||
@else
|
||||
@if ($isDisabled)
|
||||
<div class="flex flex-1 w-full gap-2">
|
||||
<x-forms.input disabled id="env.key" />
|
||||
<x-forms.input disabled type="password" id="env.value" />
|
||||
@if ($env->is_shared)
|
||||
<x-forms.input disabled type="password" id="env.real_value" />
|
||||
@endif
|
||||
@if ($type !== 'service' && !$isSharedVariable)
|
||||
<x-forms.checkbox instantSave id="env.is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
@else
|
||||
@if ($env->is_multiline)
|
||||
<x-forms.input isMultiline="{{ $env->is_multiline }}" id="env.key" />
|
||||
<x-forms.textarea type="password" id="env.value" />
|
||||
@else
|
||||
<x-forms.input id="env.key" />
|
||||
<x-forms.input type="password" id="env.value" />
|
||||
@endif
|
||||
@if ($env->is_shared)
|
||||
<x-forms.input disabled type="password" id="env.real_value" />
|
||||
@else
|
||||
<x-forms.checkbox instantSave id="env.is_multiline" label="Is Multiline?" />
|
||||
@endif
|
||||
@if ($type !== 'service' && !$isSharedVariable)
|
||||
<x-forms.checkbox instantSave id="env.is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
<div class="flex gap-2">
|
||||
@if ($isLocked)
|
||||
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
|
||||
stroke-width="2">
|
||||
<path d="M5 13a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-6z" />
|
||||
<path d="M11 16a1 1 0 1 0 2 0a1 1 0 0 0-2 0m-3-5V7a4 4 0 1 1 8 0v4" />
|
||||
</g>
|
||||
</svg>
|
||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
||||
You will delete environment variable <span
|
||||
class="font-bold text-warning">{{ $env->key }}</span>.
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@else
|
||||
@if ($isDisabled)
|
||||
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
||||
<x-forms.input disabled id="env.key" />
|
||||
<x-forms.input disabled type="password" id="env.value" />
|
||||
@if ($env->is_shared)
|
||||
<x-forms.input disabled type="password" id="env.real_value" />
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
||||
@if ($env->is_multiline)
|
||||
<x-forms.input isMultiline="{{ $env->is_multiline }}" id="env.key" />
|
||||
<x-forms.textarea type="password" id="env.value" />
|
||||
@else
|
||||
<x-forms.input id="env.key" />
|
||||
<x-forms.input type="password" id="env.value" />
|
||||
@endif
|
||||
@if ($env->is_shared)
|
||||
<x-forms.input disabled type="password" id="env.real_value" />
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex flex-col w-full gap-2 lg:flex-row">
|
||||
@if ($type !== 'service' && !$isSharedVariable)
|
||||
<x-forms.checkbox instantSave id="env.is_multiline" label="Is Multiline?" />
|
||||
<x-forms.checkbox instantSave id="env.is_build_time" label="Build Variable?" />
|
||||
@endif
|
||||
<div class="flex-1"></div>
|
||||
@if ($isDisabled)
|
||||
<x-forms.button disabled type="submit">
|
||||
Update
|
||||
@@ -62,12 +62,13 @@
|
||||
<x-forms.button wire:click='lock'>
|
||||
Lock
|
||||
</x-forms.button>
|
||||
<x-modal-confirmation isErrorButton buttonTitle="Delete">
|
||||
<x-modal-confirmation buttonFullWidth isErrorButton buttonTitle="Delete">
|
||||
You will delete environment variable <span
|
||||
class="font-bold text-warning">{{ $env->key }}</span>.
|
||||
</x-modal-confirmation>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
@if ($type === 'application')
|
||||
<h1>Execute Command</h1>
|
||||
<livewire:project.application.heading :application="$resource" />
|
||||
<h2 class="pt-4">Command Details</h2>
|
||||
<h2 class="pt-4">Command</h2>
|
||||
<div class="pb-2">Run any one-shot command inside a container.</div>
|
||||
@elseif ($type === 'database')
|
||||
<h1>Execute Command</h1>
|
||||
<livewire:project.database.heading :database="$resource" />
|
||||
<h2 class="pt-4">Command Details</h2>
|
||||
<h2 class="pt-4">Command</h2>
|
||||
<div class="pb-2">Run any one-shot command inside a container.</div>
|
||||
@elseif ($type === 'service')
|
||||
<h2>Execute Command</h2>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
@if ($settings->is_resale_license_active)
|
||||
@if (auth()->user()->isAdminFromSession())
|
||||
<div>
|
||||
<div class="flex gap-2">
|
||||
<h1>Choose a Plan</h1>
|
||||
@if (subscriptionProvider() === 'stripe' && $alreadySubscribed)
|
||||
<x-forms.button wire:click='stripeCustomerPortal'>Manage My Subscription</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@if (request()->query->get('cancelled'))
|
||||
<div class="mb-6 rounded alert-error">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>Something went wrong with your subscription. Please try again or contact
|
||||
support.</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (config('subscription.provider') !== null)
|
||||
<livewire:subscription.pricing-plans />
|
||||
<div>
|
||||
<div class="flex gap-2">
|
||||
<h1>Choose a Plan</h1>
|
||||
@if (subscriptionProvider() === 'stripe' && $alreadySubscribed)
|
||||
<x-forms.button wire:click='stripeCustomerPortal'>Manage My Subscription</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
@if (request()->query->get('cancelled'))
|
||||
<div class="mb-6 rounded alert-error">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
|
||||
viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
|
||||
d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" />
|
||||
</svg>
|
||||
<span>Something went wrong with your subscription. Please try again or contact
|
||||
support.</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (config('subscription.provider') !== null)
|
||||
<livewire:subscription.pricing-plans />
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div class="flex flex-col justify-center mx-10">
|
||||
<div class="flex gap-2">
|
||||
<h1>Subscription</h1>
|
||||
</div>
|
||||
<div>You are not an admin or have been removed from this team. If this does not make sense, please <span
|
||||
class="text-white underline cursor-pointer" wire:click="help" onclick="help.showModal()">contact
|
||||
class="text-white underline cursor-pointer" wire:click="help">contact
|
||||
us</span>.</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user