public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Bernhard Bitsch <bbitsch@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH 3/3] services.cgi: add link to addon config if ui exists for it
Date: Mon, 03 Oct 2022 20:44:28 +0200	[thread overview]
Message-ID: <002ae240-dea7-3ccb-5689-6827d8e7ddd0@ipfire.org> (raw)
In-Reply-To: <20221003153905.14824-4-robin.roevens@disroot.org>

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]

Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfire.org>


Am 03.10.2022 um 17:39 schrieb Robin Roevens:
> * If a cgi file exists with the same name as an addon, the
>    displayed service will be a link to that cgi file.
> 
> Signed-off-by: Robin Roevens <robin.roevens(a)disroot.org>
> ---
>   html/cgi-bin/services.cgi | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi
> index 498d7fd8e..d988b29a5 100644
> --- a/html/cgi-bin/services.cgi
> +++ b/html/cgi-bin/services.cgi
> @@ -185,6 +185,10 @@ END
>   
>   				# Add addon name to displayname of service if servicename differs from addon
>   				my $displayname = ($pak ne $service) ? "$service ($pak)" : $service;
> +				if ( -e "/srv/web/ipfire/cgi-bin/$pak.cgi" ) {
> +					$displayname = ($pak ne $service) ? "$service (<a href=\'$pak.cgi\'>$pak</a>)" : "<a href=\'$pak.cgi\'>$service</a>";
> +				}
> +
>   				print "<td align='left' $col width='31%'>$displayname</td> ";
>   
>   				my $status = isautorun($pak,$service,$col);

      reply	other threads:[~2022-10-03 18:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-03 15:39 [PATCH 0/3] services.cgi: few cosmetic changes/enhancements Robin Roevens
2022-10-03 15:39 ` [PATCH 1/3] services.cgi: minor cosmetics Robin Roevens
2022-10-03 18:40   ` Bernhard Bitsch
2022-10-03 15:39 ` [PATCH 2/3] services.cgi: add restart action and restrict action usage Robin Roevens
2022-10-03 18:42   ` Bernhard Bitsch
2022-10-03 15:39 ` [PATCH 3/3] services.cgi: add link to addon config if ui exists for it Robin Roevens
2022-10-03 18:44   ` Bernhard Bitsch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=002ae240-dea7-3ccb-5689-6827d8e7ddd0@ipfire.org \
    --to=bbitsch@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox