ui: update resource operations view

This commit is contained in:
Andras Bacsai 2024-05-02 09:49:10 +02:00
parent d1ab14966b
commit 139e258664

View File

@ -1,21 +1,18 @@
<div> <div>
<h2>Resource Operations</h2> <h2>Resource Operations</h2>
<div class="pb-4">You can easily make different kind of operations on this resource.</div> <div class="pb-4">You can easily make different kind of operations on this resource.</div>
<h4>Clone</h4> <h3>Clone</h3>
<div class="pb-8"> <div class="pb-4">To another project / environment on a different server.</div>
<div class="pb-2"> <div class="pb-4">
Clone this resource to another project / environment. <div class="flex flex-col flex-wrap gap-2">
</div>
<div class="flex flex-col">
@foreach ($servers->sortBy('id') as $server) @foreach ($servers->sortBy('id') as $server)
<div> <h5>Server: <span class="font-bold text-white">{{ $server->name }}</span></h5>
<div class="grid grid-cols-1 gap-2 pb-4 lg:grid-cols-4">
@foreach ($server->destinations() as $destination) @foreach ($server->destinations() as $destination)
<x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})"> <x-modal-confirmation action="cloneTo({{ data_get($destination, 'id') }})">
<x:slot name="content"> <x:slot name="content">
<div class="box"> <div class="box group">
<div class="flex flex-col"> <div class="flex flex-col">
<div class="box-title">{{ $server->name }}</div> <div class="box-title">Network</div>
<div class="box-description">{{ $destination->name }}</div> <div class="box-description">{{ $destination->name }}</div>
</div> </div>
</div> </div>
@ -23,36 +20,34 @@
<div>You are about to clone this resource.</div> <div>You are about to clone this resource.</div>
</x-modal-confirmation> </x-modal-confirmation>
@endforeach @endforeach
</div>
</div>
@endforeach @endforeach
</div> </div>
</div> </div>
<h4>Move</h4> <h3>Move</h3>
<div class="pb-4">Between projects / environments.</div>
<div> <div>
<div class="pb-8"> <div class="pb-2">
This resource is currently in the <span This resource is currently in the <span
class="font-bold dark:text-warning">{{ $resource->environment->project->name }} / class="font-bold dark:text-warning">{{ $resource->environment->project->name }} /
{{ $resource->environment->name }}</span> environment. {{ $resource->environment->name }}</span> environment.
</div> </div>
<div class="flex flex-wrap gap-2"> <div class="flex flex-col flex-wrap gap-2">
@forelse ($projects as $project) @forelse ($projects as $project)
<div class="flex flex-wrap gap-2"> <h5>Project: <span class="font-bold text-white">{{ $project->name }}</span></h5>
@foreach ($project->environments as $environment) @foreach ($project->environments as $environment)
<x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})"> <x-modal-confirmation action="moveTo({{ data_get($environment, 'id') }})">
<x:slot name="content"> <x:slot name="content">
<div class="box"> <div class="box group">
<div class="flex flex-col"> <div class="flex flex-col">
<div class="box-title">{{ $project->name }}</div> <div class="box-title">Environment</div>
<div class="box-description">environment: {{ $environment->name }} <div class="box-description">{{ $environment->name }}</div>
</div>
</div> </div>
</div> </div>
</x:slot> </x:slot>
<div>You are about to move this resource.</div> <div>You are about to move this resource.</div>
</x-modal-confirmation> </x-modal-confirmation>
@endforeach @endforeach
</div>
@empty @empty
<div>No projects found to move to</div> <div>No projects found to move to</div>
@endforelse @endforelse