<%+header%>
    <div>
        <input class="btn cbi-button-action" type="button" onclick="clearLog()" value="清空日志">
        <input class="btn cbi-button-action" type="button" onclick="toggleRefresh()" value="停止刷新">
    </div>
    <pre id="logContent">
<%
local fs = require "nixio.fs"
local log_file_path = "/var/log/ddns-go.log"
local raw_log_content = fs.readfile(log_file_path) or "No Log."
local log_lines = {}
for line in raw_log_content:gmatch("[^\r\n]+") do
    table.insert(log_lines, lin