Show warning for a server's allocations if it's currently running
This commit is contained in:
parent
87a2fff3b7
commit
6ffb7fd7f6
2 changed files with 15 additions and 0 deletions
|
@ -61,8 +61,15 @@ class ServerViewController extends Controller
|
|||
{
|
||||
$allocations = $server->node->allocations->toBase();
|
||||
|
||||
try {
|
||||
$stats = $server->getStats();
|
||||
} catch (\Exception) {
|
||||
// Can't connect to daemon
|
||||
}
|
||||
|
||||
return $this->view->make('admin.servers.view.build', [
|
||||
'server' => $server,
|
||||
'currentState' => $stats['current_state'] ?? null,
|
||||
'assigned' => $allocations->where('server_id', $server->id)->sortBy('port')->sortBy('ip'),
|
||||
'unassigned' => $allocations->where('server_id', null)->sortBy('port')->sortBy('ip'),
|
||||
]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue