Skip to content

Commit

Permalink
Use correct storage attribute, use metrics from last hour (not present)
Browse files Browse the repository at this point in the history
Position 0 has metrics from current hour, position 1 has metrics from last hour, current hour does not report anything useful 😭
  • Loading branch information
AllenBW committed Nov 14, 2017
1 parent 92c59af commit f343efd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function ComponentController ($state, $stateParams, VmsService, lodash, EventNot
capture_interval: 'hourly'
}).then((response) => {
vm.metrics = response
const lastHour = response.resources[0]
const lastHour = response.resources[1]

vm.cpuUtil = UsageGraphsService.getChartConfig({
'units': __('%'),
Expand All @@ -216,7 +216,7 @@ function ComponentController ($state, $stateParams, VmsService, lodash, EventNot
'units': __('GB'),
'chartId': 'storageChart',
'label': __('used')
}, UsageGraphsService.convertBytestoGb(lastHour.derived_vm_allocated_disk_storage), UsageGraphsService.convertBytestoGb(lastHour.derived_vm_allocated_disk_storage))
}, UsageGraphsService.convertBytestoGb(lastHour.derived_vm_used_disk_storage), UsageGraphsService.convertBytestoGb(lastHour.derived_vm_allocated_disk_storage))
})

vm.diskUsage = response.disks.map((item) => {
Expand Down

0 comments on commit f343efd

Please sign in to comment.