2023-12-07 12:07:16 +00:00
|
|
|
<div>
|
2024-06-07 09:01:10 +00:00
|
|
|
<x-slot:title>
|
2026-02-16 01:54:19 +00:00
|
|
|
{{ data_get_str($resource, 'name')->limit(10) }} > Commands | MapleDeploy
|
2024-06-07 09:01:10 +00:00
|
|
|
</x-slot>
|
2023-12-07 12:07:16 +00:00
|
|
|
@if ($type === 'application')
|
2024-10-24 10:21:36 +00:00
|
|
|
<livewire:project.shared.configuration-checker :resource="$resource" />
|
2024-09-16 08:56:11 +00:00
|
|
|
<h1>Terminal</h1>
|
2023-12-07 12:07:16 +00:00
|
|
|
<livewire:project.application.heading :application="$resource" />
|
|
|
|
|
@elseif ($type === 'database')
|
2024-10-24 10:21:36 +00:00
|
|
|
<livewire:project.shared.configuration-checker :resource="$resource" />
|
2024-09-16 08:56:11 +00:00
|
|
|
<h1>Terminal</h1>
|
2023-12-07 12:07:16 +00:00
|
|
|
<livewire:project.database.heading :database="$resource" />
|
|
|
|
|
@elseif ($type === 'service')
|
2024-10-24 10:21:36 +00:00
|
|
|
<livewire:project.shared.configuration-checker :resource="$resource" />
|
2025-05-19 19:50:32 +00:00
|
|
|
<livewire:project.service.heading :service="$resource" :parameters="$parameters" title="Terminal" />
|
2023-12-07 12:07:16 +00:00
|
|
|
@endif
|
2025-01-21 17:36:38 +00:00
|
|
|
|
2025-06-17 07:28:07 +00:00
|
|
|
@if ($type === 'application' || $type === 'database' || $type === 'service')
|
|
|
|
|
<h2 class="pb-4">Terminal</h2>
|
|
|
|
|
@if (count($containers) === 0)
|
|
|
|
|
<div>No containers are running or terminal access is disabled on this server.</div>
|
|
|
|
|
@else
|
2025-09-11 15:37:40 +00:00
|
|
|
<form class="w-96 min-w-fit flex gap-2 items-end" wire:submit="$dispatchSelf('connectToContainer')"
|
|
|
|
|
x-data="{ autoConnected: false }" x-init="if ({{ count($containers) }} === 1 && !autoConnected) {
|
|
|
|
|
autoConnected = true;
|
|
|
|
|
$nextTick(() => $wire.dispatchSelf('connectToContainer'));
|
|
|
|
|
}">
|
2025-07-18 18:44:07 +00:00
|
|
|
<x-forms.select label="Container" id="container" required wire:model.live="selected_container">
|
2025-06-20 07:35:39 +00:00
|
|
|
@foreach ($containers as $container)
|
|
|
|
|
@if ($loop->first)
|
|
|
|
|
<option disabled value="default">Select a container</option>
|
|
|
|
|
@endif
|
|
|
|
|
<option value="{{ data_get($container, 'container.Names') }}">
|
|
|
|
|
{{ data_get($container, 'container.Names') }}
|
|
|
|
|
({{ data_get($container, 'server.name') }})
|
|
|
|
|
</option>
|
|
|
|
|
@endforeach
|
|
|
|
|
</x-forms.select>
|
|
|
|
|
<x-forms.button :disabled="$isConnecting"
|
|
|
|
|
type="submit">{{ $isConnecting ? 'Connecting...' : 'Connect' }}</x-forms.button>
|
|
|
|
|
</form>
|
2025-06-17 07:28:07 +00:00
|
|
|
<div class="mx-auto w-full">
|
|
|
|
|
<livewire:project.shared.terminal />
|
2025-06-14 11:56:48 +00:00
|
|
|
</div>
|
2025-06-17 07:28:07 +00:00
|
|
|
@endif
|
|
|
|
|
@endif
|
|
|
|
|
|
|
|
|
|
@if ($type === 'server')
|
|
|
|
|
<livewire:server.navbar :server="$servers->first()" />
|
2025-06-28 12:02:08 +00:00
|
|
|
@if ($servers->first()->isTerminalEnabled() && $servers->first()->isFunctional())
|
2025-06-14 11:56:48 +00:00
|
|
|
<form class="w-full flex gap-2 items-start" wire:submit="$dispatchSelf('connectToServer')"
|
2025-07-18 19:19:32 +00:00
|
|
|
x-data="{ autoConnected: false }"
|
|
|
|
|
x-on:terminal-websocket-ready.window="if (!autoConnected) { autoConnected = true; $wire.dispatchSelf('connectToServer'); }">
|
2025-06-14 10:42:14 +00:00
|
|
|
<h2 class="pb-4">Terminal</h2>
|
2025-06-14 11:56:48 +00:00
|
|
|
<x-forms.button :disabled="$isConnecting"
|
2025-06-17 07:28:07 +00:00
|
|
|
type="submit">{{ $isConnecting ? 'Connecting...' : 'Connect' }}</x-forms.button>
|
2025-06-14 10:42:14 +00:00
|
|
|
</form>
|
|
|
|
|
<div class="mx-auto w-full">
|
2025-06-14 11:56:48 +00:00
|
|
|
<livewire:project.shared.terminal />
|
2025-06-14 10:42:14 +00:00
|
|
|
</div>
|
|
|
|
|
@else
|
2025-06-28 12:02:08 +00:00
|
|
|
<div>Server is not functional or terminal access is disabled.</div>
|
2024-10-24 10:21:36 +00:00
|
|
|
@endif
|
|
|
|
|
@endif
|
2023-12-07 12:07:16 +00:00
|
|
|
</div>
|