2023-09-22 09:23:49 +00:00
|
|
|
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }">
|
|
|
|
<livewire:project.service.navbar :service="$service" :parameters="$parameters" :query="$query" />
|
|
|
|
<div class="flex h-full pt-6">
|
|
|
|
<div class="flex flex-col gap-4 min-w-fit">
|
2023-09-22 12:47:25 +00:00
|
|
|
<a class="{{ request()->routeIs('project.service') ? 'text-white' : '' }}"
|
|
|
|
href="{{ route('project.service', [...$parameters, 'service_name' => null]) }}">
|
|
|
|
<button><- Back</button>
|
|
|
|
</a>
|
2023-09-22 09:23:49 +00:00
|
|
|
<a :class="activeTab === 'general' && 'text-white'"
|
|
|
|
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
|
|
|
<a :class="activeTab === 'storages' && 'text-white'"
|
2023-09-25 15:14:19 +00:00
|
|
|
@click.prevent="activeTab = 'storages'; window.location.hash = 'storages'" href="#">Storages
|
2023-09-22 09:23:49 +00:00
|
|
|
</a>
|
2023-10-02 11:38:16 +00:00
|
|
|
@if (data_get($parameters, 'service_name'))
|
|
|
|
<a class="{{ request()->routeIs('project.service.logs') ? 'text-white' : '' }}"
|
|
|
|
href="{{ route('project.service.logs', $parameters) }}">
|
|
|
|
<button>Logs</button>
|
|
|
|
</a>
|
|
|
|
@endif
|
2023-09-22 09:23:49 +00:00
|
|
|
</div>
|
|
|
|
<div class="w-full pl-8">
|
|
|
|
@isset($serviceApplication)
|
|
|
|
<div x-cloak x-show="activeTab === 'general'" class="h-full">
|
|
|
|
<livewire:project.service.application :application="$serviceApplication" />
|
|
|
|
</div>
|
|
|
|
<div x-cloak x-show="activeTab === 'storages'">
|
|
|
|
<livewire:project.shared.storages.all :resource="$serviceApplication" />
|
2023-09-27 10:45:53 +00:00
|
|
|
@if ($serviceApplication->fileStorages()->get()->count() > 0)
|
|
|
|
<h3 class="py-4">Mounted Files (binds)</h3>
|
|
|
|
<div class="flex flex-col gap-4">
|
2023-09-29 19:38:11 +00:00
|
|
|
@foreach ($serviceApplication->fileStorages()->get()->sort() as $fileStorage)
|
2023-09-27 10:45:53 +00:00
|
|
|
<livewire:project.service.file-storage :fileStorage="$fileStorage" wire:key="{{ $loop->index }}" />
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-09-22 09:23:49 +00:00
|
|
|
</div>
|
|
|
|
@endisset
|
|
|
|
@isset($serviceDatabase)
|
|
|
|
<div x-cloak x-show="activeTab === 'general'" class="h-full">
|
|
|
|
<livewire:project.service.database :database="$serviceDatabase" />
|
|
|
|
</div>
|
|
|
|
<div x-cloak x-show="activeTab === 'storages'">
|
|
|
|
<livewire:project.shared.storages.all :resource="$serviceDatabase" />
|
2023-09-27 10:45:53 +00:00
|
|
|
@if ($serviceDatabase->fileStorages()->get()->count() > 0)
|
|
|
|
<h3 class="py-4">Mounted Files (binds)</h3>
|
|
|
|
<div class="flex flex-col gap-4">
|
2023-09-29 19:38:11 +00:00
|
|
|
@foreach ($serviceDatabase->fileStorages()->get()->sort() as $fileStorage)
|
2023-09-27 10:45:53 +00:00
|
|
|
<livewire:project.service.file-storage :fileStorage="$fileStorage" wire:key="{{ $loop->index }}" />
|
|
|
|
@endforeach
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-09-22 09:23:49 +00:00
|
|
|
</div>
|
|
|
|
@endisset
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|