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 252 additions and 68 deletions
<%-
local site_i18n = i18n 'gluon-site'
local sysconfig = require 'gluon.sysconfig'
local msg = _translate('gluon-config-mode:welcome')
local msg = site_i18n._translate('gluon-config-mode:welcome')
if not msg then return end
-%>
<p>
......
<!DOCTYPE html>
<html lang="">
<head>
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0">
<meta http-equiv="refresh" content="0; URL=/cgi-bin/config">
</head>
<body>
</body>
</html>
......@@ -9,6 +9,6 @@ UHTTPD_BIN="/usr/sbin/uhttpd"
start_service() {
procd_open_instance
procd_set_param respawn
procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/web/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80
procd_set_param command "$UHTTPD_BIN" -f -h /lib/gluon/config-mode/www -x /cgi-bin -A 1 -R -p 0.0.0.0:80
procd_close_instance
}
<h2><%:Your node's setup is now complete.%></h2>
<%
local fs = require "nixio.fs"
local util = require "nixio.util"
local parts_dir = "/lib/gluon/config-mode/reboot/"
local files = util.consume(fs.dir(parts_dir) or function() end)
table.sort(files)
local parts = {}
for _, entry in ipairs(files) do
if entry:sub(1, 1) ~= '.' then
local p = assert(loadfile(parts_dir .. entry))
setfenv(p, getfenv())
table.insert(parts, p)
end
end
for _, p in ipairs(parts) do
p()
end
%>
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: PACKAGE VERSION\n"
"PO-Revision-Date: 2015-08-12 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"
......
package 'gluon-config-mode-core'
entry({}, alias("wizard"))
entry({"wizard"}, model("gluon-config-mode/wizard"), _("Wizard"), 5)
local disp = require 'gluon.web.dispatcher'
local fs = require "nixio.fs"
local util = require "gluon.web.util"
local nixio_util = require "nixio.util"
local util = require "gluon.util"
local uci = require("simple-uci").cursor()
local wizard_dir = "/lib/gluon/config-mode/wizard/"
local files = nixio_util.consume(fs.dir(wizard_dir) or function() end)
table.sort(files)
local wizard = {}
for _, entry in ipairs(files) do
if entry:sub(1, 1) ~= '.' then
local f = assert(loadfile(wizard_dir .. entry))
setfenv(f, getfenv())
local w = f()
table.insert(wizard, w)
end
end
local f = Form(translate("Welcome!"))
f.submit = translate('Save & restart')
f.reset = false
local s = f:section(Section)
s.template = "gluon/config-mode/welcome"
local commit = {'gluon-setup-mode'}
s.template = "wizard/welcome"
s.package = "gluon-config-mode-core"
for _, w in ipairs(wizard) do
for _, c in ipairs(w(f, uci) or {}) do
if not util.contains(commit, c) then
table.insert(commit, c)
end
end
for _, entry in ipairs(util.glob('/lib/gluon/config-mode/wizard/*')) do
local section = assert(loadfile(entry))
setfenv(section, getfenv())
section()(f, uci)
end
function f:write()
local nixio = require "nixio"
local fcntl = require 'posix.fcntl'
local unistd = require 'posix.unistd'
uci:set("gluon-setup-mode", uci:get_first("gluon-setup-mode", "setup_mode"), "configured", true)
uci:save("gluon-setup-mode")
for _, c in ipairs(commit) do
uci:commit(c)
end
os.execute('exec gluon-reconfigure >/dev/null')
f.template = "gluon/config-mode/reboot"
f.template = "wizard/reboot"
f.package = "gluon-config-mode-core"
f.hidenav = true
if nixio.fork() == 0 then
if unistd.fork() == 0 then
-- Replace stdout with /dev/null
nixio.dup(nixio.open('/dev/null', 'w'), nixio.stdout)
local null = fcntl.open('/dev/null', fcntl.O_WRONLY)
unistd.dup2(null, unistd.STDOUT_FILENO)
-- Sleep a little so the browser can fetch everything required to
-- display the reboot page, then reboot the device.
nixio.nanosleep(1)
unistd.sleep(1)
nixio.execp("reboot")
unistd.execp('reboot', {[0] = 'reboot'})
end
end
......
local site = require 'gluon.site_config'
local site_i18n = i18n 'gluon-site'
local site = require 'gluon.site'
local sysconfig = require 'gluon.sysconfig'
local pretty_hostname = require 'pretty_hostname'
......@@ -7,7 +9,7 @@ local uci = require("simple-uci").cursor()
local hostname = pretty_hostname.get(uci)
local contact = uci:get_first('gluon-node-info', 'owner', 'contact')
local msg = _translate('gluon-config-mode:reboot')
local msg = site_i18n._translate('gluon-config-mode:reboot')
if not msg then return end
renderer.render_string(msg, {
......
#!/usr/bin/lua
require 'gluon.web.cgi' {
base_path = '/lib/gluon/config-mode',
layout_package = 'gluon-config-mode-theme',
layout_template = 'theme/layout',
}
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-domain-select
include ../gluon.mk
define Package/gluon-config-mode-domain-select
TITLE:=UI for changing the node-config
DEPENDS:=+gluon-config-mode-core @GLUON_MULTIDOMAIN
endef
$(eval $(call BuildPackageGluon,gluon-config-mode-domain-select))
local valid_domain_codes = table_keys(need_table(in_domain({'domain_names'})))
alternatives(function()
need_boolean(in_domain({'hide_domain'}), false)
end, function()
need_array_of(in_domain({'hide_domain'}), valid_domain_codes, false)
end)
return function(form, uci)
local site_i18n = i18n 'gluon-site'
local json = require 'jsonc'
local site = require 'gluon.site'
local util = require 'gluon.util'
local selected_domain = uci:get('gluon', 'core', 'domain')
local configured = uci:get_first('gluon-setup-mode','setup_mode', 'configured') == '1' or
(selected_domain ~= site.default_domain())
local function hide_domain_code(domain, code)
if configured and code == selected_domain then
return false
elseif type(domain.hide_domain) == 'table' then
return util.contains(domain.hide_domain, code)
else
return domain.hide_domain
end
end
local function get_domain_list()
local list = {}
for _, domain_path in ipairs(util.glob('/lib/gluon/domains/*.json')) do
local domain_code = domain_path:match('([^/]+)%.json$')
local domain = assert(json.load(domain_path))
if not hide_domain_code(domain, domain_code) then
table.insert(list, {
domain_code = domain_code,
domain_name = domain.domain_names[domain_code],
})
end
end
table.sort(list, function(a, b) return a.domain_name < b.domain_name end)
return list
end
local s = form:section(Section, nil, site_i18n.translate('gluon-config-mode:domain-select'))
local o = s:option(ListValue, 'domain', site_i18n.translate('gluon-config-mode:domain'))
if configured then
o.default = selected_domain
end
for _, domain in ipairs(get_domain_list()) do
o:value(domain.domain_code, domain.domain_name)
end
function o:write(data)
uci:set('gluon', 'core', 'domain', data)
uci:save('gluon')
end
end
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-geo-location-osm
include ../gluon.mk
define Package/gluon-config-mode-geo-location-osm
TITLE:=Set geographic location of a node (map support)
DEPENDS:=+gluon-config-mode-geo-location +gluon-web-osm
endef
define Package/gluon-config-mode-geo-location-osm/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/config-mode/www/static/
$(LN) /lib/gluon/web/www/static/gluon-web-osm.js $(1)/lib/gluon/config-mode/www/static/
endef
$(eval $(call BuildPackageGluon,gluon-config-mode-geo-location-osm))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lon'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'center', 'lat'}))
need_number(in_site({'config_mode', 'geo_location', 'osm', 'zoom'}), false)
need_string(in_site({'config_mode', 'geo_location', 'osm', 'openlayers_url'}), false)
if need_table(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer'}), nil, false) then
need_one_of(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'type'}), {'XYZ'})
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'url'}))
need_string(in_site({'config_mode', 'geo_location', 'osm', 'tile_layer', 'attributions'}))
end
msgid ""
msgstr ""
"Project-Id-Version: gluon-config-mode-geo-location\n"
"Last-Translator: Matthias Schiffer <mschiffer@universe-factory.net>\n"
"Language-Team: German\n"
"Language: de\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 ""
"You may also select the position on the map displayed below if your computer "
"is connected to the internet at the moment."
msgstr ""
"Wenn dein Computer aktuell mit dem Internet verbunden ist, kann die Position "
"auch auf der hier angezeigten Karte ausgewählt werden."
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
msgid ""
"You may also select the position on the map displayed below if your computer "
"is connected to the internet at the moment."
msgstr ""
local osm = require 'gluon.web.model.osm'
local site = require 'gluon.site'
local M = {}
M.MapValue = osm.MapValue
function M.help(i18n)
local pkg_i18n = i18n 'gluon-config-mode-geo-location-osm'
return pkg_i18n.translate(
'You may also select the position on the map displayed below '
.. 'if your computer is connected to the internet at the moment.'
)
end
function M.options()
local config = site.config_mode.geo_location.osm
return {
openlayers_url = config.openlayers_url(),
tile_layer = config.tile_layer(),
zoom = config.zoom(12),
pos = config.center(),
}
end
return M
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-config-mode-geo-location
PKG_VERSION:=1
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
include ../gluon.mk
PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
define Package/gluon-config-mode-geo-location
SECTION:=gluon
CATEGORY:=Gluon
TITLE:=Set geographic location of a node
DEPENDS:=gluon-config-mode-core-virtual +gluon-node-info
endef
define Build/Prepare
mkdir -p $(PKG_BUILD_DIR)
endef
define Build/Configure
endef
define Build/Compile
$(call GluonBuildI18N,gluon-config-mode-geo-location,i18n)
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef
define Package/gluon-config-mode-geo-location/install
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
$(call GluonInstallI18N,gluon-config-mode-geo-location,$(1))
endef
define Package/gluon-config-mode-geo-location/postinst
#!/bin/sh
$(call GluonCheckSite,check_site.lua)
DEPENDS:=+gluon-config-mode-core +gluon-node-info
endef
$(eval $(call BuildPackage,gluon-config-mode-geo-location))
$(eval $(call BuildPackageGluon,gluon-config-mode-geo-location))
if need_table('config_mode', nil, false) and need_table('config_mode.geo_location', nil, false) then
need_boolean('config_mode.geo_location.show_altitude', false)
end
need_boolean(in_site({'config_mode', 'geo_location', 'show_altitude'}), false)
......@@ -10,12 +10,18 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Advertise node position"
msgstr "Knotenposition veröffentlichen"
msgid "Altitude"
msgstr "Höhe"
msgid ""
"If you want the location of your node to be displayed on the map, you can "
"enter its coordinates here."
"If you want the location of your node to be displayed on public maps, you "
"can enter its coordinates here."
msgstr ""
"Um deinen Knoten auf der Karte anzeigen zu können, benötigen wir seine "
"Koordinaten. Hier hast du die Möglichkeit, diese zu hinterlegen."
"Um deinen Knoten auf öffentlichen Karten anzeigen zu können, benötigen wir "
"seine Koordinaten. Hier hast du die Möglichkeit, diese zu hinterlegen."
msgid "Latitude"
msgstr "Breitengrad"
......@@ -23,8 +29,15 @@ msgstr "Breitengrad"
msgid "Longitude"
msgstr "Längengrad"
msgid "Show node on the map"
msgstr "Knoten auf der Karte anzeigen"
msgid "Set node position"
msgstr "Knotenposition setzen"
msgid ""
"Specifying the altitude is optional; it should only be filled in if an "
"accurate value is known."
msgstr ""
"Die Höhenangabe ist optional und sollte nur gesetzt werden, wenn ein exakter "
"Wert bekannt ist."
msgid "e.g. %s"
msgstr "z.B. %s"