apcupsd: Make apcupsd link in services page access its apcupsd WUI menu.

- In the services WUI page any addon that has a WUI menu page defined, such as Samba,
   Guardian etc, has the addon name shown in underlined red which is a link to the addon
   cgi page. This works for the other addons as the addon cgi name is the same as the
   addon name. I have identified that this is not the case for apcupsd, because the cgi
   page is called upsstats.cgi
- This patch adjusts the cgi name to allow apcupsd to also be shown in underlined red.
- The lfs file copies the upsstats.cgi file to one named apcupsd.cgi
- The apcupsd menu file has the cgi name changed from upsstats.cgi to apcupsd.cgi
- The rootfile is updated to also include the apcupsd.cgi file with the others.
- Tested in my vm testbed by making the above changes in the code and the apcupsd addon
   was then shown in underlined red, which acted as a link to the apcupsd status WUI page.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Adolf Belka
2023-09-04 18:52:31 +02:00
committed by Michael Tremer
parent c52a9716a1
commit 9a4946cfa9
3 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
$subipfire->{'35.apcupsd'} = {'caption' => $Lang::tr{'apcupsd'},
'uri' => '/cgi-bin/upsstats.cgi',
'uri' => '/cgi-bin/apcupsd.cgi',
'title' => $Lang::tr{'apcupsd'},
'enabled' => 1,
};