X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=applications%2Fluci-app-ddns%2Fluasrc%2Fview%2Fddns%2Foverview_status.htm;h=b409ed0728a83f9db01914ca8c2ee058eecb8501;hb=3bae3c7f5e8c383e481667fcfeae7765a1dacc75;hp=ea8e4a1e31fb07ce0a6ff6e371ac1a618befba97;hpb=31e7adea63a4e7174d7f91daa9d323ee78a17a18;p=project%2Fluci.git diff --git a/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm b/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm index ea8e4a1e3..b409ed072 100644 --- a/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm +++ b/applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm @@ -19,7 +19,7 @@ var section = data[i].section // Section to handle var cbx = document.getElementById("cbid.ddns." + section + ".enabled"); // Enabled var btn = document.getElementById("cbid.ddns." + section + "._startstop"); // Start/Stop button - var rip = document.getElementById("cbid.ddns." + section + "._domainIP.two"); // Registered IP + var rip = document.getElementById("cbid.ddns." + section + "._lookupIP.two"); // Registered IP var lup = document.getElementById("cbid.ddns." + section + "._update.one"); // Last Update var nup = document.getElementById("cbid.ddns." + section + "._update.two"); // Next Update if ( !(cbx && btn && rip && lup && nup) ) { return; } // security check @@ -76,12 +76,12 @@ break; } - // domain - // (data[i].domain ignored here + // lookup + // (data[i].lookup ignored here // registered IP // rip.innerHTML = "Registered IP"; - if (data[i].domain == "_nodomain_") + if (data[i].lookup == "_nolookup_") rip.innerHTML = ''; else if (data[i].reg_ip == "_nodata_") rip.innerHTML = '<%:No data%>'; @@ -136,7 +136,7 @@ // do start/stop var btnXHR = new XHR(); - btnXHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "startstop")%>/' + section + '/' + cbx.checked, null, + btnXHR.post('<%=url([[admin]], [[services]], [[ddns]], [[startstop]])%>/' + section + '/' + cbx.checked, { token: '<%=token%>' }, function(x, data) { if (x.responseText == "_uncommitted_") { // we need a trick to display Ampersand "&" in stead of "&" or "&" @@ -155,7 +155,7 @@ } // force to immediate show status on page load (not waiting for XHR.poll) - XHR.get('<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.get('<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null, function(x, data) { if (data) { _data2elements(data); } } @@ -164,7 +164,7 @@ // define only ONE XHR.poll in a page because if one is running it blocks the other one // optimum is to define on Map or Section Level from here you can reach all elements // we need update every 15 seconds only - XHR.poll(15, '<%=luci.dispatcher.build_url("admin", "services", "ddns", "status")%>', null, + XHR.poll(5, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null, function(x, data) { if (data) { _data2elements(data); } }