2023-08-29 12:36:17 +00:00
|
|
|
<?php
|
|
|
|
|
|
2023-12-07 18:06:32 +00:00
|
|
|
namespace App\Livewire;
|
2023-08-29 12:36:17 +00:00
|
|
|
|
2024-03-21 13:30:35 +00:00
|
|
|
use App\Models\PrivateKey;
|
2023-08-29 12:36:17 +00:00
|
|
|
use App\Models\Project;
|
|
|
|
|
use App\Models\Server;
|
2024-01-27 17:44:40 +00:00
|
|
|
use Illuminate\Support\Collection;
|
2023-08-29 12:36:17 +00:00
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
|
|
class Dashboard extends Component
|
|
|
|
|
{
|
2025-10-01 06:23:35 +00:00
|
|
|
public Collection $projects;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2024-01-27 17:44:40 +00:00
|
|
|
public Collection $servers;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2024-11-03 20:11:35 +00:00
|
|
|
public Collection $privateKeys;
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-08-29 12:36:17 +00:00
|
|
|
public function mount()
|
|
|
|
|
{
|
2025-12-08 12:39:33 +00:00
|
|
|
$this->privateKeys = PrivateKey::ownedByCurrentTeamCached();
|
|
|
|
|
$this->servers = Server::ownedByCurrentTeamCached();
|
|
|
|
|
$this->projects = Project::ownedByCurrentTeam()->with('environments')->get();
|
2023-08-29 12:36:17 +00:00
|
|
|
}
|
2024-06-10 20:43:34 +00:00
|
|
|
|
2023-08-29 12:36:17 +00:00
|
|
|
public function render()
|
|
|
|
|
{
|
|
|
|
|
return view('livewire.dashboard');
|
|
|
|
|
}
|
|
|
|
|
}
|