ui: fixes

This commit is contained in:
Andras Bacsai 2023-09-24 10:55:15 +02:00
parent 92a53a151e
commit 250d7cbc53
5 changed files with 14 additions and 14 deletions

View File

@ -28,14 +28,14 @@ public function handle(Server $server, bool $async = true): Activity|string
$commands = $commands->merge([
"apt-get update > /dev/null 2>&1 || true",
"command -v lsof >/dev/null || echo '####### Installing lsof...'",
"command -v lsof >/dev/null || echo '####### Installing lsof.'",
"command -v lsof >/dev/null || apt install -y lsof",
"command -v lsof >/dev/null || command -v fuser >/dev/null || apt install -y psmisc",
"mkdir -p $proxy_path && cd $proxy_path",
"echo '####### Creating Docker Compose file...'",
"echo '####### Pulling docker image...'",
"echo '####### Creating Docker Compose file.'",
"echo '####### Pulling docker image.'",
'docker compose pull',
"echo '####### Stopping existing coolify-proxy...'",
"echo '####### Stopping existing coolify-proxy.'",
"docker compose down -v --remove-orphans > /dev/null 2>&1",
"command -v fuser >/dev/null || command -v lsof >/dev/null || echo '####### Could not kill existing processes listening on port 80 & 443. Please stop the process holding these ports...'",
"command -v lsof >/dev/null && lsof -nt -i:80 | xargs -r kill -9 || true",
@ -45,9 +45,9 @@ public function handle(Server $server, bool $async = true): Activity|string
"systemctl disable nginx > /dev/null 2>&1 || true",
"systemctl disable apache2 > /dev/null 2>&1 || true",
"systemctl disable apache > /dev/null 2>&1 || true",
"echo '####### Starting coolify-proxy...'",
"echo '####### Starting coolify-proxy.'",
'docker compose up -d --remove-orphans',
"echo '####### Proxy installed successfully...'"
"echo '####### Proxy installed successfully.'"
]);
$commands = $commands->merge(connectProxyToNetworks($server));
if (!$async) {

View File

@ -20,7 +20,7 @@ function connectProxyToNetworks(Server $server) {
$commands = $networks->map(function ($network) {
return [
"echo '####### Connecting coolify-proxy to $network network...'",
"docker network ls --format '{{.Name}}' | grep '^$network$' || docker network create --attachable $network",
"docker network ls --format '{{.Name}}' | grep '^$network$' || docker network create --attachable $network >/dev/null",
"docker network connect $network coolify-proxy >/dev/null 2>&1 || true",
];
});

View File

@ -101,7 +101,7 @@ function generateSshCommand(Server $server, string $command, bool $isMux = true)
. " 'bash -se' << \\$delimiter" . PHP_EOL
. $command . PHP_EOL
. $delimiter;
ray($ssh_command);
// ray($ssh_command);
return $ssh_command;
}
function instant_remote_process(Collection|array $command, Server $server, $throwError = true)

View File

@ -24,7 +24,7 @@ class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400"
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
</svg>
Stop
Stop Proxy
</x-forms.button>
</div>
@else

View File

@ -1,12 +1,12 @@
<div>
@if ($server->isFunctional())
<div class="flex gap-2" x-init="$wire.getProxyStatus">
@if ($server->proxy->status === 'running')
<x-status.running text="Proxy Running" />
@elseif ($server->proxy->status === 'restarting')
<x-status.restarting text="Proxy Restarting" />
@if (data_get($server, 'proxy.status') === 'running')
<x-status.running status="Proxy Running" />
@elseif (data_get($server, 'proxy.status') === 'restarting')
<x-status.restarting status="Proxy Restarting" />
@else
<x-status.stopped text="Proxy Stopped" />
<x-status.stopped status="Proxy Stopped" />
@endif
<button wire:loading.remove.delay.longer wire:click.prevent='getProxyStatusWithNoti'>
<svg class="icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">