mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 00:16:42 +00:00
feat(dashboard): add server metrics charts and polish UI feedback
This commit is contained in:
1 parent
2949b8e158
commit
f412b2bf0d
24 files changed
+493
-104
No files matched your search
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Dashboard;
|
||||
|
||||
use App\Models\Server;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Livewire\Component;
|
||||
|
||||
class ServerMetricsChart extends Component
|
||||
{
|
||||
public Server $server;
|
||||
|
||||
public function loadData(): void
|
||||
{
|
||||
try {
|
||||
$this->dispatch("dashboard-server-metrics-{$this->server->uuid}", [
|
||||
'cpu' => $this->server->getCpuMetrics(10),
|
||||
'memory' => $this->server->getMemoryMetrics(10),
|
||||
]);
|
||||
} catch (\Throwable $e) {
|
||||
report($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function render(): View
|
||||
{
|
||||
return view('livewire.dashboard.server-metrics-chart');
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user