[Ovirt-devel] Re: [patch] correct availability graph units
Hugh O. Brock
hbrock at redhat.com
Fri Jun 6 21:44:54 UTC 2008
On Fri, Jun 06, 2008 at 05:02:31PM -0400, Mohammed Morsi wrote:
>
> >From 8cf37d7cccc276d7a59875f0b672ba6d295def15 Mon Sep 17 00:00:00 2001
> From: Mohammed Morsi <mmorsi at redhat.com>
> Date: Fri, 6 Jun 2008 16:59:08 -0400
> Subject: [PATCH] small fix of memory availability graphs units
>
>
> Signed-off-by: Mohammed Morsi <mmorsi at redhat.com>
> ---
> wui/src/app/controllers/graph_controller.rb | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/wui/src/app/controllers/graph_controller.rb b/wui/src/app/controllers/graph_controller.rb
> index 9b83a24..c21b836 100644
> --- a/wui/src/app/controllers/graph_controller.rb
> +++ b/wui/src/app/controllers/graph_controller.rb
> @@ -61,6 +61,13 @@ class GraphController < ApplicationController
> total = 15
> # TODO
> end
> +
> + # bit of a hack to convert memory from kb to mb
> + if @target == 'memory' || @target == 'vram'
> + used /= 1024
> + total /= 1024
> + end
> +
> @availability_graph_data = { 'Used' => used, 'Total' => total, 'Available' => total - used}
> end
This is a hack, but in light of the difficulty in getting memory out of the db properly,
ACK
--Hugh
More information about the ovirt-devel
mailing list