Add support for command execution in containers.
This commit is contained in:
@@ -11,6 +11,10 @@
|
||||
href="{{ route('project.application.logs', $parameters) }}">
|
||||
<button>Logs</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.application.command', $parameters) }}">
|
||||
<button>Run command</button>
|
||||
</a>
|
||||
<x-applications.links :application="$application" />
|
||||
<div class="flex-1"></div>
|
||||
@if ($application->build_pack === 'dockercompose' && is_null($application->docker_compose_raw))
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
href="{{ route('project.database.logs', $parameters) }}">
|
||||
<button>Logs</button>
|
||||
</a>
|
||||
<a class="{{ request()->routeIs('project.database.command') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.database.command', $parameters) }}">
|
||||
<button>Run command</button>
|
||||
</a>
|
||||
@if (
|
||||
$database->getMorphClass() === 'App\Models\StandalonePostgresql' ||
|
||||
$database->getMorphClass() === 'App\Models\StandaloneMongodb' ||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<div>
|
||||
@if ($type === 'application')
|
||||
<livewire:project.application.heading :application="$resource" />
|
||||
@elseif ($type === 'database')
|
||||
<livewire:project.database.heading :database="$resource" />
|
||||
@elseif ($type === 'service')
|
||||
<livewire:project.service.navbar :service="$resource" :parameters="$parameters" :query="$query" />
|
||||
<div class="pt-5 pb-5">
|
||||
<a class="{{ request()->routeIs('project.service.show') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.service.show', $parameters) }}">
|
||||
<button><- Back</button>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
<form class="flex flex-col justify-center gap-2 xl:items-end xl:flex-row" wire:submit.prevent='runCommand'>
|
||||
<x-forms.input placeholder="ls -l" autofocus id="command" label="Command" required />
|
||||
<x-forms.input id="dir" label="Working directory" />
|
||||
<x-forms.select label="Container" id="container" required>
|
||||
<option selected>Select container</option>
|
||||
@foreach ($containers as $container)
|
||||
<option value="{{ $container }}">{{ $container }}</option>
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
<x-forms.button type="submit">Execute Command
|
||||
</x-forms.button>
|
||||
</form>
|
||||
<div class="container w-full pt-10 mx-auto">
|
||||
<livewire:activity-monitor header="Command output" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -26,6 +26,10 @@
|
||||
<button>Logs</button>
|
||||
</a>
|
||||
@endif
|
||||
<a class="{{ request()->routeIs('project.service.command') ? 'text-white' : '' }}"
|
||||
href="{{ route('project.service.command', $parameters) }}">
|
||||
<button>Run command</button>
|
||||
</a>
|
||||
</div>
|
||||
<div class="w-full pl-8">
|
||||
@isset($serviceApplication)
|
||||
|
||||
Reference in New Issue
Block a user