If you like BoxMatrix then please contribute Supportdata, Supportdata2, Firmware and/or Hardware (get in touch).
My metamonk@yahoo.com is not reachable by me since years. Please use hippie2000@webnmail.de instead.

0
U

Property:uimod.lua

From BoxMatrix


BoxMatrix >> Webinterface >> uimod.lua @ BoxMatrix   -   IRC-Chat   -   Translate: de es fr it nl pl
News Selectors Models Accessories Components Environment Config Commands System Webif Software Develop Lexicon Community Project Media

UI-Structure UI-Modules HTML-Files XML-Files Lua-Scripts Javascript Browser SSI-Files SSI-Directives HTML-Text Event-Text Help-Pages CSS-Files Graphics Research

Lua-Script

Goto:   Whitelist  -  Functions  -  Dependencies   -   Model-Matrix   -   SMW-Browser

Details

This is an "in-section" name collision covering 2 completely different files:   -   (this will be splitted one day)
For now this article explains the REST-API file in /usr/rest_api. The Dependencies and Model-Matrix cover both files.

uimod.lua is the REST-API UI-Modules API. It is included by api_generic.lua, api_generic_filter.lua and security.lua.

It provides an object representing one UI-Module, if this module is listed in the Whitelist accessible at Uimod.module_names.
It also provides methods to access the Webvariables of this module, which are wrappers for the box.* backend.
This object does not contain / store any variable, but provides methods to get or set them using the backend.

REST-API:

Whitelist

uimod.lua contains a whitelist of UI-Modules which could be accessed by the API: 7530 fw 7.50:

* apps
* aura
* avm_pa
* backendsupport
* blocked_ip
* box
* boxusers
* budget
* capiotcp
* capture
* cfgtakeover
* configd
* connection_voip
* connections
* country
* ctlusb
* ddns
* dect
* dhcpv6info
* dns_excepted_domains
* dnscfg                  
* dnsserver
* downgradecheck
* dslmail
* dslstatglobal
* dslstatistic
* emailnotify
* env
* eth_ports
* filelinks
* filter_profile
* forwardrules
* fritzappurls - unused in webif
* fwupdatestate - unused in webif
* hotspotgre
* hybridcfg
* igdforwardrules
* inetstat
* interfaces
* internet_ruleset
* ipv6
* ipv6firewall
* ipv6route
* jasonii
* landevice
* language
* letsencrypt
* lisp
* mediasrv
* meshd
* mobiled
* myfritzdevice
* netapp
* nexus
* nexusfon
* nqos
* oncal
* ontel
* openports
* parental_control
* pcp
* plc
* power
* providerlist
* remoteman
* rights
* route
* services
* shellinabox
* sip
* sipextra
* speedtest
* storagedirectories
* t_media
* tam
* telcfg
* time
* timer
* tr064
* tr069
* trafficprio
* uimodlogic
* umts                    
* umts_provider
* updatecheck
* usbdevices
* user
* userglobal
* userticket
* voip_providerlist
* voipextension
* voipjournal
* voipstat
* vpn
* webdavclient
* webui
* wlan
* wlan_light - unknown so far

Functions

The function names of scripts often help to understand function blocks (and show gaps in the docs). fw 7.50 functions:

$ grep -e '^function' -e '^local function' /usr/rest_api/uimod.lua

# split a string by separator
local function str_split (inputstr, sep)

# cmd_results eg: {boxusers:settings/user[boxuser15]/vpn_axxess=-2}
# to: {vpn_axxess=-2}
local function strip_cmd2webvar(cmd_results)

# Helper function that checks the existence of an item in a list
local function contains(list, param)

# Search a list of objects for an object with a given UID
local function get_entry_with_uid(entries, uid)

# Uimod constructor.
function Uimod:new(modulename)

# Get name-value pairs for webvars.
function Uimod:get_webvar(webvar)

# Set values for webvariables
function Uimod:set_webvar(webvar_data)

# Get the whole uimodule with all webvars and values from backend.
function Uimod:get_module()

# Gets the item with the given uid from a given list or the result member of Uimod class.
function Uimod:get_entry_by_uid(uid, entries)

# Gets the whole list with all entries and their name-value-pairs
function Uimod:get_list(list_name, uid)

# Create a new uimodule list item with default values.
function Uimod:new_list_item(list_name)

# Set the values of a existing list item.
function Uimod:set_list_item(listname_with_uid, data)

# Creates a new list item and set their webvariable values.
function Uimod:create_list_item(list_name, data)

# Delete an item by its uid from a list.
function Uimod:delete_list_item(listname, uid) 

Dependencies

Daily updated index of all dependencies of this script. Last update: 2024-04-23 08:48 GMT.
A * in the Mod column marks info from Supportdata-Probes, which will always stay incomplete.
If an Object includes itself then this is a file with the same name but another Path and the dependencies are merged.

Relation Typ Object Mod Firmware Info Origin
Accesses uimod boxusers 50 7.39 - 7.90 FritzBox-Users AVM
Accesses uimod connections 14 7.70 - 7.90 TODO AVM
Accesses uimod emailnotify 14 7.70 - 7.90 Push-Mail settings AVM
Accesses uimod landevice 14 7.70 - 7.90 Network device list AVM
Requires lua avmluamessages.lua 49 7.39 - 7.62 REST-API Debug Message Printer AVM
Requires lua response.lua 14 7.70 - 7.90 REST-API Response API AVM
Requires lua rest_api_const.lua 50 7.39 - 7.90 REST-API Const Tables AVM
Required by lua api.lua 15 7.39 REST-API Lua-Land root for scgi_server AVM
Required by lua api_generic.lua 50 7.39 - 7.90 REST-API Generic Endpoints AVM
Required by lua api_generic_filter.lua 50 7.39 - 7.90 REST-API UI-Modules Webvar Filter AVM
Required by lua boxname.lua 13 7.90 TODO AVM
Required by lua configuration.lua 13 7.90 TODO AVM
Required by lua connections.lua 14 7.70 - 7.90 TODO AVM
Required by lua cookie.lua 14 7.70 - 7.90 TODO AVM
Required by lua country.lua 14 7.70 - 7.90 TODO AVM
Required by lua fiber.lua 14 7.70 - 7.90 TODO AVM
Required by lua handsets.lua 13 7.90 TODO AVM
Required by lua home.lua 29 6.36 - 6.64 TODO AVM
Required by lua internet.lua 14 7.70 - 7.90 TODO AVM
Required by lua isp.lua 14 7.70 - 7.90 TODO AVM
Required by lua landevice.lua 37 7.39 - 7.90 REST-API wrapper for the landevice ui-module AVM
Required by lua locale.lua 14 7.70 - 7.90 TODO AVM
Required by lua mesh.lua 14 7.70 - 7.90 TODO AVM
Required by lua mobile.lua 14 7.70 - 7.90 TODO AVM
Required by lua monitor.lua 13 7.90 TODO AVM
Required by lua myfritz.lua 14 7.70 - 7.90 TODO AVM
Required by lua opmode.lua 14 7.70 - 7.90 TODO AVM
Required by lua phonebook.lua 9 7.90 TODO AVM
Required by lua plugin_common.lua 13 7.90 TODO AVM
Required by lua privacy.lua 14 7.70 - 7.90 TODO AVM
Required by lua progress.lua 14 7.70 - 7.90 TODO AVM
Required by lua saveset.lua 14 7.70 - 7.90 TODO AVM
Required by lua security.lua 50 7.39 - 7.90 REST-API Security AVM
Required by lua timermix.lua 13 7.90 TODO AVM
Required by lua uimod_cache.lua 14 7.70 - 7.90 TODO AVM
Required by lua update.lua 14 7.70 - 7.90 TODO AVM
Required by lua update_status.lua 13 7.90 TODO AVM
Required by lua wan_status.lua 13 7.90 TODO AVM
Required by lua wifi.lua 14 7.70 - 7.90 TODO AVM
Required by lua wififlags.lua 14 7.70 - 7.90 TODO AVM
40 dependencies for this script

Model-Matrix

Daily updated index of the presence, path and size of this script for each model. Last update: 2024-04-23 06:22 GMT.
Showing all models using this script. Click any column header (click-wait-click) to sort the list by the respective data.
The (main/scrpn/boot/arm/prx/atom) label in the Model column shows which CPU is meant for models with multiple Linux instances.
Note that this list is merged from Firmware-Probes of all known AVM firmware for a model, including Recovery.exe and Labor-Files.

Model Firmware Path Size/Bytes
FRITZ!Box 3272 6.50 - 6.89 /usr/lua 1.2k
FRITZ!Box WLAN 3370 6.36 - 6.56 /usr/lua 1.2k
FRITZ!Box 3390 6.36 - 6.56 /usr/lua 1.2k
FRITZ!Box 3490 (main) 6.36 - 7.30 /usr/lua 1.2k - 3.1k
FRITZ!Box 4020 7.39 /usr/lua, /usr/rest_api 783 - 12.2k
FRITZ!Box 4040 6.52 - 7.57 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 4050 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 4060 7.26 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 5490 (main) 6.51 - 7.29 /usr/lua 1.2k - 3.1k
FRITZ!Box 5491 (main) 7.01 - 7.29 /usr/lua 3.1k
FRITZ!Box 5530 Fiber (main) 7.21 - 7.80 /usr/lua, /usr/rest_api 3.1k - 20.3k
FRITZ!Box 5590 Fiber (arm) 7.27 - 7.90 /usr/lua, /usr/rest_api 3.1k - 27.6k
FRITZ!Box 5590 Fiber (prx) 7.70 - 7.90 /usr/rest_api 20.3k - 27.6k
FRITZ!Box 5690 Pro (arm) 7.59 - 7.60 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 6360 Cable 6.51 /usr/lua 1.2k
FRITZ!Box 6430 Cable (arm) 6.84 - 7.57 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6430 Cable (atom) 6.84 - 7.29 /usr/lua 1.2k - 3.1k
FRITZ!Box 6490 Cable (arm) 6.50 - 7.57 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6490 Cable (atom) 6.50 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6590 Cable (arm) 6.83 - 7.57 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6590 Cable (atom) 6.83 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6591 Cable (arm) 7.04 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6591 Cable (atom) 7.04 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6660 Cable (arm) 7.14 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6660 Cable (atom) 7.14 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6670 Cable (arm) 7.57 - 7.62 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 6670 Cable (atom) 7.61 - 7.62 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 6690 Cable (arm) 7.28 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6690 Cable (atom) 7.28 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 6820 LTE v1 6.40 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6820 LTE v2 6.40 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6820 LTE v3 7.19 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 6840 LTE 6.36 - 7.39 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6850 LTE 7.21 - 7.90 /usr/lua, /usr/rest_api 3.1k - 27.6k
FRITZ!Box 6850 5G 7.24 - 7.90 /usr/lua, /usr/rest_api 3.1k - 27.6k
FRITZ!Box 6890 LTE 6.84 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6890 LTE v1 6.84 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 6890 LTE v2 6.84 - 7.51 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 7272 6.36 - 7.39 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 7312 6.50 - 6.56 /usr/lua 1.2k
FRITZ!Box 7330 6.50 - 6.56 /usr/lua 1.2k
FRITZ!Box 7330 SL 6.50 - 6.56 /usr/lua 1.2k
FRITZ!Box Fon WLAN 7360 v2 6.36 - 6.88 /usr/lua 1.2k
FRITZ!Box 7362 SL 6.36 - 7.14 /usr/lua 1.2k - 3.1k
FRITZ!Box Fon WLAN 7390 /usr/lua 1.2k
FRITZ!Box 7412 6.50 - 6.88 /usr/lua 1.2k
FRITZ!Box 7430 6.26 - 7.39 /usr/lua, /usr/rest_api 783 - 12.2k
FRITZ!Box 7490 (main) 6.35 - 7.57 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 7510 7.30 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 7520 6.98 - 7.51 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 7520 v2 (arm) 7.30 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 7530 6.98 - 7.56 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 7530 AX 7.20 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 7560 6.51 - 7.39 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Box 7580 6.53 - 7.30 /usr/lua 1.2k - 3.1k
FRITZ!Box 7581 6.54 - 7.16 /usr/lua 1.2k - 3.1k
FRITZ!Box 7582 6.83 - 7.17 /usr/lua 1.2k - 3.1k
FRITZ!Box 7583 7.01 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Box 7583 VDSL 7.19 - 7.31 /usr/lua 3.1k
FRITZ!Box 7590 6.83 - 7.90 /usr/lua, /usr/rest_api 1.2k - 30.0k
FRITZ!Box 7590 AX 7.19 - 7.90 /usr/lua, /usr/rest_api 3.1k - 30.0k
FRITZ!Box 7690 7.59 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Smart Gateway 7.39 - 7.59 /usr/lua 3.1k
FRITZ!WLAN Repeater 310 A 6.51 - 7.16 /usr/lua 1.2k - 3.1k
FRITZ!WLAN Repeater 310 B 6.51 - 7.16 /usr/lua 1.2k - 3.1k
FRITZ!WLAN Repeater 450E 6.36 - 7.15 /usr/lua 1.2k - 3.1k
FRITZ!Repeater 600 7.11 - 7.58 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Repeater 600 v2 7.19 - 7.58 /usr/lua 3.1k
FRITZ!WLAN Repeater 1160 6.51 - 7.15 /usr/lua 1.2k - 3.1k
FRITZ!Repeater 1200 7.11 - 7.58 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Repeater 1200 AX 7.27 - 7.57 /usr/lua 3.1k
FRITZ!WLAN Repeater 1750E 6.36 - 7.39 /usr/lua, /usr/rest_api 1.2k - 12.2k
FRITZ!Repeater 2400 7.12 - 7.58 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Repeater 3000 6.98 - 7.58 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Repeater 3000 AX 7.39 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Repeater 6000 7.19 - 7.57 /usr/lua 3.1k
FRITZ!WLAN Repeater DVB-C 6.36 - 7.03 /usr/lua 1.2k - 3.1k
FRITZ!Powerline 540E 6.36 - 7.15 /usr/lua 1.2k - 3.1k
FRITZ!Powerline 546E 6.50 - 7.15 /usr/lua 1.2k - 3.1k
FRITZ!Powerline 1240 AX 7.51 - 7.57 /usr/lua 3.1k
FRITZ!Powerline 1240E 6.36 - 7.16 /usr/lua 1.2k - 3.1k
FRITZ!Powerline 1260E 6.90 - 7.57 /usr/lua, /usr/rest_api 3.1k - 12.2k
FRITZ!Powerline 1260 7.27 - 7.57 /usr/lua 3.1k
83 models use this script

SMW-Browser

Information is currently being retrieved from the backend.