1
0
mirror of https://github.com/DigitalDevices/octonet.git synced 2023-10-10 13:36:52 +02:00

Systemsettings html/scripts

Use layered help in system.html
Added "strict" to systemsettings
check strict.enabled in octoserve startup script
This commit is contained in:
mvoelkel 2015-09-11 14:53:05 +02:00
parent 6e33b3c160
commit f23745b146
3 changed files with 214 additions and 117 deletions

View File

@ -20,7 +20,11 @@ case "$1" in
"$0" startoctoserve "$0" startoctoserve
;; ;;
startoctoserve) startoctoserve)
octoserve > /dev/null 2>&1 & export OPTIONS=""
if [ -e /config/strict.enabled ]; then
export OPTIONS=$OPTIONS" -c"
fi
octoserve $OPTIONS > /dev/null 2>&1 &
;; ;;
stopoctoserve) stopoctoserve)
killall octoserve killall octoserve

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>OctopusNet</title> <title>OctopusNet</title>
<link rel="stylesheet" type="text/css" href="/style.css"> <link rel="stylesheet" type="text/css" href="/style.css">
<script type="text/javascript" src="/menu.js"></script> <script type="text/javascript" src="/menu.js"></script>
@ -24,6 +24,8 @@ function SaveSettings()
param += "nodvbt=" + (nodvbtEnabled?"1":"0"); param += "nodvbt=" + (nodvbtEnabled?"1":"0");
param += "&"; param += "&";
param += "noswitch=" + (noswitchEnabled?"1":"0"); param += "noswitch=" + (noswitchEnabled?"1":"0");
param += "&";
param += "strict=" + (strictEnabled?"1":"0");
location.replace('/systemsettings.lua?'+param); location.replace('/systemsettings.lua?'+param);
} }
@ -34,6 +36,7 @@ function ClearSettings()
nodmsEnabled = false; nodmsEnabled = false;
nodvbtEnabled = false; nodvbtEnabled = false;
noswitchEnabled = false; noswitchEnabled = false;
strictEnabled = false;
SaveSettings(); SaveSettings();
} }
@ -44,6 +47,7 @@ function OnLoad()
document.getElementById("NODMSButton").checked = nodmsEnabled; document.getElementById("NODMSButton").checked = nodmsEnabled;
document.getElementById("NODVBTButton").checked = nodvbtEnabled; document.getElementById("NODVBTButton").checked = nodvbtEnabled;
document.getElementById("NOSwitchButton").checked = noswitchEnabled; document.getElementById("NOSwitchButton").checked = noswitchEnabled;
document.getElementById("STRICTButton").checked = strictEnabled;
} }
function Change() function Change()
@ -53,6 +57,7 @@ function Change()
nodmsEnabled = document.getElementById("NODMSButton").checked; nodmsEnabled = document.getElementById("NODMSButton").checked;
nodvbtEnabled = document.getElementById("NODVBTButton").checked; nodvbtEnabled = document.getElementById("NODVBTButton").checked;
noswitchEnabled = document.getElementById("NOSwitchButton").checked; noswitchEnabled = document.getElementById("NOSwitchButton").checked;
strictEnabled = document.getElementById("STRICTButton").checked;
document.getElementById("SetButton").disabled = false; document.getElementById("SetButton").disabled = false;
} }
@ -71,6 +76,15 @@ function SetPassword()
location.replace('/setpasswd.lua?'+pwd1); location.replace('/setpasswd.lua?'+pwd1);
} }
function ToggleHelp(id)
{
var el = document.getElementById(id);
if( el.style.display == "none")
el.style.display = "block";
else
el.style.display = "none";
}
</script> </script>
</head> </head>
@ -87,8 +101,9 @@ function SetPassword()
<tr> <tr>
<td class="maintd"><script type="text/javascript">CreateMenu();</script></td> <td class="maintd"><script type="text/javascript">CreateMenu();</script></td>
<td class="content"> <td class="content">
<div> <div style="position: absolute; width:720px">
<!-- Begin Content --> <!-- Begin Content -->
<div>
<table class="tableleft" align="center" cellspacing="2px"> <table class="tableleft" align="center" cellspacing="2px">
<tr> <tr>
<td>Layer 2 Quality of Service</td> <td>Layer 2 Quality of Service</td>
@ -97,7 +112,10 @@ function SetPassword()
<input id="QOSButton" type="checkbox" value="Check" checked="false" onclick="Change()" /> <input id="QOSButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
</form> </form>
</td> </td>
<td>See note below</td> <td>See note:
<a href="javascript:ToggleHelp('qos_hlpE')">English</a>
<a href="javascript:ToggleHelp('qos_hlpD')">Deutsch</a>
</td>
</tr> </tr>
<tr> <tr>
@ -111,33 +129,49 @@ function SetPassword()
</tr> </tr>
<tr> <tr>
<td>NODMS</td> <td>Disable DMS announcement</td>
<td> <td>
<form action=""> <form action="">
<input id="NODMSButton" type="checkbox" value="Check" checked="false" onclick="Change()" /> <input id="NODMSButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
</form> </form>
</td> </td>
<td>Disable DMS announcement.</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>NODVBT</td> <td>Disable DVBT announcement</td>
<td> <td>
<form action=""> <form action="">
<input id="NODVBTButton" type="checkbox" value="Check" checked="false" onclick="Change()" /> <input id="NODVBTButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
</form> </form>
</td> </td>
<td>Disable DVBT announcement.</td> <td></td>
</tr> </tr>
<tr> <tr>
<td>No DVB switch</td> <td>Enforce strict SAT>IP</td>
<td>
<form action="">
<input id="STRICTButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
</form>
</td>
<td>See note:
<a href="javascript:ToggleHelp('strict_hlpE')">English</a>
<a href="javascript:ToggleHelp('strict_hlpD')">Deutsch</a>
</td>
</tr>
<tr>
<td>Disable multiswitch emulation</td>
<td> <td>
<form action=""> <form action="">
<input id="NOSwitchButton" type="checkbox" value="Check" checked="false" onclick="Change()" /> <input id="NOSwitchButton" type="checkbox" value="Check" checked="false" onclick="Change()" />
</form> </form>
</td> </td>
<td>Disable DVB switch emulation on S8.</td> <td>See note:
<a href="javascript:ToggleHelp('nosw_hlpE')">English</a>
<a href="javascript:ToggleHelp('nosw_hlpD')">Deutsch</a>
</td>
</tr> </tr>
<tr> <tr>
@ -152,8 +186,9 @@ function SetPassword()
</td> </td>
</tr> </tr>
</table> </table>
</div>
<br/> <br/>
<!-- <div id="passwd" style="display: none"">
<table class="tableleft" align="center" cellspacing="2px"> <table class="tableleft" align="center" cellspacing="2px">
<form action=""> <form action="">
<tr> <tr>
@ -184,8 +219,10 @@ function SetPassword()
</tr> </tr>
</form> </form>
</table> </table>
--> </div>
<div style="margin:20px; clear:both"> <div id="qos_hlpE" onclick="ToggleHelp('qos_hlpE')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Layer 2 Quality of Service</h3> <h3>Layer 2 Quality of Service</h3>
This is defined in the <b>IEEE 802.1Q</b> VLAN standard, and provides QoS in a local network.<br/> This is defined in the <b>IEEE 802.1Q</b> VLAN standard, and provides QoS in a local network.<br/>
For it to work all components in the LAN must either be transparent to it or need to support it. For it to work all components in the LAN must either be transparent to it or need to support it.
@ -194,7 +231,12 @@ function SetPassword()
<li><b>smart switches:</b> depends on setting.</li> <li><b>smart switches:</b> depends on setting.</li>
<li><b>PCs and the like:</b> newer systems support it by default, for older systems check the LAN adapter settings.</li> <li><b>PCs and the like:</b> newer systems support it by default, for older systems check the LAN adapter settings.</li>
<li><b>WLAN access points:</b> depends on firmware and model. OpenWRT based devices usually work.</li> <li><b>WLAN access points:</b> depends on firmware and model. OpenWRT based devices usually work.</li>
<br> </div>
</div>
<div id="qos_hlpD" onclick="ToggleHelp('qos_hlpD')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Layer 2 Quality of Service</h3>
Dies ist im <b>IEEE 802.1Q</b> VLAN Standard definiert und erlaubt QoS im lokalem Netz.<br/> Dies ist im <b>IEEE 802.1Q</b> VLAN Standard definiert und erlaubt QoS im lokalem Netz.<br/>
Damit es funktioniert m&uuml;ssen alle Netzwerkkompenenten im LAN entweder transparent sein oder es unterst&uuml;tzen. Damit es funktioniert m&uuml;ssen alle Netzwerkkompenenten im LAN entweder transparent sein oder es unterst&uuml;tzen.
<li><b>Hubs:</b> sind immer transparent</li> <li><b>Hubs:</b> sind immer transparent</li>
@ -203,6 +245,49 @@ function SetPassword()
<li><b>PCs und dergleichen:</b> neue Systeme unterst&uuml;tzten es defaultmässig, für &auml;ltere in den Einstellungen der Netzwerkarte nachschauen</li> <li><b>PCs und dergleichen:</b> neue Systeme unterst&uuml;tzten es defaultmässig, für &auml;ltere in den Einstellungen der Netzwerkarte nachschauen</li>
<li><b>WLAN Accesspoints:</b> h&auml;ngt von Modell und deren Firmware ab. OpenWRT basierte Ger&auml;te unterst&uuml;tzen es normalerweise</li> <li><b>WLAN Accesspoints:</b> h&auml;ngt von Modell und deren Firmware ab. OpenWRT basierte Ger&auml;te unterst&uuml;tzen es normalerweise</li>
</div> </div>
</div>
<div id="nosw_hlpE" onclick="ToggleHelp('nosw_hlpE')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Multiswitch emulation on OctopusNet S8</h3>
Multiswitch emulation allows to connect directly a Quad/Quattro LNB to the 4 inputs on the S8.
Disabling configures the S8 to a standard 4 input system
</div>
</div>
<div id="nosw_hlpD" onclick="ToggleHelp('nosw_hlpD')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Multischalter-Emulation OctopusNet S8</h3>
Multischalter-Emulation erlaubt den direkten Anschlu&szlig; eines Quad/Quattro LNB an die S8
Abschalten konfiguriert die S8 als ein Standard System mit 4 Eing&auml;ngen
</div>
</div>
<div id="strict_hlpE" onclick="ToggleHelp('strict_hlpE')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Enforce strict SAT>IP</h3>
<p/>
The SAT>IP specification allows a second client to receive a stream created by another client.
The OctopusNet allows to modify some parameters (like PIDs) on this second stream. The original stream is not affected bei this.
<p/>
Enforce strict SAT>IP disables this enhancment.
<br/>
Do this for testing clients to ensure they are compatible with other SAT>IP servers
</div>
</div>
<div id="strict_hlpD" onclick="ToggleHelp('strict_hlpD')"
style="display: none; position: absolute; width: 660px; left: 30px; top:30px; z-index: 2; border: 1px solid #000000; background: #FFFFE0;">
<div style="position: relative; margin:20px; clear:both">
<h3>Erzwinge strictes SAT>IP</h3>
<p/>
Die SAT>IP Specification erlaubt einem zweiten Client das Empfangen eines von einem anderen Client angelegten Stream. Die OctopusNet erlaubt
die &Auml;nderung eingiger Parameter (z.B. PIDs) für diesen Stream. Der orginale Stream wird dadurch nicht beinflusst.
<p/>
Das Erzwingen von stricten SAT>IP achaltet diese Erweiterung ab.
<br/>
Beim Testen von Clients ist es sinnvoll diesen Parameter zu setzen um die Kompatibilit&auml;t mit anderen SAT>IP Servern sicherzustellen.
</div>
</div>
<!-- End Content --> <!-- End Content -->
</div> </div>
</td> </td>

View File

@ -71,17 +71,18 @@ if query ~= "" then
name,value = string.match(v,"(%w+)%=(%d+)") name,value = string.match(v,"(%w+)%=(%d+)")
if( WriteSetting(name,value == "1") ) then if( WriteSetting(name,value == "1") ) then
if name == "telnet" then if name == "telnet" then
os.rename("/etc/securetty","/etc/securetty.bak"); -- temp fix to allow root login on telnet --~ os.rename("/etc/securetty","/etc/securetty.bak"); -- temp fix to allow root login on telnet
os.execute("/etc/init.d/S91telnet restart") os.execute("/etc/init.d/S91telnet restart")
end end
if name == "vlan" then restart = 1 end if name == "vlan" then restart = 1 end
if name == "nodms" then restart = 1 end if name == "nodms" then restart = 1 end
if name == "nodvbt" then restart = 1 end if name == "nodvbt" then restart = 1 end
if name == "noswitch" then restart = 1 end if name == "noswitch" then restart = 1 end
nextloc = "wait.html?5" if name == "strict" then restart = 1 end
nextloc = "wait.html?10"
end end
end end
if restart == 1 then os.execute("/etc/init.d/S99octo restartoctonet&") end if restart == 1 then os.execute("/etc/init.d/S99octo restartoctonet > /dev/null 2>&1 &") end
print(proto.." 303") print(proto.." 303")
print("Location: http://"..host.."/"..nextloc) print("Location: http://"..host.."/"..nextloc)
print("") print("")
@ -122,6 +123,13 @@ else
print("noswitchEnabled = false;") print("noswitchEnabled = false;")
end end
if ReadSetting("strict") then
print("strictEnabled = true;")
else
print("strictEnabled = false;")
end
end end