forked from coollabsio/coolify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f9b7b1
commit 291b9a8
Showing
23 changed files
with
409 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire; | ||
|
||
use App\Models\Project; | ||
use App\Models\S3Storage; | ||
use App\Models\Server; | ||
use Livewire\Component; | ||
|
||
class Dashboard extends Component | ||
{ | ||
public int $projects = 0; | ||
public int $servers = 0; | ||
public int $s3s = 0; | ||
public int $resources = 0; | ||
|
||
public function mount() | ||
{ | ||
$this->servers = Server::ownedByCurrentTeam()->get()->count(); | ||
$this->s3s = S3Storage::ownedByCurrentTeam()->get()->count(); | ||
$projects = Project::ownedByCurrentTeam()->get(); | ||
foreach ($projects as $project) { | ||
$this->resources += $project->applications->count(); | ||
$this->resources += $project->postgresqls->count(); | ||
} | ||
$this->projects = $projects->count(); | ||
} | ||
public function render() | ||
{ | ||
return view('livewire.dashboard'); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire\Server; | ||
|
||
use App\Models\Server; | ||
use Illuminate\Database\Eloquent\Collection; | ||
use Livewire\Component; | ||
|
||
class All extends Component | ||
{ | ||
public ?Collection $servers = null; | ||
|
||
public function mount () { | ||
$this->servers = Server::ownedByCurrentTeam()->get(); | ||
} | ||
public function render() | ||
{ | ||
return view('livewire.server.all'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace App\Http\Livewire\Server; | ||
|
||
use App\Models\Server; | ||
use Livewire\Component; | ||
|
||
class Show extends Component | ||
{ | ||
public ?Server $server = null; | ||
public function mount() | ||
{ | ||
$this->server = Server::ownedByCurrentTeam(['name', 'description', 'ip', 'port', 'user', 'proxy'])->whereUuid(request()->server_uuid)->firstOrFail(); | ||
} | ||
public function render() | ||
{ | ||
return view('livewire.server.show'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.