Update modal input behavior and limit-reached layout
This commit is contained in:
parent
54834891fb
commit
04c92ec4bd
0
app/Http/Livewire/Server/New/ByIp.php
Normal file
0
app/Http/Livewire/Server/New/ByIp.php
Normal file
@ -90,8 +90,7 @@ class Select extends Component
|
|||||||
$this->allServices = getServiceTemplates();
|
$this->allServices = getServiceTemplates();
|
||||||
$this->services = $this->allServices->filter(function ($service, $key) {
|
$this->services = $this->allServices->filter(function ($service, $key) {
|
||||||
return str_contains(strtolower($key), strtolower($this->search));
|
return str_contains(strtolower($key), strtolower($this->search));
|
||||||
});;
|
});
|
||||||
$this->dispatch('success', 'Successfully loaded services.');
|
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="flex flex-col items-center justify-center h-screen">
|
<div class="flex flex-col items-center justify-center h-32">
|
||||||
<span class="text-xl font-bold text-white">You have reached the limit of {{ $name }} you can create.</span>
|
<span class="text-xl font-bold text-white">You have reached the limit of {{ $name }} you can create.</span>
|
||||||
<span>Please <a class="text-white underline "href="{{ route('subscription.show') }}">upgrade your
|
<span>Please <a class="text-white underline "href="{{ route('subscription.show') }}">upgrade your
|
||||||
subscription</a> to create more
|
subscription</a> to create more
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
'action' => 'delete',
|
'action' => 'delete',
|
||||||
'content' => null,
|
'content' => null,
|
||||||
])
|
])
|
||||||
<div x-data="{ modalOpen: false }" :class="{ 'z-40': modalOpen }" class="relative w-auto h-auto">
|
<div x-data="{ modalOpen: false }" :class="{ 'z-40': modalOpen }" @keydown.window.escape="modalOpen=false" class="relative w-auto h-auto">
|
||||||
@if ($content)
|
@if ($content)
|
||||||
<div @click="modalOpen=true">
|
<div @click="modalOpen=true">
|
||||||
{{ $content }}
|
{{ $content }}
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
<x-layout>
|
<x-layout>
|
||||||
<div class="flex items-start gap-2">
|
<div class="flex items-start gap-2">
|
||||||
<h1>Destinations</h1>
|
<h1>Destinations</h1>
|
||||||
<x-slide-over fullScreen closeWithX>
|
<x-modal-input buttonTitle="+ Add" title="New Destination">
|
||||||
<x-slot:title>New Destination</x-slot:title>
|
<livewire:destination.new.docker :server_id="$server_id" />
|
||||||
<x-slot:content>
|
</x-modal-input>
|
||||||
<livewire:destination.new.docker :server_id="$server_id" />
|
|
||||||
</x-slot:content>
|
|
||||||
<button @click="slideOverOpen=true" class="button">+
|
|
||||||
Add</button>
|
|
||||||
</x-slide-over>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle">Endpoints to deploy your resources.</div>
|
<div class="subtitle">Endpoints to deploy your resources.</div>
|
||||||
<div class="grid gap-2 lg:grid-cols-2">
|
<div class="grid gap-2 lg:grid-cols-2">
|
||||||
|
@ -38,8 +38,7 @@
|
|||||||
<div class="flex items-center group">
|
<div class="flex items-center group">
|
||||||
<a class="mx-4 rounded hover:no-underline"
|
<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')]) }}">
|
href="{{ route('project.resource.create', ['project_uuid' => data_get($project, 'uuid'), 'environment_name' => data_get($project, 'environments.0.name', 'production')]) }}">
|
||||||
<span
|
<span class="p-2 font-bold on-box">+
|
||||||
class="p-2 font-bold on-box">+
|
|
||||||
Add Resource</span>
|
Add Resource</span>
|
||||||
</a>
|
</a>
|
||||||
<a class="mx-4"
|
<a class="mx-4"
|
||||||
@ -59,18 +58,11 @@
|
|||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<div class='font-bold text-warning'>No projects found.</div>
|
<div class='font-bold dark:text-warning'>No projects found.</div>
|
||||||
<div class="flex gap-1">Add your first project
|
<div class="flex items-center gap-1">
|
||||||
<div>
|
<x-modal-input buttonTitle="Add" title="New Project">
|
||||||
<x-slide-over fullScreen closeWithX>
|
<livewire:project.add-empty />
|
||||||
<x-slot:title>New Project</x-slot:title>
|
</x-modal-input> your first project or
|
||||||
<x-slot:content>
|
|
||||||
<livewire:project.add-empty />
|
|
||||||
</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.
|
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a> page.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -111,78 +103,69 @@
|
|||||||
@else
|
@else
|
||||||
@if ($private_keys->count() === 0)
|
@if ($private_keys->count() === 0)
|
||||||
<div class="flex flex-col gap-1">
|
<div class="flex flex-col gap-1">
|
||||||
<div class='font-bold text-warning'>No private keys found.</div>
|
<div class='font-bold dark:text-warning'>No private keys found.</div>
|
||||||
<div class="flex gap-1">Before you can add your server, first add a private key
|
<div class="flex items-center gap-1">Before you can add your server, first <x-modal-input
|
||||||
<div>
|
buttonTitle="add" title="New Private Key">
|
||||||
<x-slide-over fullScreen closeWithX>
|
<livewire:security.private-key.create from="server" />
|
||||||
<x-slot:title>New Private Key</x-slot:title>
|
</x-modal-input> a private key
|
||||||
<x-slot:content>
|
or
|
||||||
<livewire:security.private-key.create from="server" />
|
|
||||||
</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>
|
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||||
page.
|
page.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div class="flex gap-1">
|
<div class="flex gap-1">
|
||||||
<span class='font-bold text-warning'>No servers found.</span> Add your first server
|
<span class='font-bold text-warning'>No servers found.</span>
|
||||||
<div>
|
<x-modal-input buttonTitle="Add"
|
||||||
<x-slide-over fullScreen closeWithX>
|
title="New Server">
|
||||||
<x-slot:title>New Server</x-slot:title>
|
<livewire:server.create />
|
||||||
<x-slot:content>
|
</x-modal-input> your first server
|
||||||
<livewire:server.create />
|
or
|
||||||
</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>
|
go to the <a class="underline dark:text-white" href="{{ route('onboarding') }}">onboarding</a>
|
||||||
page.
|
page.
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
<div class="flex items-center gap-2">
|
@if ($servers->count() > 0 && $projects->count() > 0)
|
||||||
<h3 class="py-4">Deployments</h3>
|
<div class="flex items-center gap-2">
|
||||||
@if (count($deployments_per_server) > 0)
|
<h3 class="py-4">Deployments</h3>
|
||||||
<x-loading />
|
@if (count($deployments_per_server) > 0)
|
||||||
@endif
|
<x-loading />
|
||||||
<x-forms.button wire:click='cleanup_queue'>Cleanup Queues</x-forms.button>
|
@endif
|
||||||
</div>
|
<x-forms.button wire:click='cleanup_queue'>Cleanup Queues</x-forms.button>
|
||||||
<div wire:poll.1000ms="get_deployments" class="grid grid-cols-1">
|
</div>
|
||||||
@forelse ($deployments_per_server as $server_name => $deployments)
|
<div wire:poll.1000ms="get_deployments" class="grid grid-cols-1">
|
||||||
<h4 class="py-4">{{ $server_name }}</h4>
|
@forelse ($deployments_per_server as $server_name => $deployments)
|
||||||
<div class="grid grid-cols-1 gap-2 lg:grid-cols-3">
|
<h4 class="py-4">{{ $server_name }}</h4>
|
||||||
@foreach ($deployments as $deployment)
|
<div class="grid grid-cols-1 gap-2 lg:grid-cols-3">
|
||||||
<a href="{{ data_get($deployment, 'deployment_url') }}" @class([
|
@foreach ($deployments as $deployment)
|
||||||
'gap-2 cursor-pointer box group border-l-2 border-dotted',
|
<a href="{{ data_get($deployment, 'deployment_url') }}" @class([
|
||||||
'dark:border-coolgray-300' => data_get($deployment, 'status') === 'queued',
|
'gap-2 cursor-pointer box group border-l-2 border-dotted',
|
||||||
'border-yellow-500' => data_get($deployment, 'status') === 'in_progress',
|
'dark:border-coolgray-300' => data_get($deployment, 'status') === 'queued',
|
||||||
])>
|
'border-yellow-500' => data_get($deployment, 'status') === 'in_progress',
|
||||||
<div class="flex flex-col mx-6">
|
])>
|
||||||
<div class="box-title">
|
<div class="flex flex-col mx-6">
|
||||||
{{ data_get($deployment, 'application_name') }}
|
<div class="box-title">
|
||||||
</div>
|
{{ data_get($deployment, 'application_name') }}
|
||||||
@if (data_get($deployment, 'pull_request_id') !== 0)
|
</div>
|
||||||
<div class="box-description">
|
@if (data_get($deployment, 'pull_request_id') !== 0)
|
||||||
PR #{{ data_get($deployment, 'pull_request_id') }}
|
<div class="box-description">
|
||||||
|
PR #{{ data_get($deployment, 'pull_request_id') }}
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
<div class="box-description">
|
||||||
|
{{ str(data_get($deployment, 'status'))->headline() }}
|
||||||
</div>
|
</div>
|
||||||
@endif
|
|
||||||
<div class="box-description">
|
|
||||||
{{ str(data_get($deployment, 'status'))->headline() }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="flex-1"></div>
|
||||||
<div class="flex-1"></div>
|
</a>
|
||||||
</a>
|
@endforeach
|
||||||
@endforeach
|
</div>
|
||||||
</div>
|
@empty
|
||||||
@empty
|
<div>No deployments running.</div>
|
||||||
<div>No deployments running.</div>
|
@endforelse
|
||||||
@endforelse
|
</div>
|
||||||
</div>
|
@endif
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -1,17 +1,11 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="flex items-start gap-2">
|
<div class="flex items-start gap-2">
|
||||||
<h1>Servers</h1>
|
<h1>Servers</h1>
|
||||||
<x-slide-over fullScreen closeWithX>
|
<x-modal-input buttonTitle="+ Add" title="New Server">
|
||||||
<x-slot:title>New Server</x-slot:title>
|
<livewire:server.create />
|
||||||
<x-slot:content>
|
</x-modal-input>
|
||||||
<livewire:server.create />
|
|
||||||
</x-slot:content>
|
|
||||||
<button @click="slideOverOpen=true" class="button">+
|
|
||||||
Add</button>
|
|
||||||
</x-slide-over>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="subtitle">All your servers are here.</div>
|
<div class="subtitle">All your servers are here.</div>
|
||||||
|
|
||||||
<div class="grid gap-2 lg:grid-cols-2">
|
<div class="grid gap-2 lg:grid-cols-2">
|
||||||
@forelse ($servers as $server)
|
@forelse ($servers as $server)
|
||||||
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
<a href="{{ route('server.show', ['server_uuid' => data_get($server, 'uuid')]) }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user