Fix incorrect CPU usage display for limited servers, closes #758

This commit is contained in:
Dane Everitt 2017-11-26 13:17:40 -06:00
parent 08a965d882
commit 47f2ca0673
3 changed files with 5 additions and 1 deletions

View file

@ -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 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]` — 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]` — 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) ## v0.7.0-beta.2 (Derelict Dermodactylus)
### Fixed ### Fixed

View file

@ -38,6 +38,9 @@ class ConsoleController extends Controller
$server = $request->attributes->get('server'); $server = $request->attributes->get('server');
$this->setRequest($request)->injectJavascript([ $this->setRequest($request)->injectJavascript([
'server' => [
'cpu' => $server->cpu,
],
'meta' => [ 'meta' => [
'saveFile' => route('server.files.save', $server->uuidShort), 'saveFile' => route('server.files.save', $server->uuidShort),
'csrfToken' => csrf_token(), 'csrfToken' => csrf_token(),

View file

@ -45,7 +45,7 @@ trait JavascriptInjection
$server = $request->attributes->get('server'); $server = $request->attributes->get('server');
$token = $request->attributes->get('server_token'); $token = $request->attributes->get('server_token');
$response = array_merge([ $response = array_merge_recursive([
'server' => [ 'server' => [
'uuid' => $server->uuid, 'uuid' => $server->uuid,
'uuidShort' => $server->uuidShort, 'uuidShort' => $server->uuidShort,