mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-22 10:25:22 +00:00
feat(ui): show internal hostname and densify config UI
Add an application Internal access section that loads the running container hostname (skipped for Compose apps), densify configuration diff and popup-small defaults, dock the server-timing HUD into the mobile top bar, restyle the 2FA challenge with the auth shell, and enforce 16px mobile form fonts to prevent iOS zoom.
This commit is contained in:
@@ -55,6 +55,10 @@ class General extends Component
|
||||
|
||||
public ?string $customNetworkAliases = null;
|
||||
|
||||
public ?string $currentInternalHostname = null;
|
||||
|
||||
public bool $currentInternalHostnameLoaded = false;
|
||||
|
||||
public ?string $dockerfile = null;
|
||||
|
||||
public ?string $dockerfileLocation = null;
|
||||
@@ -448,6 +452,32 @@ class General extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function loadCurrentInternalHostname(): void
|
||||
{
|
||||
if ($this->application->build_pack === 'dockercompose') {
|
||||
$this->currentInternalHostnameLoaded = true;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$containers = getCurrentApplicationContainerStatus(
|
||||
$this->application->destination->server,
|
||||
$this->application->id,
|
||||
0
|
||||
);
|
||||
$currentContainer = $containers->first(
|
||||
fn ($container) => data_get($container, 'State') === 'running'
|
||||
) ?? $containers->first();
|
||||
|
||||
$this->currentInternalHostname = data_get($currentContainer, 'Names');
|
||||
} catch (\Throwable) {
|
||||
$this->currentInternalHostname = null;
|
||||
} finally {
|
||||
$this->currentInternalHostnameLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
public function setSiteType(): void
|
||||
{
|
||||
$this->isStatic = $this->siteType !== 'dynamic';
|
||||
|
||||
Reference in New Issue
Block a user