diff --git a/app/Transformers/Api/Client/StatsTransformer.php b/app/Transformers/Api/Client/StatsTransformer.php index bbe5afe86..66827bf36 100644 --- a/app/Transformers/Api/Client/StatsTransformer.php +++ b/app/Transformers/Api/Client/StatsTransformer.php @@ -28,6 +28,7 @@ class StatsTransformer extends BaseClientTransformer '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), + 'uptime' => Arr::get($data, 'utilization.uptime', 0), ], ]; } diff --git a/resources/scripts/api/server/getServerResourceUsage.ts b/resources/scripts/api/server/getServerResourceUsage.ts index 6b71dcf54..2a4c01cf6 100644 --- a/resources/scripts/api/server/getServerResourceUsage.ts +++ b/resources/scripts/api/server/getServerResourceUsage.ts @@ -10,6 +10,7 @@ export interface ServerStats { diskUsageInBytes: number; networkRxInBytes: number; networkTxInBytes: number; + uptime: number; } export default (server: string): Promise => { @@ -23,6 +24,7 @@ export default (server: string): Promise => { diskUsageInBytes: attributes.resources.disk_bytes, networkRxInBytes: attributes.resources.network_rx_bytes, networkTxInBytes: attributes.resources.network_tx_bytes, + uptime: attributes.resources.uptime, })) .catch(reject); });