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-11-27 08:39:43 +00:00
|
|
|
<a class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
|
|
|
|
href="{{ route('project.service.configuration', [...$parameters, 'service_name' => null]) }}">
|
2023-09-22 12:47:25 +00:00
|
|
|
<button><- Back</button>
|
|
|
|
</a>
|
2023-09-22 09:23:49 +00:00
|
|
|
<a :class="activeTab === 'general' && 'text-white'"
|
2023-11-07 11:11:47 +00:00
|
|
|
@click.prevent="activeTab = 'general'; window.location.hash = 'general'; if(window.location.search) window.location.search = ''"
|
|
|
|
href="#">General</a>
|
2023-09-22 09:23:49 +00:00
|
|
|
<a :class="activeTab === 'storages' && 'text-white'"
|
2023-11-07 11:11:47 +00:00
|
|
|
@click.prevent="activeTab = 'storages'; window.location.hash = 'storages'; if(window.location.search) window.location.search = ''"
|
|
|
|
href="#">Storages
|
2023-09-22 09:23:49 +00:00
|
|
|
</a>
|
2023-11-08 10:07:44 +00:00
|
|
|
@if (
|
2023-11-08 11:42:20 +00:00
|
|
|
$serviceDatabase?->databaseType() === 'standalone-mysql' ||
|
|
|
|
$serviceDatabase?->databaseType() === 'standalone-postgresql' ||
|
|
|
|
$serviceDatabase?->databaseType() === 'standalone-mariadb')
|
2023-11-08 10:07:44 +00:00
|
|
|
<a :class="activeTab === 'backups' && 'text-white'"
|
|
|
|
@click.prevent="activeTab = 'backups'; window.location.hash = 'backups'" href="#">Backups</a>
|
|
|
|
@endif
|
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'">
|
2023-10-04 07:58:39 +00:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<h2>Storages</h2>
|
|
|
|
</div>
|
|
|
|
<div class="pb-4">Persistent storage to preserve data between deployments.</div>
|
2023-10-04 08:34:44 +00:00
|
|
|
<span class="text-warning">Please modify storage layout in your Docker Compose file.</span>
|
2023-10-04 07:58:39 +00:00
|
|
|
<livewire:project.service.storage wire:key="application-{{ $serviceApplication->id }}"
|
|
|
|
:resource="$serviceApplication" />
|
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'">
|
2023-10-04 07:58:39 +00:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<h2>Storages</h2>
|
|
|
|
</div>
|
|
|
|
<div class="pb-4">Persistent storage to preserve data between deployments.</div>
|
2023-10-04 08:34:44 +00:00
|
|
|
<span class="text-warning">Please modify storage layout in your Docker Compose file.</span>
|
2023-11-07 11:11:47 +00:00
|
|
|
<livewire:project.service.storage wire:key="application-{{ $serviceDatabase->id }}" :resource="$serviceDatabase" />
|
|
|
|
</div>
|
|
|
|
<div x-cloak x-show="activeTab === 'backups'">
|
|
|
|
<div class="flex gap-2 ">
|
|
|
|
<h2 class="pb-4">Scheduled Backups</h2>
|
|
|
|
<x-forms.button onclick="createScheduledBackup.showModal()">+ Add</x-forms.button>
|
|
|
|
</div>
|
2023-11-07 13:09:24 +00:00
|
|
|
<livewire:project.database.create-scheduled-backup :database="$serviceDatabase" :s3s="$s3s" />
|
2023-11-07 11:11:47 +00:00
|
|
|
<livewire:project.database.scheduled-backups :database="$serviceDatabase" />
|
2023-09-22 09:23:49 +00:00
|
|
|
</div>
|
|
|
|
@endisset
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|