diff --git a/CHANGELOG.md b/CHANGELOG.md index 62031623d..027de647d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines. * `[beta.2]` — Fixes a bug causing the dropdown menu for a server's egg to display the wrong selected value. * `[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. * `[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... +* `[beta.2]` — Fixes bug that caused incorrect rendering of CPU usage on server graphs due to missing variable. ## v0.7.0-beta.2 (Derelict Dermodactylus) ### Fixed diff --git a/app/Http/Controllers/Server/ConsoleController.php b/app/Http/Controllers/Server/ConsoleController.php index 1e873474c..0c1959251 100644 --- a/app/Http/Controllers/Server/ConsoleController.php +++ b/app/Http/Controllers/Server/ConsoleController.php @@ -38,6 +38,9 @@ class ConsoleController extends Controller $server = $request->attributes->get('server'); $this->setRequest($request)->injectJavascript([ + 'server' => [ + 'cpu' => $server->cpu, + ], 'meta' => [ 'saveFile' => route('server.files.save', $server->uuidShort), 'csrfToken' => csrf_token(), diff --git a/app/Traits/Controllers/JavascriptInjection.php b/app/Traits/Controllers/JavascriptInjection.php index 8b41fca9d..bbda917d1 100644 --- a/app/Traits/Controllers/JavascriptInjection.php +++ b/app/Traits/Controllers/JavascriptInjection.php @@ -45,7 +45,7 @@ trait JavascriptInjection $server = $request->attributes->get('server'); $token = $request->attributes->get('server_token'); - $response = array_merge([ + $response = array_merge_recursive([ 'server' => [ 'uuid' => $server->uuid, 'uuidShort' => $server->uuidShort,