The attached patch is a first stab at adding 3phase support to
upsstats/upsimage. I got a little carried away, so bare with me.
This patch adds 3phase awareness to upsstats/upsimage and the template
files, and in additional to the obvious 3phase variables:
- upsstats:
* Adds IF/ELSE-awareness, and since the parser logic is rather limited
this means that we now have IF, ELSE IF etc since all statements are
and:ed. Examples in upsstats.html.
* Adds IFEQ (IF Equal)
* Adds IFBETWEEN (if a value is within bounds)
* Removes UTILITYCOLOR, since it's now possible to "script" that.
* Adds possibility to give a full path to upsstats/upsimage. This
comes in handy when you call the CGI stuff by SSI from a parsed HTML
page and want links to go to that HTML page and not the CGI:s
directly. And possibly other uses.
- upsimage:
* Fixes the battery.voltage graph. It was hardcoded to 40V or
something, looked outright ridiculous with 420V battery voltage ;)
* Improves logic on figuring out min/max values to cope with 400V
nominal.
And probably more stuff that I have fixed while stumbling around in
the code.
To fix before commiting:
* There are a couple of FIXME:s that I stumbled upon that really
should be taken care of.
* Update man-pages.
/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke@acc.umu.se
---------------------------------------------------------------------------
Thesaurus: ancient reptile with an excellent vocabulary
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=---------------
next part --------------
A non-text attachment was scrubbed...
Name: nut-devel-cgi3phase.diff.gz
Type: application/octet-stream
Size: 6129 bytes
Desc:
Url :
http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20060206/d8952554/nut-devel-cgi3phase.diff.obj
Niklas Edmundsson
2006-Feb-07 15:15 UTC
[Nut-upsdev] upsimage/upsstats: 3phase support and more.
On Mon, 6 Feb 2006, Niklas Edmundsson wrote:> The attached patch is a first stab at adding 3phase support to > upsstats/upsimage. I got a little carried away, so bare with me.Kjell and others found some exciting bugs, so here's try 2 which adds the following in addition to the previous feature-list: * Be smarter about guessing nominal battery voltage in order to provide sane graph while discharging, also fixes the off-by-one-bug that caused a ups with 12V battery voltage to get 0V nominal ;) * Don't assume people are running their webbrowser in 1600x1200, tidied up the tables to make it look better. * Fixed the broken @RUNTIME@ which was buggy and had inconsistent output, it now always prints hh:mm:ss. /Nikke -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke@acc.umu.se --------------------------------------------------------------------------- AT&T Subspace : The next best thing to beaming there. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--------------- next part -------------- A non-text attachment was scrubbed... Name: nut-devel-cgi3phase-2.diff.gz Type: application/octet-stream Size: 6143 bytes Desc: Url : http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20060207/139d0e1b/nut-devel-cgi3phase-2.diff.obj