Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/ex400-remove-wps
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • v2023.2.5-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
137 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • hoodselector
  • master
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.x
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
56 results
Show changes
Showing
with 417 additions and 151 deletions
...@@ -19,14 +19,14 @@ msgstr "Automatisch (RA/DHCPv6)" ...@@ -19,14 +19,14 @@ msgstr "Automatisch (RA/DHCPv6)"
msgid "Disabled" msgid "Disabled"
msgstr "Deaktiviert" msgstr "Deaktiviert"
msgid "Enable PoE passthrough" msgid "Enable \"%s\""
msgstr "PoE-Passthrough aktivieren" msgstr "\"%s\" aktivieren"
msgid "Enable meshing on the LAN interface" msgid "Enable PoE Passthrough"
msgstr "Mesh auf dem LAN-Port aktivieren" msgstr "PoE-Passthrough aktivieren"
msgid "Enable meshing on the WAN interface" msgid "Enable PoE Power Port %s"
msgstr "Mesh auf dem WAN-Port aktivieren" msgstr "PoE-Ausgabe auf Port %s aktivieren"
msgid "Gateway" msgid "Gateway"
msgstr "Gateway" msgstr "Gateway"
...@@ -40,6 +40,12 @@ msgstr "IPv4" ...@@ -40,6 +40,12 @@ msgstr "IPv4"
msgid "IPv6" msgid "IPv6"
msgstr "IPv6" msgstr "IPv6"
msgid "Interface"
msgstr "Interface"
msgid "LAN Interfaces"
msgstr "LAN-Interfaces"
msgid "Netmask" msgid "Netmask"
msgstr "Netzmaske" msgstr "Netzmaske"
...@@ -52,5 +58,8 @@ msgstr "Statisch" ...@@ -52,5 +58,8 @@ msgstr "Statisch"
msgid "Static DNS servers" msgid "Static DNS servers"
msgstr "Statische DNS-Server" msgstr "Statische DNS-Server"
msgid "WAN Interfaces"
msgstr "WAN-Interfaces"
msgid "WAN connection" msgid "WAN connection"
msgstr "WAN-Verbindung" msgstr "WAN-Verbindung"
...@@ -19,14 +19,14 @@ msgstr "Automatique (RA/DHCPv6)" ...@@ -19,14 +19,14 @@ msgstr "Automatique (RA/DHCPv6)"
msgid "Disabled" msgid "Disabled"
msgstr "Désactivé" msgstr "Désactivé"
msgid "Enable PoE passthrough" msgid "Enable \"%s\""
msgstr "" msgstr ""
msgid "Enable meshing on the LAN interface" msgid "Enable PoE Passthrough"
msgstr "Activer le réseau MESH sur le port LAN" msgstr ""
msgid "Enable meshing on the WAN interface" msgid "Enable PoE Power Port %s"
msgstr "Activer le réseau MESH sur les ports WAN" msgstr ""
msgid "Gateway" msgid "Gateway"
msgstr "Passerelle" msgstr "Passerelle"
......
...@@ -10,13 +10,13 @@ msgstr "" ...@@ -10,13 +10,13 @@ msgstr ""
msgid "Disabled" msgid "Disabled"
msgstr "" msgstr ""
msgid "Enable PoE passthrough" msgid "Enable \"%s\""
msgstr "" msgstr ""
msgid "Enable meshing on the LAN interface" msgid "Enable PoE Passthrough"
msgstr "" msgstr ""
msgid "Enable meshing on the WAN interface" msgid "Enable PoE Power Port %s"
msgstr "" msgstr ""
msgid "Gateway" msgid "Gateway"
...@@ -31,6 +31,12 @@ msgstr "" ...@@ -31,6 +31,12 @@ msgstr ""
msgid "IPv6" msgid "IPv6"
msgstr "" msgstr ""
msgid "Interface"
msgstr ""
msgid "LAN Interfaces"
msgstr ""
msgid "Netmask" msgid "Netmask"
msgstr "" msgstr ""
...@@ -43,5 +49,8 @@ msgstr "" ...@@ -43,5 +49,8 @@ msgstr ""
msgid "Static DNS servers" msgid "Static DNS servers"
msgstr "" msgstr ""
msgid "WAN Interfaces"
msgstr ""
msgid "WAN connection" msgid "WAN connection"
msgstr "" msgstr ""
package 'gluon-web-network'
entry({"admin", "network"}, model("admin/network"), _("Network"), 40) entry({"admin", "network"}, model("admin/network"), _("Network"), 40)
--[[ -- SPDX-License-Identifier: Apache-2.0
Copyright 2014 Nils Schneider <nils@nilsschneider.net> -- SPDX-FileCopyrightText: 2014, Nils Schneider <nils@nilsschneider.net>
-- SPDX-FileCopyrightText: 2023, Leonardo Mörlein <me@irrelefant.net>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
]]--
local uci = require("simple-uci").cursor() local uci = require("simple-uci").cursor()
local sysconfig = require 'gluon.sysconfig'
local util = require 'gluon.util'
local wan = uci:get_all("network", "wan") local wan = uci:get_all("network", "wan")
local wan6 = uci:get_all("network", "wan6") local wan6 = uci:get_all("network", "wan6")
local dns_static = uci:get_first("gluon-wan-dnsmasq", "static") local dns_static = uci:get_first("gluon-wan-dnsmasq", "static")
local f = Form(translate("WAN connection")) local f = Form(translate("WAN connection"))
local s = f:section(Section) local s = f:section(Section)
...@@ -42,7 +35,7 @@ ipv4_gateway.default = wan.gateway ...@@ -42,7 +35,7 @@ ipv4_gateway.default = wan.gateway
ipv4_gateway.datatype = "ip4addr" ipv4_gateway.datatype = "ip4addr"
local s = f:section(Section) s = f:section(Section)
local ipv6 = s:option(ListValue, "ipv6", translate("IPv6")) local ipv6 = s:option(ListValue, "ipv6", translate("IPv6"))
ipv6:value("dhcpv6", translate("Automatic (RA/DHCPv6)")) ipv6:value("dhcpv6", translate("Automatic (RA/DHCPv6)"))
...@@ -61,7 +54,7 @@ ipv6_gateway.default = wan6.ip6gw ...@@ -61,7 +54,7 @@ ipv6_gateway.default = wan6.ip6gw
ipv6_gateway.datatype = "ip6addr" ipv6_gateway.datatype = "ip6addr"
if dns_static then if dns_static then
local s = f:section(Section) s = f:section(Section)
local dns = s:option(DynamicList, "dns", translate("Static DNS servers")) local dns = s:option(DynamicList, "dns", translate("Static DNS servers"))
dns.default = uci:get_list("gluon-wan-dnsmasq", dns_static, "server") dns.default = uci:get_list("gluon-wan-dnsmasq", dns_static, "server")
...@@ -74,45 +67,86 @@ if dns_static then ...@@ -74,45 +67,86 @@ if dns_static then
end end
end end
local s = f:section(Section) s = f:section(Section)
local mesh_wan = s:option(Flag, "mesh_wan", translate("Enable meshing on the WAN interface"))
mesh_wan.default = uci:get_bool("network", "mesh_wan", "auto")
function mesh_wan:write(data) local pretty_ifnames = {
uci:set("network", "mesh_wan", "auto", data) ["/wan"] = translate("WAN Interfaces"),
end ["/single"] = translate("Interface"),
["/lan"] = translate("LAN Interfaces")
}
if sysconfig.lan_ifname then uci:foreach('gluon', 'interface', function(config)
local mesh_lan = s:option(Flag, "mesh_lan", translate("Enable meshing on the LAN interface")) local section_name = config['.name']
mesh_lan.default = uci:get_bool("network", "mesh_lan", "auto") local ifaces = s:option(MultiListValue, section_name, pretty_ifnames[config.name] or config.name)
function mesh_lan:write(data) ifaces.orientation = 'horizontal'
uci:set("network", "mesh_lan", "auto", data) ifaces:value('uplink', 'Uplink')
ifaces:value('mesh', 'Mesh')
ifaces:value('client', 'Client')
ifaces:exclusive('uplink', 'client')
ifaces:exclusive('mesh', 'client')
local interfaces = uci:get_list("network", "client", "ifname") ifaces.default = config.role
for lanif in sysconfig.lan_ifname:gmatch('%S+') do function ifaces:write(data)
if data then uci:set_list("gluon", section_name, "role", data)
util.remove_from_set(interfaces, lanif)
else
util.add_to_set(interfaces, lanif)
end end
end)
local section
uci:foreach("system", "gpio_switch", function(si)
if si[".name"]:match("poe") then
if not section then
section = f:section(Section)
end end
uci:set_list("network", "client", "ifname", interfaces) local texts = {
["^PoE Power Port(%d*)$"] = {
get_title = function(m) return translatef("Enable PoE Power Port %s", m[1]) end,
active_low = false,
},
["^PoE Passthrough$"] = {
get_title = function() return translate("Enable PoE Passthrough") end,
active_low = false,
},
-- Typo in AP-303H (ipq40xx-generic)
["^POE passtrough disable$"] = {
get_title = function() return translate("Enable PoE Passthrough") end,
active_low = true,
},
}
local name
local active_low = false
for pattern, text_obj in pairs(texts) do
local match = {si.name:match(pattern)}
if match[1] then
name = text_obj.get_title(match)
active_low = text_obj.active_low
break
end
end end
if not name then
name = translatef('Enable "%s"', si.name)
end end
if uci:get('system', 'gpio_switch_poe_passthrough') then local poe = section:option(Flag, si[".name"], name)
local s = f:section(Section) poe.default = uci:get_bool("system", si[".name"], "value")
local poe_passthrough = s:option(Flag, "poe_passthrough", translate("Enable PoE passthrough")) if active_low then
poe_passthrough.default = uci:get_bool("system", "gpio_switch_poe_passthrough", "value") poe.default = not poe.default
end
function poe_passthrough:write(data) function poe:write(data)
uci:set('system', 'gpio_switch_poe_passthrough', 'value', data) local write_value = data
if active_low then
write_value = not write_value
end
uci:set("system", si[".name"], "value", write_value)
end end
end end
end)
function f:write() function f:write()
uci:set("network", "wan", "proto", ipv4.data) uci:set("network", "wan", "proto", ipv4.data)
...@@ -135,9 +169,10 @@ function f:write() ...@@ -135,9 +169,10 @@ function f:write()
uci:delete("network", "wan6", "ip6gw") uci:delete("network", "wan6", "ip6gw")
end end
uci:commit('gluon')
uci:commit("network") uci:commit("network")
uci:commit('system') uci:commit('system')
end end
return f return f
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-node-role PKG_NAME:=gluon-web-node-role
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-web-node-role define Package/gluon-web-node-role
SECTION:=gluon
CATEGORY:=Gluon
DEPENDS:=+gluon-web-admin +gluon-node-info DEPENDS:=+gluon-web-admin +gluon-node-info
TITLE:=UI for specifying node role TITLE:=UI for specifying node role
endef endef
define Build/Prepare $(eval $(call BuildPackageGluon,gluon-web-node-role))
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-web-node-role,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-web-node-role/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-web-node-role,$(1))
endef
define Package/gluon-web-node-role/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
endef
$(eval $(call BuildPackage,gluon-web-node-role))
need_string 'roles.default' need_string(in_site({'roles', 'default'}))
need_string_array 'roles.list' need_string_array(in_site({'roles', 'list'}))
...@@ -10,18 +10,18 @@ msgstr "" ...@@ -10,18 +10,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
"If this node has a special role within the mesh network you can specify this "
"role here. Please find out about the available roles and their impact first. "
"Only change the role if you know what you are doing."
msgstr ""
"Wenn dein Knoten eine besondere Rolle im Mesh-Netzwerk einnimmt, kannst du "
"diese hier angeben. Bringe bitte zuvor in Erfahrung, welche Bedeutung die "
"zur Verfügung stehenden Rollen haben. Setze die Rolle nur, wenn du weißt, "
"was du tust."
msgid "Node role" msgid "Node role"
msgstr "Verwendungszweck" msgstr "Verwendungszweck"
msgid "Role" msgid "Role"
msgstr "Rolle" msgstr "Rolle"
msgid ""
"If this node has a special role within the freifunk network you can specify "
"this role here. Please find out about the available roles and their impact "
"first. Only change the role if you know what you are doing."
msgstr ""
"Wenn dein Freifunk-Knoten eine besondere Rolle im Freifunk Netz einnimmt, "
"kannst du diese hier angeben. Bringe bitte zuvor in Erfahrung, welche "
"Auswirkungen die zur Verfügung stehenden Rollen im Freifunk-Netz haben. "
"Setze die Rolle nur, wenn du weißt was du machst."
msgid "" msgid ""
msgstr "" msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-19 23:30+0100\n" "PO-Revision-Date: 2015-08-19 23:30+0100\n"
"Last-Translator:Tobias Bernot <tqbs@airmail.cc>\n" "Last-Translator:Tobias Bernot <tqbs@airmail.cc>\n"
"Language-Team: French\n" "Language-Team: French\n"
"Language: fr\n" "Language: fr\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid ""
"If this node has a special role within the mesh network you can specify this "
"role here. Please find out about the available roles and their impact first. "
"Only change the role if you know what you are doing."
msgstr ""
"Si votre nœud a un rôle spécial dans le réseau MESH, vous pouvez spécifier "
"ce rôle ici. Avant de changer, informez vous sur les rôles disponibles et "
"sur leur impacts. Changez de rôle uniquement si vous comprenez ce que vous "
"faites."
msgid "Node role" msgid "Node role"
msgstr "Rôle du nœud" msgstr "Rôle du nœud"
msgid "Role" msgid "Role"
msgstr "Rôle" msgstr "Rôle"
msgid ""
"If this node has a special role within the freifunk network you can specify "
"this role here. Please find out about the available roles and their impact "
"first. Only change the role if you know what you are doing."
msgstr ""
"Si votre nœud a un rôle spécial dans le réseau freifunk, vous pouvez spécifier ce "
"rôle ici. Avant de changer, informez vous sur les rôles disponibles et sur leur impacts. "
"Changez de rôle uniquement si vous comprenez ce que vous faites."
msgid "" msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8" msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "Node role" msgid ""
"If this node has a special role within the mesh network you can specify this "
"role here. Please find out about the available roles and their impact first. "
"Only change the role if you know what you are doing."
msgstr "" msgstr ""
msgid "Role" msgid "Node role"
msgstr "" msgstr ""
msgid "" msgid "Role"
"If this node has a special role within the freifunk network you can specify this role here. "
"Please find out about the available roles and their impact first. "
"Only change the role if you know what you are doing."
msgstr "" msgstr ""
package 'gluon-web-node-role'
entry({"admin", "noderole"}, model("admin/noderole"), "Node role", 60) entry({"admin", "noderole"}, model("admin/noderole"), "Node role", 60)
local f, s, o local f, s, o
local site = require 'gluon.site_config' local site = require 'gluon.site'
local site_i18n = i18n 'gluon-site'
local uci = require("simple-uci").cursor() local uci = require("simple-uci").cursor()
local config = 'gluon-node-info' local config = 'gluon-node-info'
...@@ -9,15 +10,15 @@ local role = uci:get(config, uci:get_first(config, "system"), "role") ...@@ -9,15 +10,15 @@ local role = uci:get(config, uci:get_first(config, "system"), "role")
f = Form(translate("Node role")) f = Form(translate("Node role"))
s = f:section(Section, nil, translate( s = f:section(Section, nil, translate(
"If this node has a special role within the freifunk network you can specify this role here. " "If this node has a special role within the mesh network you can specify this role here. "
.. "Please find out about the available roles and their impact first. " .. "Please find out about the available roles and their impact first. "
.. "Only change the role if you know what you are doing." .. "Only change the role if you know what you are doing."
)) ))
o = s:option(ListValue, "role", translate("Role")) o = s:option(ListValue, "role", translate("Role"))
o.default = role o.default = role
for _, role in ipairs(site.roles.list) do for _, role_value in ipairs(site.roles.list()) do
o:value(role, translate('gluon-web-node-role:role:' .. role)) o:value(role_value, site_i18n.translate('gluon-web-node-role:role:' .. role_value))
end end
function o:write(data) function o:write(data)
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-osm
include ../gluon.mk
define Package/gluon-web-osm
TITLE:=base src for OSM inlay
endef
PKG_CONFIG_DEPENDS += CONFIG_GLUON_MINIFY
define Package/gluon-web-osm/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/web/www/static/
ifdef CONFIG_GLUON_MINIFY
$(INSTALL_DATA) ./javascript/gluon-web-osm.min.js $(1)/lib/gluon/web/www/static/gluon-web-osm.js
else
$(INSTALL_DATA) ./javascript/gluon-web-osm.js $(1)/lib/gluon/web/www/static/
endif
endef
$(eval $(call BuildPackageGluon,gluon-web-osm))
<div id="<%=id%>" class="gluon-osm-map" style="display: none"></div>
<script type="text/javascript" src="/static/gluon-web-osm.js"></script>
<script type="text/javascript">
(function() {
var elMap = document.getElementById(<%=json(id)%>);
var wrapper = elMap.parentNode;
var elLon, elLat;
window.addEventListener('gluon-update', function() {
<% if self.lon then -%>
elLon = document.getElementById(<%=json(self.lon:id())%>);
<%- end %>
<% if self.lat then -%>
elLat = document.getElementById(<%=json(self.lat:id())%>);
<%- end %>
}, {once: true});
initOSM(<%=json(self.options)%>, function(createMap) {
elMap.style.display = '';
var pos = <%=json(self:cfgvalue().pos)%>;
var map = createMap(
elMap,
[pos.lon, pos.lat],
<%=json(self:cfgvalue().zoom)%>,
<%=json(self:cfgvalue().set)%>,
function(lonlat) {
if (elLon) {
elLon.value = lonlat[0].toFixed(6);
elLon.dispatchEvent(new Event('gluon-revalidate'));
}
if (elLat) {
elLat.value = lonlat[1].toFixed(6);
elLat.dispatchEvent(new Event('gluon-revalidate'));
}
}
);
wrapper.addEventListener('gluon-show', function() {
map.updateSize();
});
});
})();
</script>
/*
Build using:
uglifyjs javascript/gluon-web-osm.js -o javascript/gluon-web-osm.min.js -c -m
*/
'use strict';
function initOSM(options, ready) {
var markerSvg = '<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="30" height="45">'
+ '<path d="M2,15A13,13,0,0,1,28,13Q28,28,15,45Q2,28,2,15" fill="#48b" stroke="#369" stroke-width="1.5" />'
+ '<circle cx="15" cy="15" r="6" fill="#fff" />'
+ '</svg>';
var style = document.createElement('link');
style.rel = 'stylesheet';
style.type = 'text/css';
style.href = options.openlayers_url + '/css/ol.css';
document.head.appendChild(style);
var script = document.createElement('script');
var done = false;
script.onload = script.onreadystatechange = function() {
if (done)
return;
if (this.readyState && this.readyState !== "loaded" && this.readyState !== "complete")
return;
done = true;
var markerImg = new Image();
markerImg.onload = function() {
var markerStyle = new ol.style.Style({
image: new ol.style.Icon({
img: markerImg,
imgSize: [30, 45],
anchor: [0.5, 1]
})
});
var marker = new ol.Feature();
marker.setStyle(markerStyle);
var source;
if (options.tile_layer && options.tile_layer.type === 'XYZ') {
source = new ol.source.XYZ({
url: options.tile_layer.url,
attributions: options.tile_layer.attributions,
});
} else {
source = new ol.source.OSM();
}
ready(function(elMap, pos, zoom, set, onUpdate) {
var map = new ol.Map({
target: elMap,
layers: [
new ol.layer.Tile({
source: source
}),
new ol.layer.Vector({
source: new ol.source.Vector({
features: [marker]
})
})
],
view: new ol.View({
center: ol.proj.fromLonLat(pos),
zoom: zoom,
})
});
var refresh = function(coord) {
marker.setGeometry(new ol.geom.Point(coord));
}
map.addEventListener('click', function(e) {
refresh(e.coordinate);
onUpdate(ol.proj.toLonLat(e.coordinate));
});
if (set)
refresh(ol.proj.fromLonLat(pos));
return map;
});
}
markerImg.src = 'data:image/svg+xml,' + escape(markerSvg);
};
script.src = options.openlayers_url + '/build/ol.js';
document.head.appendChild(script);
}
"use strict";function initOSM(o,r){var e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.href=o.openlayers_url+"/css/ol.css",document.head.appendChild(e);var t=document.createElement("script"),l=!1;t.onload=t.onreadystatechange=function(){if(!(l||this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState)){l=!0;var t=new Image;t.onload=function(){var i,e=new ol.style.Style({image:new ol.style.Icon({img:t,imgSize:[30,45],anchor:[.5,1]})}),s=new ol.Feature;s.setStyle(e),i=o.tile_layer&&"XYZ"===o.tile_layer.type?new ol.source.XYZ({url:o.tile_layer.url,attributions:o.tile_layer.attributions}):new ol.source.OSM,r(function(e,t,o,r,l){function n(e){s.setGeometry(new ol.geom.Point(e))}var a=new ol.Map({target:e,layers:[new ol.layer.Tile({source:i}),new ol.layer.Vector({source:new ol.source.Vector({features:[s]})})],view:new ol.View({center:ol.proj.fromLonLat(t),zoom:o})});return a.addEventListener("click",function(e){n(e.coordinate),l(ol.proj.toLonLat(e.coordinate))}),r&&n(ol.proj.fromLonLat(t)),a})},t.src="data:image/svg+xml,"+escape('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="30" height="45"><path d="M2,15A13,13,0,0,1,28,13Q28,28,15,45Q2,28,2,15" fill="#48b" stroke="#369" stroke-width="1.5" /><circle cx="15" cy="15" r="6" fill="#fff" /></svg>')}},t.src=o.openlayers_url+"/build/ol.js",document.head.appendChild(t)}
\ No newline at end of file
local classes = require 'gluon.web.model.classes'
local util = require "gluon.web.util"
local class = util.class
local DEFAULT_URL =
'https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@35ffe7626ce16c372143f3c903950750075e7068/en/v5.3.0'
local M = {}
local MapValue = class(classes.AbstractValue)
M.MapValue = MapValue
function MapValue:__init__(title, options)
classes.AbstractValue.__init__(self, title)
self.subtemplate = "model/osm/map"
self.options = {
openlayers_url = options.openlayers_url or DEFAULT_URL,
tile_layer = options.tile_layer,
}
self.lon = options.lon
self.lat = options.lat
self.pos = options.pos or {lon = 0, lat = 0}
self.zoom = options.zoom or 0
self.set = options.set or false
end
function MapValue:cfgvalue()
local pos_lon = tonumber(self.lon and self.lon:cfgvalue())
local pos_lat = tonumber(self.lat and self.lat:cfgvalue())
if pos_lon and pos_lat then
return {
zoom = 18,
pos = { lon = pos_lon, lat = pos_lat },
set = true,
}
else
return self
end
end
function MapValue:validate()
return true
end
return M
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-private-wifi PKG_NAME:=gluon-web-private-wifi
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-web-private-wifi define Package/gluon-web-private-wifi
SECTION:=gluon DEPENDS:=+gluon-web-admin +gluon-private-wifi
CATEGORY:=Gluon
DEPENDS:=+gluon-web-admin
TITLE:=UI for activating a private WLAN TITLE:=UI for activating a private WLAN
endef endef
define Build/Prepare $(eval $(call BuildPackageGluon,gluon-web-private-wifi))
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-web-private-wifi,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-web-private-wifi/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-web-private-wifi,$(1))
endef
$(eval $(call BuildPackage,gluon-web-private-wifi))
...@@ -13,18 +13,45 @@ msgstr "" ...@@ -13,18 +13,45 @@ msgstr ""
msgid "8-63 characters" msgid "8-63 characters"
msgstr "8-63 Zeichen" msgstr "8-63 Zeichen"
msgid "Disabled"
msgstr "Deaktiviert"
msgid "Enabled" msgid "Enabled"
msgstr "Aktiviert" msgstr "Aktiviert"
msgid "Encryption"
msgstr "Verschlüsselung"
msgid "Key" msgid "Key"
msgstr "Schlüssel" msgstr "Schlüssel"
msgid "Management Frame Protection"
msgstr ""
msgid "Name (SSID)" msgid "Name (SSID)"
msgstr "Name (SSID)" msgstr "Name (SSID)"
msgid "Optional"
msgstr ""
msgid "Private WLAN" msgid "Private WLAN"
msgstr "Privates WLAN" msgstr "Privates WLAN"
msgid "Required"
msgstr "Aktiviert"
msgid "WPA2"
msgstr ""
msgid "WPA2 / WPA3"
msgstr ""
msgid "WPA3"
msgstr ""
msgid "Meshing on WAN interface is enabled. This can lead to problems."
msgstr "Mesh auf WAN ist aktiv. Dies kann zu Problemen führen."
msgid "" msgid ""
"Your node can additionally extend your private network by bridging the WAN " "Your node can additionally extend your private network by bridging the WAN "
"interface with a separate WLAN. This feature is completely independent of " "interface with a separate WLAN. This feature is completely independent of "
......
...@@ -13,17 +13,41 @@ msgstr "" ...@@ -13,17 +13,41 @@ msgstr ""
msgid "8-63 characters" msgid "8-63 characters"
msgstr "8-63 charactères" msgstr "8-63 charactères"
msgid "Disabled"
msgstr ""
msgid "Enabled" msgid "Enabled"
msgstr "Activé" msgstr "Activé"
msgid "Encryption"
msgstr ""
msgid "Key" msgid "Key"
msgstr "Clé" msgstr "Clé"
msgid "Management Frame Protection"
msgstr ""
msgid "Name (SSID)" msgid "Name (SSID)"
msgstr "Nom (SSID)" msgstr "Nom (SSID)"
msgid "Optional"
msgstr ""
msgid "Private WLAN" msgid "Private WLAN"
msgstr "WLAN privé" msgstr "Wi-Fi privé"
msgid "Required"
msgstr ""
msgid "WPA2"
msgstr ""
msgid "WPA2 / WPA3"
msgstr ""
msgid "WPA3"
msgstr ""
msgid "" msgid ""
"Your node can additionally extend your private network by bridging the WAN " "Your node can additionally extend your private network by bridging the WAN "
...@@ -31,7 +55,7 @@ msgid "" ...@@ -31,7 +55,7 @@ msgid ""
"the mesh functionality. Please note that the private WLAN and meshing on the " "the mesh functionality. Please note that the private WLAN and meshing on the "
"WAN interface should not be enabled at the same time." "WAN interface should not be enabled at the same time."
msgstr "" msgstr ""
"Votre nœud peut étendre votre réseau privé en interfaçant le WAN avec un " "Votre nœud peut étendre votre réseau privé en interfaçant le WAN avec un Wi-"
"WLAN séparé. Cette fonction est complètement indépendante de les fonctions " "Fi séparé. Cette fonction est complètement indépendante de les fonctions de "
"de MESH. Il ne faut pas activer la fonction de MESH et de WLAN privé en même " "MESH. Il ne faut pas activer la fonction de MESH et de Wi-Fi privé en même "
"temps." "temps."