X-Git-Url: http://git.openwrt.org/?p=feed%2Frouting.git;a=blobdiff_plain;f=bird-openwrt%2Fbird4-openwrt%2Fsrc%2Fview%2Flog.htm;fp=bird-openwrt%2Fbird4-openwrt%2Fsrc%2Fview%2Flog.htm;h=0000000000000000000000000000000000000000;hp=2a85e9f36ce7d2231277a5cbb4ebee3027887c7a;hb=23c04022c696c75281933f6552334f002a315143;hpb=453de2136e2f354b2d6c88270297f31d4de488ae diff --git a/bird-openwrt/bird4-openwrt/src/view/log.htm b/bird-openwrt/bird4-openwrt/src/view/log.htm deleted file mode 100644 index 2a85e9f..0000000 --- a/bird-openwrt/bird4-openwrt/src/view/log.htm +++ /dev/null @@ -1,41 +0,0 @@ -<%- - -- Only populate textarea through XHR.poll - -- "refresh" is present in the URL (.../log?refresh=1) - if luci.http.formvalue("refresh") then - - -- Force HTTP Contents to be "text/plain" - luci.http.prepare_content("text/plain") - - local sys = require("luci.sys") - local uci = require "luci.model.uci".cursor() - - -- Get Log File from Bird's configuration or leave it empty. - local log_file = uci:get("bird4", "global", "log_file") or "" - local log_size = "" - if log_file then - log_size = sys.exec("du -h " .. log_file .. " | awk '{print $1}'") - -- Gathering last 30 lines of the Log File. - lf = sys.exec("tail -n30 " .. log_file):gsub("\r\n?", "\n") - end - - -- Write File used and its contents. - luci.http.write("Using Log File: " .. log_file .. " - File Size: " .. log_size .. "\n" .. lf) - - -- Avoid printing the rest of the page (return only text log data) - return - end --%> - -<%+header%> - - - - - -<%+footer%>