update 2026-10-27 07:31:06

This commit is contained in:
action committed 2026-10-27 07:31:06 +08:00
1 parent 197c60d843
commit a4d6470641
4213 files changed
-1575003

No files matched your search

@@ -1,34 +0,0 @@
module("luci.controller.fastnet", package.seeall)
function index()
if not nixio.fs.access("/etc/config/fastnet") then return end
entry({"admin", "services", "fastnet"}, cbi("fastnet"), _("FastNet"), 50).dependent = true
entry({"admin", "services", "fastnet", "status"}, call("action_status")).leaf = true
local open = entry({"admin", "services", "fastnet", "open"}, call("action_open"))
open.leaf = true
open.dependent = false
open.sysauth = false
end
local function compat()
local dispatcher = require "luci.dispatcher"
return require("luci.model.linkease.apps_compat").new({
http = require "luci.http",
resolver = require("luci.model.linkease.apps_openwrt").new(),
auth_url = dispatcher.build_url("admin", "services", "linkease_auth", "auth")
})
end
function action_status()
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
compat():legacy_status("fastnet", {
running = sys.call("pidof FastNet >/dev/null") == 0,
port = uci:get_first("fastnet", "fastnet", "port") or "3200"
})
end
function action_open()
compat():open("fastnet")
end
@@ -1,32 +0,0 @@
local sys = require "luci.sys"
local dispatcher = require "luci.dispatcher"
local m = Map("fastnet", translate("FastNet"))
m.description = translate("FastNet provides network testing tools and a Web UI.")
local st = m:section(SimpleSection, translate("Status"))
local running = (sys.call("pidof FastNet >/dev/null") == 0)
local url = dispatcher.build_url("admin", "services", "linkease_apps", "open") .. "?id=fastnet"
st.template = "fastnet/status"
st.running = running
st.url = url
local s = m:section(TypedSection, "fastnet", translate("Settings"))
s.anonymous = true
local enabled = s:option(Flag, "enabled", translate("Enable"))
enabled.default = enabled.enabled
local port = s:option(Value, "port", translate("Listen Port"))
port.datatype = "port"
port.default = "3200"
local token = s:option(Value, "token", translate("API Token"))
token.password = true
token.rmempty = true
local logger = s:option(Flag, "logger", translate("Enable Logging"))
logger.rmempty = true
return m
@@ -1,21 +0,0 @@
<fieldset class="cbi-section">
<legend><%:Status%></legend>
<div class="cbi-section-node">
<div class="cbi-value">
<label class="cbi-value-title"><%:Status%></label>
<div class="cbi-value-field">
<% if self.running then %>
<span style="color: green; font-weight: bold"><%:Running%></span>
<% else %>
<span style="color: red; font-weight: bold"><%:Not running%></span>
<% end %>
</div>
</div>
<div class="cbi-value">
<label class="cbi-value-title"><%:Open Web UI%></label>
<div class="cbi-value-field">
<a href="<%=self.url%>" target="_blank" rel="noreferrer"><%:Open Web UI%></a>
</div>
</div>
</div>
</fieldset>