wip
This commit is contained in:
		@@ -13,12 +13,14 @@ class Show extends Component
 | 
				
			|||||||
    public function scan()
 | 
					    public function scan()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $alreadyAddedNetworks = $this->server->standaloneDockers;
 | 
					        $alreadyAddedNetworks = $this->server->standaloneDockers;
 | 
				
			||||||
        ray($alreadyAddedNetworks);
 | 
					 | 
				
			||||||
        $networks = instant_remote_process(['docker network ls --format "{{json .}}"'], $this->server, false);
 | 
					        $networks = instant_remote_process(['docker network ls --format "{{json .}}"'], $this->server, false);
 | 
				
			||||||
        $this->networks = format_docker_command_output_to_json($networks)->filter(function ($network) {
 | 
					        $this->networks = format_docker_command_output_to_json($networks)->filter(function ($network) {
 | 
				
			||||||
            return $network['Name'] !== 'bridge' && $network['Name'] !== 'host' && $network['Name'] !== 'none';
 | 
					            return $network['Name'] !== 'bridge' && $network['Name'] !== 'host' && $network['Name'] !== 'none';
 | 
				
			||||||
        })->filter(function ($network) use ($alreadyAddedNetworks) {
 | 
					        })->filter(function ($network) use ($alreadyAddedNetworks) {
 | 
				
			||||||
            return !$alreadyAddedNetworks->contains('network', $network['Name']);
 | 
					            return !$alreadyAddedNetworks->contains('network', $network['Name']);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					        if ($this->networks->count() === 0) {
 | 
				
			||||||
 | 
					            $this->emit('success', 'No new networks found.');
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,9 +13,6 @@ use Illuminate\Database\Seeder;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
class ServerSeeder extends Seeder
 | 
					class ServerSeeder extends Seeder
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    /**
 | 
					 | 
				
			||||||
     * Run the database seeds.
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    public function run(): void
 | 
					    public function run(): void
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
        $root_team = Team::find(0);
 | 
					        $root_team = Team::find(0);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<div>
 | 
					<div>
 | 
				
			||||||
    <div class="flex items-end gap-2">
 | 
					    <div class="flex items-end gap-2">
 | 
				
			||||||
        <h1>Destinations</h1>
 | 
					        <h2>Destinations</h2>
 | 
				
			||||||
        <a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
 | 
					        <a href="{{ route('destination.new', ['server_id' => $server->id]) }}">
 | 
				
			||||||
            <x-forms.button>Add a new destination</x-forms.button>
 | 
					            <x-forms.button>Add a new destination</x-forms.button>
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
@@ -19,14 +19,14 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="grid gap-2 pt-2">
 | 
					    <div class="grid gap-2 pt-2">
 | 
				
			||||||
        @if (count($networks) > 0)
 | 
					        @if (count($networks) > 0)
 | 
				
			||||||
            <h3>Scanned available Destinations</h3>
 | 
					            <h4>Found Destinations</h4>
 | 
				
			||||||
        @endif
 | 
					        @endif
 | 
				
			||||||
        @foreach ($networks as $network)
 | 
					        @foreach ($networks as $network)
 | 
				
			||||||
            <div class="flex gap-2 w-96">
 | 
					            <div class="flex gap-2 w-96">
 | 
				
			||||||
                <div class="w-32">{{ data_get($network, 'Name') }}</div>
 | 
					                <div class="w-32">{{ data_get($network, 'Name') }}</div>
 | 
				
			||||||
                <a
 | 
					                <a
 | 
				
			||||||
                    href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
 | 
					                    href="{{ route('destination.new', ['server_id' => $server->id, 'network_name' => data_get($network, 'Name')]) }}">
 | 
				
			||||||
                    <x-forms.button>Add to Coolify</x-forms.button>
 | 
					                    <x-forms.button>Configure</x-forms.button>
 | 
				
			||||||
                </a>
 | 
					                </a>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        @endforeach
 | 
					        @endforeach
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,6 +40,7 @@
 | 
				
			|||||||
                <x-forms.button wire:click.prevent='validateServer'>
 | 
					                <x-forms.button wire:click.prevent='validateServer'>
 | 
				
			||||||
                    Check Server Details
 | 
					                    Check Server Details
 | 
				
			||||||
                </x-forms.button>
 | 
					                </x-forms.button>
 | 
				
			||||||
 | 
					                @if ($server->id !== 0)
 | 
				
			||||||
                    <x-forms.button wire:click.prevent='installDocker' isHighlighted>
 | 
					                    <x-forms.button wire:click.prevent='installDocker' isHighlighted>
 | 
				
			||||||
                        @if ($server->settings->is_usable)
 | 
					                        @if ($server->settings->is_usable)
 | 
				
			||||||
                            Reconfigure Docker Engine
 | 
					                            Reconfigure Docker Engine
 | 
				
			||||||
@@ -47,6 +48,7 @@
 | 
				
			|||||||
                            Install Docker Engine
 | 
					                            Install Docker Engine
 | 
				
			||||||
                        @endif
 | 
					                        @endif
 | 
				
			||||||
                    </x-forms.button>
 | 
					                    </x-forms.button>
 | 
				
			||||||
 | 
					                @endif
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
        @else
 | 
					        @else
 | 
				
			||||||
            <div class="w-full">
 | 
					            <div class="w-full">
 | 
				
			||||||
@@ -59,8 +61,8 @@
 | 
				
			|||||||
            <livewire:activity-monitor :header="true" />
 | 
					            <livewire:activity-monitor :header="true" />
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        @isset($uptime)
 | 
					        @isset($uptime)
 | 
				
			||||||
            <h4 class="pb-3">Server Info</h4>
 | 
					            <h3 class="pb-3">Server Info</h3>
 | 
				
			||||||
            <div class="">
 | 
					            <div class="py-2 pb-4">
 | 
				
			||||||
                <p>Uptime: {{ $uptime }}</p>
 | 
					                <p>Uptime: {{ $uptime }}</p>
 | 
				
			||||||
                @isset($dockerVersion)
 | 
					                @isset($dockerVersion)
 | 
				
			||||||
                    <p>Docker Engine {{ $dockerVersion }}</p>
 | 
					                    <p>Docker Engine {{ $dockerVersion }}</p>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,6 @@
 | 
				
			|||||||
<div>
 | 
					<div>
 | 
				
			||||||
    <div class="flex items-end gap-2 pb-6 ">
 | 
					    <div class="flex items-end gap-2 pb-6 ">
 | 
				
			||||||
        <h1>Private Key</h1>
 | 
					        <h2>Private Key</h2>
 | 
				
			||||||
        <a href="{{ route('private-key.new') }}">
 | 
					        <a href="{{ route('private-key.new') }}">
 | 
				
			||||||
            <x-forms.button>Add a new Private Key</x-forms.button>
 | 
					            <x-forms.button>Add a new Private Key</x-forms.button>
 | 
				
			||||||
        </a>
 | 
					        </a>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user