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 438 additions and 765 deletions
......@@ -4,18 +4,45 @@ msgstr "Content-Type: text/plain; charset=UTF-8"
msgid "8-63 characters"
msgstr ""
msgid "Disabled"
msgstr ""
msgid "Enabled"
msgstr ""
msgid "Encryption"
msgstr ""
msgid "Key"
msgstr ""
msgid "Management Frame Protection"
msgstr ""
msgid "Name (SSID)"
msgstr ""
msgid "Optional"
msgstr ""
msgid "Private WLAN"
msgstr ""
msgid "Required"
msgstr ""
msgid "WPA2"
msgstr ""
msgid "WPA2 / WPA3"
msgstr ""
msgid "WPA3"
msgstr ""
msgid "Meshing on WAN interface is enabled. This can lead to problems."
msgstr ""
msgid ""
"Your node can additionally extend your private network by bridging the WAN "
"interface with a separate WLAN. This feature is completely independent of "
......
local uci = require("simple-uci").cursor()
local wireless = require 'gluon.wireless'
package 'gluon-web-private-wifi'
if wireless.device_uses_wlan(uci) then
entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30)
end
local uci = require("simple-uci").cursor()
local wireless = require 'gluon.wireless'
local util = require 'gluon.util'
-- where to read the configuration from
......@@ -13,9 +14,27 @@ local s = f:section(Section, nil, translate(
.. 'at the same time.'
))
local uplink_interfaces = util.get_role_interfaces(uci, 'uplink')
local mesh_on_wan = false
for _, iface in ipairs(util.get_role_interfaces(uci, 'mesh')) do
if util.contains(uplink_interfaces, iface) then
mesh_on_wan = true
end
end
local enabled = s:option(Flag, "enabled", translate("Enabled"))
enabled.default = uci:get('wireless', primary_iface) and not uci:get_bool('wireless', primary_iface, "disabled")
local warning = s:element('model/warning', {
content = translate(
'Meshing on WAN interface is enabled. ' ..
'This can lead to problems.'
),
hide = not mesh_on_wan,
}, 'warning')
warning:depends(enabled, true)
local ssid = s:option(Value, "ssid", translate("Name (SSID)"))
ssid:depends(enabled, true)
ssid.datatype = "maxlength(32)"
......@@ -26,23 +45,52 @@ key:depends(enabled, true)
key.datatype = "wpakey"
key.default = uci:get('wireless', primary_iface, "key")
local encryption = s:option(ListValue, "encryption", translate("Encryption"))
encryption:depends(enabled, true)
encryption:value("psk2", translate("WPA2"))
if wireless.device_supports_wpa3() then
encryption:value("sae-mixed", translate("WPA2 / WPA3"))
encryption:value("sae", translate("WPA3"))
end
encryption.default = uci:get('wireless', primary_iface, 'encryption') or "psk2"
local mfp = s:option(ListValue, "mfp", translate("Management Frame Protection"))
mfp:depends(enabled, true)
mfp:value("0", translate("Disabled"))
if wireless.device_supports_mfp(uci) then
mfp:value("1", translate("Optional"))
mfp:value("2", translate("Required"))
end
mfp.default = uci:get('wireless', primary_iface, 'ieee80211w') or "0"
function f:write()
util.iterate_radios(uci, function(radio, index)
local name = "wan_" .. radio
wireless.foreach_radio(uci, function(radio, index)
local radio_name = radio['.name']
local suffix = radio_name:match('^radio(%d+)$')
local name = "wan_" .. radio_name
if enabled.data then
local macaddr = util.get_wlan_mac(uci, radio, index, 4)
local macaddr = wireless.get_wlan_mac('wan_radio', index, radio)
uci:section('wireless', "wifi-iface", name, {
device = radio,
network = "wan",
uci:section('wireless', 'wifi-iface', name, {
device = radio_name,
network = 'wan',
mode = 'ap',
encryption = 'psk2',
encryption = encryption.data,
ssid = ssid.data,
key = key.data,
macaddr = macaddr,
ifname = suffix and 'wl-wan' .. suffix,
disabled = false,
})
-- hostapd-mini won't start in case 802.11w is configured
if wireless.device_supports_mfp(uci) then
uci:set('wireless', name, 'ieee80211w', mfp.data)
else
uci:delete('wireless', name, 'ieee80211w')
end
else
uci:set('wireless', name, "disabled", true)
end
......
entry({"admin", "privatewifi"}, model("admin/privatewifi"), _("Private WLAN"), 30)
# Copyright (C) 2013 Nils Schneider <nils at nilsschneider.net>
# This is free software, licensed under the Apache 2.0 license.
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-theme
PKG_VERSION:=0.1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
define Package/gluon-web-theme
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=gluon-web theme
DEPENDS:=+pretty-hostname
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/gluon-web-theme/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,gluon-web-theme))
.lang_he{direction:RTL;unicode-bidi:embed}.hidden{display:none}html{min-height:100%;height:auto;position:relative}body,input,select,option{font-family:'Open Sans', Arial, sans-serif;font-size:12pt}body{color:#4d4e53;line-height:1.5em;margin:0;display:flex;flex-direction:column;min-height:100vh;background-color:#f3f3f3}a img{border:none;text-decoration:none}.tabmenu1{text-align:center}ul.tabmenu{list-style:none;padding:0;margin:2em 0;display:inline-flex}ul.tabmenu li{white-space:nowrap;margin:0 0.5em;padding:0;text-align:center}ul.tabmenu li a{display:block;text-decoration:none;padding:1em;margin:0;color:#333;border-radius:2em}ul.tabmenu li a:hover{background:#ffe9b3}ul.tabmenu li.active a{font-weight:bold;background:white;color:#333}abbr,acronym{font-style:normal;font-variant:normal}abbr[title],acronym[title]{border-bottom:1px dotted;cursor:help}a:link abbr[title],a:visited abbr[title],a:link acronym[title],a:visited acronym[title]{cursor:pointer}code{font-family:monospace;white-space:pre}#maincontent ul{margin-left:2em}.clear{clear:both}.error{color:#ff0000;background-color:white}#menubar{display:flex;background:#dc0067;color:#ffffff}#menubar a:link.topcat,#menubar a:visited.topcat{position:relative;display:block;padding:0.5em;text-decoration:none;font-size:80%;font-weight:normal;color:white}#menubar a:link.topcat:hover,#menubar a:link.topcat:focus,#menubar a:visited.topcat:hover,#menubar a:visited.topcat:focus{background:#ffb400;color:black}#menubar a:link.topcat.active,#menubar a:visited.topcat.active{background:#ffb400;color:black;font-weight:bold}#menubar div.hostinfo{position:relative;margin:0;padding:0.5em;flex:1;font-weight:bold;font-size:80%}#menubar div.hostinfo a:link,#menubar div.hostinfo a:visited{text-decoration:none;font-weight:bold;color:white}#menubar div.hostinfo a:link:hover,#menubar div.hostinfo a:link:focus,#menubar div.hostinfo a:visited:hover,#menubar div.hostinfo a:visited:focus{text-decoration:underline}#topmenu{list-style:none;margin:0;padding:0}#topmenu li{display:inline-block}#maincontent{padding:0 1em 2em;max-width:60em;min-width:40em;margin:1em auto}#maincontent p{margin-bottom:1em}.gluon-section{margin:0;padding:0;border:none;margin-bottom:1.3em}.gluon-section:last-child{margin-bottom:0.7em}.gluon-section legend{font-size:1.4em;font-weight:bold;position:relative;padding:0;margin-bottom:0.5em}.gluon-section h2{margin:0em 0 0.5em -0.5em !important}.gluon-section h3{text-decoration:none !important;font-weight:bold !important;color:#555555 !important;margin:0.25em !important;font-size:100% !important}.gluon-section-descr{margin-bottom:2em}input:placeholder{color:#aaaaaa}input:-webkit-input-placeholder{color:#aaaaaa}input:-moz-placeholder{color:#aaaaaa}input:-ms-input-placeholder{color:#aaaaaa}input[type=checkbox]{display:none}input[type=checkbox]+label{display:inline-block;width:1em;height:1em;margin:0}input[type=checkbox]:checked+label:after{content:'✔';color:#dc0067;vertical-align:middle;position:absolute;top:50%;left:0;margin-top:-0.5em;width:100%;text-align:center;font-size:1.7em}input[type=submit],input[type=reset],input[type=image],input[type=button]{cursor:pointer}select,input,textarea,input[type=checkbox]+label{color:#003247;border:none;background:#ffe199;border-radius:3pt;padding:0.5em;margin-top:1px;margin-bottom:2px}input[type=image]{border:none}select,input[type=text],input[type=password]{width:20em}input.gluon-button{display:inline-block;zoom:1;line-height:normal;white-space:nowrap;vertical-align:baseline;text-align:center;cursor:pointer;user-select:none;font-size:100%;padding:0.5em 1em;color:rgba(0,0,0,0.8);border:none transparent;background-color:#E6E6E6;text-decoration:none;border-radius:2px;transition:0.1s linear box-shadow;margin-left:0.5em;background-repeat:no-repeat}input.gluon-button::-moz-focus-inner{padding:0;border:0}input.gluon-button:active{box-shadow:0 0 0 1px rgba(0,0,0,0.15) inset,0 0 6px rgba(0,0,0,0.2) inset}input.gluon-button:focus{outline:0}input.gluon-button:hover,input.gluon-button:focus{background-image:linear-gradient(transparent, rgba(0,0,0,0.05) 40%, rgba(0,0,0,0.1))}input.gluon-button[disabled]{border:none;background-image:none;opacity:0.40;cursor:not-allowed;box-shadow:none}input.gluon-button-reset{background-color:#e30;color:#fff}input.gluon-button-submit{background-color:#009ee0;color:#fff}.gluon-input-invalid{background:#e30 !important;color:white}div.gluon-section-remove input{border-bottom:none}textarea{margin-left:-1px;margin-bottom:0.5em}.gluon-section .gluon-rowstyle-1 h3{background-color:#eeeeff;color:#555555}.gluon-rowstyle-2{color:#000000}div.gluon-value{display:flex;flex-direction:row;margin-bottom:0.5em}.gluon-section-node .gluon-value:last-child{margin-bottom:0}.gluon-value-title{flex:2;text-align:right;padding-right:1em;font-weight:bold}div.gluon-value-field{flex:3;position:relative}div.gluon-value-field input,div.gluon-value-field select,div.gluon-value-field input+label{position:relative;top:-0.39em}div.gluon-value-field-long{flex:10;position:relative}div.gluon-value-field-long input,div.gluon-value-field-long select,div.gluon-value-field-long input+label{position:relative;top:-0.39em}div.gluon-value-field-long-after{flex:2}div.gluon-value-description{font-size:8pt}div.gluon-section-create{clear:left;white-space:nowrap;vertical-align:top}div.gluon-section-create .gluon-button{margin:0.25em}input.gluon-section-create-name{margin-right:-0.25em}div.gluon-map-descr{margin-bottom:1em}.gluon-map-descr:empty,.gluon-section-descr:empty{display:none}.gluon-map-descr,.gluon-section-descr,.gluon-page-actions{padding:1em;background:#ececec}.gluon-page-actions{text-align:right;display:flex;flex-flow:row-reverse}div.gluon-optionals{padding:0.25em;border-bottom:1px dotted #bbbbbb}div.gluon-section-remove{float:right}.gluon-section-node{clear:both;position:relative;border:none}.gluon-section-node-tabbed{border-top-left-radius:0}div.gluon-error{font-size:95%;font-weight:bold;color:#ff0000;background-color:#ffffff}.gluon-value-error input,.gluon-value-error select{background-color:#ffcccc}.gluon-section-error{color:red;background-color:white;font-size:95%;border:1px dotted red;margin:3px;padding:3px}.gluon-value-field var{color:#2222FF}.gluon-add:after,.gluon-remove:after{cursor:pointer;display:inline-block;text-align:center;vertical-align:middle;font-size:180%;width:1.2em;height:1em}.gluon-add{color:#008000;position:relative;left:21em}input+.gluon-add{left:0;top:-0.35em}.gluon-add:first-child{top:0.04em;left:-0.08em}.gluon-add:after{content:'+'}.gluon-remove{color:#800000;position:relative;top:-0.42em}.gluon-remove:after{content:'–'}.left{text-align:left !important}.right{text-align:right !important}.inline{display:inline}.error500{border:1px dotted #ff0000;background-color:#ffffff;color:#000000;padding:0.5em}.errorbox{border:1px solid #FF0000;background-color:#FFCCCC;padding:5px;margin-bottom:5px}.errorbox a{color:#000000 !important}.the-key{text-align:left;font-size:1.4em;background:#ffe9b3;border:3pt dashed #dc0067;margin-bottom:0.5em;padding:0.5em}
/*
ATTENTION: This file is not compiled when building gluon.
The compiled version is at ../files/lib/gluon/web/www/static/gluon/cascade.css
Use sass like this to update it:
sass --sourcemap=none -C -t compressed sass/cascade.scss files/lib/gluon/web/www/static/gluon/cascade.css
When commiting changes to this file make sure to commit the respective
changes to the compilid version within the same commit!
*/
@charset "utf-8";
$ffyellow: #ffb400;
$ffmagenta: #dc0067;
$ffzusatz: #009ee0;
$red: #ee3300;
@mixin button {
&::-moz-focus-inner {
padding: 0;
border: 0;
}
display: inline-block;
zoom: 1;
line-height: normal;
white-space: nowrap;
vertical-align: baseline;
text-align: center;
cursor: pointer;
user-select: none;
font-size: 100%;
padding: 0.5em 1em;
color: rgba(0, 0, 0, 0.80);
border: none rgba(0, 0, 0, 0);
background-color: #E6E6E6;
text-decoration: none;
border-radius: 2px;
/* Transitions */
transition: 0.1s linear box-shadow;
&:active {
box-shadow: 0 0 0 1px rgba(0,0,0, 0.15) inset, 0 0 6px rgba(0,0,0, 0.20) inset;
}
&:focus {
outline: 0;
}
&:hover, &:focus {
background-image: linear-gradient(transparent, rgba(0,0,0, 0.05) 40%, rgba(0,0,0, 0.10));
}
&[disabled] {
border: none;
background-image: none;
opacity: 0.40;
cursor: not-allowed;
box-shadow: none;
}
}
@mixin button-primary {
background-color: $ffzusatz;
color: #fff;
}
.lang_he {
direction: RTL;
unicode-bidi: embed;
}
.hidden {
display: none;
}
html {
min-height: 100%;
height: auto;
position:relative;
}
body, input, select, option {
font-family: 'Open Sans', Arial, sans-serif;
font-size: 12pt;
}
body {
color: rgb(77, 78, 83);
line-height: 1.5em;
margin: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
background-color: #f3f3f3;
}
a img {
border: none;
text-decoration: none;
}
.tabmenu1 {
text-align: center;
}
ul.tabmenu {
list-style: none;
padding: 0;
margin: 2em 0;
display: inline-flex;
}
ul.tabmenu li {
white-space: nowrap;
margin: 0 0.5em;
padding: 0;
text-align: center;
a {
display: block;
text-decoration: none;
padding: 1em;
margin: 0;
color: #333;
border-radius: 2em;
&:hover {
background: lighten($ffyellow, 35);
}
}
&.active a {
font-weight: bold;
background: white;
color: #333;
}
}
abbr,
acronym {
font-style: normal;
font-variant: normal;
}
abbr[title],
acronym[title] {
border-bottom: 1px dotted;
cursor: help;
}
a:link abbr[title],
a:visited abbr[title],
a:link acronym[title],
a:visited acronym[title] {
cursor: pointer;
}
code {
font-family: monospace;
white-space: pre;
}
#maincontent ul {
margin-left: 2em;
}
.clear {
clear: both;
}
.error {
color: #ff0000;
background-color: white;
}
#menubar {
display: flex;
background: $ffmagenta;
color: #ffffff;
}
#menubar a:link.topcat,
#menubar a:visited.topcat {
position: relative;
display: block;
padding: 0.5em;
text-decoration: none;
font-size: 80%;
font-weight: normal;
color: white;
&:hover, &:focus {
background: $ffyellow;
color: black;
}
&.active {
background: $ffyellow;
color: black;
font-weight: bold;
}
}
#menubar div.hostinfo {
position: relative;
margin: 0;
padding: 0.5em;
flex: 1;
font-weight: bold;
font-size: 80%;
}
#menubar div.hostinfo a {
&:link, &:visited {
text-decoration: none;
font-weight: bold;
color: white;
&:hover, &:focus {
text-decoration: underline;
}
}
}
#topmenu {
list-style: none;
margin: 0;
padding: 0;
}
#topmenu li {
display: inline-block;
}
#maincontent {
padding: 0 1em 2em;
max-width: 60em;
min-width: 40em;
margin: 1em auto;
}
#maincontent p {
margin-bottom: 1em;
}
.gluon-section {
margin: 0;
padding: 0;
border: none;
margin-bottom: 1.3em;
}
.gluon-section:last-child {
margin-bottom: 0.7em;
}
.gluon-section legend {
font-size: 1.4em;
font-weight: bold;
position: relative;
padding: 0;
margin-bottom: 0.5em;
}
.gluon-section h2 {
margin: 0em 0 0.5em -0.5em !important;
}
.gluon-section h3 {
text-decoration: none !important;
font-weight: bold !important;
color: #555555 !important;
margin: 0.25em !important;
font-size: 100% !important;
}
.gluon-section-descr {
margin-bottom: 2em;
}
input:placeholder {
color: #aaaaaa;
}
input:-webkit-input-placeholder {
color: #aaaaaa;
}
input:-moz-placeholder {
color: #aaaaaa;
}
input:-ms-input-placeholder {
color: #aaaaaa;
}
input[type=checkbox] {
display: none;
& + label {
display: inline-block;
width: 1em;
height: 1em;
margin: 0;
}
&:checked + label:after {
content: '✔';
color: $ffmagenta;
vertical-align: middle;
position: absolute;
top: 50%;
left: 0;
margin-top: -0.5em;
width: 100%;
text-align: center;
font-size: 1.7em;
}
}
input[type=submit],
input[type=reset],
input[type=image],
input[type=button] {
cursor: pointer;
}
select,
input,
textarea,
input[type=checkbox] + label {
color: darken($ffzusatz, 30);
border: none;
background: lighten($ffyellow, 30);
border-radius: 3pt;
padding: 0.5em;
margin-top: 1px;
margin-bottom: 2px;
}
input[type=image] {
border: none;
}
select,
input[type=text],
input[type=password] {
width: 20em;
}
input.gluon-button {
@include button;
margin-left: 0.5em;
background-repeat: no-repeat;
}
input.gluon-button-reset {
background-color: $red;
color: #fff;
}
input.gluon-button-submit {
@include button-primary;
}
.gluon-input-invalid {
background: $red !important;
color: white;
}
div.gluon-section-remove input {
border-bottom: none;
}
textarea {
margin-left: -1px;
margin-bottom: 0.5em;
}
.gluon-section .gluon-rowstyle-1 h3 {
background-color: #eeeeff;
color: #555555;
}
.gluon-rowstyle-2 {
color: #000000;
}
div.gluon-value {
display: flex;
flex-direction: row;
margin-bottom: 0.5em;
}
.gluon-section-node .gluon-value:last-child {
margin-bottom: 0;
}
.gluon-value-title {
flex: 2;
text-align: right;
padding-right: 1em;
font-weight: bold;
}
div.gluon-value-field {
flex: 3;
position: relative;
input, select, input + label {
position: relative;
top: -0.39em;
}
}
div.gluon-value-field-long {
flex: 10;
position: relative;
input, select, input + label {
position: relative;
top: -0.39em;
}
}
div.gluon-value-field-long-after {
flex: 2;
}
div.gluon-value-description {
font-size: 8pt;
}
div.gluon-section-create {
clear: left;
white-space: nowrap;
vertical-align: top;
}
div.gluon-section-create .gluon-button {
margin: 0.25em;
}
input.gluon-section-create-name {
margin-right: -0.25em;
}
div.gluon-map-descr {
margin-bottom: 1em;
}
.gluon-map-descr:empty, .gluon-section-descr:empty {
display: none;
}
.gluon-map-descr, .gluon-section-descr, .gluon-page-actions {
padding: 1em;
background: #ececec;
}
.gluon-page-actions {
text-align: right;
display: flex;
flex-flow: row-reverse;
}
div.gluon-optionals {
padding: 0.25em;
border-bottom: 1px dotted #bbbbbb;
}
div.gluon-section-remove {
float: right;
}
.gluon-section-node {
clear: both;
position: relative;
border: none;
}
.gluon-section-node-tabbed {
border-top-left-radius: 0;
}
div.gluon-error {
font-size: 95%;
font-weight: bold;
color: #ff0000;
background-color: #ffffff;
}
.gluon-value-error input,
.gluon-value-error select {
background-color: #ffcccc;
}
.gluon-section-error {
color: red;
background-color: white;
font-size: 95%;
border: 1px dotted red;
margin: 3px;
padding: 3px;
}
.gluon-value-field var {
color: #2222FF;
}
.gluon-add:after, .gluon-remove:after {
cursor: pointer;
display: inline-block;
text-align: center;
vertical-align: middle;
font-size: 180%;
width: 1.2em;
height: 1em;
}
.gluon-add {
color: #008000;
position: relative;
left: 21em;
input + & {
left: 0;
top: -0.35em;
}
&:first-child {
top: 0.04em;
left: -0.08em;
}
&:after {
content: '+';
}
}
.gluon-remove {
color: #800000;
position: relative;
top: -0.42em;
&:after {
content: '–';
}
}
.left {
text-align: left !important;
}
.right {
text-align: right !important;
}
.inline {
display: inline;
}
.error500 {
border: 1px dotted #ff0000;
background-color: #ffffff;
color: #000000;
padding: 0.5em;
}
.errorbox {
border: 1px solid #FF0000;
background-color: #FFCCCC;
padding: 5px;
margin-bottom: 5px;
}
.errorbox a {
color: #000000 !important;
}
.the-key {
text-align: left;
font-size: 1.4em;
background: lighten($ffyellow, 35);
border: 3pt dashed $ffmagenta;
margin-bottom: 0.5em;
padding: 0.5em
}
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web-wifi-config
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-web-wifi-config
SECTION:=gluon
CATEGORY:=Gluon
DEPENDS:=+gluon-web-admin +libiwinfo-lua
TITLE:=UI for Wifi Settings
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-web-wifi-config,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-web-wifi-config/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-web-wifi-config,$(1))
endef
$(eval $(call BuildPackage,gluon-web-wifi-config))
$(eval $(call BuildPackageGluon,gluon-web-wifi-config))
......@@ -19,14 +19,33 @@ msgstr "2,4GHz-WLAN"
msgid "5GHz WLAN"
msgstr "5GHz-WLAN"
msgid ""
"Configuring the node for outdoor use tunes the 5 GHz radio to a frequency "
"and transmission power that conforms with the local regulatory requirements. "
"It also enables dynamic frequency selection (DFS; radar detection). At the "
"same time, mesh functionality is disabled as it requires neighbouring nodes "
"to stay on the same channel permanently."
msgstr ""
"Ist der Knoten für den Einsatz im Freien konfiguriert, wird ein WLAN-Kanal "
"auf dem 5-GHz-Band sowie eine Sendeleistung entsprechend den gesetzlichen "
"Frequenzregulatorien gewählt. Gleichzeitig wird die dynamische Frequenzwahl "
"(DFS; Radarerkennung) aktiviert und die Mesh-Funktionalität deaktiviert, da "
"sich Nachbarknoten dauerhaft auf demselben Kanal befinden müssen."
msgid "Enable client network (access point)"
msgstr "Client-Netz aktivieren (Access Point)"
msgid "Enable mesh network (802.11s)"
msgstr "Mesh-Netz aktivieren (802.11s)"
msgid "Enable mesh network (IBSS)"
msgstr "Mesh-Netz aktivieren (IBSS)"
msgid "HT Mode"
msgstr "HT-Modus"
msgid "Node will be installed outdoors"
msgstr "Knoten wird im Außenbereich betrieben"
msgid "Outdoor Installation"
msgstr "Outdoor-Installation"
msgid "Transmission power"
msgstr "Sendeleistung"
......@@ -37,15 +56,15 @@ msgstr "WLAN"
msgid ""
"You can enable or disable your node's client and mesh network SSIDs here. "
"Please don't disable the mesh network without a good reason, so other nodes "
"can mesh with yours.<br /><br />It is also possible to configure the WLAN "
"can mesh with yours.<br><br>It is also possible to configure the WLAN "
"adapters transmission power here. Please note that the transmission power "
"values include the antenna gain where available, but there are many devices "
"for which the gain is unavailable or inaccurate."
msgstr ""
"In diesem Abschnitt hast du die Möglichkeit, die SSIDs des Client- und des "
"Mesh-Netzes zu aktivieren bzw. deaktivieren. Bitte lass die SSID des Mesh-"
"Netzes aktiviert, damit sich andere Knoten mit deinem verbinden können.<br /"
"><br />Außerdem kann hier die Sendeleistung des WLAN-Adapters konfiguriert "
"Netzes aktiviert, damit sich andere Knoten mit deinem verbinden können.<br"
"><br>Außerdem kann hier die Sendeleistung des WLAN-Adapters konfiguriert "
"werden. Wenn möglich, ist in den Werten der Sendeleistung der Antennengewinn "
"enthalten; diese Werte sind allerdings für viele Geräte nicht verfügbar oder "
"fehlerhaft."
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-19 23:30+0100\n"
"Last-Translator:Tobias Bernot <tqbs@airmail.cc>\n"
"Language-Team: French\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "(default)"
msgstr "(défaut)"
msgid "2.4GHz WLAN"
msgstr "2,4GHz-WLAN"
msgstr "2,4GHz Wi-Fi"
msgid "5GHz WLAN"
msgstr "5GHz-WLAN"
msgstr "5GHz Wi-Fi"
msgid ""
"Configuring the node for outdoor use tunes the 5 GHz radio to a frequency "
"and transmission power that conforms with the local regulatory requirements. "
"It also enables dynamic frequency selection (DFS; radar detection). At the "
"same time, mesh functionality is disabled as it requires neighbouring nodes "
"to stay on the same channel permanently."
msgstr ""
msgid "Enable client network (access point)"
msgstr "Activer le réseau client (Access Point)"
......@@ -24,25 +33,32 @@ msgstr "Activer le réseau client (Access Point)"
msgid "Enable mesh network (802.11s)"
msgstr "Activer le réseau MESH (802.11s)"
msgid "Enable mesh network (IBSS)"
msgstr "Activer le réseau MESH (IBSS)"
msgid "HT Mode"
msgstr "Mode HT"
msgid "Node will be installed outdoors"
msgstr ""
msgid "Outdoor Installation"
msgstr "Installation extérieure"
msgid "Transmission power"
msgstr "Puissance d'émission"
msgid "WLAN"
msgstr "WLAN"
msgstr "Wi-Fi"
msgid ""
"You can enable or disable your node's client and mesh network SSIDs here. "
"Please don't disable the mesh network without a good reason, so other nodes "
"can mesh with yours.<br /><br />It is also possible to configure the WLAN "
"can mesh with yours.<br><br>It is also possible to configure the WLAN "
"adapters transmission power here. Please note that the transmission power "
"values include the antenna gain where available, but there are many devices "
"for which the gain is unavailable or inaccurate."
msgstr ""
"Ici vous pouvez activer ou désactiver la SSID du client ou MESH. "
"Pensez a laisser la SSID du MESH activée pour que les autres nœuds puissent se connecter. "
"<br /><br />Ici vous pouvez aussi configurer la puissance d'émmission se votre WLAN. "
"Prenez note que les valeurs fournies pour la puissance de transmission prennent "
"en compte les gains fournis par l'antenne, et que ces valeurs ne sont pas toujours disponibles ou exactes."
"Ici vous pouvez activer ou désactiver la SSID du client ou MESH. Pensez a "
"laisser la SSID du MESH activée pour que les autres nœuds puissent se "
"connecter. <br><br>Ici vous pouvez aussi configurer la puissance "
"d'émmission se votre Wi-Fi. Prenez note que les valeurs fournies pour la "
"puissance de transmission prennent en compte les gains fournis par "
"l'antenne, et que ces valeurs ne sont pas toujours disponibles ou exactes."
......@@ -10,13 +10,27 @@ msgstr ""
msgid "5GHz WLAN"
msgstr ""
msgid ""
"Configuring the node for outdoor use tunes the 5 GHz radio to a frequency "
"and transmission power that conforms with the local regulatory requirements. "
"It also enables dynamic frequency selection (DFS; radar detection). At the "
"same time, mesh functionality is disabled as it requires neighbouring nodes "
"to stay on the same channel permanently."
msgstr ""
msgid "Enable client network (access point)"
msgstr ""
msgid "Enable mesh network (802.11s)"
msgstr ""
msgid "Enable mesh network (IBSS)"
msgid "HT Mode"
msgstr ""
msgid "Node will be installed outdoors"
msgstr ""
msgid "Outdoor Installation"
msgstr ""
msgid "Transmission power"
......@@ -28,7 +42,7 @@ msgstr ""
msgid ""
"You can enable or disable your node's client and mesh network SSIDs here. "
"Please don't disable the mesh network without a good reason, so other nodes "
"can mesh with yours.<br /><br />It is also possible to configure the WLAN "
"can mesh with yours.<br><br>It is also possible to configure the WLAN "
"adapters transmission power here. Please note that the transmission power "
"values include the antenna gain where available, but there are many devices "
"for which the gain is unavailable or inaccurate."
......
local uci = require("simple-uci").cursor()
local wireless = require 'gluon.wireless'
package 'gluon-web-wifi-config'
if wireless.device_uses_wlan(uci) then
entry({"admin", "wifi-config"}, model("admin/wifi-config"), _("WLAN"), 20)
end
local fs = require 'nixio.fs'
local iwinfo = require 'iwinfo'
local uci = require("simple-uci").cursor()
local util = require 'gluon.util'
local site = require 'gluon.site'
local wireless = require 'gluon.wireless'
local function txpower_list(phy)
......@@ -9,7 +9,6 @@ local function txpower_list(phy)
local off = tonumber(iwinfo.nl80211.txpower_offset(phy)) or 0
local new = { }
local prev = -1
local _, val
for _, val in ipairs(list) do
local dbm = val.dbm + off
local mw = math.floor(10 ^ (dbm / 10))
......@@ -25,26 +24,30 @@ local function txpower_list(phy)
return new
end
local f = Form(translate("WLAN"))
f:section(Section, nil, translate(
"You can enable or disable your node's client and mesh network "
.. "SSIDs here. Please don't disable the mesh network without "
.. "a good reason, so other nodes can mesh with yours.<br /><br />"
.. "a good reason, so other nodes can mesh with yours.<br><br>"
.. "It is also possible to configure the WLAN adapters transmission power "
.. "here. Please note that the transmission power values include the antenna gain "
.. "where available, but there are many devices for which the gain is unavailable or inaccurate."
))
local mesh_vifs_5ghz = {}
uci:foreach('wireless', 'wifi-device', function(config)
local radio = config['.name']
local is_5ghz = false
local title
if config.hwmode == '11g' or config.hwmode == '11ng' then
if config.band == '2g' then
title = translate("2.4GHz WLAN")
elseif config.hwmode == '11a' or config.hwmode == '11na' then
elseif config.band == '5g' then
is_5ghz = true
title = translate("5GHz WLAN")
else
return
......@@ -52,24 +55,52 @@ uci:foreach('wireless', 'wifi-device', function(config)
local p = f:section(Section, title)
local function vif_option(t, msg)
if not uci:get('wireless', t .. '_' .. radio) then
local function filter_existing_interfaces(interfaces)
local out = {}
for _, interface in ipairs(interfaces) do
if uci:get('wireless', interface .. '_' .. radio) then
table.insert(out, interface)
end
end
return out
end
local function has_active_interfaces(interfaces)
for _, interface in ipairs(interfaces) do
if not uci:get_bool('wireless', interface .. '_' .. radio, 'disabled') then
return true
end
end
return false
end
local function vif_option(name, interfaces, msg)
local existing_interfaces = filter_existing_interfaces(interfaces)
if #existing_interfaces == 0 then
return
end
local o = p:option(Flag, radio .. '_' .. t .. '_enabled', msg)
o.default = not uci:get_bool('wireless', t .. '_' .. radio, 'disabled')
local o = p:option(Flag, radio .. '_' .. name .. '_enabled', msg)
o.default = has_active_interfaces(existing_interfaces)
function o:write(data)
uci:set('wireless', t .. '_' .. radio, 'disabled', not data)
for _, interface in ipairs(existing_interfaces) do
uci:set('wireless', interface .. '_' .. radio, 'disabled', not data)
end
end
return o
end
vif_option('client', translate('Enable client network (access point)'))
vif_option('mesh', translate("Enable mesh network (802.11s)"))
vif_option('ibss', translate("Enable mesh network (IBSS)"))
vif_option('client', {'client', 'owe'}, translate('Enable client network (access point)'))
local phy = util.find_phy(config)
local mesh_vif = vif_option('mesh', {'mesh'}, translate("Enable mesh network (802.11s)"))
if is_5ghz then
table.insert(mesh_vifs_5ghz, mesh_vif)
end
local phy = wireless.find_phy(config)
if not phy then
return
end
......@@ -92,14 +123,71 @@ uci:foreach('wireless', 'wifi-device', function(config)
function tp:write(data)
if data == 'default' then
uci:delete('wireless', radio, 'txpower')
else
data = nil
end
uci:set('wireless', radio, 'txpower', data)
end
end)
if wireless.device_uses_11a(uci) and not wireless.preserve_channels(uci) then
local r = f:section(Section, translate("Outdoor Installation"), translate(
"Configuring the node for outdoor use tunes the 5 GHz radio to a frequency "
.. "and transmission power that conforms with the local regulatory requirements. "
.. "It also enables dynamic frequency selection (DFS; radar detection). At the "
.. "same time, mesh functionality is disabled as it requires neighbouring nodes "
.. "to stay on the same channel permanently."
))
local outdoor = r:option(Flag, 'outdoor', translate("Node will be installed outdoors"))
outdoor.default = uci:get_bool('gluon', 'wireless', 'outdoor')
for _, mesh_vif in ipairs(mesh_vifs_5ghz) do
mesh_vif:depends(outdoor, false)
if outdoor.default then
mesh_vif.default = not site.wifi5.mesh.disabled(false)
end
end
function outdoor:write(data)
uci:set('gluon', 'wireless', 'outdoor', data)
end
uci:foreach('wireless', 'wifi-device', function(config)
local radio = config['.name']
local band = uci:get('wireless', radio, 'band')
if band ~= '5g' then
return
end
local phy = wireless.find_phy(config)
local ht = r:option(ListValue, 'outdoor_htmode', translate('HT Mode') .. ' (' .. radio .. ')')
ht:depends(outdoor, true)
ht.default = uci:get('gluon', 'wireless', 'outdoor_' .. radio .. '_htmode') or 'default'
ht:value('default', translate("(default)"))
for mode, available in pairs(iwinfo.nl80211.htmodelist(phy)) do
if available then
ht:value(mode, mode)
end
end
function ht:write(data)
if data == 'default' then
data = nil
end
uci:set('gluon', 'wireless', 'outdoor_' .. radio .. '_htmode', data)
end
end)
end
function f:write()
uci:commit('gluon')
os.execute('/lib/gluon/upgrade/200-wireless')
uci:commit('network')
uci:commit('wireless')
end
......
entry({"admin", "wifi-config"}, model("admin/wifi-config"), _("WLAN"), 20)
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-web
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
PKG_INSTALL:=1
include ../gluon.mk
include $(INCLUDE_DIR)/host-build.mk
define Package/gluon-web
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Minimal Lua web framework derived from LuCI
DEPENDS:=+luci-lib-jsonc +luci-lib-nixio
DEPENDS:=+lua-jsonc +luaposix
endef
define lang-config
......@@ -31,23 +24,18 @@ define Package/gluon-web/config
$(foreach lang,$(GLUON_SUPPORTED_LANGS),$(call lang-config,$(lang)))
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
$(CP) ./src/* $(PKG_BUILD_DIR)/
define Host/Prepare
$(CP) ./src/* $(HOST_BUILD_DIR)
endef
define Build/Compile
$(call Build/Compile/Default)
$(call GluonBuildI18N,gluon-web,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
define Host/Compile
$(call Host/Compile/Default,gluon-po2lmo)
endef
define Package/gluon-web/install
$(CP) ./files/* $(1)/
$(CP) $(PKG_INSTALL_DIR)/* $(1)/
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-web,$(1))
define Host/Install
$(INSTALL_DIR) $(1)/bin
$(INSTALL_BIN) $(HOST_BUILD_DIR)/gluon-po2lmo $(1)/bin/
endef
$(eval $(call BuildPackage,gluon-web))
$(eval $(call BuildPackageGluon,gluon-web))
$(eval $(call HostBuild))
<%#
Copyright 2015 Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
-%>
<h2 name="content"><%:Form token mismatch%></h2>
<br />
<p class="alert-message"><%:The submitted security token is invalid or already expired!%></p>
<p><%:
In order to prevent unauthorized access to the system, your request has
been blocked.
%></p>
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
SPDX-FileCopyrightText: 2008 Steven Barth <steven@midlink.org>
SPDX-FileCopyrightText: 2008 Jo-Philipp Wich <jow@openwrt.org>
SPDX-License-Identifier: Apache-2.0
-%>
<h2 name="content">404 <%:Not Found%></h2>
<p><%:Sorry, the object you requested was not found.%></p>
<tt><%=pcdata(message)%></tt>
<tt><%|message%></tt>
<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008 Jo-Philipp Wich <jow@openwrt.org>
Licensed to the public under the Apache License 2.0.
SPDX-FileCopyrightText: 2008 Steven Barth <steven@midlink.org>
SPDX-FileCopyrightText: 2008 Jo-Philipp Wich <jow@openwrt.org>
SPDX-License-Identifier: Apache-2.0
-%>
<h2 name="content">500 <%:Internal Server Error%></h2>
<p><%:Sorry, the server encountered an unexpected error.%></p>
<pre class="error500"><%=pcdata(message)%></pre>
<pre class="error500"><%|message%></pre>
<%
include("themes/" .. theme .. "/layout")
%>
<%
local i, key
local br = self.orientation == "horizontal" and '&#160;' or '<br />'
%>
<% if self.widget == "select" then %>
<select class="gluon-input-select" data-update="change"<%=
attr("id", id) ..
attr("name", id) ..
attr("size", self.size)
%>>
<% for i, key in pairs(self.keylist) do -%>
<option<%=
attr("id", id.."."..key) ..
attr("value", key) ..
attr("data-index", i) ..
attr("data-depends", self:deplist(self.valdeps[i])) ..
attr("selected", (self:cfgvalue() == key) and "selected")
%>><%=pcdata(self.vallist[i])%></option>
<%- end %>
</select>
<% elseif self.widget == "radio" then %>
<div>
<% for i, key in pairs(self.keylist) do %>
<label<%=
attr("data-index", i) ..
attr("data-depends", self:deplist(self.valdeps[i]))
%>>
<input class="gluon-input-radio" data-update="click change" type="radio"<%=
attr("id", id.."."..key) ..
attr("name", id) ..
attr("value", key) ..
attr("checked", (self:cfgvalue() == key) and "checked")
%> />
<label<%= attr("for", id.."-"..key)%>></label>
<%=pcdata(self.vallist[i])%>
</label>
<% if i == self.size then write(br) end %>
<% end %>
</div>
<% end %>