Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions NEWS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ several `FSD` notifications into one executed action. [PR #3097]

- `upsset` should now recognize `RANGE NUMBER` and `NUMBER` types. [#3164]

- `upsstats` has now JSON output mode via `?json` (or `&json`) CGI query
parameter. [issue #2524, PR #3171]
- `upsstats` tool updates:
* Now has JSON output mode via `?json` (or `&json`) CGI query
parameter. [issue #2524, PR #3171]
* Handle `device.model` in addition to `ups.model` in upsstats HTML
templates. [#3180]

- `upssched` tool updates:
* Previously in PR #2896 (NUT releases v2.8.3 and v2.8.4) the `UPSNAME` and
Expand Down
5 changes: 5 additions & 0 deletions UPGRADING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ Changes from 2.8.4 to 2.8.5
directories (and recipe variable names). This may impact some packaging
recipes which do not rely on `make install` alone. [#3049]

- Some fixes were applied to HTML templates for NUT CGI clients. It can be
useful for NUT deployments being upgraded to compare the files they have
installed (and possibly customized) with the `*.html.sample` files delivered
by the new build. [PR #3180]

- Dropped the `compile` script from Git sources. It originates from automake
and is added to work area (if missing) during `autogen.sh` rituals anyway
(as `make` says, `'automake --add-missing' can install 'compile'` when you
Expand Down
28 changes: 25 additions & 3 deletions conf/upsstats-single.html.sample
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
@REFRESH@
<title>@HOSTDESC@ : @VAR ups.model@ on @HOST@</title>
<title>
@HOSTDESC@ :
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you check if any rendering aspects change in title or table cells that have now added the sort of whitespace around text in their contents? They were like "closing angle bracket"-"evaluated string" and now there's an end of line in-between...

Copy link
Contributor Author

@atanas-vladimirov atanas-vladimirov Nov 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I have double-checked how it looks after the change(s) - you can see it here - https://hodor.bsdbg.net/cgi-bin/nut/upsstats.cgi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the link, looks good :)

@IFSUPP device.model@
@VAR device.model@
@ELSE@
@VAR ups.model@
@ENDIF@
on @HOST@
</title>
<!-- LINK REL="stylesheet" TYPE="text/css" HREF="http://localhost/nut/nut.css" / -->
<style type="text/css">
body{color:#00fc00; background:#808080; font-family:"Times New Roman", Times, serif;}
Expand All @@ -38,7 +46,15 @@ table{background:#000;}
<table style="margin:auto" BORDER="1" CELLSPACING="0" CELLPADDING="10">

<tr>
<th COLSPAN="20">Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ - @VAR ups.model@ on @HOST@</th>
<th COLSPAN="20">
Network UPS Tools upsstats @VERSION@ - @HOSTDESC@ -
@IFSUPP device.model@
@VAR device.model@
@ELSE@
@VAR ups.model@
@ENDIF@
on @HOST@
</th>
</tr>

<tr>
Expand All @@ -63,7 +79,13 @@ table{background:#000;}

<tr>
<th ALIGN="RIGHT">UPS Model:</th>
<td>@VAR ups.model@</td>
<td>
@IFSUPP device.model@
@VAR device.model@
@ELSE@
@VAR ups.model@
@ENDIF@
</td>
</tr>

<tr>
Expand Down
4 changes: 4 additions & 0 deletions conf/upsstats.html.sample
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ th, td{padding:0.5ex;}
</td>

<td class="t1">
@IFSUPP device.model@
@VAR device.model@
@ELSE@
@VAR ups.model@
@ENDIF@
</td>

<td style="background:@STATUSCOLOR@">
Expand Down
Loading