[PATCH] Add Cli to WebUI

mayosemmel mayosemmel at googlemail.com
Fr Jun 17 20:54:39 CEST 2016


Hallo Christian,

der Patch ansich passt meiner Meinung nach so.
Allerdings finde ich die Idee nicht so extrem gut. Das verleitet Leute,
die nicht mal SSH bedienen können dazu auf dem Router irgendwas
rumzuspielen.
Als optionales Paket wäre ich dafür, es aufzunehmen. Allerdings nicht im
Standardumfang.

Grüße Jan

Am Freitag, den 17.06.2016, 20:10 +0200 schrieb Christian Dresel:
> Signed-off-by: Christian Dresel <fff at chrisi01.de>
> ---
>  .../fff/fff-web/files/www/ssl/cgi-bin/cmd.html     | 32 ++++++++++++++++++++++
>  .../fff/fff-web/files/www/ssl/cgi-bin/header       |  1 +
>  2 files changed, 33 insertions(+)
>  create mode 100644 src/packages/fff/fff-web/files/www/ssl/cgi-bin/cmd.html
> 
> diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/cmd.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/cmd.html
> new file mode 100644
> index 0000000..e2ebb10
> --- /dev/null
> +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/cmd.html
> @@ -0,0 +1,32 @@
> +#!/usr/bin/haserl
> +
> +<%in /www/ssl/cgi-bin/header %>
> +<%in /www/ssl/cgi-bin/helpers %>
> +<% show_msg %>
> +<form method="POST">
> +<table style="width: 100%;">
> +	<tr>
> +		<td>
> +			<fieldset>
> +				<legend>Kommandozeile</legend>
> +				<table>
> +					<tr><td colspan="2"><input type="text" name="command" /></td>
> +					<td colspan="2"><input type="submit" name="cmd" value="Ausführen" /></td></tr>
> +				</table>
> +				<table>
> +					<tr><td colspan="2"><% ${POST_command} %></td></tr>
> +				</table>
> +			</fieldset>
> +			<fieldset>
> +				<legend>Beispiel Kommandos</legend>
> +				<table>
> +					<tr><td colspan="2"><b>Ausfürbares Kommandos</b></td><td colspan="2"><b>Erklärung</b></td></tr>
> +					<tr><td colspan="2">batctl o</td><td colspan="2">Zeigt alle Batman Nachbarn an</td></tr>
> +					<tr><td colspan="2">batctl gwl</td><td colspan="2">Zeigt alle Gateways in der Batman Gatewayselection an</td></tr>
> +				</table>
> +			</fieldset>
> +		</td>
> +	</tr>
> +</table>
> +</form>
> +<%in /www/ssl/cgi-bin/footer %>
> diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header
> index 4cecfcd..5844d07 100755
> --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header
> +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/header
> @@ -36,6 +36,7 @@ HOSTNAME=$(uci get -q 'system. at system[0].hostname')
>  			nav_entry settings.html		"Einstellungen"
>  			nav_entry ports.html		"Anschlüsse"
>  			nav_entry wifiscan.html		"Wifi Scan"
> +                        nav_entry cmd.html         	"Kommandozeile"
>  			nav_entry upgrade.html		"Upgrade"
>  			nav_entry password.html		"Password"
>  			nav_entry reboot.html		"Neustart"
> -- 
> 2.1.4
> 

-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : signature.asc
Dateityp    : application/pgp-signature
Dateigröße  : 473 bytes
Beschreibung: This is a digitally signed message part
URL         : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20160617/c5d587b4/attachment.sig>


Mehr Informationen über die Mailingliste franken-dev