luci-app-ddns: rollup to 2.3.0 to reflect changes on ddns-scripts
[project/luci.git] / applications / luci-app-ddns / luasrc / view / ddns / overview_status.htm
index b6d4ebb..b409ed0 100644 (file)
@@ -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
                                        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 = '<em><%:No data%></em>';
 
                // do start/stop
                var btnXHR = new XHR();
-               btnXHR.post('<%=url('admin/services/ddns/startstop')%>/' + section + '/' + cbx.checked, { token: '<%=token%>' },
+               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 "&#38;" or "&amp;"
        }
 
        // force to immediate show status on page load (not waiting for XHR.poll)
-       XHR.get('<%=url('admin/services/ddns/status')%>', null,
+       XHR.get('<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
                function(x, data) {
                        if (data) { _data2elements(data); }
                }
        // 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, '<%=url('admin/services/ddns/status')%>', null,
+       XHR.poll(5, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
                function(x, data) {
                        if (data) { _data2elements(data); }
                }