Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat(execute-container): enhance container command form with auto-connect feature for single container scenarios

Andras Bacsai6d477ff59352
diff --git a/openapi.json b/openapi.json
index fd9f7b7e24..d5b3b14c4d 100644
--- a/openapi.json
+++ b/openapi.json
@@ -8360,6 +8360,9 @@
"is_preview": {
"type": "boolean"
},
+ "is_buildtime_only": {
+ "type": "boolean"
+ },
"is_shared": {
"type": "boolean"
},
diff --git a/openapi.yaml b/openapi.yaml
index e3e3e0b67f..69848d99a0 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -5411,6 +5411,8 @@ components:
type: boolean
is_preview:
type: boolean
+ is_buildtime_only:
+ type: boolean
is_shared:
type: boolean
is_shown_once:
diff --git a/resources/views/livewire/project/shared/execute-container-command.blade.php b/resources/views/livewire/project/shared/execute-container-command.blade.php
index 7fe208a9b0..f980d6f3c9 100644
--- a/resources/views/livewire/project/shared/execute-container-command.blade.php
+++ b/resources/views/livewire/project/shared/execute-container-command.blade.php
@@ -20,7 +20,11 @@
@if (count($containers) === 0)
<div>No containers are running or terminal access is disabled on this server.</div>
@else
- <form class="w-full flex gap-2 items-end" wire:submit="$dispatchSelf('connectToContainer')">
+ <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'));
+ }">
<x-forms.select label="Container" id="container" required wire:model.live="selected_container">
@foreach ($containers as $container)
@if ($loop->first)