summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-ddns/luasrc/view
diff options
context:
space:
mode:
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-11-15 11:42:43 +0100
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>2015-11-15 11:42:43 +0100
commit28d86aeec5bd47846961073846519f428a1ddff9 (patch)
tree89c380c0864f6a9c9f2cb6f68a2cd1f0135ff021 /applications/luci-app-ddns/luasrc/view
parent1cb3adb619bdd876867f4c4da615ea850464e711 (diff)
luci-app-ddns: rollup to 2.3.0 to reflect changes on ddns-scripts
- support for new options "lookup_host", "param_enc" and "param_opt" - rewritten ddns provider handling to only show/check needed options "domain", "username", etc. - modified version check/handling incl. using new ipkg.compare_versions function - modified map.title and map.description generation - changed XHR.poll interval to 15 seconds on system status page - using new value_parse function for testing and later implementation into cbi.lua - some optimizations Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Diffstat (limited to 'applications/luci-app-ddns/luasrc/view')
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm2
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/overview_status.htm14
-rw-r--r--applications/luci-app-ddns/luasrc/view/ddns/system_status.htm14
3 files changed, 15 insertions, 15 deletions
diff --git a/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm b/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm
index 4dcb7bb6f..fd1d5be26 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm
@@ -6,7 +6,7 @@
var txt = document.getElementById("cbid.ddns." + section + "._logview.txt"); // TextArea
if ( !txt ) { return; } // security check
- XHR.get('<%=url('admin/services/ddns/logview')%>/' + section, null,
+ XHR.get('<%=url([[admin]], [[services]], [[ddns]], [[logview]])%>/' + section, null,
function(x) {
if (x.responseText == "_nodata_")
txt.value = "<%:File not found or empty%>";
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 b6d4ebb9f..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 = '<em><%:No data%></em>';
@@ -136,7 +136,7 @@
// 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;"
@@ -155,7 +155,7 @@
}
// 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); }
}
@@ -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, '<%=url('admin/services/ddns/status')%>', null,
+ XHR.poll(5, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
function(x, data) {
if (data) { _data2elements(data); }
}
diff --git a/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm b/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm
index 06dca48a9..5bdcb03e7 100644
--- a/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm
+++ b/applications/luci-app-ddns/luasrc/view/ddns/system_status.htm
@@ -69,15 +69,15 @@
break;
}
- // domain
- if (data[j].domain == "_nodomain_")
+ // lookup
+ if (data[j].lookup == "_nolookup_")
tr.insertCell(-1).innerHTML = '<em><%:config error%></em>';
else
- tr.insertCell(-1).innerHTML = data[j].domain;
+ tr.insertCell(-1).innerHTML = data[j].lookup;
// registered IP
switch (data[j].reg_ip) {
- case "_nodomain_":
+ case "_nolookup_":
tr.insertCell(-1).innerHTML = '<em><%:Config error%></em>';
break;
case "_nodata_":
@@ -111,13 +111,13 @@
}
// force to immediate show status (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(x, data); }
}
);
- XHR.poll(5, '<%=url('admin/services/ddns/status')%>', null,
+ XHR.poll(15, '<%=url([[admin]], [[services]], [[ddns]], [[status]])%>', null,
function(x, data) {
if (data) { _data2elements(x, data); }
}
@@ -132,7 +132,7 @@
<tr class="cbi-section-table-titles">
<th class="cbi-section-table-cell"><%:Configuration%></th>
<th class="cbi-section-table-cell"><%:Next Update%></th>
- <th class="cbi-section-table-cell"><%:Hostname/Domain%></th>
+ <th class="cbi-section-table-cell"><%:Lookup Hostname%></th>
<th class="cbi-section-table-cell"><%:Registered IP%></th>
<th class="cbi-section-table-cell"><%:Network%></th>
</tr>