add luci support for omcproxy
Signed-off-by: Shun Li <riverscn@gmail.com>
This commit is contained in:
parent
3fd4ec0215
commit
796301a02f
5 changed files with 209 additions and 0 deletions
22
applications/luci-app-omcproxy/Makefile
Normal file
22
applications/luci-app-omcproxy/Makefile
Normal file
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# Copyright 2019 Shun Li <riverscn@gmail.com>
|
||||
#
|
||||
# This is free software, licensed under the Apache License, Version 2.0 .
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-omcproxy
|
||||
PKG_VERSION:=0.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_MAINTAINER:=Shun Li <riverscn@gmail.com>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
LUCI_TITLE:=LuCI support for omcproxy
|
||||
LUCI_DEPENDS:=+omcproxy
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
include $(TOPDIR)/feeds/luci/luci.mk
|
||||
|
||||
# call BuildPackage - OpenWrt buildroot signature
|
|
@ -0,0 +1,40 @@
|
|||
// Copyright 2019 Shun Li <riverscn@gmail.com>
|
||||
// This is free software, licensed under the Apache License, Version 2.0
|
||||
|
||||
'use strict';
|
||||
'require form';
|
||||
'require tools.widgets as widgets';
|
||||
|
||||
return L.view.extend({
|
||||
render: function () {
|
||||
var m, s, o;
|
||||
|
||||
m = new form.Map('omcproxy', _('omcproxy'), _('Embedded IGMPv3 and MLDv2 proxy'));
|
||||
|
||||
s = m.section(form.TypedSection, 'proxy', _('Proxy Instance'));
|
||||
s.anonymous = true;
|
||||
s.addremove = true;
|
||||
s.addbtntitle = _('Add instance');
|
||||
|
||||
o = s.option(form.ListValue, 'scope', _('Scope'), _('Minimum multicast scope to proxy (only affects IPv6 multicast)'));
|
||||
o.datatype = 'string';
|
||||
o.value('', _('default'))
|
||||
o.value('global', _('global'))
|
||||
o.value('organization', _('organization-local'))
|
||||
o.value('site', _('site-local'))
|
||||
o.value('admin', _('admin-local'))
|
||||
o.value('realm', _('realm'))
|
||||
o.default = '';
|
||||
o.rmempty = true;
|
||||
|
||||
o = s.option(widgets.NetworkSelect, 'uplink', _('Uplink interface'), _('Where does the multicast come from?'));
|
||||
o.nocreate = true;
|
||||
o.rmempty = false;
|
||||
|
||||
o = s.option(widgets.NetworkSelect, 'downlink', _('Downlink interface'), _('Where does the multicast go to?'));
|
||||
o.nocreate = true;
|
||||
o.rmempty = false;
|
||||
|
||||
return m.render();
|
||||
}
|
||||
});
|
|
@ -0,0 +1,13 @@
|
|||
-- Copyright 2019 Shun Li <riverscn@gmail.com>
|
||||
-- This is free software, licensed under the Apache License, Version 2.0
|
||||
|
||||
module("luci.controller.omcproxy", package.seeall)
|
||||
|
||||
function index()
|
||||
if not nixio.fs.access("/etc/config/omcproxy") then
|
||||
return
|
||||
end
|
||||
|
||||
entry({"admin", "services", "omcproxy"}, view("omcproxy"), _("omcproxy")).dependent = true
|
||||
|
||||
end
|
67
applications/luci-app-omcproxy/po/templates/omcproxy.pot
Normal file
67
applications/luci-app-omcproxy/po/templates/omcproxy.pot
Normal file
|
@ -0,0 +1,67 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:14
|
||||
msgid "Add instance"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:31
|
||||
msgid "Downlink interface"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:9
|
||||
msgid "Embedded IGMPv3 and MLDv2 proxy"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:16
|
||||
msgid "Minimum multicast scope to proxy (only affects IPv6 multicast)"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:11
|
||||
msgid "Proxy Instance"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:16
|
||||
msgid "Scope"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:27
|
||||
msgid "Uplink interface"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:27
|
||||
msgid "Where does the multicast come from?"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:31
|
||||
msgid "Where does the multicast go to?"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:22
|
||||
msgid "admin-local"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:18
|
||||
msgid "default"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:19
|
||||
msgid "global"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:9
|
||||
#: luasrc/controller/omcproxy.lua:11
|
||||
msgid "omcproxy"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:20
|
||||
msgid "organization-local"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:23
|
||||
msgid "realm"
|
||||
msgstr ""
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:21
|
||||
msgid "site-local"
|
||||
msgstr ""
|
67
applications/luci-app-omcproxy/po/zh-cn/omcproxy.po
Normal file
67
applications/luci-app-omcproxy/po/zh-cn/omcproxy.po
Normal file
|
@ -0,0 +1,67 @@
|
|||
msgid ""
|
||||
msgstr "Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:14
|
||||
msgid "Add instance"
|
||||
msgstr "添加实例"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:31
|
||||
msgid "Downlink interface"
|
||||
msgstr "下行链路接口"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:9
|
||||
msgid "Embedded IGMPv3 and MLDv2 proxy"
|
||||
msgstr "嵌入式IGMPv3和MLDv2组播代理(omcproxy)"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:16
|
||||
msgid "Minimum multicast scope to proxy (only affects IPv6 multicast)"
|
||||
msgstr "代理的最小范围(只影响IPv6的组播)"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:11
|
||||
msgid "Proxy Instance"
|
||||
msgstr "代理实例"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:16
|
||||
msgid "Scope"
|
||||
msgstr "范围"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:27
|
||||
msgid "Uplink interface"
|
||||
msgstr "上行链路接口"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:27
|
||||
msgid "Where does the multicast come from?"
|
||||
msgstr "组播数据来源"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:31
|
||||
msgid "Where does the multicast go to?"
|
||||
msgstr "组播代理去向"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:22
|
||||
msgid "admin-local"
|
||||
msgstr "管理本地范围"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:18
|
||||
msgid "default"
|
||||
msgstr "默认"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:19
|
||||
msgid "global"
|
||||
msgstr "全球范围"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:9
|
||||
#: luasrc/controller/omcproxy.lua:11
|
||||
msgid "omcproxy"
|
||||
msgstr "组播代理"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:20
|
||||
msgid "organization-local"
|
||||
msgstr "机构本地范围"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:23
|
||||
msgid "realm"
|
||||
msgstr "保留"
|
||||
|
||||
#: htdocs/luci-static/resources/view/omcproxy/overview.js:21
|
||||
msgid "site-local"
|
||||
msgstr "站点本地范围"
|
Loading…
Reference in a new issue