Fix switching port showing

Fix reading of config file to show active switching ports
This commit is contained in:
nahy 2014-06-08 15:01:27 +04:00
parent d2b6e89c4d
commit 45bddd4804
1 changed files with 7 additions and 7 deletions

View File

@ -185,9 +185,9 @@
<div id="menu">
{{? (function(){
if (!it.portalConfig.proxy) return false;
for (var p in it.portalConfig.proxy){
if (it.portalConfig.proxy[p].enabled)
if (!it.portalConfig.switching) return false;
for (var p in it.portalConfig.switching){
if (it.portalConfig.switching[p].enabled)
return true;
}
return false;
@ -197,14 +197,14 @@
{{?}}
<div class="menuList">
{{ for (var p in it.portalConfig.proxy){
if (!it.portalConfig.proxy[p].enabled) continue;
{{ for (var p in it.portalConfig.switching){
if (!it.portalConfig.switching[p].enabled) continue;
var info = {
algo: p,
ports: {},
host: it.portalConfig.website.stratumHost
};
info.ports[it.portalConfig.proxy[p].port] = {diff: it.portalConfig.proxy[p].diff};
info.ports[it.portalConfig.switching[p].port] = {diff: it.portalConfig.switching[p].diff};
info = JSON.stringify(info).replace(/"/g, '&quot;');
}}
<a href="#" class="poolOption" data-info="{{=info}}">{{=p}}</a>
@ -315,4 +315,4 @@
alert('NOMP App development still in progress...');
return false;
});
</script>
</script>