From 18e5ce310a3e439da19fb8e6084f977bafa14ea6 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 4 Apr 2021 10:25:54 -0700 Subject: [PATCH] Use updated response from wings --- app/Transformers/Api/Client/StatsTransformer.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Transformers/Api/Client/StatsTransformer.php b/app/Transformers/Api/Client/StatsTransformer.php index 8ca7bea07..bbe5afe86 100644 --- a/app/Transformers/Api/Client/StatsTransformer.php +++ b/app/Transformers/Api/Client/StatsTransformer.php @@ -21,13 +21,13 @@ class StatsTransformer extends BaseClientTransformer { return [ 'current_state' => Arr::get($data, 'state', 'stopped'), - 'is_suspended' => Arr::get($data, 'suspended', false), + 'is_suspended' => Arr::get($data, 'is_suspended', false), 'resources' => [ - 'memory_bytes' => Arr::get($data, 'memory_bytes', 0), - 'cpu_absolute' => Arr::get($data, 'cpu_absolute', 0), - 'disk_bytes' => Arr::get($data, 'disk_bytes', 0), - 'network_rx_bytes' => Arr::get($data, 'network.rx_bytes', 0), - 'network_tx_bytes' => Arr::get($data, 'network.tx_bytes', 0), + 'memory_bytes' => Arr::get($data, 'utilization.memory_bytes', 0), + 'cpu_absolute' => Arr::get($data, 'utilization.cpu_absolute', 0), + 'disk_bytes' => Arr::get($data, 'utilization.disk_bytes', 0), + 'network_rx_bytes' => Arr::get($data, 'utilization.network.rx_bytes', 0), + 'network_tx_bytes' => Arr::get($data, 'utilization.network.tx_bytes', 0), ], ]; }