parent
72680fc954
commit
ef4410bac6
2 changed files with 3 additions and 0 deletions
|
@ -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),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ export interface ServerStats {
|
|||
diskUsageInBytes: number;
|
||||
networkRxInBytes: number;
|
||||
networkTxInBytes: number;
|
||||
uptime: number;
|
||||
}
|
||||
|
||||
export default (server: string): Promise<ServerStats> => {
|
||||
|
@ -23,6 +24,7 @@ export default (server: string): Promise<ServerStats> => {
|
|||
diskUsageInBytes: attributes.resources.disk_bytes,
|
||||
networkRxInBytes: attributes.resources.network_rx_bytes,
|
||||
networkTxInBytes: attributes.resources.network_tx_bytes,
|
||||
uptime: attributes.resources.uptime,
|
||||
}))
|
||||
.catch(reject);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue