Skip to content

Commit

Permalink
Improve bootstrap conversion and clean up the GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
doktornotor committed Jan 30, 2017
1 parent 80a3677 commit ae73ffe
Showing 1 changed file with 85 additions and 44 deletions.
129 changes: 85 additions & 44 deletions www/pfSense-pkg-Lightsquid/files/usr/local/pkg/lightsquid.xml
Expand Up @@ -8,7 +8,7 @@
* lightsquid.xml
*
* part of pfSense (https://www.pfsense.org)
* Copyright (c) 2015-2016 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2015-2017 Rubicon Communications, LLC (Netgate)
* Copyright (c) 2006-2012 Sergey Dvoriancev <dv_serg@mail.ru>
* All rights reserved.
*
Expand All @@ -35,13 +35,6 @@
<section>Status</section>
<url>/pkg_edit.php?xml=lightsquid.xml</url>
</menu>
<tabs>
<tab>
<text>Settings</text>
<url>/pkg_edit.php?xml=lightsquid.xml</url>
<active/>
</tab>
</tabs>
<service>
<name>lightsquid_web</name>
<rcfile>lighttpd_ls.sh</rcfile>
Expand All @@ -57,18 +50,39 @@
<type>info</type>
<fielddescr>
<![CDATA[
<span class="errmsg">IMPORTANT: Perform these steps after install:</span>
Perform these steps after install
]]>
</fielddescr>
<description>
<![CDATA[
1/ <strong>Enable 'Access Logging' in the Squid package!</strong> It is strongly suggested to leave the 'Log Store Directory' in Squid package at default '/var/squid/logs' value.<br/><br/>
2/ <strong>ONLY if Squid is NOT set up as transparent proxy:</strong><br/>
- Configure Squid - General - Proxy Interface(s) to include <strong>'loopback'</strong> interface (in addition to any other interfaces you want Squid to bind on).<br/><br/>
3/ <strong>Configure 'Report Template Settings' and 'Reporting Settings and Scheduler' below and Save when finished.</strong><br/><br/>
4/ <strong>Use the Refresh buttons in the 'Manual Refresh' section below to create initial LightSquid reports</strong>; otherwise you will get an error diagnostic page.<br/>
- <em>"Refresh"</em> will (re)parse today's entries only in Squid's current access.log.<br/>
- <em>"Refresh Full"</em> will (re)parse all entries in all Squid's access logs, including the rotated ones. <strong>Note: This may take long time to finish!</strong><br/>
<strong><span class="text-danger">IMPORTANT: </span>Click Info and follow the instructions below if this is initial install!</strong>
<div class="infoblock"><ol type="1">
<li>
<strong><span class="text-info">Enable and configure Squid logging</span></strong><br/>
Check 'Enable Access Logging' and configure 'Log Store Directory' on <a href="/pkg_edit.php?xml=squid.xml">Squid Proxy Server > General</a> page.<br/>
Hint: It is strongly suggested to leave the 'Log Store Directory' at default <code>/var/squid/logs</code> value.<br/><br/>
</li>
<li>
<strong><span class="text-info">(ONLY if Squid is NOT set up as transparent proxy)</span></strong><br/>
Configure 'Proxy Interface(s)' on <a href="/pkg_edit.php?xml=squid.xml">Squid Proxy Server > General</a> page to
include <strong>'loopback'</strong> interface (in addition to any other interfaces you want Squid to bind on).
This is required for sqstat to work.<br/><br/>
</li>
<li>
<strong><span class="text-info">Configure Lightsquid</span></strong><br/>
Complete the 'Report Template Settings' and 'Reporting Settings and Scheduler' sections below and <strong>Save when finished.</strong><br/><br/>
</li>
<li>
<strong><span class="text-info">Create initial Lightsquid reports</span></strong><br/>
Use the 'Refresh' buttons in the 'Manual Refresh' section below to create initial LightSquid reports.<br/>
<span class="text-danger">Important: </span>If you skip this step, you will get a diagnostic error page when you click 'Open Lightsquid'.
<dl class="dl-horizontal responsive">
<dt>Refresh</dt><dd>(Re)parse today's entries only in Squid's current access.log.</dd>
<dt>Refresh Full</dt><dd>(Re)parse all entries in all Squid's access logs, including the rotated ones.<br/>
<span class="text-info">Note: This may take a long time to finish!</span></dd>
</dl>
</li>
</ol></div>
]]>
</description>
</field>
Expand All @@ -79,35 +93,53 @@
<field>
<fielddescr>Lightsquid Web Port</fielddescr>
<fieldname>lighttpd_ls_port</fieldname>
<description>Port the lighttpd web server for lightsquid will listen on. (Default: 7445)</description>
<description>
<![CDATA[
Port the lighttpd web server for Lightsquid will listen on.
<span class="text-info">(Default: 7445)</span>
]]>
</description>
<type>input</type>
<size>5</size>
<default_value>7445</default_value>
<required/>
</field>
<field>
<fielddescr>Lightsquid Web SSL</fielddescr>
<fieldname>lighttpd_ls_ssl</fieldname>
<description>Use SSL for Lightsquid Web Access</description>
<sethelp>This option configures the lightsquid web server to use SSL and uses the WebGUI HTTPS certificate.</sethelp>
<sethelp>This option configures the Lightsquid web server to use SSL and uses the WebGUI HTTPS certificate.</sethelp>
<type>checkbox</type>
<default_value>on</default_value>
</field>

<field>
<fielddescr>Lightsquid Web User</fielddescr>
<fieldname>lighttpd_ls_user</fieldname>
<description>Username used to access lighttpd. (Default: admin)</description>
<description>
<![CDATA[
Username used to access lighttpd.
<span class="text-info">(Default: admin)</span>
]]>
</description>
<type>input</type>
<size>5</size>
<default_value>admin</default_value>
<required/>
</field>
<field>
<fielddescr>Lightsquid Web Password</fielddescr>
<fieldname>lighttpd_ls_password</fieldname>
<description>Password used to access lighttpd. (Default: pfsense)</description>
<description>
<![CDATA[
Password used to access lighttpd.
<span class="text-info">(Default: pfsense)</span>
]]>
</description>
<type>password</type>
<size>5</size>
<default_value>pfsense</default_value>
<required/>
</field>
<field>
<type>info</type>
Expand Down Expand Up @@ -182,17 +214,18 @@
<fieldname>lightsquid_ip2name</fieldname>
<description>
<![CDATA[
<table cellpadding=1 cellspacing=0 style="text-align: left;">
<tbody>
<tr><th colspan=2>Select which method(s) should be attempted (in the order listed below) to resolve IPs to hostnames:</th></tr>
<tr><th>IP </th><td> - Do not resolve IP addresses.</td></tr>
<tr><th>Demo </th><td> - Use Squid AUTHNAME, then DNSNAME, then IP.</td></tr>
<tr><th>DNS </th><td> - Use DNSNAME.</td></tr>
<tr><th>Simple </th><td> - Use Squid AUTHNAME, then IP address.</td></tr>
<tr><th>SMB </th><td> - Use NetBIOS name.</td></tr>
<tr><th>Squidauth </th><td> - Use Squid AUTHNAME, then IP address (allow international characters).</td></tr>
</tbody>
</table>
Select which method(s) should be attempted (in the order listed below) to resolve IPs to hostnames.<br/>
Click Info for details. <span class="text-info">(Default: DNS)</span>
<div class="infoblock">
<dl class="dl-horizontal responsive">
<dt>IP</dt><dd>Do not resolve IP addresses.</dt>
<dt>Demo</dt><dd>Use Squid AUTHNAME, then DNS hostname, then IP.</dt>
<dt>DNS</dt><dd>Use DNS hostname.</dt>
<dt>Simple</dt><dd>Use Squid AUTHNAME, then IP address.</dt>
<dt>SMB</dt><dd>Use NetBIOS name.</dt>
<dt>Squidauth</dt><dd>Use Squid AUTHNAME, then IP address (allows international characters).</dt>
</dl>
</div>
]]>
</description>
<type>select</type>
Expand All @@ -212,8 +245,10 @@
<description>
<![CDATA[
If you want to omit some sites from statistics (e.g., a local webserver), specify the URL(s) here.<br/>
Separate multiple entries by <strong>|</strong> character.<br/><br/>
Example: example.com|192.168.1.|example.net
<span class="text-info">
Separate multiple entries by <strong>|</strong> character.
<strong>Example: </strong><code>example.com|192.168.1.|example.net</code>
</span>
]]>
</description>
<type>textarea</type>
Expand All @@ -226,19 +261,23 @@
<description>
<![CDATA[
Select data refresh period. The reporting task will be executed every XX minutes/hours.<br/>
<strong>Legend:</strong> (!),(*) - use only with fast hardware; (+) - recommended values.<br/>
<span class="text-info">
<strong>Legend:</strong>
&nbsp;&nbsp; (!)(*) &nbsp; Use only with fast hardware
&nbsp;&nbsp; (+) &nbsp; Recommended values
</span>
]]>
</description>
<type>select</type>
<default_value>lhp_none</default_value>
<options>
<option><name>none</name><value>lhp_none</value></option>
<option><name>10min(!)</name><value>lhp_10m</value></option>
<option><name>20min(!)</name><value>lhp_20m</value></option>
<option><name>30min(*)</name><value>lhp_30m</value></option>
<option><name>40min(*)</name><value>lhp_40m</value></option>
<option><name>50min(+)</name><value>lhp_50m</value></option>
<option><name>60min(+)</name><value>lhp_60m</value></option>
<option><name>10min (!)</name><value>lhp_10m</value></option>
<option><name>20min (!)</name><value>lhp_20m</value></option>
<option><name>30min (*)</name><value>lhp_30m</value></option>
<option><name>40min (*)</name><value>lhp_40m</value></option>
<option><name>50min (+)</name><value>lhp_50m</value></option>
<option><name>60min (+)</name><value>lhp_60m</value></option>
<option><name>2h</name><value>lhp_2h</value></option>
<option><name>3h</name><value>lhp_3h</value></option>
<option><name>4h</name><value>lhp_4h</value></option>
Expand All @@ -253,10 +292,12 @@
<fielddescr>Manual Refresh</fielddescr>
<description>
<![CDATA[
<button type="submit" class="btn btn-primary" name="refreshnow" id="refreshnow" value="Refresh Now"><i class="fa fa-refresh icon-embed-btn"></i>Refresh</button> will (re)parse today's entries only in Squid's current access.log.<br/><br/>
<button type="submit" class="btn btn-warning" name="refreshfull" id="refreshfull" value="Refresh Full"><i class="fa fa-retweet icon-embed-btn"></i>Refresh Full</button> will (re)parse all entries in all Squid's access logs, including the rotated ones.
<strong>Note: This may take long time to finish!</strong><br/><br/>
Press a button above to start background refresh (this will take some time).<br/>
Use these buttons to start a background refresh of the Lightsquid reports.<br/><br/>
<button type="submit" class="btn btn-primary" name="refreshnow" id="refreshnow" value="Refresh Now"><i class="fa fa-refresh icon-embed-btn"></i>Refresh</button>
Will (re)parse today's entries only in Squid's current access.log.<br/><br/>
<button type="submit" class="btn btn-warning" name="refreshfull" id="refreshfull" value="Refresh Full"><i class="fa fa-retweet icon-embed-btn"></i>Refresh Full</button>
Will (re)parse all entries in all Squid's access logs, including the rotated ones.
<span class="text-info">This may take a long time to finish!</span></dd>
]]>
</description>
</field>
Expand Down

0 comments on commit ae73ffe

Please sign in to comment.