⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mtest.js

📁 Acorp firmware port for D-Link DSL-300T - root fs
💻 JS
字号:

<? if eq 1 1 '<script language="JavaScript">' '' ?>

<? if eq 1 1 '<? include ../html/js/jsl.js ?>'   '<script language="JavaScript" src="../html/js/jsl.js"></script>' ?>
<? if eq 1 1 '<? include ../html/js/error.js ?>' '<script language="JavaScript" src="../html/js/error.js"></script>' ?>

<? if eq 1 1 '' '<script language="JavaScript">' ?>

var PVC = new Array();
var MaxConnections;
var CurrentConnectionSelection = -1;
function uiPollResult()
{  
  document.getElementById("uiPostMTestResultForm").submit();
}
function uiDoOnLoad()
{
  var i = 0;

  <? multiquery manager:command/connection/list_group 'PVC[i++]="<? query $03:pvc:settings/vpi ?>" + "." + "<? query $03:pvc:settings/vci ?>";' ?>

  MaxConnections = i;
  switch(document.getElementById("uiPostTestCheckResult").value)
  {
    case "0":
       document.getElementById("uiViewTestResult").value = "Failure";
	   break;
    case "1":
	   document.getElementById("uiViewTestResult").value = "Success";
	   break;
    case "2":
	   document.getElementById("uiViewTestResult").value = "In progress...";
       setInterval("uiPollResult()",1000);
	   break;
    default:
	   document.getElementById("uiViewTestResult").value = "No test is running";
	   break;
  }  
  switch(document.getElementById("uiPostTestConnection").value) {
  	<? multiquery manager:command/connection/list_group
	 `case "$01":
	 		CurrentConnectionSelection = $00;
	 		jslDoToggleRadio("uiViewTestStatus",$00, MaxConnections);
			break;
	 ` ?>
  }
  jslDoShowComboBox("uiViewModemTest", "uiPostTestCommand");
}
function uiDoSave()
{
  if (CurrentConnectionSelection == -1)
  {
	alert ("Select a connection on which the test needs to execute");
	return;
  } 
  jslSetValue("uiPostTestCommand", "uiViewModemTest");
  document.getElementById("uiPostTestPVC").value = PVC[CurrentConnectionSelection];
  document.getElementById("uiPostForm").submit();
}
function uiChangeTestStatus (arg)
{
  CurrentConnectionSelection = arg;
  jslDoToggleRadio("uiViewTestStatus",arg, MaxConnections);
}
function uiCurrentConnid (conid)
{
  document.getElementById("uiPostTestConnection").value = conid;
}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -