Mohammed Morsi
2008-Jun-06 21:02 UTC
[Ovirt-devel] [patch] correct availability graph units
-------------- next part -------------- A non-text attachment was scrubbed... Name: memory-graphs-unit-fix.patch Type: text/x-patch Size: 999 bytes Desc: not available URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20080606/86703896/attachment.bin>
Hugh O. Brock
2008-Jun-06 21:44 UTC
[Ovirt-devel] Re: [patch] correct availability graph units
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} > endThis is a hack, but in light of the difficulty in getting memory out of the db properly, ACK --Hugh
Been testing mos patches on mantis ACK the series -mark 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 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Ovirt-devel mailing list > Ovirt-devel at redhat.com > https://www.redhat.com/mailman/listinfo/ovirt-devel >