fix: move terminal to separate view on services
This commit is contained in:
@@ -20,6 +20,8 @@ class Navbar extends Component
|
|||||||
|
|
||||||
public $isDeploymentProgress = false;
|
public $isDeploymentProgress = false;
|
||||||
|
|
||||||
|
public $title = 'Configuration';
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
if (str($this->service->status())->contains('running') && is_null($this->service->config_hash)) {
|
if (str($this->service->status())->contains('running') && is_null($this->service->config_hash)) {
|
||||||
|
|||||||
@@ -23,10 +23,6 @@
|
|||||||
@click.prevent="activeTab = 'scheduled-tasks'; window.location.hash = 'scheduled-tasks'"
|
@click.prevent="activeTab = 'scheduled-tasks'; window.location.hash = 'scheduled-tasks'"
|
||||||
href="#">Scheduled Tasks
|
href="#">Scheduled Tasks
|
||||||
</a>
|
</a>
|
||||||
<a class="menu-item sm:min-w-fit" :class="activeTab === 'terminal' && 'menu-item-active'"
|
|
||||||
@click.prevent="activeTab = 'terminal';
|
|
||||||
window.location.hash = 'terminal'"
|
|
||||||
href="#">Terminal</a>
|
|
||||||
<a class="menu-item sm:min-w-fit" :class="activeTab === 'logs' && 'menu-item-active'"
|
<a class="menu-item sm:min-w-fit" :class="activeTab === 'logs' && 'menu-item-active'"
|
||||||
@click.prevent="activeTab = 'logs';
|
@click.prevent="activeTab = 'logs';
|
||||||
window.location.hash = 'logs'"
|
window.location.hash = 'logs'"
|
||||||
@@ -191,9 +187,6 @@
|
|||||||
<div x-cloak x-show="activeTab === 'logs'">
|
<div x-cloak x-show="activeTab === 'logs'">
|
||||||
<livewire:project.shared.logs :resource="$service" />
|
<livewire:project.shared.logs :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
<div x-cloak x-show="activeTab === 'terminal'">
|
|
||||||
<livewire:project.shared.execute-container-command :resource="$service" />
|
|
||||||
</div>
|
|
||||||
<div x-cloak x-show="activeTab === 'environment-variables'">
|
<div x-cloak x-show="activeTab === 'environment-variables'">
|
||||||
<livewire:project.shared.environment-variable.all :resource="$service" />
|
<livewire:project.shared.environment-variable.all :resource="$service" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,17 +6,21 @@
|
|||||||
<livewire:activity-monitor header="Logs" showWaiting fullHeight />
|
<livewire:activity-monitor header="Logs" showWaiting fullHeight />
|
||||||
</x-slot:content>
|
</x-slot:content>
|
||||||
</x-slide-over>
|
</x-slide-over>
|
||||||
<h1>Configuration</h1>
|
<h1>{{ $title }}</h1>
|
||||||
<x-resources.breadcrumbs :resource="$service" :parameters="$parameters" />
|
<x-resources.breadcrumbs :resource="$service" :parameters="$parameters" />
|
||||||
<div class="navbar-main" x-data>
|
<div class="navbar-main" x-data>
|
||||||
<nav class="flex items-center flex-shrink-0 gap-6 scrollbar min-h-10 whitespace-nowrap">
|
<nav class="flex flex-shrink-0 gap-6 items-center whitespace-nowrap scrollbar min-h-10">
|
||||||
<a class="{{ request()->routeIs('project.service.configuration') ? 'dark:text-white' : '' }}"
|
<a class="{{ request()->routeIs('project.service.configuration') ? 'dark:text-white' : '' }}"
|
||||||
href="{{ route('project.service.configuration', $parameters) }}">
|
href="{{ route('project.service.configuration', $parameters) }}">
|
||||||
<button>Configuration</button>
|
<button>Configuration</button>
|
||||||
</a>
|
</a>
|
||||||
|
<a class="{{ request()->routeIs('project.service.command') ? 'dark:text-white' : '' }}"
|
||||||
|
href="{{ route('project.service.command', $parameters) }}">
|
||||||
|
<button>Terminal</button>
|
||||||
|
</a>
|
||||||
<x-services.links :service="$service" />
|
<x-services.links :service="$service" />
|
||||||
</nav>
|
</nav>
|
||||||
<div class="flex flex-wrap items-center order-first gap-2 sm:order-last">
|
<div class="flex flex-wrap order-first gap-2 items-center sm:order-last">
|
||||||
@if (str($service->status())->contains('running'))
|
@if (str($service->status())->contains('running'))
|
||||||
<button @click="$wire.dispatch('restartEvent')" class="gap-2 button">
|
<button @click="$wire.dispatch('restartEvent')" class="gap-2 button">
|
||||||
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
<svg class="w-5 h-5 dark:text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<h1>Terminal</h1>
|
<h1>Terminal</h1>
|
||||||
<livewire:project.database.heading :database="$resource" />
|
<livewire:project.database.heading :database="$resource" />
|
||||||
@elseif ($type === 'service')
|
@elseif ($type === 'service')
|
||||||
<h2>Terminal</h2>
|
<livewire:project.service.navbar :service="$resource" :parameters="$parameters" title="Terminal" />
|
||||||
@endif
|
@endif
|
||||||
<div x-init="$wire.loadContainers">
|
<div x-init="$wire.loadContainers">
|
||||||
<div class="pt-4" wire:loading wire:target='loadContainers'>
|
<div class="pt-4" wire:loading wire:target='loadContainers'>
|
||||||
|
|||||||
@@ -195,8 +195,8 @@ Route::middleware(['auth', 'verified'])->group(function () {
|
|||||||
});
|
});
|
||||||
Route::prefix('project/{project_uuid}/{environment_name}/service/{service_uuid}')->group(function () {
|
Route::prefix('project/{project_uuid}/{environment_name}/service/{service_uuid}')->group(function () {
|
||||||
Route::get('/', ServiceConfiguration::class)->name('project.service.configuration');
|
Route::get('/', ServiceConfiguration::class)->name('project.service.configuration');
|
||||||
Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index');
|
|
||||||
Route::get('/terminal', ExecuteContainerCommand::class)->name('project.service.command');
|
Route::get('/terminal', ExecuteContainerCommand::class)->name('project.service.command');
|
||||||
|
Route::get('/{stack_service_uuid}', ServiceIndex::class)->name('project.service.index');
|
||||||
Route::get('/tasks/{task_uuid}', ScheduledTaskShow::class)->name('project.service.scheduled-tasks');
|
Route::get('/tasks/{task_uuid}', ScheduledTaskShow::class)->name('project.service.scheduled-tasks');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user