Correctly handle response from daemon for server stats; #2183

This commit is contained in:
Dane Everitt 2020-07-29 20:34:06 -07:00
parent 4c558a8662
commit 874d928a50
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 5 additions and 5 deletions

View File

@ -27,11 +27,11 @@ class StatsTransformer extends BaseClientTransformer
'current_state' => Arr::get($data, 'state', 'stopped'), 'current_state' => Arr::get($data, 'state', 'stopped'),
'is_suspended' => Arr::get($data, 'suspended', false), 'is_suspended' => Arr::get($data, 'suspended', false),
'resources' => [ 'resources' => [
'memory_bytes' => Arr::get($data, 'resources.memory_bytes', 0), 'memory_bytes' => Arr::get($data, 'memory_bytes', 0),
'cpu_absolute' => Arr::get($data, 'resources.cpu_absolute', 0), 'cpu_absolute' => Arr::get($data, 'cpu_absolute', 0),
'disk_bytes' => Arr::get($data, 'resources.disk_bytes', 0), 'disk_bytes' => Arr::get($data, 'disk_bytes', 0),
'network_rx_bytes' => Arr::get($data, 'resources.network.rx_bytes', 0), 'network_rx_bytes' => Arr::get($data, 'network.rx_bytes', 0),
'network_tx_bytes' => Arr::get($data, 'resources.network.tx_bytes', 0), 'network_tx_bytes' => Arr::get($data, 'network.tx_bytes', 0),
], ],
]; ];
} }