Skip to content

Commit 47f2ca0

Browse files
committed
Fix incorrect CPU usage display for limited servers, closes pterodactyl#758
1 parent 08a965d commit 47f2ca0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
99
* `[beta.2]` — Fixes a bug causing the dropdown menu for a server's egg to display the wrong selected value.
1010
* `[beta.2]` — Fixes a bug that would throw a red page of death when submitting an invalid egg variable value for a server in the Admin CP.
1111
* `[beta.2]` — Someone found a `@todo` that I never `@todid` and thus database hosts could not be created without being linked to a node. This is fixed...
12+
* `[beta.2]` — Fixes bug that caused incorrect rendering of CPU usage on server graphs due to missing variable.
1213

1314
## v0.7.0-beta.2 (Derelict Dermodactylus)
1415
### Fixed

app/Http/Controllers/Server/ConsoleController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ public function index(Request $request): View
3838
$server = $request->attributes->get('server');
3939

4040
$this->setRequest($request)->injectJavascript([
41+
'server' => [
42+
'cpu' => $server->cpu,
43+
],
4144
'meta' => [
4245
'saveFile' => route('server.files.save', $server->uuidShort),
4346
'csrfToken' => csrf_token(),

app/Traits/Controllers/JavascriptInjection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function injectJavascript($args = [], $overwrite = false)
4545
$server = $request->attributes->get('server');
4646
$token = $request->attributes->get('server_token');
4747

48-
$response = array_merge([
48+
$response = array_merge_recursive([
4949
'server' => [
5050
'uuid' => $server->uuid,
5151
'uuidShort' => $server->uuidShort,

0 commit comments

Comments
 (0)