update 2026-09-24 10:46:53

This commit is contained in:
action committed 2026-09-24 10:46:53 +08:00
1 parent 907a158127
commit b31a5c3878
4914 files changed
-1716179

No files matched your search

-18
View File
@@ -1,18 +0,0 @@
# Copyright (C) 2016 Openwrt.org
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI support for floatip
LUCI_DEPENDS:=+floatip
LUCI_PKGARCH:=all
PKG_VERSION:=0.1.3-r2
# PKG_RELEASE MUST be empty for luci.mk
PKG_RELEASE:=
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot signature
@@ -1,24 +0,0 @@
module("luci.controller.floatip", package.seeall)
function index()
if not nixio.fs.access("/etc/config/floatip") then
return
end
entry({"admin", "services", "floatip"}, cbi("floatip"), _("FloatingGateway"), 20).dependent = true
entry({"admin", "services", "floatip_status"}, call("floatip_status"))
end
function floatip_status()
local sys = require "luci.sys"
local uci = require "luci.model.uci".cursor()
local status = {
running = not (sys.call("flock -sn /var/lock/floatip_loop.lock -c true >/dev/null") == 0),
}
luci.http.prepare_content("application/json")
luci.http.write_json(status)
end
@@ -1,36 +0,0 @@
local m, s, o
m = Map("floatip", translate("FloatingGateway"), translate("FloatingGateway allows two gateway within one lan which can switch between each other in case of a failure.")
.. "<br>" .. translate("Before using the FloatingGateway, ensure that the LAN interface is static address.")
.. "<br>" .. translate("Note that this service is actually a floating IP implementation. It only configures the IP address and does not modify the gateway advertised by the DHCP service, because the DHCP service is not necessarily provided by the local machine. It is named floating gateway because this is the most common usage scenario."))
m:section(SimpleSection).template = "floatip_status"
s=m:section(NamedSection, "main", translate("Global settings"))
s.anonymous=true
o = s:option(Flag, "enabled", translate("Enable"))
o.rmempty = false
o = s:option(ListValue, "role", translate("Node Role"))
o.rmempty = false
o.widget = "select"
o:value("main", translate("FG Preempt Node"))
o:value("fallback", translate("FG Fallback Node"))
o = s:option(Value, "set_ip", translate("Floating Gateway IP"), translate("This IP must be within any subnet of the LAN interface"))
o.rmempty = false
o.datatype = "or(ip4addr,cidr4)"
o = s:option(Value, "check_ip", translate("FG Preempt Node IP"))
o.datatype = "ip4addr"
o:depends("role", "fallback")
o = s:option(Value, "check_url", translate("Check URL"), translate("If status code of the URL is not 2xx, then release the floating IP and disable LAN port pinging"))
o:depends("role", "main")
o = s:option(Value, "check_url_timeout", translate("Check URL Timeout (s)"), translate("Default is 5 seconds if not set"))
o.datatype = "uinteger"
o:depends("role", "main")
return m
@@ -1,26 +0,0 @@
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=url("admin/services/floatip_status")%>', null,
function(x, st)
{
var tb = document.getElementById('floatip_status');
if (st && tb)
{
if (st.running)
{
tb.innerHTML = '<br/><em style=\"color:green\"><%:The FloatingGateway service is running.%></em>';
}
else
{
tb.innerHTML = '<br/><em style=\"color:red\"><%:The FloatingGateway service is not running.%></em>';
}
}
}
);
//]]></script>
<fieldset class="cbi-section">
<legend><%:FloatingGateway Status%></legend>
<p id="floatip_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>
-56
View File
@@ -1,56 +0,0 @@
msgid "FloatingGateway"
msgstr "浮动网关"
msgid "Running state"
msgstr "运行状态"
msgid "FloatingGateway allows two gateway within one lan which can switch between each other in case of a failure."
msgstr "浮动网关可以让你在内网有两个相互备份的网关,出现问题会相互切换。"
msgid "The FloatingGateway service is running."
msgstr "服务已启动"
msgid "The FloatingGateway service is not running."
msgstr "服务未启动"
msgid "FloatingGateway Status"
msgstr "服务状态"
msgid "Collecting data..."
msgstr "收集数据..."
msgid "Node Role"
msgstr "节点角色"
msgid "FG Preempt Node"
msgstr "旁路由"
msgid "FG Fallback Node"
msgstr "主路由"
msgid "Floating Gateway IP"
msgstr "浮动网关 IP"
msgid "FG Preempt Node IP"
msgstr "旁路由 IP"
msgid "Check URL"
msgstr "检查 URL"
msgid "If status code of the URL is not 2xx, then release the floating IP and disable LAN port pinging"
msgstr "如果检查URL状态码不是2xx,则释放浮动IP,并禁止LAN口ping"
msgid "Check URL Timeout (s)"
msgstr "检查 URL 超时(秒)"
msgid "Default is 5 seconds if not set"
msgstr "默认5秒"
msgid "Before using the FloatingGateway, ensure that the LAN interface is static address."
msgstr "使用浮动网关前需确保 LAN 接口是静态地址。"
msgid "Note that this service is actually a floating IP implementation. It only configures the IP address and does not modify the gateway advertised by the DHCP service, because the DHCP service is not necessarily provided by the local machine. It is named floating gateway because this is the most common usage scenario."
msgstr "注意此服务实际是浮动 IP 的实现,仅配置 IP 地址,不会修改 DHCP 服务通告的网关,因为 DHCP 服务不一定由本机提供。取名浮动网关只是因为这是最常见的使用场景。"
msgid "This IP must be within any subnet of the LAN interface"
msgstr "此 IP 必须在 LAN 接口的任意一个子网范围内"
-1
View File
@@ -1 +0,0 @@
zh-cn
@@ -1,4 +0,0 @@
#!/bin/sh
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
exit 0