mirror of
https://github.com/kenzok8/small-package.git
synced 2026-02-08 07:37:13 +08:00
update 05-03 23:05:47
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
LUCI_TITLE:=LuCI support arp online
|
||||
LUCI_DEPENDS:=
|
||||
LUCI_DEPENDS:=+luci-app-nlbwmon
|
||||
LUCI_PKGARCH:=all
|
||||
PKG_NAME:=luci-app-onliner
|
||||
PKG_VERSION:=1.1
|
||||
@@ -15,8 +15,13 @@ PKG_RELEASE:=5
|
||||
define Package/luci-app-onliner/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci
|
||||
cp -pR ./luasrc/* $(1)/usr/lib/lua/luci
|
||||
|
||||
$(INSTALL_DIR) $(1)/
|
||||
cp -pR ./root/* $(1)/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh-cn/onliner.po $(1)/usr/lib/lua/luci/i18n/onliner.zh-cn.lmo
|
||||
|
||||
endef
|
||||
|
||||
define Package/luci-app-onliner/postinst
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
module("luci.controller.onliner",package.seeall)
|
||||
|
||||
nixio=require"nixio"
|
||||
function index()
|
||||
entry({"admin","status","onliner"},alias("admin","status","onliner","onliner"),_("Online User"))
|
||||
entry({"admin","status","onliner","onliner"},template("onliner/onliner"),_("Online User"),1)
|
||||
entry({"admin", "status","onliner","speed"}, template("onliner/display"), _("speed"), 2)
|
||||
entry({"admin", "status","onliner","setnlbw"}, call("set_nlbw"))
|
||||
entry({"admin","status","onliner"},alias("admin","status","onliner","onliner"),_("Online User"), 50)
|
||||
entry({"admin","status","onliner","onliner"},template("onliner/onliner"),_("User List"), 1)
|
||||
entry({"admin","status","onliner","speed"}, template("onliner/display"), _("speed"), 2)
|
||||
entry({"admin","status","onliner","setnlbw"}, call("set_nlbw"))
|
||||
end
|
||||
function set_nlbw()
|
||||
if nixio.fs.access("/var/run/onsetnlbw") then
|
||||
|
||||
@@ -357,11 +357,11 @@ function fetchData(period)
|
||||
if (res !== null && typeof(res) === 'object' && typeof(res.columns) === 'object' && typeof(res.data) === 'object')
|
||||
trafficData = res;
|
||||
trafficData["data"].sort();
|
||||
bakdatanew = JSON.parse(JSON.stringify(trafficData["data"]));
|
||||
bakdatanew = $.extend(true, {}, trafficData["data"]);
|
||||
if (bakdataold){
|
||||
var j=0;
|
||||
var k=j;
|
||||
var ll=bakdataold.length;
|
||||
var ll=Object.getOwnPropertyNames(bakdataold).length;
|
||||
for (i=0,l=trafficData["data"].length; i<l ; i++){
|
||||
one=trafficData["data"][i];
|
||||
for (j=k;j<ll;j++){
|
||||
@@ -394,7 +394,7 @@ function fetchData(period)
|
||||
renderLayer7Data();
|
||||
renderIPv6Data();
|
||||
});
|
||||
XHR.poll(5,'<%=url([[admin]], [[status]], [[onliner]], [[setnlbw]])%>', null, function(xhr, res) {
|
||||
XHR.poll(5,'<%=url([[admin]], [[nlbw]], [[onliner]], [[setnlbw]])%>', null, function(xhr, res) {
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -71,17 +71,17 @@ end
|
||||
|
||||
var td = tr.insertCell(-1);
|
||||
td.colSpan = 4;
|
||||
td.innerHTML = '<em><br /><%:What? There is no one online.%></em>';
|
||||
td.innerHTML = '<em><br /><%:There is no one online now.%></em>';
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
//]]></script>
|
||||
|
||||
<h2 name="content"><%:Status%></h2>
|
||||
<h2 name="content" style="display:none"><%:Status%></h2>
|
||||
|
||||
<fieldset class="cbi-section">
|
||||
<legend><%:user online%></legend>
|
||||
<legend style="display:none"><%:user online%></legend>
|
||||
|
||||
<table class="cbi-section-table" id="online_status_table">
|
||||
<tr class="cbi-section-table-titles">
|
||||
|
||||
12
luci-app-onliner/po/zh-cn/onliner.po
Normal file
12
luci-app-onliner/po/zh-cn/onliner.po
Normal file
@@ -0,0 +1,12 @@
|
||||
msgid "Online User"
|
||||
msgstr "在线用户"
|
||||
|
||||
msgid "User List"
|
||||
msgstr "用户列表"
|
||||
|
||||
msgid "user online"
|
||||
msgstr "客户端"
|
||||
|
||||
msgid "speed"
|
||||
msgstr "网速监控"
|
||||
|
||||
1
luci-app-onliner/po/zh_Hans
Symbolic link
1
luci-app-onliner/po/zh_Hans
Symbolic link
@@ -0,0 +1 @@
|
||||
zh-cn
|
||||
@@ -1,6 +0,0 @@
|
||||
### 通过arp实现的在线人员查看的luci界面,统计误差为arp老化时间 ###
|
||||
### 通过nlbwmon实现的实时网速查看每两秒更新 需要luci-app-nlbwmon ###
|
||||
|
||||

|
||||
|
||||

|
||||
Reference in New Issue
Block a user