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

SCIF settings page extended for 12 Tuner

This commit is contained in:
mvoelkel 2019-07-29 17:19:08 +02:00
parent f1e6470651
commit 82c51267bd

View File

@ -12,6 +12,29 @@
<!-- Add page scripts here --> <!-- Add page scripts here -->
<script type="text/javascript"> <script type="text/javascript">
var xmlhttp = new XMLHttpRequest();
var url = "/octoserve/tunerstatus.json";
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState == 4 )
{
if( xmlhttp.status == 200 )
myFunction(xmlhttp.responseText);
}
}
function myFunction(response)
{
try
{
var tl = JSON.parse(response);
for(i= 0; i < tl.TunerList.length; i++ )
document.getElementById("trTuner"+i).style.display = "table-row";
}
catch(err) {}
}
SCIFEnabled = false; SCIFEnabled = false;
SelectedManufacturer = 0; SelectedManufacturer = 0;
SelectedUnit = 0; SelectedUnit = 0;
@ -97,14 +120,10 @@ function OnLoad()
{ {
SCIFEnabled = false; SCIFEnabled = false;
TunerList[0] = document.Tuner1; for( i = 0; i < 12 ; i++ )
TunerList[1] = document.Tuner2; {
TunerList[2] = document.Tuner3; TunerList[i] = document.getElementById("formTuner"+i);
TunerList[3] = document.Tuner4; }
TunerList[4] = document.Tuner5;
TunerList[5] = document.Tuner6;
TunerList[6] = document.Tuner7;
TunerList[7] = document.Tuner8;
document.Manufacturer.Select.length = 0; document.Manufacturer.Select.length = 0;
for( i = 0; i < ManufacturerList.length ; i++ ) for( i = 0; i < ManufacturerList.length ; i++ )
@ -141,6 +160,8 @@ function OnLoad()
document.getElementById("EnableButton").checked = SCIFEnabled; document.getElementById("EnableButton").checked = SCIFEnabled;
document.getElementById("SetButton").disabled = true; document.getElementById("SetButton").disabled = true;
xmlhttp.open("GET", url, true);
xmlhttp.send();
} }
</script> </script>
@ -196,93 +217,22 @@ function OnLoad()
</td> </td>
</tr> </tr>
<tr> <script type="text/javascript">
<td>Tuner 1</td> for( var i = 0; i < 12 ; i++ )
<td> {
<form name="Tuner1" action=""> // document.write('<tr id="trTuner'+i+'">');
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner1.Select.selectedIndex)"> document.write('<tr id="trTuner'+i+'" style="display:none">');
<option>----</option> document.write('<td>Tuner ' + (i+1) + '</td>');
</select> document.write('<td>');
</form> document.write('<form name="Tuner'+(i+1)+'" id="formTuner'+i+'" action="">');
</td> document.write('<select name="Select" size="1" style="width: 300px" onchange="SetSlot(1,document.Tuner' +(i+1)+'.Select.selectedIndex)">');
</tr> document.write('</option>----</option>');
document.write('</select>');
<tr> document.write('</form>');
<td>Tuner 2</td> document.write('</td>');
<td> document.write('</tr>');
<form name="Tuner2" action=""> }
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(2,document.Tuner2.Select.selectedIndex)"> </script>
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 3</td>
<td>
<form name="Tuner3" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(3,document.Tuner3.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 4</td>
<td>
<form name="Tuner4" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(4,document.Tuner4.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 5</td>
<td>
<form name="Tuner5" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(5,document.Tuner5.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 6</td>
<td>
<form name="Tuner6" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(6,document.Tuner6.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 7</td>
<td>
<form name="Tuner7" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(7,document.Tuner7.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr>
<td>Tuner 8</td>
<td>
<form name="Tuner8" action="">
<select name="Select" size="1" style="width: 300px" onchange="SetSlot(8,document.Tuner8.Select.selectedIndex)">
<option>----</option>
</select>
</form>
</td>
</tr>
<tr><td colspan="2" align="right"> <tr><td colspan="2" align="right">
<div style="width: 300px"> <div style="width: 300px">