mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 00:34:44 +02:00
Fix 500 when viewing node (#1144)
* Fix node 500 * this feels better * Update app/Models/Node.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> * Update app/Models/Node.php Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com> * pint --------- Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
This commit is contained in:
parent
b69136d7a4
commit
5bea1ea80a
@ -365,16 +365,20 @@ class Node extends Model implements Validatable
|
||||
];
|
||||
|
||||
try {
|
||||
$this->systemInformation();
|
||||
|
||||
return Http::daemon($this)
|
||||
$data = Http::daemon($this)
|
||||
->connectTimeout(1)
|
||||
->timeout(1)
|
||||
->get('/api/system/utilization')
|
||||
->json() ?? $default;
|
||||
} catch (Exception) {
|
||||
return $default;
|
||||
->json();
|
||||
|
||||
if ($data['memory_total']) {
|
||||
return $data;
|
||||
}
|
||||
} catch (Exception) {
|
||||
}
|
||||
|
||||
return $default;
|
||||
}
|
||||
|
||||
/** @return string[] */
|
||||
|
Loading…
x
Reference in New Issue
Block a user