[Nut-upsdev] upsimage/upsstats: 3phase support

Niklas Edmundsson nikke at acc.umu.se
Mon Feb 6 15:12:33 UTC 2006


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 at 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


More information about the Nut-upsdev mailing list