luci/applications/luci-app-ddns/luasrc/view/ddns/detail_logview.htm
Christian Schoenebeck 28d86aeec5 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>
2015-11-15 11:42:43 +01:00

56 lines
1.9 KiB
HTML

<!-- ++ BEGIN ++ Dynamic DNS ++ detail_logview.htm ++ -->
<script type="text/javascript">//<![CDATA[
function onclick_logview(section, bottom) {
// get elements
var txt = document.getElementById("cbid.ddns." + section + "._logview.txt"); // TextArea
if ( !txt ) { return; } // security check
XHR.get('<%=url([[admin]], [[services]], [[ddns]], [[logview]])%>/' + section, null,
function(x) {
if (x.responseText == "_nodata_")
txt.value = "<%:File not found or empty%>";
else
txt.value = x.responseText;
if (bottom)
txt.scrollTop = txt.scrollHeight;
else
txt.scrollTop = 0; }
);
}
//]]></script>
<%+cbi/valueheader%>
<br />
<%
-- one button on top, one at the buttom
%>
<input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, false)"
<%=
attr("name", section) .. attr("id", cbid .. ".btn1") .. attr("value", self.inputtitle)
%> />
<br /><br />
<%
-- set a readable style taken from openwrt theme for textarea#syslog
-- in openwrt theme there are problems with a width of 100 so we check for theme and set to lower value
%>
<textarea style="width: <%if media == "/luci-static/openwrt.org" then%>98.7%<%else%>100%<%end%> ; min-height: 500px; border: 3px solid #cccccc; padding: 5px; font-family: monospace; resize: none;" wrap="off" readonly="readonly"
<%=
attr("name", cbid .. ".txt") .. attr("id", cbid .. ".txt") .. ifattr(self.rows, "rows")
%> >
<%-=pcdata(self:cfgvalue(section))-%>
</textarea>
<br /><br />
<%
-- one button on top, one at the buttom
%>
<input class="cbi-button cbi-input-button" style="align: center; width: 100%" type="button" onclick="onclick_logview(this.name, true)"
<%= attr("name", section) .. attr("id", cbid .. ".btn2") .. attr("value", self.inputtitle) %> />
<%+cbi/valuefooter%>
<!-- ++ END ++ Dynamic DNS ++ detail_logview.htm ++ -->