diff --git a/mote/v1/openwrt/package/luci/host/bin/luadoc b/mote/v1/openwrt/package/luci/host/bin/luadoc deleted file mode 100755 index ba99a37..0000000 --- a/mote/v1/openwrt/package/luci/host/bin/luadoc +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env lua -------------------------------------------------------------------------------- --- LuaDoc launcher. --- @release $Id: luadoc.lua.in,v 1.1 2008/02/17 06:42:51 jasonsantos Exp $ -------------------------------------------------------------------------------- - -require "luadoc" - -------------------------------------------------------------------------------- --- Print version number. - -local function print_version () - print (string.format("%s\n%s\n%s", - luadoc._VERSION, - luadoc._DESCRIPTION, - luadoc._COPYRIGHT)) -end - -------------------------------------------------------------------------------- --- Print usage message. - -local function print_help () - print ("Usage: "..arg[0]..[[ [options|files] -Generate documentation from files. Available options are: - -d path output directory path - -t path template directory path - -h, --help print this help and exit - --noindexpage do not generate global index page - --nofiles do not generate documentation for files - --nomodules do not generate documentation for modules - --doclet doclet_module doclet module to generate output - --taglet taglet_module taglet module to parse input code - -q, --quiet suppress all normal output - -v, --version print version information]]) -end - -local function off_messages (arg, i, options) - options.verbose = nil -end - -------------------------------------------------------------------------------- --- Process options. TODO: use getopts. --- @class table --- @name OPTIONS - -local OPTIONS = { - d = function (arg, i, options) - local dir = arg[i+1] - if string.sub (dir, -2) ~= "/" then - dir = dir..'/' - end - options.output_dir = dir - return 1 - end, - t = function (arg, i, options) - local dir = arg[i+1] - if string.sub (dir, -2) ~= "/" then - dir = dir..'/' - end - options.template_dir = dir - return 1 - end, - h = print_help, - help = print_help, - q = off_messages, - quiet = off_messages, - v = print_version, - version = print_version, - doclet = function (arg, i, options) - options.doclet = arg[i+1] - return 1 - end, - taglet = function (arg, i, options) - options.taglet = arg[i+1] - return 1 - end, -} - -------------------------------------------------------------------------------- - -local function process_options (arg) - local files = {} - local options = require "luadoc.config" - local i = 1 - while i <= #arg do - local argi = arg[i] - if string.sub (argi, 1, 1) ~= '-' then - table.insert (files, argi) - else - local opt = string.sub (argi, 2) - if string.sub (opt, 1, 1) == '-' then - opt = string.gsub (opt, "%-", "") - end - if OPTIONS[opt] then - if OPTIONS[opt] (arg, i, options) then - i = i + 1 - end - else - options[opt] = 1 - end - end - i = i+1 - end - return files, options -end - -------------------------------------------------------------------------------- --- Main function. Process command-line parameters and call luadoc processor. - -function main (arg) - -- Process options - local argc = #arg - if argc < 1 then - print_help () - return - end - local files, options = process_options (arg) - return luadoc.main(files, options) -end - -main(arg) diff --git a/mote/v1/openwrt/package/luci/host/bin/uci b/mote/v1/openwrt/package/luci/host/bin/uci deleted file mode 100755 index f6104c6..0000000 --- a/mote/v1/openwrt/package/luci/host/bin/uci +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -$(dirname $0)/../usr/bin/uci -c $(dirname $0)/../etc/config "$@" diff --git a/mote/v1/openwrt/package/luci/host/bin/uci-defaults b/mote/v1/openwrt/package/luci/host/bin/uci-defaults deleted file mode 100755 index 3b58d7b..0000000 --- a/mote/v1/openwrt/package/luci/host/bin/uci-defaults +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -for i in $(find $(dirname $0)/../etc/uci-defaults -type f -not -name "$2") -do - [ -f $i ] && { - bash $i; rm $i - } -done diff --git a/mote/v1/openwrt/package/luci/host/etc/boa/boa.conf b/mote/v1/openwrt/package/luci/host/etc/boa/boa.conf deleted file mode 100644 index c152caa..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/boa/boa.conf +++ /dev/null @@ -1,17 +0,0 @@ -Port 80 -ErrorLog /dev/stderr -AccessLog /dev/stderr -DocumentRoot /www -DirectoryMaker /usr/lib/boa/boa_indexer -KeepAliveMax 1000 -KeepAliveTimeout 10 -MimeTypes /etc/mime.types -DefaultType text/plain -ServerName localhost -CGIPath /bin:/usr/bin - -AddType application/x-httpd-cgi cgi -AddType application/x-httpd-cgi sh - -ScriptAlias /cgi-bin/ /www/cgi-bin -PluginRoot /usr/lib/boa diff --git a/mote/v1/openwrt/package/luci/host/etc/config/batmand b/mote/v1/openwrt/package/luci/host/etc/config/batmand deleted file mode 100644 index 95ec3fa..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/batmand +++ /dev/null @@ -1,10 +0,0 @@ -config batmand general - option interface ath0 - option announce - option gateway_class - option originator_interval - option preferred_gateway - option routing_class - option visualisation_srv - option policy_routing_script - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/ddns b/mote/v1/openwrt/package/luci/host/etc/config/ddns deleted file mode 100644 index 7c3f3c1..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/ddns +++ /dev/null @@ -1,85 +0,0 @@ -################################################################# -# In order to enable dynamic dns you need at least one section, -# and in that seciton the "enabled" option must be set to one -# -# Each section represents an update to a different service -# -# You specify your domain name, your username and your password -# with the optins "domain", "username" and "password" respectively -# -# Next you need to specify the name of the service you are -# connecting to "eg. dyndns.org". The format of the update -# urls for several different dynamic dns services is specified -# in the /usr/lib/ddns/services file. This list is hardly complete -# as there are many, many different dynamic dns services. If your -# service is on the list you can merely specify it with the -# "service_name" option. Otherwise you will need to determine -# the format of the url to update with. You can either add an -# entry to the /usr/lib/ddns/services file or specify this with -# the "update_url" option. -# -# We also need to specify the source of the ip address to associate with -# your domain. The "ip_source" option can be "network", "interface" -# or "web", with "network" as the default. -# -# If "ip_source" is "network" you specify a network section in your -# /etc/network config file (e.g. "wan", which is the default) with -# the "ip_network" option. If you specify "wan", you will update -# with whatever the ip for your wan is. -# -# If "ip_source" is "interface" you specify a hardware interface -# (e.g. "eth1") and whatever the current ip of this interface is -# will be associated with the domain when an update is performed. -# -# The last possibility is that "ip_source" is "web", which means -# that in order to obtain our ip address we will connect to a -# website, and the first valid ip address listed on that page -# will be assumed to be ours. If you are behind another firewall -# this is the best option since none of the local networks or -# interfaces will have the external ip. The website to connect -# to is specified by the "ip_url" option. You may specify multiple -# urls in the option, separated by whitespace. -# -# Finally we need to specify how often to check whether we need -# to check whether the ip address has changed (and if so update -# it) and how often we need to force an update ( many services -# will expire your domain if you don't connect and do an update -# every so often). Use the "check_interval" to specify how -# often to check whether an update is necessary, and the -# "force_interval" option to specify how often to force an -# update. Specify the units for these values with the "check_unit" -# and the "force_unit" options. Units can be "days", "hours", -# "minutes" or "seconds". The default force_unit is hours and the -# default check_unit is seconds. The default check_interval is -# 600 seconds, or ten minutes. The default force_interval is -# 72 hours or 3 days. -# -# -######################################################### - -config service "myddns" - option enabled "0" - - option service_name "dyndns.org" - option domain "mypersonaldomain.dyndns.org" - option username "myusername" - option password "mypassword" - - option ip_source "network" - option ip_network "wan" - - - option force_interval "72" - option force_unit "hours" - option check_interval "10" - option check_unit "minutes" - - #option ip_source "interface" - #option ip_interface "eth0.1" - - #option ip_source "web" - #option ip_url "http://www.whatismyip.com/automation/n09230945.asp" - - #option update_url "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" - - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/dhcp b/mote/v1/openwrt/package/luci/host/etc/config/dhcp deleted file mode 100644 index 4904b02..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/dhcp +++ /dev/null @@ -1,23 +0,0 @@ -config dnsmasq - option domainneeded 1 - option boguspriv 1 - option filterwin2k '0' #enable for dial on demand - option localise_queries 1 - option local '/lan/' - option domain 'lan' - option expandhosts 1 - option nonegcache 0 - option authoritative 1 - option readethers 1 - option leasefile '/tmp/dhcp.leases' - option resolvfile '/tmp/resolv.conf.auto' - -config dhcp - option interface lan - option start 100 - option limit 150 - option leasetime 12h - -config dhcp - option interface wan - option ignore 1 diff --git a/mote/v1/openwrt/package/luci/host/etc/config/dropbear b/mote/v1/openwrt/package/luci/host/etc/config/dropbear deleted file mode 100644 index e660ac7..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/dropbear +++ /dev/null @@ -1,3 +0,0 @@ -config dropbear - option PasswordAuth 'on' - option Port '22' diff --git a/mote/v1/openwrt/package/luci/host/etc/config/firewall b/mote/v1/openwrt/package/luci/host/etc/config/firewall deleted file mode 100644 index 0731690..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/firewall +++ /dev/null @@ -1,80 +0,0 @@ -config defaults - option syn_flood 1 - option input DROP - option output ACCEPT - option forward DROP - -config zone - option name lan - option input ACCEPT - option output ACCEPT - option forward DROP - -config zone - option name wan - option input DROP - option output ACCEPT - option forward DROP - option masq 1 - -config forwarding - option src lan - option dest wan - - -### EXAMPLE CONFIG SECTIONS -# do not allow a specific ip to access wan -#config rule -# option src lan -# option src_ip 192.168.45.2 -# option dest wan -# option proto tcp -# option target REJECT - -# block a specific mac on wan -#config rule -# option dest wan -# option src_mac 00:11:22:33:44:66 -# option target REJECT - -# block incoming ICMP traffic on a zone -#config rule -# option src lan -# option proto ICMP -# option target DROP - -# port redirect port coming in on wan to lan -#config redirect -# option src wan -# option src_dport 80 -# option dest lan -# option dest_ip 192.168.16.235 -# option dest_port 80 -# option protocol tcp - -# include a file with users custom iptables rules -#config include -# option path /etc/firewall.user - - -### FULL CONFIG SECTIONS -#config rule -# option src lan -# option src_ip 192.168.45.2 -# option src_mac 00:11:22:33:44:55 -# option src_port 80 -# option dest wan -# option dest_ip 194.25.2.129 -# option dest_port 120 -# option proto tcp -# option target REJECT - -#config redirect -# option src lan -# option src_ip 192.168.45.2 -# option src_mac 00:11:22:33:44:55 -# option src_port 1024 -# option src_dport 80 -# option dest_ip 194.25.2.129 -# option dest_port 120 -# option proto tcp diff --git a/mote/v1/openwrt/package/luci/host/etc/config/freifunk b/mote/v1/openwrt/package/luci/host/etc/config/freifunk deleted file mode 100644 index 862c86d..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/freifunk +++ /dev/null @@ -1,126 +0,0 @@ -config settings wizard -config public contact - option nickname '' - option name '' - option mail '' - option phone '' - option location '' - option note '' - -config public community - option name 'Freifunk' - option homepage 'http://freifunk.net' - -config fw_rule icmp - option src freifunk - option target ACCEPT - option proto icmp - -config fw_rule http - option src freifunk - option target ACCEPT - option proto tcp - option dest_port 80 - -config fw_rule https - option src freifunk - option target ACCEPT - option proto tcp - option dest_port 443 - -config fw_rule ssh - option src freifunk - option target ACCEPT - option proto tcp - option dest_port 22 - -config fw_rule olsr - option src freifunk - option target ACCEPT - option proto udp - option dest_port 698 - -config fw_forwarding lan - option src lan - option dest freifunk - -config fw_forwarding fffwd - option src freifunk - option dest freifunk - - -config defaults wifi_device - option channel 1 - option diversity 1 - option disabled 0 - option txpower 10 - - -config defaults wifi_iface - option mode adhoc - option bssid 02:CA:FF:EE:BA:BE - option sw_merge 1 - - -config defaults interface - option netmask 255.0.0.0 - option dns "88.198.178.18 141.54.1.1 212.204.49.83 208.67.220.220 208.67.222.222" - - -config defaults alias - option netmask 255.255.255.0 - - -config defaults dhcp - option leasetime 30m - - -config defaults olsr_interface - option HelloInterval 6.0 - option HelloValidityTime 108.0 - option TcInterval 4.0 - option TcValidityTime 324.0 - option MidInterval 18.0 - option MidValidityTime 324.0 - option HnaInterval 18.0 - option HnaValidityTime 108.0 - - -config community leipzig - option name "Freifunk Leipzig" - option homepage http://leipzig.freifunk.net - option ssid "leipzig.freifunk.net" - option prefix "104.61" - -config community halle - option name "Freifunk Halle" - option homepage http://halle.freifunk.net - option ssid "halle.freifunk.net" - option prefix "104.62" - -config community l59 - option name "Freifunk L59" - option homepage http://freifunk.net - option ssid "start.freifunk.net" - option prefix "104.59" - -config community berlin - option name "Freifunk Berlin" - option homepage http://berlin.freifunk.net - option ssid "olsr.freifunk.net" - option prefix "104" - option external freifunk_berlin - -config community hannover - option name "Freifunk Hannover" - option homepage http://hannover.freifunk.net - option ssid "hannover.freifunk.net" - option prefix "10.2" - option external freifunk_hannover - -config community augsburg - option name "Freifunk Augsburg" - option homepage http://augsburg.freifunk.net - option ssid "augsburg.freifunk.net" - option prefix "191.161" - option external freifunk_augsburg diff --git a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_augsburg b/mote/v1/openwrt/package/luci/host/etc/config/freifunk_augsburg deleted file mode 100644 index f68600c..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_augsburg +++ /dev/null @@ -1,2 +0,0 @@ -config defaults interface - option netmask 255.255.0.0 \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_berlin b/mote/v1/openwrt/package/luci/host/etc/config/freifunk_berlin deleted file mode 100644 index 65bde76..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_berlin +++ /dev/null @@ -1,2 +0,0 @@ -config defaults wifi_device - option channel 10 \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_hannover b/mote/v1/openwrt/package/luci/host/etc/config/freifunk_hannover deleted file mode 100644 index f797a93..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/freifunk_hannover +++ /dev/null @@ -1,5 +0,0 @@ -config defaults wifi_iface - option bssid CA:FF:EE:CA:FF:EE - -config defaults interface - option netmask 255.255.0.0 \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/config/fstab b/mote/v1/openwrt/package/luci/host/etc/config/fstab deleted file mode 100644 index eccf0ce..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/fstab +++ /dev/null @@ -1,10 +0,0 @@ -config mount - option target /home - option device /dev/sda1 - option fstype ext3 - option options rw,sync - option enabled 0 - -config swap - option device /dev/sda2 - option enabled 0 diff --git a/mote/v1/openwrt/package/luci/host/etc/config/httpd b/mote/v1/openwrt/package/luci/host/etc/config/httpd deleted file mode 100644 index 2f8020f..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/httpd +++ /dev/null @@ -1,5 +0,0 @@ - -config 'httpd' - option 'port' '80' - option 'home' '/www' - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/luci b/mote/v1/openwrt/package/luci/host/etc/config/luci deleted file mode 100644 index 843a7fe..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/luci +++ /dev/null @@ -1,43 +0,0 @@ - -config 'core' 'main' - option 'lang' 'auto' - option 'mediaurlbase' '/luci-static/openwrt.org' - option 'resourcebase' '/luci-static/resources' - -config 'extern' 'flash_keep' - option 'uci' '/etc/config/' - option 'dropbear' '/etc/dropbear/' - option 'openvpn' '/etc/openvpn/' - option 'passwd' '/etc/passwd' - option 'opkg' '/etc/opkg.conf' - option 'firewall' '/etc/firewall.user' - option 'uploads' '/lib/uci/upload/' - -config 'internal' 'languages' - option 'ru' 'Russian' - option 'it' 'Italian' - option 'en' 'English' - option 'de' 'Deutsch' - option 'fr' 'Francais' - option 'pt_br' 'Portuguese (Brazilian)' - -config 'internal' 'sauth' - option 'sessionpath' '/tmp/luci-sessions' - option 'sessiontime' '3600' - -config 'internal' 'ccache' - option 'enable' '1' - -config 'internal' 'template' - option 'compiler_mode' 'file' - option 'compiledir' '/tmp/luci-templatecache' - -config 'internal' 'themes' - option 'OpenWrt_Light' '/luci-static/openwrt-light' - option 'Fledermaus' '/luci-static/fledermaus' - option 'Oxygen' '/luci-static/oxygen' - option 'OpenWrtOxygen' '/luci-static/openwrt.org-oxygen' - option 'OpenWrt' '/luci-static/openwrt.org' - option 'Freifunk' '/luci-static/freifunk' - option 'Freifunk_BNO' '/luci-static/freifunk-bno' - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/luci_ethers b/mote/v1/openwrt/package/luci/host/etc/config/luci_ethers deleted file mode 100644 index 8b13789..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/luci_ethers +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/luci_hosts b/mote/v1/openwrt/package/luci/host/etc/config/luci_hosts deleted file mode 100644 index 8b13789..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/luci_hosts +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/luci_splash b/mote/v1/openwrt/package/luci/host/etc/config/luci_splash deleted file mode 100644 index c4cfef5..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/luci_splash +++ /dev/null @@ -1,2 +0,0 @@ -config core general - option leasetime 1 \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/config/luci_statistics b/mote/v1/openwrt/package/luci/host/etc/config/luci_statistics deleted file mode 100644 index f6d870e..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/luci_statistics +++ /dev/null @@ -1,132 +0,0 @@ -config 'statistics' 'rrdtool' - option 'default_timespan' '1hour' - option 'image_width' '400' - option 'image_path' '/tmp/rrdimg' - -config 'statistics' 'collectd' - option 'BaseDir' '/var/run/collectd' - option 'Include' '/etc/collectd/conf.d' - option 'PIDFile' '/var/run/collectd.pid' - option 'PluginDir' '/usr/lib/collectd' - option 'TypesDB' '/usr/lib/collectd/types.db' - option 'Interval' '30' - option 'ReadThreads' '2' - -config 'statistics' 'collectd_ping' - option 'enable' '0' - option 'TTL' '127' - option 'Hosts' '127.0.0.1' - -config 'statistics' 'collectd_csv' - option 'enable' '0' - option 'StoreRates' '0' - option 'DataDir' '/tmp' - -config 'statistics' 'collectd_df' - option 'enable' '0' - option 'Devices' '/dev/mtdblock/4' - option 'MountPoints' '/jffs' - option 'FSTypes' 'tmpfs' - option 'IgnoreSelected' '0' - -config 'statistics' 'collectd_disk' - option 'enable' '0' - option 'Disks' 'hda1 hdb' - option 'IgnoreSelected' '0' - -config 'statistics' 'collectd_dns' - option 'enable' '0' - option 'Interfaces' 'ffdhcp ff br-lan' - option 'IgnoreSources' '127.0.0.1' - -config 'statistics' 'collectd_email' - option 'enable' '0' - option 'SocketFile' '/var/run/collectd/email.sock' - option 'SocketGroup' 'nogroup' - -config 'statistics' 'collectd_exec' - option 'enable' '1' - -config 'collectd_exec_input' - option 'cmdline' '/usr/bin/stat-input-olsr' - -config 'collectd_exec_notify' - option 'cmdline' '/usr/bin/stat-output-syslog' - -config 'statistics' 'collectd_interface' - option 'enable' '1' - option 'Interfaces' 'br-lan br-ff' - option 'IgnoreSelected' '0' - -config 'statistics' 'collectd_iptables' - option 'enable' '1' - -config 'collectd_iptables_match' - option 'table' 'nat' - option 'chain' 'luci_fw_postrouting' - option 'target' 'MASQUERADE' - option 'source' '192.168.1.0/24' - option 'outputif' 'br-ff' - option 'name' 'Verkehr LAN-Clients' - -config 'collectd_iptables_match' - option 'chain' 'luci_fw_postrouting' - option 'table' 'nat' - option 'target' 'MASQUERADE' - option 'source' '10.61.230.0/24' - option 'outputif' 'br-ff' - option 'name' 'Verkehr WLAN-Clients' - -config 'statistics' 'collectd_irq' - option 'enable' '0' - option 'Irqs' '2 3 4 7' - -config 'statistics' 'collectd_load' - option 'enable' '1' - -config 'statistics' 'collectd_logfile' - option 'enable' '0' - option 'LogLevel' 'notice' - option 'File' '/var/log/collectd.log' - option 'Timestamp' '1' - -config 'statistics' 'collectd_netlink' - option 'enable' '0' - option 'IgnoreSelected' '0' - option 'VerboseInterfaces' 'br-lan br-ff' - option 'QDiscs' 'br-lan br-ff' - -config 'statistics' 'collectd_network' - option 'enable' '0' - -config 'collectd_network_listen' - option 'host' '0.0.0.0' - -config 'collectd_network_server' - option 'host' '0.0.0.0' - -config 'statistics' 'collectd_processes' - option 'enable' '1' - -config 'statistics' 'collectd_tcpconns' - option 'enable' '1' - option 'ListeningPorts' '0' - option 'LocalPorts' '22 80' - -config 'statistics' 'collectd_unixsock' - option 'enable' '0' - option 'SocketFile' '/var/run/collectd/query.sock' - option 'SocketGroup' 'nogroup' - -config 'statistics' 'collectd_wireless' - option 'enable' '1' - -config 'statistics' 'collectd_cpu' - option 'enable' '1' - -config 'statistics' 'collectd_rrdtool' - option 'enable' '1' - option 'DataDir' '/tmp' - option 'RRARows' '100' - option 'RRASingle' '1' - option 'RRATimespans' '10min 1hour 1day 1week 1month 1year' diff --git a/mote/v1/openwrt/package/luci/host/etc/config/lucittpd b/mote/v1/openwrt/package/luci/host/etc/config/lucittpd deleted file mode 100644 index 803a6e5..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/lucittpd +++ /dev/null @@ -1,6 +0,0 @@ -config lucittpd lucittpd - option port 80 - option timeout 90 - option keepalive 0 - option path /usr/lib/lucittpd/plugins/ - option root /www diff --git a/mote/v1/openwrt/package/luci/host/etc/config/network b/mote/v1/openwrt/package/luci/host/etc/config/network deleted file mode 100644 index 6f499c9..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/network +++ /dev/null @@ -1,27 +0,0 @@ -#### VLAN configuration -config switch eth0 - option vlan0 "0 1 2 3 5*" - option vlan1 "4 5" - - -#### Loopback configuration -config interface loopback - option ifname "lo" - option proto static - option ipaddr 127.0.0.1 - option netmask 255.0.0.0 - - -#### LAN configuration -config interface lan - option type bridge - option ifname "eth0" - option proto static - option ipaddr 192.168.1.1 - option netmask 255.255.255.0 - - -#### WAN configuration -config interface wan - option ifname "wlan0" - option proto dhcp diff --git a/mote/v1/openwrt/package/luci/host/etc/config/ntpclient b/mote/v1/openwrt/package/luci/host/etc/config/ntpclient deleted file mode 100644 index 1b56f1b..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/ntpclient +++ /dev/null @@ -1,22 +0,0 @@ -config ntpserver - option hostname '0.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '1.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '2.openwrt.pool.ntp.org' - option port '123' - -config ntpserver - option hostname '3.openwrt.pool.ntp.org' - option port '123' - -config ntpdrift - option freq '0' - -config ntpclient - option interval 60 - #option count 10 diff --git a/mote/v1/openwrt/package/luci/host/etc/config/qos b/mote/v1/openwrt/package/luci/host/etc/config/qos deleted file mode 100644 index 51959b5..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/qos +++ /dev/null @@ -1,89 +0,0 @@ -# QoS configuration for OpenWrt - -# INTERFACES: -config interface wan - option classgroup "Default" - option enabled 1 - option overhead 1 - option upload 128 - option download 1024 - -# RULES: -config classify - option target "Bulk" - option ipp2p "all" -config classify - option target "Bulk" - option layer7 "edonkey" -config classify - option target "Bulk" - option layer7 "bittorrent" -config classify - option target "Priority" - option ports "22,53" -config classify - option target "Normal" - option proto "tcp" - option ports "20,21,25,80,110,443,993,995" -config classify - option target "Express" - option ports "5190" -config default - option target "Express" - option proto "udp" - option pktsize "-500" -config reclassify - option target "Priority" - option proto "icmp" -config default - option target "Bulk" - option portrange "1024-65535" -config reclassify - option target "Priority" - option proto "tcp" - option pktsize "-128" - option mark "!Bulk" - option tcpflags "SYN" -config reclassify - option target "Priority" - option proto "tcp" - option pktsize "-128" - option mark "!Bulk" - option tcpflags "ACK" - - -# Don't change the stuff below unless you -# really know what it means :) - -config classgroup "Default" - option classes "Priority Express Normal Bulk" - option default "Normal" - - -config class "Priority" - option packetsize 400 - option maxsize 400 - option avgrate 10 - option priority 20 -config class "Priority_down" - option packetsize 1000 - option avgrate 10 - - -config class "Express" - option packetsize 1000 - option maxsize 800 - option avgrate 50 - option priority 10 - -config class "Normal" - option packetsize 1500 - option packetdelay 100 - option avgrate 10 - option priority 5 -config class "Normal_down" - option avgrate 20 - -config class "Bulk" - option avgrate 1 - option packetdelay 200 diff --git a/mote/v1/openwrt/package/luci/host/etc/config/siit b/mote/v1/openwrt/package/luci/host/etc/config/siit deleted file mode 100644 index 0fce1ea..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/siit +++ /dev/null @@ -1,10 +0,0 @@ -config siit ipv6 - option ula_prefix "fd00::" - option ula_global "00ca:ffee:babe::" - option ula_subnet "0000:0000:0000:dada::" - option siit_prefix "::ffff:0000:0000" - -config siit wifi - option essid "6mesh.freifunk.net" - option bssid "02:ca:ff:ee:ba:be" - option channel "1" diff --git a/mote/v1/openwrt/package/luci/host/etc/config/system b/mote/v1/openwrt/package/luci/host/etc/config/system deleted file mode 100644 index b0726b7..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/system +++ /dev/null @@ -1,3 +0,0 @@ -config system - option hostname OpenWrt - option timezone UTC diff --git a/mote/v1/openwrt/package/luci/host/etc/config/ucitrack b/mote/v1/openwrt/package/luci/host/etc/config/ucitrack deleted file mode 100644 index 422e82e..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/ucitrack +++ /dev/null @@ -1,81 +0,0 @@ - -config 'network' - option 'init' 'network' - list 'affects' 'dhcp' - -config 'wireless' - list 'affects' 'network' - -config 'firewall' - option 'init' 'firewall' - list 'affects' 'luci-splash' - list 'affects' 'qos' - -config 'olsr' - option 'init' 'olsrd' - -config 'dhcp' - option 'init' 'dnsmasq' - -config 'dropbear' - option 'init' 'dropbear' - -config 'httpd' - option 'init' 'httpd' - -config 'fstab' - option 'init' 'fstab' - -config 'qos' - option 'init' 'qos' - -config 'system' - option 'init' 'led' - -config 'luci_hosts' - option 'init' 'luci_hosts' - list 'affects' 'dhcp' - -config 'luci_ethers' - option 'init' 'luci_ethers' - list 'affects' 'dhcp' - -config 'luci_splash' - option 'init' 'luci_splash' - -config 'upnpd' - option 'init' 'miniupnpd' - -config 'ntpclient' - option 'init' 'ntpclient' - -config 'samba' - option 'init' 'samba' - -config 'tinyproxy' - option 'init' 'tinyproxy' - -config 'polipo' - option 'init' 'polipo' - -config 'ushare' - option 'init' 'ushare' - -config 'hd-idle' - option 'init' 'hd-idle' - -config 'olsrd' - option 'init' 'olsrd' - -config 'mmc_over_gpio' - option 'init' 'mmc_over_gpio' - -config 'p910nd' - option 'init' 'p910nd' - -config 'uvc-streamer' - option 'init' 'uvc-streamer' - -config 'luci_statistics' - option 'init' 'luci_statistics' - diff --git a/mote/v1/openwrt/package/luci/host/etc/config/upnpd b/mote/v1/openwrt/package/luci/host/etc/config/upnpd deleted file mode 100644 index 75dcb9a..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/upnpd +++ /dev/null @@ -1,4 +0,0 @@ -config upnpd config - option log_output 0 - option download 1024 - option upload 512 diff --git a/mote/v1/openwrt/package/luci/host/etc/config/wireless b/mote/v1/openwrt/package/luci/host/etc/config/wireless deleted file mode 100644 index 4895797..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/config/wireless +++ /dev/null @@ -1,13 +0,0 @@ -config wifi-device wifi0 - option type atheros - option channel auto - - # REMOVE THIS LINE TO ENABLE WIFI: - option disabled 1 - -config wifi-iface - option device wifi0 - option network lan - option mode ap - option ssid OpenWrt - option encryption none diff --git a/mote/v1/openwrt/package/luci/host/etc/cron.minutely/luci_splash b/mote/v1/openwrt/package/luci/host/etc/cron.minutely/luci_splash deleted file mode 100755 index eae4294..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/cron.minutely/luci_splash +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -[ "$(date +%M | cut -c2)" == "5" ] && luci-splash sync \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/firewall.freifunk b/mote/v1/openwrt/package/luci/host/etc/firewall.freifunk deleted file mode 100644 index 3a33127..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/firewall.freifunk +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# Freifunk Firewall addons -# $Id: firewall.freifunk 4140 2009-01-25 19:38:41Z jow $ - - -# -# Apply advanced settings -# -apply_advanced() { - local tcp_ecn - local tcp_window_scaling - local accept_redirects - local accept_source_route - - config_get_bool tcp_ecn $1 tcp_ecn 1 - config_get_bool tcp_window_scaling $1 tcp_window_scaling 1 - config_get_bool accept_redirects $1 accept_redirects 0 - config_get_bool accept_source_route $1 accept_source_route 0 - - logger -t firewall.freifunk "tcp_ecn is $tcp_ecn" - logger -t firewall.freifunk "tcp_window_scaling is $tcp_window_scaling" - logger -t firewall.freifunk "accept_redirects is $accept_redirects" - logger -t firewall.freifunk "accept_source_route is $accept_source_route" - - sysctl -w net.ipv4.tcp_ecn=$tcp_ecn >/dev/null - sysctl -w net.ipv4.tcp_window_scaling=$tcp_window_scaling >/dev/null - - for f in /proc/sys/net/ipv4/conf/*/accept_redirects; do - echo $accept_redirects > $f - done - - for f in /proc/sys/net/ipv4/conf/*/accept_source_route; do - echo $accept_source_route > $f - done -} - -config_foreach apply_advanced advanced - - -# -# Apply fixes for masquerading rules -# -apply_nat_fix() { - local up - local ifname - config_get up $1 up - [ -n "$up" ] || return 0 - (ACTION="ifup" INTERFACE="$1" . /etc/hotplug.d/iface/22-firewall-nat-fix ) -} - -uci_set_state firewall core loaded 1 -config_foreach fw_addif interface -config_foreach apply_nat_fix interface diff --git a/mote/v1/openwrt/package/luci/host/etc/hotplug.d/iface/22-firewall-nat-fix b/mote/v1/openwrt/package/luci/host/etc/hotplug.d/iface/22-firewall-nat-fix deleted file mode 100644 index 634f432..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/hotplug.d/iface/22-firewall-nat-fix +++ /dev/null @@ -1,61 +0,0 @@ -. /lib/firewall/uci_firewall.sh -unset ZONE -config_get ifname $INTERFACE ifname -[ "$ifname" == "lo" ] && exit 0 - -load_zones() { - local name - local network - config_get name $1 name - config_get network $1 network - [ -z "$network" ] && network=$name - for n in $network; do - [ "$n" = "$INTERFACE" ] && ZONE="$ZONE $name" - done -} - -config_foreach load_zones zone - -[ -z "$ZONE" ] && exit 0 - -natfix_addr_add() { - local network=$1 - local iface=$2 - - config_get parent "$1" interface - [ "$network" != "$INTERFACE" -a "$parent" != "$INTERFACE" ] && return 0 - - config_get ipaddr "$network" ipaddr - [ -n "$ipaddr" ] || return 0 - config_get netmask "$network" netmask - [ -n "$netmask" ] || return 0 - eval "$(ipcalc.sh $ipaddr $netmask)" - - logger -t firewall.freifunk "adding nat rule for $iface($NETWORK/$PREFIX)" - iptables -t nat -A "natfix_$iface" -s "$NETWORK/$PREFIX" -d "$NETWORK/$PREFIX" -j ACCEPT -} - -[ ifup = "$ACTION" ] && { - iptables -t nat -N "natfix_$ifname" - natfix_addr_add "$INTERFACE" "$ifname" - config_foreach natfix_addr_add alias "$ifname" - - for z in $ZONE; do - local loaded - config_get loaded core loaded - [ -n "$loaded" ] && { - logger -t firewall.freifunk "applying nat rules on zone $z" - iptables -t nat -I "zone_${z}_nat" 1 -o "$ifname" -j "natfix_$ifname" - } - done -} - -[ ifdown = "$ACTION" ] && { - for z in $ZONE; do - local up - config_get up $z up - iptables -t nat -D "zone_${z}_nat" -o "$ifname" -j "natfix_$ifname" 2>/dev/null - done - iptables -t nat -F "natfix_$ifname" 2>/dev/null - iptables -t nat -X "natfix_$ifname" 2>/dev/null -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/boa b/mote/v1/openwrt/package/luci/host/etc/init.d/boa deleted file mode 100755 index 2a11ed7..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/boa +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh /etc/rc.common -# -# Written by Miquel van Smoorenburg . -# Modified for Debian GNU/Linux -# by Ian Murdock . -# Modified for boa by Bill Allombert . -# Modified for OpenWrt by Steven Barth . - -### BEGIN INIT INFO -# Provides: boa -# Required-Start: $local_fs $remote_fs $network -# Required-Stop: $local_fs $remote_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Boa: lightweight and high performance web server -### END INIT INFO - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/boa -NAME=boa -DESC="HTTP server" -START=49 - -test -x $DAEMON || exit 0 - -set -e - -start() { - echo -n "Starting $DESC: $NAME" - start-stop-daemon -S -q -x $DAEMON - echo "." -} - -stop() { - echo -n "Stopping $DESC: $NAME" - start-stop-daemon -K -q -x $DAEMON - echo "." -} - -restart() { - echo -n "Restarting $DESC: $NAME... " - start-stop-daemon -K -s HUP -q -x $DAEMON - echo "done." -} - -reload() { - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - echo -n "Reloading $DESC configuration... " - start-stop-daemon -K -s 1 -q -x $DAEMON - echo "done." -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/freifunk b/mote/v1/openwrt/package/luci/host/etc/init.d/freifunk deleted file mode 100755 index 60c0eb5..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/freifunk +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh /etc/rc.common -# Freifunk Init -# $Id: freifunk 4214 2009-01-31 17:32:35Z jow $ - -START=99 - -boot() { - grep -q 'killall -HUP dnsmasq' /etc/crontabs/root || { - echo "*/5 * * * * killall -HUP dnsmasq" >> /etc/crontabs/root - } - - grep -q '/usr/sbin/ff_olsr_test_gw' /etc/crontabs/root || { - echo "* * * * * /usr/sbin/ff_olsr_test_gw" >> /etc/crontabs/root - } - - [ -f /etc/rc.local ] && . /etc/rc.local - [ -d /etc/rc.local.d ] && { - for file in /etc/rc.local.d/*; do - test -f "$file" && . "$file" - done - } - - killall -HUP crond 2>/dev/null || /etc/init.d/cron start -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_ethers b/mote/v1/openwrt/package/luci/host/etc/init.d/luci_ethers deleted file mode 100755 index fb1deb2..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_ethers +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh /etc/rc.common -START=59 - -apply_lease() { - local cfg="$1" - - config_get macaddr "$cfg" macaddr - config_get ipaddr "$cfg" ipaddr - - [ -n "$macaddr" -a -n "$ipaddr" ] || return 0 - - echo "$macaddr $ipaddr" >> /var/etc/ethers -} - -start() { - if [ ! -L /etc/ethers ]; then - test -f /etc/ethers && mv /etc/ethers /etc/ethers.local - ln -s /var/etc/ethers /etc/ethers - fi - - test -d /var/etc || mkdir -p /var/etc - - echo "# This file is autogenerated, use /etc/ethers.local instead" > /var/etc/ethers - - config_load luci_ethers - config_foreach apply_lease static_lease - - test -f /etc/ethers.local && cat /etc/ethers.local >> /var/etc/ethers - - return 0 -} - -stop() { - test -f /var/etc/ethers && rm -f /var/etc/ethers - - return 0 -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_hosts b/mote/v1/openwrt/package/luci/host/etc/init.d/luci_hosts deleted file mode 100755 index ae94714..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_hosts +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh /etc/rc.common -START=59 - -apply_host() { - local cfg="$1" - - config_get hostname "$cfg" hostname - config_get ipaddr "$cfg" ipaddr - - [ -n "$hostname" -a -n "$ipaddr" ] || return 0 - - echo "$ipaddr $hostname" >> /var/etc/hosts -} - -start() { - if [ ! -L /etc/hosts ]; then - test -f /etc/hosts && mv /etc/hosts /etc/hosts.local - ln -s /var/etc/hosts /etc/hosts - fi - - echo "# This file is autogenerated, use /etc/hosts.local instead" > /var/etc/hosts - - test -d /var/etc || mkdir -p /var/etc - test -f /etc/hosts.local && cat /etc/hosts.local >> /var/etc/hosts - - config_load luci_hosts - config_foreach apply_host host - - return 0 -} - -stop() { - test -f /var/etc/hosts && rm -f /var/etc/hosts - - return 0 -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_splash b/mote/v1/openwrt/package/luci/host/etc/init.d/luci_splash deleted file mode 100755 index 85ea8ec..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_splash +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh /etc/rc.common -START=70 - -iface_add() { - local cfg="$1" - - config_get zone "$cfg" zone - [ -n "$zone" ] || return 0 - - config_get net "$cfg" network - [ -n "$net" ] || return 0 - - config_get ipaddr "$net" ipaddr - [ -n "$ipaddr" ] || return 0 - - config_get netmask "$net" netmask - [ -n "$netmask" ] || return 0 - - eval "$(ipcalc.sh $ipaddr $netmask)" - - iptables -t nat -A zone_${zone}_prerouting -s "$NETWORK/$PREFIX" -p ! tcp -j luci_splash_portal - iptables -t nat -A zone_${zone}_prerouting -s "$NETWORK/$PREFIX" -d ! "$ipaddr" -j luci_splash_portal - iptables -t nat -A zone_${zone}_prerouting -s "$NETWORK/$PREFIX" -d "$ipaddr" -p tcp -m multiport ! --dport 22,80,443 -j luci_splash_portal -} - -blacklist_add() { - local cfg="$1" - - config_get mac "$cfg" mac - [ -n "$mac" ] && iptables -t nat -A luci_splash_portal -m mac --mac-source "$mac" -j DROP -} - -whitelist_add() { - local cfg="$1" - - config_get mac "$cfg" mac - [ -n "$mac" ] && iptables -t nat -A luci_splash_portal -m mac --mac-source "$mac" -j RETURN -} - -start() { - ### Read chains from config - include /lib/network - scan_interfaces - config_load luci_splash - - ### Create subchains - iptables -t nat -N luci_splash - iptables -t nat -N luci_splash_portal - iptables -t nat -N luci_splash_leases - - ### Build the main and portal rule - config_foreach blacklist_add blacklist - config_foreach whitelist_add whitelist - config_foreach iface_add iface - - ### Build the portal rule - iptables -t nat -A luci_splash_portal -p udp --dport 53 -j RETURN - iptables -t nat -A luci_splash_portal -j luci_splash_leases - - ### Build the leases rule - iptables -t nat -A luci_splash_leases -p tcp --dport 80 -j REDIRECT --to-ports 8082 - iptables -t nat -A luci_splash_leases -j DROP - - ### Add crontab entry - grep luci-splash /var/spool/cron/crontabs/root >/dev/null 2>&1 || { - echo '*/5 * * * * /usr/sbin/luci-splash sync' >> /var/spool/cron/crontabs/root - } - - ### Start the splash httpd - start-stop-daemon -S -b -q -x /usr/bin/luci-splashd -} - -stop() { - ### Clear subchains - iptables -t nat -F luci_splash_leases - iptables -t nat -F luci_splash_portal - iptables -t nat -F luci_splash - - ### Delete subchains - iptables -t nat -X luci_splash_leases - iptables -t nat -X luci_splash_portal - iptables -t nat -X luci_splash - - ### Stop the splash httpd - start-stop-daemon -K -q -x /usr/bin/luci-splashd -} - diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_statistics b/mote/v1/openwrt/package/luci/host/etc/init.d/luci_statistics deleted file mode 100755 index e4da1d5..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/luci_statistics +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh /etc/rc.common -START=79 - -start() { - ### replace shipped config with symlink - if [ ! -L /etc/collectd.conf ]; then - test -f /etc/collectd.conf && mv /etc/collectd.conf /etc/collectd.conf.bak - ln -s /var/etc/collectd.conf /etc/collectd.conf - fi - - ### create config - mkdir -p /var/etc - /usr/bin/stat-genconfig > /var/etc/collectd.conf - - ### prepare rrdimg directory - if [ ! -L /www/rrdimg ]; then - imagepath="$(uci get luci_statistics.rrdtool.image_path)" - ln -s ${imagepath:-/tmp/rrdimg}/ /www/rrdimg - fi - - ### flush LuCI index cache - test -f /var/luci-indexcache && rm /var/luci-indexcache -} - -restart() { - ### regenerate config / prepare environment - start - - ### restart collectd - /etc/init.d/collectd restart -} diff --git a/mote/v1/openwrt/package/luci/host/etc/init.d/lucittpd b/mote/v1/openwrt/package/luci/host/etc/init.d/lucittpd deleted file mode 100755 index a7f78e0..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/init.d/lucittpd +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh /etc/rc.common -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/bin/lucittpd -NAME=lucittpd -DESC="HTTP server" -START=49 - -test -x $DAEMON || exit 0 -set -e - -start() { - echo -n "Starting $DESC: $NAME" - start-stop-daemon -b -S -q -x $DAEMON - echo "." -} - -stop() { - echo -n "Stopping $DESC: $NAME" - start-stop-daemon -K -q -x $DAEMON - echo "." -} - -restart() { - # echo -n "Restarting $DESC: $NAME... " - # start-stop-daemon -K -s HUP -q -x $DAEMON - # echo "done." - stop - sleep 3 - start -} - -reload() { - # - # If the daemon can reload its config files on the fly - # for example by sending it SIGHUP, do it here. - # - # If the daemon responds to changes in its config file - # directly anyway, make this a do-nothing entry. - # - # echo -n "Reloading $DESC configuration... " - # start-stop-daemon -K -s 1 -q -x $DAEMON - # echo "done." - restart -} diff --git a/mote/v1/openwrt/package/luci/host/etc/lpk.conf b/mote/v1/openwrt/package/luci/host/etc/lpk.conf deleted file mode 100644 index 7ff49f8..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/lpk.conf +++ /dev/null @@ -1 +0,0 @@ -backend.model = "ipkg" \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/etc/mime.types b/mote/v1/openwrt/package/luci/host/etc/mime.types deleted file mode 100644 index ee11c1b..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/mime.types +++ /dev/null @@ -1,748 +0,0 @@ -############################################################################### -# -# MIME-TYPES and the extensions that represent them -# -# This file is part of the "mime-support" package. Please send email (not a -# bug report) to mime-support@packages.debian.org if you would like new types -# and/or extensions to be added. -# -# The reason that all types are managed by the mime-support package instead -# allowing individual packages to install types in much the same way as they -# add entries in to the mailcap file is so these types can be referenced by -# other programs (such as a web server) even if the specific support package -# for that type is not installed. -# -# Users can add their own types if they wish by creating a ".mime.types" -# file in their home directory. Definitions included there will take -# precedence over those listed here. -# -# Note: Compression schemes like "gzip", "bzip", and "compress" are not -# actually "mime-types". They are "encodings" and hence must _not_ have -# entries in this file to map their extensions. The "mime-type" of an -# encoded file refers to the type of data that has been encoded, not the -# type of encoding. -# -############################################################################### - - -application/activemessage -application/andrew-inset ez -application/applefile -application/atom atom -application/atomcat+xml atomcat -application/atomserv+xml atomsrv -application/atomicmail -application/batch-SMTP -application/beep+xml -application/cals-1840 -application/cap cap pcap -application/commonground -application/cu-seeme cu -application/cybercash -application/dca-rft -application/dec-dx -application/docbook+xml -application/dsptype tsp -application/dvcs -application/edi-consent -application/edi-x12 -application/edifact -application/eshop -application/font-tdpfr -application/futuresplash spl -application/ghostview -application/hta hta -application/http -application/hyperstudio -application/iges -application/index -application/index.cmd -application/index.obj -application/index.response -application/index.vnd -application/iotp -application/ipp -application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/mac-binhex40 hqx -application/mac-compactpro cpt -application/macwriteii -application/marc -application/mathematica nb -application/mathematica-old -application/ms-tnef -application/msaccess mdb -application/msword doc dot -application/news-message-id -application/news-transmission -application/ocsp-request -application/ocsp-response -application/octet-stream bin -application/oda oda -application/ogg ogg -application/parityfec -application/pdf pdf -application/pgp-encrypted -application/pgp-keys key -application/pgp-signature pgp -application/pics-rules prf -application/pkcs10 -application/pkcs7-mime -application/pkcs7-signature -application/pkix-cert -application/pkix-crl -application/pkixcmp -application/postscript ps ai eps -application/prs.alvestrand.titrax-sheet -application/prs.cww -application/prs.nprend -application/qsig -application/rar rar -application/rdf+xml rdf -application/remote-printing -application/riscos -application/rss+xml rss -application/rtf rtf -application/sdp -application/set-payment -application/set-payment-initiation -application/set-registration -application/set-registration-initiation -application/sgml -application/sgml-open-catalog -application/sieve -application/slate -application/smil smi smil -application/timestamp-query -application/timestamp-reply -application/vemmi -application/whoispp-query -application/whoispp-response -application/wita -application/wordperfect wpd -application/wordperfect5.1 wp5 -application/x400-bp -application/xhtml+xml xhtml xht -application/xml xml xsl -application/xml-dtd -application/xml-external-parsed-entity -application/zip zip -application/vnd.3M.Post-it-Notes -application/vnd.accpac.simply.aso -application/vnd.accpac.simply.imp -application/vnd.acucobol -application/vnd.aether.imp -application/vnd.anser-web-certificate-issue-initiation -application/vnd.anser-web-funds-transfer-initiation -application/vnd.audiograph -application/vnd.bmi -application/vnd.businessobjects -application/vnd.canon-cpdl -application/vnd.canon-lips -application/vnd.cinderella cdy -application/vnd.claymore -application/vnd.commerce-battelle -application/vnd.commonspace -application/vnd.comsocaller -application/vnd.contact.cmsg -application/vnd.cosmocaller -application/vnd.ctc-posml -application/vnd.cups-postscript -application/vnd.cups-raster -application/vnd.cups-raw -application/vnd.cybank -application/vnd.dna -application/vnd.dpgraph -application/vnd.dxr -application/vnd.ecdis-update -application/vnd.ecowin.chart -application/vnd.ecowin.filerequest -application/vnd.ecowin.fileupdate -application/vnd.ecowin.series -application/vnd.ecowin.seriesrequest -application/vnd.ecowin.seriesupdate -application/vnd.enliven -application/vnd.epson.esf -application/vnd.epson.msf -application/vnd.epson.quickanime -application/vnd.epson.salt -application/vnd.epson.ssf -application/vnd.ericsson.quickcall -application/vnd.eudora.data -application/vnd.fdf -application/vnd.ffsns -application/vnd.flographit -application/vnd.framemaker -application/vnd.fsc.weblaunch -application/vnd.fujitsu.oasys -application/vnd.fujitsu.oasys2 -application/vnd.fujitsu.oasys3 -application/vnd.fujitsu.oasysgp -application/vnd.fujitsu.oasysprs -application/vnd.fujixerox.ddd -application/vnd.fujixerox.docuworks -application/vnd.fujixerox.docuworks.binder -application/vnd.fut-misnet -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq -application/vnd.groove-account -application/vnd.groove-identity-message -application/vnd.groove-injector -application/vnd.groove-tool-message -application/vnd.groove-tool-template -application/vnd.groove-vcard -application/vnd.hhe.lesson-player -application/vnd.hp-HPGL -application/vnd.hp-PCL -application/vnd.hp-PCLXL -application/vnd.hp-hpid -application/vnd.hp-hps -application/vnd.httphone -application/vnd.hzn-3d-crossword -application/vnd.ibm.MiniPay -application/vnd.ibm.afplinedata -application/vnd.ibm.modcap -application/vnd.informix-visionary -application/vnd.intercon.formnet -application/vnd.intertrust.digibox -application/vnd.intertrust.nncp -application/vnd.intu.qbo -application/vnd.intu.qfx -application/vnd.irepository.package+xml -application/vnd.is-xpr -application/vnd.japannet-directory-service -application/vnd.japannet-jpnstore-wakeup -application/vnd.japannet-payment-wakeup -application/vnd.japannet-registration -application/vnd.japannet-registration-wakeup -application/vnd.japannet-setstore-wakeup -application/vnd.japannet-verification -application/vnd.japannet-verification-wakeup -application/vnd.koan -application/vnd.lotus-1-2-3 -application/vnd.lotus-approach -application/vnd.lotus-freelance -application/vnd.lotus-notes -application/vnd.lotus-organizer -application/vnd.lotus-screencam -application/vnd.lotus-wordpro -application/vnd.mcd -application/vnd.mediastation.cdkey -application/vnd.meridian-slingshot -application/vnd.mif -application/vnd.minisoft-hp3000-save -application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf -application/vnd.mobius.dis -application/vnd.mobius.msl -application/vnd.mobius.plc -application/vnd.mobius.txf -application/vnd.motorola.flexsuite -application/vnd.motorola.flexsuite.adsi -application/vnd.motorola.flexsuite.fis -application/vnd.motorola.flexsuite.gotap -application/vnd.motorola.flexsuite.kmr -application/vnd.motorola.flexsuite.ttc -application/vnd.motorola.flexsuite.wem -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry -application/vnd.ms-asf -application/vnd.ms-excel xls xlb xlt -application/vnd.ms-lrm -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -application/vnd.ms-powerpoint ppt pps -application/vnd.ms-project -application/vnd.ms-tnef -application/vnd.ms-works -application/vnd.mseq -application/vnd.msign -application/vnd.music-niff -application/vnd.musician -application/vnd.netfpx -application/vnd.noblenet-directory -application/vnd.noblenet-sealer -application/vnd.noblenet-web -application/vnd.novadigm.EDM -application/vnd.novadigm.EDX -application/vnd.novadigm.EXT -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -application/vnd.osa.netdeploy -application/vnd.palm -application/vnd.pg.format -application/vnd.pg.osasli -application/vnd.powerbuilder6 -application/vnd.powerbuilder6-s -application/vnd.powerbuilder7 -application/vnd.powerbuilder7-s -application/vnd.powerbuilder75 -application/vnd.powerbuilder75-s -application/vnd.previewsystems.box -application/vnd.publishare-delta-tree -application/vnd.pvi.ptid1 -application/vnd.pwg-xhtml-print+xml -application/vnd.rapid -application/vnd.rim.cod cod -application/vnd.s3sms -application/vnd.seemail -application/vnd.shana.informed.formdata -application/vnd.shana.informed.formtemplate -application/vnd.shana.informed.interchange -application/vnd.shana.informed.package -application/vnd.smaf mmf -application/vnd.sss-cod -application/vnd.sss-dtf -application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.chart sds -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math sdf -application/vnd.stardivision.writer sdw -application/vnd.stardivision.writer-global sgl -application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -application/vnd.svd -application/vnd.swiftview-ics -application/vnd.symbian.install sis -application/vnd.triscape.mxs -application/vnd.trueapp -application/vnd.truedoc -application/vnd.tve-trigger -application/vnd.ufdl -application/vnd.uplanet.alert -application/vnd.uplanet.alert-wbxml -application/vnd.uplanet.bearer-choice -application/vnd.uplanet.bearer-choice-wbxml -application/vnd.uplanet.cacheop -application/vnd.uplanet.cacheop-wbxml -application/vnd.uplanet.channel -application/vnd.uplanet.channel-wbxml -application/vnd.uplanet.list -application/vnd.uplanet.list-wbxml -application/vnd.uplanet.listcmd -application/vnd.uplanet.listcmd-wbxml -application/vnd.uplanet.signal -application/vnd.vcx -application/vnd.vectorworks -application/vnd.vidsoft.vidconference -application/vnd.visio vsd -application/vnd.vividence.scriptfile -application/vnd.wap.sic -application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo -application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf -application/vnd.xara -application/vnd.xfdl -application/vnd.yellowriver-custom-menu -application/x-123 wk -application/x-7z-compressed 7z -application/x-abiword abw -application/x-apple-diskimage dmg -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-cab cab -application/x-cbr cbr -application/x-cbz cbz -application/x-cdf cdf -application/x-cdlink vcd -application/x-chess-pgn pgn -application/x-core -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-director dcr dir dxr -application/x-dms dms -application/x-doom wad -application/x-dvi dvi -application/x-httpd-eruby rhtml -application/x-executable -application/x-flac flac -application/x-font pfa pfb gsf pcf pcf.Z -application/x-freemind mm -application/x-futuresplash spl -application/x-gnumeric gnumeric -application/x-go-sgf sgf -application/x-graphing-calculator gcf -application/x-gtar gtar tgz taz -application/x-hdf hdf -application/x-httpd-php phtml pht php -application/x-httpd-php-source phps -application/x-httpd-php3 php3 -application/x-httpd-php3-preprocessed php3p -application/x-httpd-php4 php4 -application/x-ica ica -application/x-internet-signup ins isp -application/x-iphone iii -application/x-iso9660-image iso -application/x-java-applet -application/x-java-bean -application/x-java-jnlp-file jnlp -application/x-javascript js -application/x-jmol jmz -application/x-kchart chrt -application/x-kdelnk -application/x-killustrator kil -application/x-koan skp skd skt skm -application/x-kpresenter kpr kpt -application/x-kspread ksp -application/x-kword kwd kwt -application/x-latex latex -application/x-lha lha -application/x-lyx lyx -application/x-lzh lzh -application/x-lzx lzx -application/x-maker frm maker frame fm fb book fbdoc -application/x-mif mif -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-msdos-program com exe bat dll -application/x-msi msi -application/x-netcdf nc -application/x-ns-proxy-autoconfig pac -application/x-nwc nwc -application/x-object o -application/x-oz-application oza -application/x-pkcs7-certreqresp p7r -application/x-pkcs7-crl crl -application/x-python-code pyc pyo -application/x-quicktimeplayer qtl -application/x-redhat-package-manager rpm -application/x-rx -application/x-sh sh -application/x-shar shar -application/x-shellscript -application/x-shockwave-flash swf swfl -application/x-stuffit sit sitx -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-tar tar -application/x-tcl tcl -application/x-tex-gf gf -application/x-tex-pk pk -application/x-texinfo texinfo texi -application/x-trash ~ % bak old sik -application/x-troff t tr roff -application/x-troff-man man -application/x-troff-me me -application/x-troff-ms ms -application/x-ustar ustar -application/x-videolan -application/x-wais-source src -application/x-wingz wz -application/x-x509-ca-cert crt -application/x-xcf xcf -application/x-xfig fig -application/x-xpinstall xpi - -audio/32kadpcm -audio/3gpp -audio/basic au snd -audio/g.722.1 -audio/l16 -audio/midi mid midi kar -audio/mp4a-latm -audio/mpa-robust -audio/mpeg mpga mpega mp2 mp3 m4a -audio/mpegurl m3u -audio/parityfec -audio/prs.sid sid -audio/telephone-event -audio/tone -audio/vnd.cisco.nse -audio/vnd.cns.anp1 -audio/vnd.cns.inf1 -audio/vnd.digital-winds -audio/vnd.everad.plj -audio/vnd.lucent.voice -audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 -audio/vnd.nuera.ecelp7470 -audio/vnd.nuera.ecelp9600 -audio/vnd.octel.sbc -audio/vnd.qcelp -audio/vnd.rhetorex.32kadpcm -audio/vnd.vmx.cvsd -audio/x-aiff aif aiff aifc -audio/x-gsm gsm -audio/x-mpegurl m3u -audio/x-ms-wma wma -audio/x-ms-wax wax -audio/x-pn-realaudio-plugin -audio/x-pn-realaudio ra rm ram -audio/x-realaudio ra -audio/x-scpls pls -audio/x-sd2 sd2 -audio/x-wav wav - -chemical/x-alchemy alc -chemical/x-cache cac cache -chemical/x-cache-csf csf -chemical/x-cactvs-binary cbin cascii ctab -chemical/x-cdx cdx -chemical/x-cerius cer -chemical/x-chem3d c3d -chemical/x-chemdraw chm -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-compass cpa -chemical/x-crossfire bsd -chemical/x-csml csml csm -chemical/x-ctx ctx -chemical/x-cxf cxf cef -#chemical/x-daylight-smiles smi -chemical/x-embl-dl-nucleotide emb embl -chemical/x-galactic-spc spc -chemical/x-gamess-input inp gam gamin -chemical/x-gaussian-checkpoint fch fchk -chemical/x-gaussian-cube cub -chemical/x-gaussian-input gau gjc gjf -chemical/x-gaussian-log gal -chemical/x-gcg8-sequence gcg -chemical/x-genbank gen -chemical/x-hin hin -chemical/x-isostar istr ist -chemical/x-jcamp-dx jdx dx -chemical/x-kinemage kin -chemical/x-macmolecule mcm -chemical/x-macromodel-input mmd mmod -chemical/x-mdl-molfile mol -chemical/x-mdl-rdfile rd -chemical/x-mdl-rxnfile rxn -chemical/x-mdl-sdfile sd sdf -chemical/x-mdl-tgf tgf -#chemical/x-mif mif -chemical/x-mmcif mcif -chemical/x-mol2 mol2 -chemical/x-molconn-Z b -chemical/x-mopac-graph gpt -chemical/x-mopac-input mop mopcrt mpc dat zmt -chemical/x-mopac-out moo -chemical/x-mopac-vib mvb -chemical/x-ncbi-asn1 asn -chemical/x-ncbi-asn1-ascii prt ent -chemical/x-ncbi-asn1-binary val aso -chemical/x-ncbi-asn1-spec asn -chemical/x-pdb pdb ent -chemical/x-rosdal ros -chemical/x-swissprot sw -chemical/x-vamas-iso14976 vms -chemical/x-vmd vmd -chemical/x-xtel xtel -chemical/x-xyz xyz - -image/cgm -image/g3fax -image/gif gif -image/ief ief -image/jpeg jpeg jpg jpe -image/naplps -image/pcx pcx -image/png png -image/prs.btif -image/prs.pti -image/svg+xml svg svgz -image/tiff tiff tif -image/vnd.cns.inf2 -image/vnd.djvu djvu djv -image/vnd.dwg -image/vnd.dxf -image/vnd.fastbidsheet -image/vnd.fpx -image/vnd.fst -image/vnd.fujixerox.edmics-mmr -image/vnd.fujixerox.edmics-rlc -image/vnd.mix -image/vnd.net-fpx -image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff -image/x-cmu-raster ras -image/x-coreldraw cdr -image/x-coreldrawpattern pat -image/x-coreldrawtemplate cdt -image/x-corelphotopaint cpt -image/x-icon ico -image/x-jg art -image/x-jng jng -image/x-ms-bmp bmp -image/x-photoshop psd -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd - -inode/chardevice -inode/blockdevice -inode/directory-locked -inode/directory -inode/fifo -inode/socket - -message/delivery-status -message/disposition-notification -message/external-body -message/http -message/s-http -message/news -message/partial -message/rfc822 eml - -model/iges igs iges -model/mesh msh mesh silo -model/vnd.dwf -model/vnd.flatland.3dml -model/vnd.gdl -model/vnd.gs-gdl -model/vnd.gtw -model/vnd.mts -model/vnd.vtu -model/vrml wrl vrml - -multipart/alternative -multipart/appledouble -multipart/byteranges -multipart/digest -multipart/encrypted -multipart/form-data -multipart/header-set -multipart/mixed -multipart/parallel -multipart/related -multipart/report -multipart/signed -multipart/voice-message - -text/calendar ics icz -text/css css -text/csv csv -text/directory -text/english -text/enriched -text/h323 323 -text/html html htm shtml -text/iuls uls -text/mathml mml -text/parityfec -text/plain asc txt text pot -text/prs.lines.tag -text/rfc822-headers -text/richtext rtx -text/rtf -text/scriptlet sct wsc -text/t140 -text/texmacs tm ts -text/tab-separated-values tsv -text/uri-list -text/vnd.abc -text/vnd.curl -text/vnd.DMClientScript -text/vnd.flatland.3dml -text/vnd.fly -text/vnd.fmi.flexstor -text/vnd.in3d.3dml -text/vnd.in3d.spot -text/vnd.IPTC.NewsML -text/vnd.IPTC.NITF -text/vnd.latex-z -text/vnd.motorola.reflex -text/vnd.ms-mediapackage -text/vnd.sun.j2me.app-descriptor jad -text/vnd.wap.si -text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-bibtex bib -text/x-boo boo -text/x-c++hdr h++ hpp hxx hh -text/x-c++src c++ cpp cxx cc -text/x-chdr h -text/x-component htc -text/x-crontab -text/x-csh csh -text/x-csrc c -text/x-dsrc d -text/x-diff diff patch -text/x-haskell hs -text/x-java java -text/x-literate-haskell lhs -text/x-makefile -text/x-moc moc -text/x-pascal p pas -text/x-pcs-gcd gcd -text/x-perl pl pm -text/x-python py -text/x-server-parsed-html -text/x-setext etx -text/x-sh sh -text/x-tcl tcl tk -text/x-tex tex ltx sty cls -text/x-vcalendar vcs -text/x-vcard vcf - -video/3gpp 3gp -video/dl dl -video/dv dif dv -video/fli fli -video/gl gl -video/mpeg mpeg mpg mpe -video/mp4 mp4 -video/quicktime qt mov -video/mp4v-es -video/parityfec -video/pointer -video/vnd.fvt -video/vnd.motorola.video -video/vnd.motorola.videop -video/vnd.mpegurl mxu -video/vnd.mts -video/vnd.nokia.interleaved-multimedia -video/vnd.vivo -video/x-la-asf lsf lsx -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie - -x-conference/x-cooltalk ice - -x-epoc/x-sisx-app sisx -x-world/x-vrml vrm vrml wrl diff --git a/mote/v1/openwrt/package/luci/host/etc/rc.local b/mote/v1/openwrt/package/luci/host/etc/rc.local deleted file mode 100644 index 58e44e4..0000000 --- a/mote/v1/openwrt/package/luci/host/etc/rc.local +++ /dev/null @@ -1,2 +0,0 @@ -# /etc/rc.local -# Only executed on boot, put your custom startup commands here diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ddns b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ddns deleted file mode 100644 index f947aff..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ddns +++ /dev/null @@ -1,147 +0,0 @@ -package ddns - -config package - option title 'Dynamic DNS configuration' - -config section - option name 'service' - option title 'DynDNS service entry' - option package 'ddns' - option named true - option required true - -config variable - option name 'enabled' - option title 'Enable this service entry' - option section 'ddns.service' - option datatype 'boolean' - -config variable - option name 'service_name' - option title 'Name of the DynDNS provider' - option section 'ddns.service' - option datatype 'string' - -config variable - option name 'domain' - option title 'Own DynDNS domain' - option section 'ddns.service' - option required true - -config variable - option name 'username' - option title 'Account username' - option section 'ddns.service' - option required true - -config variable - option name 'password' - option title 'Account password' - option section 'ddns.service' - option required true - -config variable - option name 'ip_source' - option title 'Method to determine current IP address' - option section 'ddns.service' - option type 'enum' - option required true - -config enum - option variable 'ddns.service.ip_source' - option value 'network' - option title 'Read ip address from /etc/config/network' - -config enum - option variable 'ddns.service.ip_source' - option value 'interface' - option title 'Determine ip address from given hardware interface' - -config enum - option variable 'ddns.service.ip_source' - option value 'web' - option title 'Determine own IP using a remote web page' - -config variable - option name 'ip_network' - option title 'Configured network to use IP from' - option section 'ddns.service' - option depends 'ip_source=network' - option valueof 'network.interface' - -config variable - option name 'ip_interface' - option title 'Physical network interface to read IP from' - option section 'ddns.service' - option depends 'ip_source=interface' - -config variable - option name 'ip_url' - option title 'Web page used to determine IP address' - option section 'ddns.service' - option depends 'ip_source=web' - -config variable - option name 'update_url' - option title 'URL format to use for updating DNS information (for yet-unknown providers)' - option section 'ddns.service' - -config variable - option name 'check_interval' - option title 'Update check interval' - option section 'ddns.service' - option datatype 'integer' - option required true - -config variable - option name 'check_unit' - option title 'Unit for update check interval' - option section 'ddns.service' - option type 'enum' - option required true - -config enum - option variable 'ddns.service.check_unit' - option value 'seconds' - -config enum - option variable 'ddns.service.check_unit' - option value 'minutes' - -config enum - option variable 'ddns.service.check_unit' - option value 'hours' - -config enum - option variable 'ddns.service.check_unit' - option value 'days' - -config variable - option name 'force_interval' - option title 'Forced update interval' - option section 'ddns.service' - option datatype 'integer' - option required true - -config variable - option name 'force_unit' - option title 'Unit of forced update interval' - option section 'ddns.service' - option type 'enum' - option required true - -config enum - option variable 'ddns.service.force_unit' - option value 'seconds' - -config enum - option variable 'ddns.service.force_unit' - option value 'minutes' - -config enum - option variable 'ddns.service.force_unit' - option value 'hours' - -config enum - option variable 'ddns.service.force_unit' - option value 'days' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dhcp b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dhcp deleted file mode 100644 index 86a5a47..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dhcp +++ /dev/null @@ -1,240 +0,0 @@ -package dhcp - -config package - option title 'Dnsmasq DHCPd configuration' - -config section - option name 'dnsmasq' - option package 'dhcp' - option title 'General Settings' - option unique true - option required true - option dynamic true - -config variable - option name 'domainneeded' - option section 'dhcp.dnsmasq' - option title 'Domain required' - option description "Don't forward DNS-Requests without DNS-Name" - option datatype boolean - -config variable - option name 'authoritative' - option section 'dhcp.dnsmasq' - option title 'Authoritative' - option description 'This is the only DHCP in the local network' - option datatype boolean - -config variable - option name 'boguspriv' - option section 'dhcp.dnsmasq' - option title 'Filter private' - option description "Don't forward reverse lookups for local networks" - option datatype boolean - -config variable - option name 'filterwin2k' - option section 'dhcp.dnsmasq' - option title 'Filter useless' - option description 'Filter useless DNS-queries of Windows-systems' - option datatype boolean - -config variable - option name 'localise_queries' - option section 'dhcp.dnsmasq' - option title 'Localise queries' - option description 'Localises the hostname depending on its subnet' - option datatype boolean - -config variable - option name 'local' - option section 'dhcp.dnsmasq' - option title 'Local Server' - -config variable - option name 'domain' - option section 'dhcp.dnsmasq' - option title 'Local Domain' - -config variable - option name 'expandhosts' - option section 'dhcp.dnsmasq' - option title 'Expand Hosts' - option description 'adds domain names to hostentries in the resolv file' - option datatype boolean - -config variable - option name 'nonegcache' - option section 'dhcp.dnsmasq' - option title "don't cache unknown" - option description 'prevents caching of negative DNS-replies' - option datatype boolean - -config variable - option name 'readethers' - option section 'dhcp.dnsmasq' - option title 'Use /etc/ethers' - option description 'Read /etc/ethers to configure the DHCP-Server' - option datatype boolean - -config variable - option name 'leasefile' - option section 'dhcp.dnsmasq' - option title 'Leasefile' - option description 'file where given DHCP-leases will be stored' - -config variable - option name 'resolvfile' - option section 'dhcp.dnsmasq' - option title 'Resolvfile' - option description 'local DNS file' - -config variable - option name 'nohosts' - option section 'dhcp.dnsmasq' - option title 'Ignore /etc/hosts ' - option datatype boolean - -config variable - option name 'strictorder' - option section 'dhcp.dnsmasq' - option title 'Strict order' - option description 'DNS-Server will be queried in the order of the resolvfile' - option datatype boolean - -config variable - option name 'logqueries' - option section 'dhcp.dnsmasq' - option title 'Log queries' - option datatype boolean - -config variable - option name 'noresolv' - option section 'dhcp.dnsmasq' - option title 'Ignore resolve file' - option datatype boolean - -config variable - option name 'dnsforwardmax' - option section 'dhcp.dnsmasq' - option title 'concurrent queries' - option datatype uint - -config variable - option name 'port' - option section 'dhcp.dnsmasq' - option title 'DNS-Port' - option datatype port - -config variable - option name 'ednspacket_max' - option section 'dhcp.dnsmasq' - option title 'ednspacket_max' - option datatype uint - -config variable - option name 'dhcpleasemax' - option section 'dhcp.dnsmasq' - option title 'max. DHCP -Leases' - option datatype uint - -config variable - option name 'addnhosts' - option section 'dhcp.dnsmasq' - option title 'additional hostfile' - option datatype file - -config variable - option name 'queryport' - option section 'dhcp.dnsmasq' - option title 'query port' - option datatype port - -config variable - option name 'enable_tftp' - option section 'dhcp.dnsmasq' - option title 'Enable builtin TFTP-Server' - option datatype boolean - -config variable - option name 'tftp_root' - option section 'dhcp.dnsmasq' - option title 'TFTP-Server root directory' - option datatype directory - -config variable - option name 'dhcp_boot' - option section 'dhcp.dnsmasq' - option title 'DHCP Boot image' - - -config section - option name 'dhcp' - option package 'dhcp' - option title 'DHCP interface configuration' - option dynamic true - -config variable - option name 'interface' - option section 'dhcp.dhcp' - option title 'Interface' - option required true - option type reference - list valueof network.interface - list valueof network.alias - -config variable - option name 'start' - option section 'dhcp.dhcp' - option title 'Start' - option description 'first address (last octet)' - option datatype uint - -config variable - option name 'limit' - option section 'dhcp.dhcp' - option title 'Limit' - option description 'number of leased addresses -1' - option datatype uint - -config variable - option name 'leasetime' - option section 'dhcp.dhcp' - option title 'Leasetime' - -config variable - option name 'dynamicdhcp' - option section 'dhcp.dhcp' - option title 'Dynamic DHCP ' - option datatype boolean - -config variable - option name 'name' - option section 'dhcp.dhcp' - option title 'Name' - -config variable - option name 'ignore' - option section 'dhcp.dhcp' - option title 'Ignore interface' - option description 'disable DHCP for this interface' - option datatype boolean - -config variable - option name 'netmask' - option section 'dhcp.dhcp' - option title 'IPv4-Netmask' - option datatype ip4addr - -config variable - option name 'force' - option section 'dhcp.dhcp' - option title 'Force' - option datatype boolean - -config variable - option name 'dhcp_option' - option section 'dhcp.dhcp' - option title 'DHCP-Options' - option description 'See "dnsmasq --help dhcp" for a list of available options.' - option type lazylist diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dropbear b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dropbear deleted file mode 100644 index ba490a7..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/dropbear +++ /dev/null @@ -1,24 +0,0 @@ -package dropbear - -config package - option title 'Dropbear SSHd configuration' - -config section - option name 'dropbear' - option title 'General SSH daemon settings' - option package 'dropbear' - option required true - option unique true - -config variable - option name 'PasswordAuth' - option title 'Permit password authentication' - option section 'dropbear.dropbear' - option datatype 'boolean' - -config variable - option name 'Port' - option title 'Listening port' - option section 'dropbear.dropbear' - option datatype 'integer' - option required true diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/firewall b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/firewall deleted file mode 100644 index 35ff056..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/firewall +++ /dev/null @@ -1,255 +0,0 @@ -package firewall - -config package - option title 'Firewall configuration' - -config section - option name 'zone' - option title 'Firewall zones' - option package 'firewall' - -config variable - option name 'name' - option title 'Name' - option section 'firewall.zone' - option required true - -config variable - option name 'network' - option title 'Networks belonging to this zone' - option section 'firewall.zone' - option valueof 'network.interface' - option multival true - -config variable - option name 'forward' - option title 'Zone specific action for forwarded traffic' - option section 'firewall.zone' - option required true - -config variable - option name 'input' - option title 'Zone specific action for incoming traffic' - option section 'firewall.zone' - option required true - -config variable - option name 'output' - option title 'Zone specific action for outgoing traffic' - option section 'firewall.zone' - option required true - -config variable - option name 'masq' - option title 'Enable masquerading for outgoing zone traffic' - option section 'firewall.zone' - option datatype 'boolean' - - - -config section - option name 'defaults' - option title 'Global firewall defaults' - option package 'firewall' - option unique true - option required true - -config variable - option name 'forward' - option title 'Action for forwarded traffic' - option section 'firewall.defaults' - option required true - -config variable - option name 'input' - option title 'Action for incoming traffic' - option section 'firewall.defaults' - option required true - -config variable - option name 'output' - option title 'Action for outgoing traffic' - option section 'firewall.defaults' - option required true - -config variable - option name 'syn_flood' - option title 'Enable syn-flood protection' - option section 'firewall.defaults' - option datatype 'boolean' - -config variable - option name 'drop_invalid' - option title 'Do not drop packages with state invalid' - option section 'firewall.defaults' - option datatype 'boolean' - - - -config section - option name 'forwarding' - option title 'Forwarding rules' - option package 'firewall' - -config variable - option name 'src' - option title 'Source zone' - option section 'firewall.forwarding' - option valueof 'firewall.zone.name' - option required true - -config variable - option name 'dest' - option title 'Destination zone' - option section 'firewall.forwarding' - option valueof 'firewall.zone.name' - option required true - -config variable - option name 'mtu_fix' - option title 'Fixup MTU of outgoing packages' - option section 'firewall.forwarding' - option datatype 'boolean' - - - -config section - option name 'rule' - option title 'Custom rules' - option package 'firewall' - list depends 'target, src' - list depends 'target, dest' - list depends 'target, src_ip' - list depends 'target, src_port' - list depends 'target, src_mac' - list depends 'target, dest_ip' - list depends 'target, dest_port' - list depends 'target, proto' - -config variable - option name 'src' - option title 'Source zone' - option section 'firewall.rule' - option valueof 'firewall.zone.name' - -config variable - option name 'src_ip' - option title 'Source IP address' - option section 'firewall.rule' - option datatype 'ipaddr' - -config variable - option name 'src_port' - option title 'Source port' - option section 'firewall.rule' - option datatype 'portrange' - -config variable - option name 'src_mac' - option title 'Source MAC address' - option section 'firewall.rule' - option datatype 'macaddr' - -config variable - option name 'dest' - option title 'Destination zone' - option section 'firewall.rule' - option valueof 'firewall.zone.name' - -config variable - option name 'dest_ip' - option title 'Destination IP address' - option section 'firewall.rule' - option datatype 'ipaddr' - -config variable - option name 'dest_port' - option title 'Destination port' - option section 'firewall.rule' - option datatype 'portrange' - -config variable - option name 'proto' - option title 'Protocol' - option section 'firewall.rule' - option datatype 'string' - -config variable - option name 'target' - option title 'Option target' - option section 'firewall.rule' - option datatype 'string' - - - -config section - option name 'redirect' - option title 'Redirection rules' - option package 'firewall' - -config variable - option name 'src' - option title 'Source zone' - option section 'firewall.redirect' - option valueof 'firewall.zone.name' - -config variable - option name 'src_ip' - option title 'Source IP address' - option section 'firewall.redirect' - option datatype 'ipaddr' - -config variable - option name 'src_port' - option title 'Source port' - option section 'firewall.redirect' - option datatype 'portrange' - -config variable - option name 'src_dport' - option title 'Source destination port' - option section 'firewall.redirect' - option datatype 'portrange' - -config variable - option name 'src_mac' - option title 'Option src_mac' - option section 'firewall.redirect' - option datatype 'macaddr' - -config variable - option name 'dest' - option title 'Destination zone' - option section 'firewall.redirect' - option valueof 'firewall.zone.name' - -config variable - option name 'dest_ip' - option title 'Destination IP address' - option section 'firewall.redirect' - option datatype 'ipaddr' - -config variable - option name 'dest_port' - option title 'Destination port' - option section 'firewall.redirect' - option datatype 'portrange' - -config variable - option name 'proto' - option title 'Protocol' - option section 'firewall.redirect' - option datatype 'string' - - - -config section - option name 'include' - option title 'User defined config includes' - option package 'firewall' - -config variable - option name 'path' - option title 'Path to the include file' - option section 'firewall.include' - option datatype 'file' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/fstab b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/fstab deleted file mode 100644 index 58dff58..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/fstab +++ /dev/null @@ -1,54 +0,0 @@ -package fstab - -config package - option title 'Filesystem configuration' - -config section - option name 'mount' - option title 'Filesystem entry' - option package 'fstab' - -config variable - option name 'device' - option title 'Device node' - option section 'fstab.mount' - -config variable - option name 'enabled' - option title 'Enable this mount point' - option section 'fstab.mount' - option datatype 'boolean' - option required 'true' - -config variable - option name 'fstype' - option title 'Filesystem type' - option section 'fstab.mount' - -config variable - option name 'options' - option title 'Mount options' - option section 'fstab.mount' - -config variable - option name 'target' - option title 'Mount point' - option section 'fstab.mount' - option datatype 'directory' - - -config section - option name 'swap' - option title 'Swap entry' - option package 'fstab' - -config variable - option name 'device' - option title 'Swap file or Partition' - option section 'fstab.swap' - -config variable - option name 'enabled' - option title 'Enable this swap' - option section 'fstab.swap' - option datatype 'boolean' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/httpd b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/httpd deleted file mode 100644 index 8dcf095..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/httpd +++ /dev/null @@ -1,37 +0,0 @@ -package httpd - -config package - option title 'Busybox HTTPd configuration' - -config section - option name 'httpd' - option title 'General httpd settings' - option package 'httpd' - option required true - -config variable - option name 'home' - option title 'Document root' - option section 'httpd.httpd' - option datatype 'directory' - option required true - -config variable - option name 'port' - option title 'Listening port' - option section 'httpd.httpd' - option datatype 'integer' - option required true - -config variable - option name 'c_file' - option title 'Configuration file' - option section 'httpd.httpd' - option datatype 'file' - -config variable - option name 'realm' - option title 'Authentication Realm' - option description 'Realm shown on login prompt' - option section 'httpd.httpd' - diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_hosts b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_hosts deleted file mode 100644 index e2597f4..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_hosts +++ /dev/null @@ -1,21 +0,0 @@ -package luci_hosts - -config section - option name 'host' - option title 'Host entry definition' - option package 'luci_hosts' - -config variable - option name 'hostname' - option title 'Hostname' - option section 'luci_hosts.host' - option datatype 'hostname' - option required true - -config variable - option name 'ipaddr' - option title 'IP address' - option section 'luci_hosts.host' - option datatype 'ipaddr' - option required true - diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_splash b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_splash deleted file mode 100644 index f320141..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/luci_splash +++ /dev/null @@ -1,14 +0,0 @@ -package luci_splash - -config section - option name 'core' - option title 'Common DHCP splash settings' - option package 'luci_splash' - option unique true - option required true - -config variable - option name 'leasetime' - option title 'Lease time in hours' - option section 'luci_splash.core' - option datatype 'float' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/network b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/network deleted file mode 100644 index 0ea439d..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/network +++ /dev/null @@ -1,495 +0,0 @@ -package network - -config package - option title 'Network configuration' - -config section - option name 'interface' - option title 'Network interface' - option package 'network' - list depends 'proto=static, ipaddr, netmask' - list depends 'proto=static, ip6addr' - list depends 'proto=pppoe, username, password' - list depends 'proto=pppoa, username, password, encaps, vpi, vci' - list depends 'proto=ppp, device' - list depends 'proto=3g, device' - list depends 'proto=pptp, username, password, server' - list depends 'proto=dhcp' - list depends 'proto=none' - option named 'true' - option required 'true' - -config variable - option name 'ifname' - option title 'Physical interface' - option section 'network.interface' - -config variable - option name 'macaddr' - option title 'Interface MAC address' - option section 'network.interface' - option datatype 'macaddr' - -config variable - option name 'mtu' - option title 'MTU' - option section 'network.interface' - option datatype 'uint' - -config variable - option name 'ipaddr' - option title 'IPv4 host address' - option section 'network.interface' - option datatype 'ip4addr' - -config variable - option name 'netmask' - option title 'IPv4 network mask' - option section 'network.interface' - option datatype 'ip4addr' - -config variable - option name 'gateway' - option title 'IPv4 gateway' - option section 'network.interface' - option datatype 'ip4addr' - -config variable - option name 'bcast' - option title 'IPv4 broadcast address' - option section 'network.interface' - option datatype 'ip4addr' - -config variable - option name 'ip6addr' - option title 'IPv6 address (CIDR)' - option section 'network.interface' - option datatype 'ip6addr' - -config variable - option name 'ip6gw' - option title 'IPv6 gateway' - option section 'network.interface' - option datatype 'ip6addr' - -config variable - option name 'dns' - option title 'DNS server (IPv4 or IPv6)' - option section 'network.interface' - option datatype 'ipaddr' - option multival 'true' - -config variable - option name 'keepalive' - option title 'keep-alive' - option description 'Number of connection failures before reconnect' - option section 'network.interface' - option datatype 'string' - list depends 'proto=pppoe' - list depends 'proto=pptp' - list depends 'proto=ppp' - list depends 'proto=3g' - list depends 'proto=pppoa' - -config variable - option name 'demand' - option title 'Dial on-demand' - option description 'Number of seconds to wait before closing the connection due to inactivity' - option section 'network.interface' - option datatype 'uint' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=ppp' - list depends 'proto=3g' - -config variable - option name 'username' - option title 'Username' - option section 'network.interface' - option datatype 'string' - list depends 'proto=pppoa' - list depends 'proto=pppoe' - list depends 'proto=pptp' - list depends 'proto=ppp' - list depends 'proto=3g' - -config variable - option name 'password' - option title 'Password' - option section 'network.interface' - option datatype 'string' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=ppp' - list depends 'proto=3g' - -config variable - option name 'encaps' - option title 'PPPoA encapsulation mode' - option section 'network.interface' - option type 'enum' - list depends 'proto=pppoa' - -config enum - option variable 'network.interface.encaps' - option value 'vc' - option title 'VC' - -config enum - option variable 'network.interface.encaps' - option value 'llc' - option title 'LLC' - -config variable - option name 'vpi' - option title 'PPPoA VPI' - option section 'network.interface' - option datatype 'uint' - list depends 'proto=pppoa' - -config variable - option name 'vci' - option title 'PPPoA VCI' - option section 'network.interface' - option datatype 'uint' - list depends 'proto=pppoa' - -config variable - option name 'server' - option title 'PPTP server' - option section 'network.interface' - option datatype 'host' - list depends 'proto=pptp' - -config variable - option name 'device' - option title 'Modem device' - option section 'network.interface' - option datatype 'device' - list depends 'proto=ppp' - list depends 'proto=3g' - -config variable - option name 'defaultroute' - option title 'Replace default route' - option section 'network.interface' - option datatype 'boolean' - list depends 'proto=ppp' - list depends 'proto=pppoa' - list depends 'proto=pppoe' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'peerdns' - option title 'Use peer DNS' - option section 'network.interface' - option datatype 'boolean' - list depends 'proto=ppp' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'ipv6' - option title 'Enable IPv6 on PPP link' - option section 'network.interface' - option datatype 'boolean' - list depends 'proto=ppp' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'connect' - option title 'PPP connect script' - option section 'network.interface' - option datatype 'file' - list depends 'proto=ppp' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'disconnect' - option title 'PPP disconnect script' - option section 'network.interface' - option datatype 'file' - list depends 'proto=ppp' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'pppd_options' - option title 'Additional PPP daemon options' - option section 'network.interface' - option datatype 'string' - list depends 'proto=ppp' - list depends 'proto=pppoe' - list depends 'proto=pppoa' - list depends 'proto=pptp' - list depends 'proto=3g' - -config variable - option name 'maxwait' - option title 'Setup wait time' - option description 'Number of seconds to wait for the device to become ready' - option section 'network.interface' - option datatype 'uint' - list depends 'proto=3g' - -config variable - option name 'apn' - option title 'Access point (APN)' - option section 'network.interface' - option datatype 'string' - list depends 'proto=3g' - -config variable - option name 'pincode' - option title 'PIN code' - option section 'network.interface' - option datatype 'uint' - list depends 'proto=3g' - -config variable - option name 'service' - option title 'Service type' - option section 'network.interface' - option type 'enum' - list depends 'proto=3g' - -config enum - option variable 'network.interface.service' - option value 'umts' - option title 'UMTS/GPRS' - -config enum - option variable 'network.interface.service' - option value 'cdma' - option title 'CDMA' - -config enum - option variable 'network.interface.service' - option value 'evdo' - option title 'EV-DO' - -config variable - option name 'proto' - option title 'Protocol' - option section 'network.interface' - option type 'enum' - option required 'true' - -config enum - option variable 'network.interface.proto' - option value 'none' - option title 'Disabled' - -config enum - option variable 'network.interface.proto' - option value 'dhcp' - option title 'Retrieve IP address via DHCP' - option default 'true' - -config enum - option variable 'network.interface.proto' - option value 'pptp' - option title 'Interface is a PPTP tunnel endpoint' - -config enum - option variable 'network.interface.proto' - option value 'static' - option title 'Interface has static network configuration' - -config enum - option variable 'network.interface.proto' - option value 'pppoe' - option title 'Interface is a PPPoE connection' - -config enum - option variable 'network.interface.proto' - option value 'pppoa' - option title 'Interface is a PPPoA connection' - -config enum - option variable 'network.interface.proto' - option value 'ppp' - option title 'Interface is a PPP connection' - -config enum - option variable 'network.interface.proto' - option value '3g' - option title '3G UMTS/GPRS connection' - -config variable - option name 'type' - option title 'Option type' - option section 'network.interface' - option type 'enum' - -config enum - option variable 'network.interface.type' - option value 'bridge' - option title 'This is a bridge interface' - - - -config section - option name 'alias' - option title 'Alias interface definition' - option package 'network' - list depends 'proto=static, ipaddr, netmask' - list depends 'proto=static, ip6addr' - option named 'true' - -config variable - option name 'interface' - option title 'Parent interface' - option section 'network.alias' - option valueof 'network.interface' - option required 'true' - -config variable - option name 'ipaddr' - option title 'IPv4 host address' - option section 'network.alias' - option datatype 'ip4addr' - -config variable - option name 'netmask' - option title 'IPv4 network mask' - option section 'network.alias' - option datatype 'ip4addr' - -config variable - option name 'gateway' - option title 'IPv4 gateway' - option section 'network.alias' - option datatype 'ip4addr' - -config variable - option name 'bcast' - option title 'IPv4 broadcast address' - option section 'network.alias' - option datatype 'ip4addr' - -config variable - option name 'ip6addr' - option title 'IPv6 address (CIDR)' - option section 'network.alias' - option datatype 'ip6addr' - -config variable - option name 'ip6gw' - option title 'IPv6 gateway' - option section 'network.alias' - option datatype 'ip6addr' - -config variable - option name 'dns' - option title 'DNS server (IPv4 or IPv6)' - option section 'network.alias' - option datatype 'ipaddr' - -config variable - option name 'proto' - option title 'Protocol' - option section 'network.alias' - option type 'enum' - option required 'true' - -config enum - option variable 'network.alias.proto' - option value 'static' - option title 'Interface has static network configuration' - - - -config section - option name 'route' - option title 'Static route definition' - option package 'network' - -config variable - option name 'interface' - option title 'Interface' - option section 'network.route' - option valueof 'network.interface' - option required 'true' - -config variable - option name 'target' - option title 'Target IPv4 host or network' - option section 'network.route' - option datatype 'ip4addr' - option required 'true' - -config variable - option name 'netmask' - option title 'Target IPv4 netmask' - option section 'network.route' - option datatype 'ip4addr' - -config variable - option name 'gateway' - option title 'IPv4 gateway' - option section 'network.route' - option datatype 'ip4addr' - -config variable - option name 'metric' - option title 'Metric' - option section 'network.route6' - option datatype 'uint' - - - -config section - option name 'route6' - option title 'Static IPv6 route definition' - option package 'network' - -config variable - option name 'interface' - option title 'Interface' - option section 'network.route6' - option valueof 'network.interface' - option required 'true' - -config variable - option name 'target' - option title 'Target IPv6 host or network (CIDR)' - option section 'network.route6' - option datatype 'ip6addr' - option required 'true' - -config variable - option name 'gateway' - option title 'IPv6 gateway' - option section 'network.route6' - option datatype 'ip6addr' - option required 'false' - -config variable - option name 'metric' - option title 'Metric' - option section 'network.route6' - option datatype 'uint' - - - -config section - option name 'switch' - option title 'Section switch' - option package 'network' - option named 'true' - option dynamic 'true' - option required 'true' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ntpclient b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ntpclient deleted file mode 100644 index 0b7b5a5..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/ntpclient +++ /dev/null @@ -1,53 +0,0 @@ -package ntpclient - -config package - option title 'Time Synchronisation' - -config section - option name 'ntpclient' - option package 'ntpclient' - option title 'General' - option unique true - option required true - -config variable - option name 'interval' - option section 'ntpclient.ntpclient' - option title 'Update Interval (in s)' - option datatype uint - -config variable - option name 'count' - option section 'ntpclient.ntpclient' - option title 'Count of Time Measurements' - option datatype uint - -config section - option name 'ntpdrift' - option package 'ntpclient' - option title 'Clock Adjustment' - option unique true - -config variable - option name 'freq' - option section 'ntpclient.ntpdrift' - option title 'Offset Frequency' - option datatype float - -config section - option name 'ntpserver' - option package 'ntpclient' - option title 'Time Server' - -config variable - option name 'hostname' - option section 'ntpclient.ntpserver' - option title 'Hostname' - option required true - option datatype host - -config variable - option name 'port' - option section 'ntpclient.ntpserver' - option title 'Port' - option datatype port diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/qos b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/qos deleted file mode 100644 index 24f8e0d..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/qos +++ /dev/null @@ -1,200 +0,0 @@ -package qos - -config package - option title 'Network quality of service' - -config section - option name 'interface' - option title 'QoS interface section' - option package 'qos' - option named true - option required true - -config variable - option name 'enabled' - option title 'Enable QoS on this interface' - option section 'qos.interface' - -config variable - option name 'overhead' - option title 'Calculate overhead bandwidth' - option section 'qos.interface' - option datatype 'boolean' - -config variable - option name 'classgroup' - option title 'QoS classification' - option section 'qos.interface' - option valueof 'qos.classgroup' - -config variable - option name 'download' - option title 'Maximum download speed in kBits/s' - option section 'qos.interface' - option datatype 'integer' - -config variable - option name 'upload' - option title 'Maximum upload speed in kBits/s' - option section 'qos.interface' - option datatype 'integer' - - -config section - option name 'class' - option title 'QoS traffic class definition' - option package 'qos' - option named true - option required true - -config variable - option name 'avgrate' - option title 'Average rate' - option section 'qos.class' - option datatype 'integer' - -config variable - option name 'maxsize' - option title 'Maximum size' - option section 'qos.class' - option datatype 'integer' - -config variable - option name 'packetdelay' - option title 'Packet delay' - option section 'qos.class' - option datatype 'integer' - -config variable - option name 'packetsize' - option title 'Packet size' - option section 'qos.class' - option datatype 'integer' - -config variable - option name 'priority' - option title 'QoS priority' - option section 'qos.class' - option datatype 'integer' - - -config section - option name 'classgroup' - option title 'QoS classification group' - option package 'qos' - option named true - -config variable - option name 'classes' - option title 'Defined QoS classes in group' - option section 'qos.classgroup' - -config variable - option name 'default' - option title 'Default QoS class in group' - option section 'qos.classgroup' - option valueof 'qos.class' - - -config section - option name 'default' - option title 'QoS default classification' - option package 'qos' - list depends 'target, pktsize' - list depends 'target, portrange' - list depends 'target, proto' - -config variable - option name 'pktsize' - option title 'Match by packet size' - option section 'qos.default' - option datatype 'integer' - -config variable - option name 'portrange' - option title 'Match by port range' - option section 'qos.default' - -config variable - option name 'proto' - option title 'Match by layer 3 protocol' - option section 'qos.default' - -config variable - option name 'target' - option title 'Option target' - option section 'qos.default' - option valueof 'qos.class' - option required true - - -config section - option name 'classify' - option title 'QoS classification rule' - option package 'qos' - -config variable - option name 'ipp2p' - option title 'Match by ipp2p' - option section 'qos.classify' - -config variable - option name 'layer7' - option title 'Match by layer 7 protocol' - option section 'qos.classify' - -config variable - option name 'ports' - option title 'Match by ports' - option section 'qos.classify' - -config variable - option name 'proto' - option title 'Match by layer 3 protocol' - option section 'qos.classify' - -config variable - option name 'tcpflags' - option title 'Match by TCP flags' - option section 'qos.classify' - -config variable - option name 'target' - option title 'QoS target class' - option section 'qos.classify' - option valueof 'qos.class' - option required true - - -config section - option name 'reclassify' - option title 'QoS reclassification rule' - option package 'qos' - -config variable - option name 'mark' - option title 'Match by classification mark' - option section 'qos.reclassify' - -config variable - option name 'pktsize' - option title 'Match by packet size' - option section 'qos.reclassify' - option datatype 'integer' - -config variable - option name 'proto' - option title 'Match by layer 3 protocol' - option section 'qos.reclassify' - -config variable - option name 'tcpflags' - option title 'Match by TCP flags' - option section 'qos.reclassify' - -config variable - option name 'target' - option title 'QoS classification target' - option section 'qos.reclassify' - option valueof 'qos.class' - option required true diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/samba b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/samba deleted file mode 100644 index d4c7d8c..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/samba +++ /dev/null @@ -1,76 +0,0 @@ -package samba - -config package - option title 'Samba CIFS/SMB Daemon' - -config section - option name 'samba' - option package 'samba' - option title 'General Settings' - option unique true - option required true - -config variable - option name 'name' - option section 'samba.samba' - option title 'Hostname' - option datatype host - option required true - -config variable - option name 'description' - option section 'samba.samba' - option title 'Description' - -config variable - option name 'workgroup' - option section 'samba.samba' - option title 'Workgroup' - option required true - -config variable - option name 'homes' - option section 'samba.samba' - option title 'Share home-directories' - option description 'System users can reach their home directories via network shares.' - option datatype boolean - -config section - option name 'sambashare' - option package 'samba' - option title 'Shared Directories' - -config variable - option name 'name' - option section 'samba.sambashare' - option title 'Name' - option required true - -config variable - option name 'users' - option section 'samba.sambashare' - option title 'Allowed Users' - -config variable - option name 'read_only' - option section 'samba.sambashare' - option title 'Read Only' - option datatype boolean - -config variable - option name 'guest_ok' - option section 'samba.sambashare' - option title 'Allow Guests' - option datatype boolean - -config variable - option name 'create_mask' - option section 'samba.sambashare' - option title 'Create Mask' - option description 'Mask for new files' - -config variable - option name 'dir_mask' - option section 'samba.sambashare' - option title 'Directory Mask' - option description 'Mask for new directories' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/system b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/system deleted file mode 100644 index 28fee1c..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/system +++ /dev/null @@ -1,103 +0,0 @@ -package system - -config package - option title 'System configuration' - -config section - option name 'system' - option title 'General system configuration' - option package 'system' - option unique true - option required true - -config variable - option name 'hostname' - option title 'Local hostname' - option section 'system.system' - option datatype 'hostname' - option required true - -config variable - option name 'zonename' - option title 'Option zonename' - option section 'system.system' - -config variable - option name 'timezone' - option title 'Option timezone' - option section 'system.system' - option required true - -config variable - option name 'log_size' - option section 'system.system' - option title 'System log buffer size (kiB)' - option datatype uint - -config variable - option name 'log_ip' - option section 'system.system' - option title 'External system log server' - option datatype ipaddr - -config variable - option name 'conloglevel' - option section 'system.system' - option title 'Log output level' - option description 'Level of log messages on the console' - option datatype integer - -config section - option name 'led' - option package 'system' - option title 'LED Configuration' - -config variable - option name 'name' - option section 'system.led' - option title 'LED Name' - option required true - -config variable - option name 'sysfs' - option section 'system.led' - option title 'LED Device' - option required true - -config variable - option name 'default' - option section 'system.led' - option title 'Default state' - option datatype boolean - -config variable - option name 'trigger' - option section 'system.led' - option title 'Trigger' - option required true - -config variable - option name 'delayon' - option section 'system.led' - option title 'On-State Delay' - option description 'Time (in ms) the LED is on' - list depends 'trigger=timer' - -config variable - option name 'delayoff' - option section 'system.led' - option title 'Off-State Delay' - option description 'Time (in ms) the LED is off' - list depends 'trigger=timer' - -config variable - option name 'dev' - option section 'system.led' - option title 'Device' - list depends 'trigger=netdev' - -config variable - option name 'mode' - option section 'system.led' - option title 'Trigger Mode' - list depends 'trigger=netdev' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/upnpd b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/upnpd deleted file mode 100644 index 8574d03..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/upnpd +++ /dev/null @@ -1,28 +0,0 @@ -package upnpd - -config package - option title 'Miniupnpd UPNP daemon' - -config section - option name 'upnpd' - option title 'Settings' - option package 'upnpd' - option unique true - -config variable - option name 'download' - option title 'Download bandwidth in kBit/s' - option section 'upnpd.upnpd' - option datatype 'integer' - -config variable - option name 'upload' - option title 'Upload bandwidth in kBit/s' - option section 'upnpd.upnpd' - option datatype 'integer' - -config variable - option name 'log_output' - option title 'Enable log messages' - option section 'upnpd.upnpd' - option datatype 'boolean' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/uvc-streamer b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/uvc-streamer deleted file mode 100644 index 9ea255c..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/uvc-streamer +++ /dev/null @@ -1,41 +0,0 @@ -#package uvc-streamer - -config package - option title 'UVC-Streamer webcam streaming configuration' - -config section - option name 'uvc-streamer' - option package 'uvc-streamer' - option title 'Settings' - option unique true - option required true - -config variable - option name 'enabled' - option section 'uvc-streamer.uvc-streamer' - option title 'Enable' - option required true - option datatype boolean - -config variable - option name 'device' - option section 'uvc-streamer.uvc-streamer' - option title 'Device' - -config variable - option name 'resolution' - option section 'uvc-streamer.uvc-streamer' - option title 'Resolution' - option required true - -config variable - option name 'framespersecond' - option section 'uvc-streamer.uvc-streamer' - option title 'Frames per second' - option datatype uint - -config variable - option name 'port' - option section 'uvc-streamer.uvc-streamer' - option title 'Port' - option datatype port diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/wireless b/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/wireless deleted file mode 100644 index 85532a1..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/default/wireless +++ /dev/null @@ -1,523 +0,0 @@ -package wireless - -config package - option title 'Wireless LAN' - -config section - option name 'wifi-device' - option package 'wireless' - option title 'Devices' - option named true - -config variable - option name 'disabled' - option section 'wireless.wifi-device' - option title 'disabled' - option datatype boolean - -config variable - option name 'type' - option section 'wireless.wifi-device' - option title 'Type' - option required true - -config variable - option name 'channel' - option section 'wireless.wifi-device' - option title 'Channel' - -config variable - option name 'hwmode' - option section 'wireless.wifi-device' - option title 'Mode (atheros)' - option type enum - list depends type=atheros - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '' - option title 'auto' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11b' - option title '802.11b' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11g' - option title '802.11g' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11a' - option title '802.11a' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11bg' - option title '802.11b+g' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11gdt' - option title '802.11adt' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value '11adt' - option title '802.11adt' - -config enum - option variable 'wireless.wifi-device.hwmode' - option value 'fh' - option title 'Frequency Hopping' - -config variable - option name 'diversity' - option section 'wireless.wifi-device' - option title 'Diversity (atheros)' - option datatype boolean - list depends type=atheros - -config variable - option name 'txpower' - option section 'wireless.wifi-device' - option title 'Transmit Power' - option description 'dbm' - option datatype uint - -config variable - option name 'txantenna' - option section 'wireless.wifi-device' - option title 'Transmitter Antenna' - option datatype uint - list depends type=atheros - list depends type=broadcom - -config variable - option name 'rxantenna' - option section 'wireless.wifi-device' - option title 'Receiver Antenna' - option datatype uint - list depends type=atheros - list depends type=broadcom - -config variable - option name 'distance' - option section 'wireless.wifi-device' - option title 'Distance Optimization (atheros, broadcom)' - option description 'Distance to farthest network member in meters.' - option datatype uint - list depends type=atheros - list depends type=broadcom - -config variable - option name 'macfilter' - option section 'wireless.wifi-device' - option title 'MAC-Address Filter (broadcom)' - option type enum - list depends type=broadcom - -config enum - option variable 'wireless.wifi-device.macfilter' - option value 'deny' - option title 'Allow listed only' - -config enum - option variable 'wireless.wifi-device.macfilter' - option value 'allow' - option title 'Allow all except listed' - -config variable - option name 'maclist' - option section 'wireless.wifi-device' - option title 'MAC-List (broadcom)' - list depends 'type=broadcom, macfilter=allow' - list depends 'type=broadcom, macfilter=deny' - option type lazylist - option datatype macaddr - -config variable - option name 'frameburst' - option section 'wireless.wifi-device' - option title 'Frame Bursting (broadcom)' - option datatype boolean - list depends 'type=broadcom' - -config variable - option name 'country' - option section 'wireless.wifi-device' - option title 'Country Code (broadcom)' - list depends 'type=broadcom' - -config variable - option name 'maxassoc' - option section 'wireless.wifi-device' - option title 'Connection Limit (broadcom)' - option datatype uint - list depends 'type=broadcom' - - -config section - option name 'wifi-iface' - option package 'wireless' - option title 'Interfaces' - -config variable - option name 'device' - option section 'wireless.wifi-iface' - option title 'Wifi Device' - option valueof 'wireless.wifi-device' - -config variable - option name 'ssid' - option section 'wireless.wifi-iface' - option title 'ESSID' - -config variable - option name 'network' - option section 'wireless.wifi-iface' - option title 'Network' - option description 'Add the Wifi network to physical network' - option type reference - list valueof network.interface - -config variable - option name 'mode' - option section 'wireless.wifi-iface' - option title 'Mode' - option required true - option type enum - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'ap' - option title 'Access Point' - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'adhoc' - option title 'Ad-Hoc' - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'sta' - option title 'Client' - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'monitor' - option title 'Monitor' - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'ahdemo' - option title 'Pseudo Ad-Hoc (ahdemo)' - -config enum - option variable 'wireless.wifi-iface.mode' - option value 'wds' - option title 'WDS' - -config variable - option name 'bssid' - option section 'wireless.wifi-iface' - option title 'BSSID' - -config variable - option name 'txpower' - option section 'wireless.wifi-iface' - option title 'Transmit Power' - option description 'dbm' - option datatype uint - -config variable - option name 'frag' - option section 'wireless.wifi-iface' - option title 'Fragmentation Threshold (mac80211, atheros)' - option datatype uint - -config variable - option name 'rts' - option section 'wireless.wifi-iface' - option title 'RTS/CTS Threshold (mac80211, atheros)' - option datatype uint - -config variable - option name 'wds' - option section 'wireless.wifi-iface' - option title 'WDS (atheros)' - option datatype boolean - list depends 'mode=ap' - list depends 'mode=sta' - -config variable - option name 'wdssep' - option section 'wireless.wifi-iface' - option title 'Separate WDS (atheros)' - option datatype boolean - list depends 'wds=1,mode=ap' - -config variable - option name 'doth' - option section 'wireless.wifi-iface' - option title '802.11h (atheros)' - option datatype boolean - -config variable - option name 'hidden' - option section 'wireless.wifi-iface' - option title 'Hide ESSID (atheros, broadcom)' - option datatype boolean - list depends 'mode=ap' - list depends 'mode=adhoc' - list depends 'mode=wds' - -config variable - option name 'isolate' - option section 'wireless.wifi-iface' - option title 'isolate (atheros, broadcom)' - option datatype boolean - list depends 'mode=ap' - -config variable - option name 'bgscan' - option section 'wireless.wifi-iface' - option title 'Background Scan (atheros)' - option datatype boolean - -config variable - option name 'sw_merge' - option section 'wireless.wifi-iface' - option title 'Disable Ad-Hoc HW beacon timer (atheros)' - option datatype boolean - -config variable - option name 'nosbeacon' - option section 'wireless.wifi-iface' - option title 'Disable station HW beacon timer (atheros)' - option datatype boolean - -config variable - option name 'probereq' - option section 'wireless.wifi-iface' - option title 'Disable probe responses (atheros)' - option datatype boolean - -config variable - option name 'macpolicy' - option section 'wireless.wifi-iface' - option title 'MAC-Address Filter (atheros)' - option type enum - -config enum - option variable 'wireless.wifi-iface.macpolicy' - option value 'deny' - option title 'Allow listed only' - -config enum - option variable 'wireless.wifi-iface.macpolicy' - option value 'allow' - option title 'Allow all except listed' - -config variable - option name 'maclist' - option section 'wireless.wifi-iface' - option title 'MAC-List (atheros)' - list depends 'macpolicy=allow' - list depends 'macpolicy=deny' - option type lazylist - option datatype macaddr - -config variable - option name 'rate' - option section 'wireless.wifi-iface' - option title 'Transmission Rate (atheros)' - -config variable - option name 'mcast_rate' - option section 'wireless.wifi-iface' - option title 'Multicast Rate (atheros)' - -config variable - option name 'minrate' - option section 'wireless.wifi-iface' - option title 'Minimum Rate (atheros)' - -config variable - option name 'maxrate' - option section 'wireless.wifi-iface' - option title 'Maximum Rate (atheros)' - -config variable - option name 'compression' - option section 'wireless.wifi-iface' - option title 'Compression (atheros)' - option datatype boolean - -config variable - option name 'bursting' - option section 'wireless.wifi-iface' - option title 'Frame Bursting (atheros)' - option datatype boolean - -config variable - option name 'turbo' - option section 'wireless.wifi-iface' - option title 'Turbo Mode (atheros)' - option datatype boolean - -config variable - option name 'ff' - option section 'wireless.wifi-iface' - option title 'Fast Frames (atheros)' - -config variable - option name 'wmm' - option section 'wireless.wifi-iface' - option title 'WMM Mode (atheros)' - option datatype boolean - -config variable - option name 'xr' - option section 'wireless.wifi-iface' - option title 'XR Support (atheros)' - option datatype boolean - -config variable - option name 'ar' - option section 'wireless.wifi-iface' - option title 'AR Support (atheros)' - option datatype boolean - -config variable - option name 'encryption' - option section 'wireless.wifi-iface' - option title 'Encryption' - option description 'WPA-Encryption requires wpa_supplicant (for client mode) or hostapd (for AP and ad-hoc mode) to be installed.' - option type enum - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'none' - option title 'No Encryption' - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'wep' - option title 'WEP' - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'psk' - option title 'WPA-PSK' - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'psk2' - option title 'WPA2-PSK' - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'wpa' - option title 'WPA-EAP' - -config enum - option variable 'wireless.wifi-iface.encryption' - option value 'wpa2i' - option title 'WPA2-EAP' - -config variable - option name 'server' - option section 'wireless.wifi-iface' - option title 'RadiusServer' - list depends 'encryption=wpa,mode=ap' - list depends 'encryption=wpa2i,mode=ap' - option datatype host - -config variable - option name 'port' - option section 'wireless.wifi-iface' - option title 'Radius-Port' - list depends 'encryption=wpa,mode=ap' - list depends 'encryption=wpa2i,mode=ap' - option datatype port - -config variable - option name 'key' - option section 'wireless.wifi-iface' - option title 'Key' - list depends 'encryption=wep' - list depends 'encryption=psk' - list depends 'encryption=wpa,mode=ap' - list depends 'encryption=psk2' - list depends 'encryption=wpa2i,mode=ap' - -config variable - option name 'nasid' - option section 'wireless.wifi-iface' - option title 'NAS ID' - list depends 'encryption=wpa,mode=ap' - list depends 'encryption=wpa2i,mode=ap' - -config variable - option name 'eap_type' - option section 'wireless.wifi-iface' - option title 'EAP-Method' - option type enum - list depends 'encryption=wpa,mode=sta' - list depends 'encryption=wpa2i,mode=sta' - -config enum - option variable 'wireless.wifi-iface.eap_type' - option value 'TLS' - -config enum - option variable 'wireless.wifi-iface.eap_type' - option value 'PEAP' - -config variable - option name 'ca_cert' - option section 'wireless.wifi-iface' - option title 'Path to CA-Certificate' - list depends 'encryption=wpa,mode=sta' - list depends 'encryption=wpa2i,mode=sta' - option datatype file - -config variable - option name 'priv_key' - option section 'wireless.wifi-iface' - option title 'Path to Private Key' - list depends 'mode=sta,encryption=wpa2i,eap_type=TLS' - list depends 'mode=sta,encryption=wpa,eap_type=TLS' - option datatype file - - -config variable - option name 'priv_key_pwd' - option section 'wireless.wifi-iface' - option title 'Password of Private Key' - list depends 'mode=sta,encryption=wpa2i,eap_type=TLS' - list depends 'mode=sta,encryption=wpa,eap_type=TLS' - -config variable - option name 'auth' - option section 'wireless.wifi-iface' - option title 'PEAP-Authentication' - list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP' - list depends 'mode=sta,encryption=wpa,eap_type=PEAP' - -config variable - option name 'identity' - option section 'wireless.wifi-iface' - option title 'PEAP-Identity' - list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP' - list depends 'mode=sta,encryption=wpa,eap_type=PEAP' - -config variable - option name 'password' - option section 'wireless.wifi-iface' - option title 'PEAP-Password' - list depends 'mode=sta,encryption=wpa2i,eap_type=PEAP' - list depends 'mode=sta,encryption=wpa,eap_type=PEAP' diff --git a/mote/v1/openwrt/package/luci/host/lib/uci/schema/meta/schema b/mote/v1/openwrt/package/luci/host/lib/uci/schema/meta/schema deleted file mode 100644 index a2f29aa..0000000 --- a/mote/v1/openwrt/package/luci/host/lib/uci/schema/meta/schema +++ /dev/null @@ -1,403 +0,0 @@ -# UVL - Reference-Spec -# This is a meta scheme defining the format of uci schemes. -# $Id: schema 3709 2008-11-04 21:28:07Z jow $ - -package schema - -#------------------------------------------------------------------------------- -# Central package definition -# -# config package -# option ... -#------------------------------------------------------------------------------- - -# Section definition (schema.@package) -config section - option name 'package' - option title 'Definition of uci package' - option package 'schema' - option required false - option named false - option unique true - option dynamic false - -# Section title (schema.@package.title) -config variable - option name 'title' - option title 'Title of the defined package' - option section 'schema.package' - option type 'variable' - option datatype 'string' - option required false - -# Section description (schema.@package.description) -config variable - option name 'description' - option title 'Description of the defined package' - option section 'schema.package' - option type 'lazylist' - option datatype 'string' - option required false - - -#------------------------------------------------------------------------------- -# Central section definition -# -# config section -# option ... -#------------------------------------------------------------------------------- - -# Section definition (schema.@section) -config section - option name 'section' - option title 'Definition of uci section' - option package 'schema' - option required false - option named false - option unique false - option dynamic false - -# Section name (schema.@section.name) -config variable - option name 'name' - option title 'Name of the defined section' - option section 'schema.section' - option type 'variable' - option datatype 'string' - option required true - -# Section package (schema.@section.package) -config variable - option name 'package' - option title 'Parent package of the defined section' - option section 'schema.section' - option type 'variable' - option datatype 'string' - option required true - -# Section title (schema.@section.title) -config variable - option name 'title' - option title 'Title of the defined section' - option section 'schema.section' - option type 'variable' - option datatype 'string' - option required false - -# Section description (schema.@section.description) -config variable - option name 'description' - option title 'Description of the defined section' - option section 'schema.section' - option type 'lazylist' - option datatype 'string' - option required false - -# Section dependencies (schema.@section.depends) -config variable - option name 'depends' - option title 'List of dependencies within and between defined sections' - option section 'schema.section' - option type 'lazylist' - option datatype 'string' - option required false - -# Section required flag (schema.@section.required) -config variable - option name 'required' - option title 'Specify whether at least one instance of this section type must be defined in config' - option section 'schema.section' - option type 'variable' - option datatype 'boolean' - option required false - -# Section unique flag (schema.@section.unique) -config variable - option name 'unique' - option title 'Specify whether only one instance of this section type is allowed in config' - option section 'schema.section' - option type 'variable' - option datatype 'boolean' - option required false - -# Section named flag (schema.@section.named) -config variable - option name 'named' - option title 'Specify whether sections of this type must have a name set (are not anonymous)' - option section 'schema.section' - option type 'variable' - option datatype 'boolean' - option required false - -# Section dynamic flag (schema.@section.dynamic) -config variable - option name 'dynamic' - option title 'Specify whether sections of this type may contain arbitary, not specified options' - option section 'schema.section' - option type 'variable' - option datatype 'boolean' - option required false - - -#------------------------------------------------------------------------------- -# Central variable definition -# -# config variable -# option ... -#------------------------------------------------------------------------------- - -# Variable definition (schema.@variable) -config section - option name 'variable' - option title 'Definition of uci variable' - option package 'schema' - option required false - option named false - option unique false - option dynamic false - -# Variable name (schema.@variable.name) -config variable - option name 'name' - option title 'Name of the defined variable' - option section 'schema.variable' - option type 'variable' - option datatype 'string' - option required true - -# Variable section (schema.@variable.section) -config variable - option name 'section' - option title 'Parent section of the defined variable' - option section 'schema.variable' - option type 'variable' - option datatype 'string' - option required true - -# Variable title (schema.@variable.title) -config variable - option name 'title' - option title 'Title of the defined variable' - option section 'schema.variable' - option type 'variable' - option datatype 'string' - option required false - -# Variable description (schema.@variable.description) -config variable - option name 'description' - option title 'Description of the defined variable' - option section 'schema.variable' - option type 'lazylist' - option datatype 'string' - option required false - -# Variable dependencies (schema.@variable.depends) -config variable - option name 'depends' - option title 'List of dependencies between defined variables' - option section 'schema.variable' - option type 'lazylist' - option datatype 'string' - option required false - -# Variable required flag (schema.@variable.required) -config variable - option name 'required' - option title 'Specify whether this variable must be set in config' - option section 'schema.variable' - option type 'variable' - option datatype 'boolean' - option required false - -# Variable multiple values flag (schema.@variable.multival) -config variable - option name 'multival' - option title 'Specify whether this variable may contain multiple values separated by space' - option section 'schema.variable' - option type 'variable' - option datatype 'boolean' - option required false - -# Variable type (schema.@variable.type) -config variable - option name 'type' - option title 'Type of this variable' - option section 'schema.variable' - option type 'enum' - option datatype 'string' - option required false - -# Plain variable type (schema.@variable.type=variable) -config enum - option value 'variable' - option title 'This is a plain variable' - option variable 'schema.variable.type' - -# Enum variable type (schema.@variable.type=enum) -config enum - option value 'enum' - option title 'This is a enum variable' - option variable 'schema.variable.type' - -# List variable type (schema.@variable.type=list) -config enum - option value 'list' - option title 'This is a list variable' - option variable 'schema.variable.type' - -# List-or-Option variable type (schema.@variable.type=lazylist) -config enum - option value 'lazylist' - option title 'This is a list or option variable' - option variable 'schema.variable.type' - -# Reference variable type (schema.@variable.type=reference) -config enum - option value 'reference' - option title 'This is a reference (valueof) variable' - option variable 'schema.variable.type' - -# Variable datatype (schema.@variable.datatype) -config variable - option name 'datatype' - option title 'Datatype of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'string' - option required false - -# Variable default value (schema.@variable.default) -config variable - option name 'default' - option title 'Default value of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'string' - option required false - -# Variable minimum length (schema.@variable.minlength) -config variable - option name 'minlength' - option title 'Minimum length of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'uint' - option required false - -# Variable maximum length (schema.@variable.minlength) -config variable - option name 'maxlength' - option title 'Maximum length of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'uint' - option required false - -# Variable minimum value (schema.@variable.minlength) -config variable - option name 'minimum' - option title 'Minimum value of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'integer' - option required false - -# Variable maximum value (schema.@variable.minlength) -config variable - option name 'maximum' - option title 'Maximum value of this variable' - option section 'schema.variable' - option type 'variable' - option datatype 'integer' - option required false - -# Variable validators (schema.@variable.validator) -config variable - option name 'validator' - option title 'Datatype of this variable' - option section 'schema.variable' - option type 'lazylist' - option datatype 'string' - option required false - -# Variable value references (schema.@variable.valueof) -config variable - option name 'valueof' - option title 'Reference to section or option to read values from' - option section 'schema.variable' - option type 'lazylist' - option datatype 'string' - option required false - - -#------------------------------------------------------------------------------- -# Central enum definition -# -# config enum -# option ... -#------------------------------------------------------------------------------- - -# Enum definition (schema.@enum) -config section - option name 'enum' - option title 'Definition of uci enum value' - option package 'schema' - option required false - option named false - option unique false - option dynamic false - -# Enum value (schema.@enum.value) -config variable - option name 'value' - option title 'Value of the defined enum value' - option section 'schema.enum' - option type 'variable' - option datatype 'string' - option required true - -# Enum variable (schema.@enum.variable) -config variable - option name 'variable' - option title 'Parent variable of the defined enum value' - option section 'schema.enum' - option type 'variable' - option datatype 'string' - option required true - -# Enum value title (schema.@enum.title) -config variable - option name 'title' - option title 'Title of the defined enum value' - option section 'schema.enum' - option type 'variable' - option datatype 'string' - option required false - -# Enum value description (schema.@enum.description) -config variable - option name 'description' - option title 'Description of the defined enum value' - option section 'schema.enum' - option type 'lazylist' - option datatype 'string' - option required false - -# Enum value dependencies (schema.@enum.depends) -config variable - option name 'depends' - option title 'List of dependencies on defined variables' - option section 'schema.enum' - option type 'lazylist' - option datatype 'string' - option required false - -# Enum value default flag (schema.@enum.default) -config variable - option name 'default' - option title 'Specify whether this value is the default value of the parent enum' - option section 'schema.enum' - option type 'variable' - option datatype 'boolean' - option required false diff --git a/mote/v1/openwrt/package/luci/host/luci b/mote/v1/openwrt/package/luci/host/luci deleted file mode 120000 index 1844fff..0000000 --- a/mote/v1/openwrt/package/luci/host/luci +++ /dev/null @@ -1 +0,0 @@ -./usr/lib/lua/luci \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/sbin/luci-flash b/mote/v1/openwrt/package/luci/host/sbin/luci-flash deleted file mode 100755 index 819be40..0000000 --- a/mote/v1/openwrt/package/luci/host/sbin/luci-flash +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/sh -. /etc/functions.sh - -# initialize defaults -RAMFS_COPY_BIN="/usr/bin/awk" # extra programs for temporary ramfs root -RAMFS_COPY_DATA="" # extra data files -export KEEP_PATTERN="" -export VERBOSE=0 - -# parse options -while [ -n "$1" ]; do - case "$1" in - -k) - shift - export SAVE_CONFIG=1 - export KEEP_PATTERN="$1" - ;; - -*) - echo "Invalid option: $1" - exit 1 - ;; - *) break;; - esac - shift; -done - -export CONFFILES=/tmp/sysupgrade.conffiles -export CONF_TAR=/tmp/sysupgrade.tgz - -[ -f $CONFFILES ] && rm $CONFFILES -[ -f $CONF_TAR ] && rm $CONF_TAR - -export ARGV="$*" -export ARGC="$#" - -[ -z "$ARGV" ] && { - cat < - -Options: - -k <"file 1, file 2, ..."> Files to be kept -EOF - exit 1 -} - -add_pattern_conffiles() { - local file="$1" - find $KEEP_PATTERN >> "$file" 2>/dev/null - return 0 -} - -# hooks -sysupgrade_image_check="platform_check_image" -sysupgrade_init_conffiles="" - -[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles" - -include /lib/upgrade - -do_save_conffiles() { - [ -z "$(rootfs_type)" ] && { - echo "Cannot save config while running from ramdisk." - exit 3 - return 0 - } - run_hooks "$CONFFILES" $sysupgrade_init_conffiles - - v "Saving config files..." - [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" - tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null -} - -type platform_check_image >/dev/null 2>/dev/null || { - echo "Firmware upgrade is not implemented for this platform." - exit 1 -} - -for check in $sysupgrade_image_check; do - ( eval "$check \"\$ARGV\"" ) || { - echo "Image check '$check' failed." - exit 2 - } -done - -[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles -run_hooks "" $sysupgrade_pre_upgrade - -v "Switching to ramdisk..." -run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' diff --git a/mote/v1/openwrt/package/luci/host/sbin/luci-reload b/mote/v1/openwrt/package/luci/host/sbin/luci-reload deleted file mode 100755 index b6b1ff6..0000000 --- a/mote/v1/openwrt/package/luci/host/sbin/luci-reload +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -. /etc/functions.sh - -apply_config() { - config_get init "$1" init - config_get exec "$1" exec - config_get test "$1" test - - [ -n "$init" ] && reload_init "$2" "$init" "$test" - [ -n "$exec" ] && reload_exec "$2" "$exec" "$test" -} - -reload_exec() { - [ -x $2 ] && { - echo "Reloading $1... " - $2 >/dev/null 2>&1 - [ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!' - } -} - -reload_init() { - [ -x /etc/init.d/$2 ] && /etc/init.d/$2 enabled && { - echo "Reloading $1... " - /etc/init.d/$2 reload >/dev/null 2>&1 - [ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!' - } -} - -config_load ucitrack - -for i in $* -do - config_foreach apply_config $i $i -done diff --git a/mote/v1/openwrt/package/luci/host/tmp/.uci/luci b/mote/v1/openwrt/package/luci/host/tmp/.uci/luci deleted file mode 100644 index e69de29..0000000 diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/boa b/mote/v1/openwrt/package/luci/host/usr/bin/boa deleted file mode 100755 index 55594df..0000000 Binary files a/mote/v1/openwrt/package/luci/host/usr/bin/boa and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/boa_indexer b/mote/v1/openwrt/package/luci/host/usr/bin/boa_indexer deleted file mode 100755 index c857026..0000000 Binary files a/mote/v1/openwrt/package/luci/host/usr/bin/boa_indexer and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/lpk b/mote/v1/openwrt/package/luci/host/usr/bin/lpk deleted file mode 100755 index 6e6dcde..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/bin/lpk +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/lua -require("luci.lpk") \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/luci-splashd b/mote/v1/openwrt/package/luci/host/usr/bin/luci-splashd deleted file mode 100755 index 267fbdf..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/bin/luci-splashd +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/lua - -require("socket") -require("luci.ip") -require("luci.model.uci") - -local uci = luci.model.uci.cursor_state() -uci:load("network") - -local server = socket.bind("0.0.0.0", arg[1] or 8082) -server:settimeout(0, "t") - -while true do - local client = server:accept() - - if client then - client:settimeout(1) - local srv - local ip = luci.ip.IPv4(client:getpeername()) - uci:foreach("network", "interface", - function (section) - if section.ipaddr then - local net = luci.ip.IPv4(section.ipaddr, section.netmask) - if ip and net and net:contains(ip) then - srv = section.ipaddr - return - end - end - end) - - client:receive() - client:send("HTTP/1.0 302 Found\r\nLocation: http://" .. srv .. - (arg[2] or "/luci/splash") .. "\r\n\r\n") - client:close() - else - socket.sleep(0.1) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/lucittpd b/mote/v1/openwrt/package/luci/host/usr/bin/lucittpd deleted file mode 100755 index 34988d3..0000000 Binary files a/mote/v1/openwrt/package/luci/host/usr/bin/lucittpd and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/stat-genconfig b/mote/v1/openwrt/package/luci/host/usr/bin/stat-genconfig deleted file mode 100755 index 5313869..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/bin/stat-genconfig +++ /dev/null @@ -1,381 +0,0 @@ -#!/usr/bin/lua - ---[[ - -Luci statistics - collectd configuration generator -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: stat-genconfig 3642 2008-10-29 05:08:03Z jow $ - -]]-- - - -require("luci.model.uci") -require("luci.sys.iptparser") -require("luci.util") - -local ipt = luci.sys.iptparser.IptParser() -local uci = luci.model.uci.cursor() -local sections = uci:get_all( "luci_statistics" ) - - -function section( plugin ) - - local config = sections[ "collectd_" .. plugin ] or sections["collectd"] - - if type(config) == "table" and ( plugin == "collectd" or config.enable == "1" ) then - - local params = "" - - if type( plugins[plugin] ) == "function" then - params = plugins[plugin]( config ) - else - params = config_generic( config, plugins[plugin][1], plugins[plugin][2], plugins[plugin][3], plugin == "collectd" ) - end - - - if plugin ~= "collectd" then - print( "LoadPlugin " .. plugin ) - - if params:len() > 0 then - print( "\n" .. params .. "\n" ) - else - print( "" ) - end - else - print( params .. "\n" ) - end - end -end - -function config_generic( c, singles, bools, lists, nopad ) - local str = "" - - if type(c) == "table" then - - if type(singles) == "table" then - for i, key in ipairs( singles ) do - if preprocess[key] then - c[key] = preprocess[key](c[key]) - end - - str = str .. _string( c[key], key, nopad ) - end - end - - if type(bools) == "table" then - for i, key in ipairs( bools ) do - if preprocess[key] then - c[key] = preprocess[key](c[key]) - end - - str = str .. _bool( c[key], key, nopad ) - end - end - - if type(lists) == "table" then - str = str .. _list_expand( c, lists, nopad ) - end - end - - return str -end - -function config_exec( c ) - local str = "" - - for s in pairs(sections) do - for key, type in pairs({ Exec="collectd_exec_input", NotificationExec="collectd_exec_notify" }) do - if sections[s][".type"] == type then - - cmd = sections[s].cmdline - - if cmd then - cmd = cmd:gsub("^%s+", ""):gsub("%s+$", "") - user = sections[s].cmduser or "nobody" - group = sections[s].cmdgroup - - str = str .. "\t" .. key .. ' "' .. - user .. ( group and ":" .. group or "" ) .. '" "' .. - cmd:gsub('%s+', '" "') .. '"\n' - end - end - end - end - - return str -end - -function config_iptables( c ) - local str = "" - - for s in pairs(sections) do - if sections[s][".type"] == "collectd_iptables_match" then - - search = { } - - for i, k in ipairs( { - "table", "chain", "target", "protocol", "source", "destination", - "inputif", "outputif", "options" - } ) do - v = sections[s][k] - - if type(v) == "string" then - if k == "options" then v = luci.util.split( v, "%s+", nil, true ) end - search[k] = v - end - end - - for i, rule in ipairs( ipt:find( search ) ) do - - name = sections[s].name:gsub( "%s+", "_" ) - if i > 1 then name = name .. "_(" .. i .. ")" end - - str = str .. "\tChain " .. rule.table .. " " .. rule.chain .. " " .. rule.index .. ' "' .. name .. "\"\n" - end - end - end - - return str -end - -function config_network( c ) - local str = "" - - for s in pairs(sections) do - for key, type in pairs({ Listen="collectd_network_listen", Server="collectd_network_server" }) do - if sections[s][".type"] == type then - - host = sections[s].host - port = sections[s].port - - if host then - if port then - str = str .. "\t" .. key .. " " .. host .. " " .. port .. "\n" - else - str = str .. "\t" .. key .. " " .. host .. "\n" - end - end - end - end - end - - return str .. _string( c["TimeToLive"], "TimeToLive" ) - .. _string( c["CacheFlush"], "CacheFlush" ) - .. _bool( c["Forward"], "Forward" ) -end - - -function _list_expand( c, l, nopad ) - local str = "" - - for i, n in ipairs(l) do - if c[n] then - if preprocess[n] then - c[n] = preprocess[n](c[n]) - end - - if n:find("(%w+)ses") then - k = n:gsub("(%w+)ses", "%1s") - else - k = n:gsub("(%w+)s", "%1") - end - - str = str .. _expand( c[n], k, nopad ) - end - end - - return str -end - -function _expand( s, n, nopad ) - if type(s) == "string" then - local str = "" - - for i, v in ipairs( luci.util.split( s, "%s+", nil, true ) ) do - str = str .. _string( v, n, nopad ) - end - - return str - end -end - -function _bool( s, n, nopad ) - - local str = "" - local pad = "" - if not nopad then pad = "\t" end - - if s and s == "1" then - str = pad .. n .. " true" - else - str = pad .. n .. " false" - end - - return str .. "\n" -end - -function _string( s, n, nopad ) - - local str = "" - local pad = "" - if not nopad then pad = "\t" end - - if s then - if s:find("[^%d]") then - if not s:find("[^%w]") then - str = pad .. n .. " " .. luci.util.trim(s) - else - str = pad .. n .. ' "' .. luci.util.trim(s) .. '"' - end - else - str = pad .. n .. " " .. luci.util.trim(s) - end - - str = str .. "\n" - end - - return str -end - - -plugins = { - collectd = { - { "BaseDir", "Include", "PIDFile", "PluginDir", "TypesDB", "Interval", "ReadThreads", "Hostname" }, - { }, - { } - }, - - cpu = { - { }, - { }, - { } - }, - - csv = { - { "DataDir" }, - { "StoreRates" }, - { } - }, - - df = { - { }, - { "IgnoreSelected" }, - { "Devices", "MountPoints", "FSTypes" } - }, - - disk = { - { }, - { "IgnoreSelected" }, - { "Disks" } - }, - - dns = { - { }, - { }, - { "Interfaces", "IgnoreSources" } - }, - - email = { - { "SocketFile", "SocketGroup", "SocketPerms", "MaxConns" }, - { }, - { } - }, - - exec = config_exec, - - interface = { - { }, - { "IgnoreSelected" }, - { "Interfaces" } - }, - - iptables = config_iptables, - - irq = { - { }, - { "IgnoreSelected" }, - { "Irqs" } - }, - - load = { - { }, - { }, - { } - }, - - logfile = { - { "LogLevel", "File" }, - { "Timestamp" }, - { } - }, - - netlink = { - { }, - { "IgnoreSelected" }, - { "Interfaces", "VerboseInterfaces", "QDiscs", "Classes", "Filters" } - }, - - network = config_network, - - ping = { - { "TTL" }, - { }, - { "Hosts" } - }, - - processes = { - { }, - { }, - { "Processes" } - }, - - rrdtool = { - { "DataDir", "StepSize", "HeartBeat", "RRARows", "XFF", "CacheFlush", "CacheTimeout" }, - { "RRASingle" }, - { "RRATimespans" } - }, - - tcpconns = { - { }, - { "ListeningPorts" }, - { "LocalPorts", "RemotePorts" } - }, - - unixsock = { - { "SocketFile", "SocketGroup", "SocketPerms" }, - { }, - { } - }, - - wireless = { - { }, - { }, - { } - }, -} - -preprocess = { - RRATimespans = function(val) - local rv = { } - for time in val:gmatch("[^%s]+") do - table.insert( rv, luci.util.parse_units(time) ) - end - return table.concat(rv, " ") - end -} - - -section("collectd") - -for plugin in pairs(plugins) do - if plugin ~= "collectd" then - section( plugin ) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/uci b/mote/v1/openwrt/package/luci/host/usr/bin/uci deleted file mode 100755 index 7002711..0000000 Binary files a/mote/v1/openwrt/package/luci/host/usr/bin/uci and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/uvl b/mote/v1/openwrt/package/luci/host/usr/bin/uvl deleted file mode 100755 index 2eb6c31..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/bin/uvl +++ /dev/null @@ -1,241 +0,0 @@ -#!/usr/bin/lua ---[[ - -UCI Validation Layer - Command Line Utility -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: uvl 4085 2009-01-17 23:51:28Z jow $ - -]]-- - -require("luci.uvl") -require("luci.util") - - -function getopt( arg, options ) - options = options or "" - local tab = {} - local args = {} - for k, v in ipairs(arg) do - if v:sub(1, 2) == "--" then - local x = v:find( "=", 1, true ) - if x then - tab[ v:sub( 3, x-1 ) ] = v:sub( x+1 ) - else - tab[ v:sub( 3 ) ] = true - end - elseif v:sub( 1, 1 ) == "-" then - local y = 2 - local l = #v - local jopt - while ( y <= l ) do - jopt = v:sub( y, y ) - if options:find( jopt, 1, true ) then - if y < l then - tab[ jopt ] = v:sub( y+1 ) - y = l - else - tab[ jopt ] = arg[ k + 1 ] - arg[ k + 1 ] = "" - end - else - tab[ jopt ] = true - end - y = y + 1 - end - elseif #v > 0 then - table.insert(args, v) - end - end - return tab, args -end - -function genspec(conf) - require("luci.model.uci") - require("luci.uvl.datatypes") - - local uci = luci.model.uci.cursor() - local ok, err = uci:load(conf) - - if not ok then - print("Can not load config:", err) - os.exit(1) - else - local function _guess_datatype(v) - if type(v) == "table" then v = v[1] end - - for _, type in ipairs({ - "boolean", "integer", "float", "ip4addr", "ip6addr", - "macaddr", "directory", "file" - }) do - if luci.uvl.datatypes[type](v) then - return type - end - end - return "string" - end - - - local co = uci:get_all(conf) - local ct = { } - local ca = { } - local so = { } - local to = { } - - -- count section types - for _, section in pairs(co) do - ct[section['.type']] = ( ct[section['.type']] or 0 ) + 1 - ca[section['.type']] = section['.anonymous'] - so[section['.type']] = so[section['.type']] or { } - to[section['.type']] = to[section['.type']] or { } - - for option, value in pairs(section) do - if option:sub(1,1) ~= "." then - so[section['.type']][option] = _guess_datatype(value) - to[section['.type']][option] = ( type(value) == "table" and "list" or "variable" ) - end - end - end - - -- package name - print( "package %s" % conf ) - - -- write section schemes - for type, count in luci.util.kspairs(ct) do - print( "\nconfig section" ) - print( "\toption name '%s'" % type ) - print( "\toption title 'Section %s'" % type ) - print( "\toption package '%s'"% conf ) - print( "\toption named %s" % ( ca[type] and 'false' or 'true' ) ) - print( "\toption unique %s" % ( ct[type] > 1 and 'false' or ( ca[type] and 'false' or 'true' ) ) ) - print( "\toption dynamic false" ) - print( "\toption required false" ) - - -- write option schemes - for opt, val in luci.util.kspairs(so[type]) do - print( "\nconfig variable" ) - print( "\toption name '%s'" % opt ) - print( "\toption title 'Option %s'" % opt ) - print( "\toption section '%s.%s'" %{ conf, type } ) - print( "\toption datatype '%s'" % so[type][opt] ) - - if to[type][opt] ~= "variable" then - print( "\toption type '%s'" % to[type][opt] ) - end - end - - print("") - end - - end -end - - -local options, arguments = getopt( arg ) - -if #arguments ~= 2 or options.help then - print([=[ - -uvl - UCI Validation Layer -$Id: uvl 4085 2009-01-17 23:51:28Z jow $ -(c) 2008 Jo-Philipp Wich, Steven Barth - -Usage: - uvl --help - uvl [--silent] [--schemedir=DIR] [--configdir=DIR] [--no-strict-sections] \ - [--no-strict-options] [--no-strict-validators] [--no-strict-lists] \ - {verify|verify-scheme|genspec} config[.section[.option]] - -Options: - --help - Display this help message. - - --silent - Don't produce any output. - - --schemedir=DIR - Use DIR as scheme directory. - - --configdir=DIR - Use DIR as config directory. - - --no-strict-sections - Don't treat sections found in config but not in scheme as error. - - --no-strict-options - Don't treat options found in config but not in scheme as error. - - --no-strict-validators - Don't invalidate config if an external validator fails. - - --no-strict-lists - Don't invalidate lists that are stored options. - -Actions: - verify - Validate given configuration, section or option. - - verify-scheme - Validate given scheme against the reference meta scheme. - - genspec - Generate a scheme skeleton from given configuration. - ]=]) - os.exit(255) -elseif arguments[1] == "verify" or arguments[1] == "verify-scheme" then - luci.uvl.STRICT_UNKNOWN_SECTIONS = - ( not options['no-strict-sections'] and true or false ) - luci.uvl.STRICT_UNKNOWN_OPTIONS = - ( not options['no-strict-options'] and true or false ) - luci.uvl.STRICT_EXTERNAL_VALIDATORS = - ( not options['no-strict-validators'] and true or false ) - luci.uvl.STRICT_LIST_TYPE = - ( not options['no-strict-lists'] and true or false ) - - local uvl = luci.uvl.UVL( - type(options.schemedir) == "string" and options.schemedir, - type(options.configdir) == "string" and options.configdir - ) - - local cso = luci.util.split( arguments[2], "." ) - local ok, err - - if arguments[1] == "verify-scheme" then - uvl:read_scheme( 'schema', cso[1] ) - - local uci = uvl.uci.cursor( - type(options.configdir) == "string" - and options.configdir or uvl.schemedir .. '/default' - ) - - ok, err = uvl:validate_config( cso[1], uci:get_all(cso[1]) ) - if err then err.code = luci.uvl.errors.ERR_SCHEME end - else - ok, err = uvl:validate( unpack(cso) ) - end - - if ok then - if not options.silent then - print( string.format( - '%s "%s" validates fine!', - ( arguments[1] == "verify-scheme" and "Scheme" or - ( #cso == 1 and "Config" or - ( #cso == 2 and "Section" or "Option" ) ) ), - table.concat(cso, ".") - ) ) - end - os.exit( 0 ) - else - if not options.silent then print( err and err:string() or "Unknown error" ) end - os.exit( 1 ) - end -else - genspec( arguments[2] ) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/bin/uvlc b/mote/v1/openwrt/package/luci/host/usr/bin/uvlc deleted file mode 100755 index c07cc54..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/bin/uvlc +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/lua - - -if arg[1] then - require("luci.util") - require("luci.uvl") - require("luci.fs") - - local uvl = luci.uvl.UVL() - local scheme, err = uvl:get_scheme( arg[1] ) - - if scheme then - luci.fs.writefile( - "%s/bytecode/%s.lua" %{ uvl.schemedir, arg[1] }, - luci.util.get_bytecode(scheme) - ) - else - print("Error:", err:string()) - end -else - print( "Usage: uvlc " ) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/include/uci.h b/mote/v1/openwrt/package/luci/host/usr/include/uci.h deleted file mode 100644 index 2ae02b7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/include/uci.h +++ /dev/null @@ -1,545 +0,0 @@ -/* - * libuci - Library for the Unified Configuration Interface - * Copyright (C) 2008 Felix Fietkau - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 2.1 - * as published by the Free Software Foundation - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef __LIBUCI_H -#define __LIBUCI_H - -#include "uci_config.h" - -/* - * you can use these defines to enable debugging behavior for - * apps compiled against libuci: - * - * #define UCI_DEBUG_TYPECAST: - * enable uci_element typecast checking at run time - * - */ - -#include -#include -#include - -#define UCI_CONFDIR "/etc/config" -#define UCI_SAVEDIR "/tmp/.uci" -#define UCI_DIRMODE 0700 -#define UCI_FILEMODE 0600 - -enum -{ - UCI_OK = 0, - UCI_ERR_MEM, - UCI_ERR_INVAL, - UCI_ERR_NOTFOUND, - UCI_ERR_IO, - UCI_ERR_PARSE, - UCI_ERR_DUPLICATE, - UCI_ERR_UNKNOWN, - UCI_ERR_LAST -}; - -struct uci_list; -struct uci_list -{ - struct uci_list *next; - struct uci_list *prev; -}; - -struct uci_ptr; -struct uci_element; -struct uci_package; -struct uci_section; -struct uci_option; -struct uci_history; -struct uci_context; -struct uci_backend; -struct uci_parse_context; - - -/** - * uci_alloc_context: Allocate a new uci context - */ -extern struct uci_context *uci_alloc_context(void); - -/** - * uci_free_context: Free the uci context including all of its data - */ -extern void uci_free_context(struct uci_context *ctx); - -/** - * uci_perror: Print the last uci error that occured - * @ctx: uci context - * @str: string to print before the error message - */ -extern void uci_perror(struct uci_context *ctx, const char *str); - -/** - * uci_geterror: Get an error string for the last uci error - * @ctx: uci context - * @dest: target pointer for the string - * @str: prefix for the error message - * - * Note: string must be freed by the caller - */ -extern void uci_get_errorstr(struct uci_context *ctx, char **dest, const char *str); - -/** - * uci_import: Import uci config data from a stream - * @ctx: uci context - * @stream: file stream to import from - * @name: (optional) assume the config has the given name - * @package: (optional) store the last parsed config package in this variable - * @single: ignore the 'package' keyword and parse everything into a single package - * - * the name parameter is for config files that don't explicitly use the 'package <...>' keyword - * if 'package' points to a non-null struct pointer, enable history tracking and merge - */ -extern int uci_import(struct uci_context *ctx, FILE *stream, const char *name, struct uci_package **package, bool single); - -/** - * uci_export: Export one or all uci config packages - * @ctx: uci context - * @stream: output stream - * @package: (optional) uci config package to export - * @header: include the package header - */ -extern int uci_export(struct uci_context *ctx, FILE *stream, struct uci_package *package, bool header); - -/** - * uci_load: Parse an uci config file and store it in the uci context - * - * @ctx: uci context - * @name: name of the config file (relative to the config directory) - * @package: store the loaded config package in this variable - */ -extern int uci_load(struct uci_context *ctx, const char *name, struct uci_package **package); - -/** - * uci_unload: Unload a config file from the uci context - * - * @ctx: uci context - * @package: pointer to the uci_package struct - */ -extern int uci_unload(struct uci_context *ctx, struct uci_package *p); - -/** - * uci_lookup_ptr: Split an uci tuple string and look up an element tree - * @ctx: uci context - * @ptr: lookup result struct - * @str: uci tuple string to look up - * @extended: allow extended syntax lookup - * - * if extended is set to true, uci_lookup_ptr supports the following - * extended syntax: - * - * Examples: - * network.@interface[0].ifname ('ifname' option of the first interface section) - * network.@interface[-1] (last interface section) - * Note: uci_lookup_ext will automatically load a config package if necessary - */ -extern int uci_lookup_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str, bool extended); - -/** - * uci_add_section: Add an unnamed section - * @ctx: uci context - * @p: package to add the section to - * @type: section type - * @res: pointer to store a reference to the new section in - */ -extern int uci_add_section(struct uci_context *ctx, struct uci_package *p, const char *type, struct uci_section **res); - -/** - * uci_set: Set an element's value; create the element if necessary - * @ctx: uci context - * @ptr: uci pointer - * - * The updated/created element is stored in ptr->last - */ -extern int uci_set(struct uci_context *ctx, struct uci_ptr *ptr); - -/** - * uci_add_list: Append a string to an element list - * @ctx: uci context - * @ptr: uci pointer (with value) - * - * Note: if the given option already contains a string value, - * it will be converted to an 1-element-list before appending the next element - */ -extern int uci_add_list(struct uci_context *ctx, struct uci_ptr *ptr); - -/** - * uci_rename: Rename an element - * @ctx: uci context - * @ptr: uci pointer (with value) - */ -extern int uci_rename(struct uci_context *ctx, struct uci_ptr *ptr); - -/** - * uci_delete: Delete a section or option - * @ctx: uci context - * @ptr: uci pointer - */ -extern int uci_delete(struct uci_context *ctx, struct uci_ptr *ptr); - -/** - * uci_save: save change history for a package - * @ctx: uci context - * @p: uci_package struct - */ -extern int uci_save(struct uci_context *ctx, struct uci_package *p); - -/** - * uci_commit: commit changes to a package - * @ctx: uci context - * @p: uci_package struct pointer - * @overwrite: overwrite existing config data and flush history - * - * committing may reload the whole uci_package data, - * the supplied pointer is updated accordingly - */ -extern int uci_commit(struct uci_context *ctx, struct uci_package **p, bool overwrite); - -/** - * uci_list_configs: List available uci config files - * @ctx: uci context - * - * caller is responsible for freeing the allocated memory behind list - */ -extern int uci_list_configs(struct uci_context *ctx, char ***list); - -/** - * uci_set_savedir: override the default history save directory - * @ctx: uci context - * @dir: directory name - */ -extern int uci_set_savedir(struct uci_context *ctx, const char *dir); - -/** - * uci_set_savedir: override the default config storage directory - * @ctx: uci context - * @dir: directory name - */ -extern int uci_set_confdir(struct uci_context *ctx, const char *dir); - -/** - * uci_add_history_path: add a directory to the search path for change history files - * @ctx: uci context - * @dir: directory name - * - * This function allows you to add directories, which contain 'overlays' - * for the active config, that will never be committed. - */ -extern int uci_add_history_path(struct uci_context *ctx, const char *dir); - -/** - * uci_revert: revert all changes to a config item - * @ctx: uci context - * @ptr: uci pointer - */ -extern int uci_revert(struct uci_context *ctx, struct uci_ptr *ptr); - -/** - * uci_parse_argument: parse a shell-style argument, with an arbitrary quoting style - * @ctx: uci context - * @stream: input stream - * @str: pointer to the current line (use NULL for parsing the next line) - * @result: pointer for the result - */ -extern int uci_parse_argument(struct uci_context *ctx, FILE *stream, char **str, char **result); - -/** - * uci_set_backend: change the default backend - * @ctx: uci context - * @name: name of the backend - * - * The default backend is "file", which uses /etc/config for config storage - */ -extern int uci_set_backend(struct uci_context *ctx, const char *name); - -/** - * uci_validate_text: validate a value string for uci options - * @str: value - * - * this function checks whether a given string is acceptable as value - * for uci options - */ -extern bool uci_validate_text(const char *str); - -/* UCI data structures */ -enum uci_type { - UCI_TYPE_UNSPEC = 0, - UCI_TYPE_HISTORY = 1, - UCI_TYPE_PACKAGE = 2, - UCI_TYPE_SECTION = 3, - UCI_TYPE_OPTION = 4, - UCI_TYPE_PATH = 5, - UCI_TYPE_BACKEND = 6, - UCI_TYPE_ITEM = 7, -}; - -enum uci_option_type { - UCI_TYPE_STRING = 0, - UCI_TYPE_LIST = 1, -}; - -enum uci_flags { - UCI_FLAG_STRICT = (1 << 0), /* strict mode for the parser */ - UCI_FLAG_PERROR = (1 << 1), /* print parser error messages */ - UCI_FLAG_EXPORT_NAME = (1 << 2), /* when exporting, name unnamed sections */ - UCI_FLAG_SAVED_HISTORY = (1 << 3), /* store the saved history in memory as well */ -}; - -struct uci_element -{ - struct uci_list list; - enum uci_type type; - char *name; -}; - -struct uci_backend -{ - struct uci_element e; - char **(*list_configs)(struct uci_context *ctx); - struct uci_package *(*load)(struct uci_context *ctx, const char *name); - void (*commit)(struct uci_context *ctx, struct uci_package **p, bool overwrite); - - /* private: */ - const void *ptr; - void *priv; -}; - -struct uci_context -{ - /* list of config packages */ - struct uci_list root; - - /* parser context, use for error handling only */ - struct uci_parse_context *pctx; - - /* backend for import and export */ - struct uci_backend *backend; - struct uci_list backends; - - /* uci runtime flags */ - enum uci_flags flags; - - char *confdir; - char *savedir; - - /* search path for history files */ - struct uci_list history_path; - - /* private: */ - int err; - const char *func; - jmp_buf trap; - bool internal, nested; - char *buf; - int bufsz; -}; - -struct uci_package -{ - struct uci_element e; - struct uci_list sections; - struct uci_context *ctx; - bool has_history; - char *path; - - /* private: */ - struct uci_backend *backend; - void *priv; - int n_section; - struct uci_list history; - struct uci_list saved_history; -}; - -struct uci_section -{ - struct uci_element e; - struct uci_list options; - struct uci_package *package; - bool anonymous; - char *type; -}; - -struct uci_option -{ - struct uci_element e; - struct uci_section *section; - enum uci_option_type type; - union { - struct uci_list list; - char *string; - } v; -}; - -enum uci_command { - UCI_CMD_ADD, - UCI_CMD_REMOVE, - UCI_CMD_CHANGE, - UCI_CMD_RENAME, - UCI_CMD_LIST_ADD, -}; - -struct uci_history -{ - struct uci_element e; - enum uci_command cmd; - char *section; - char *value; -}; - -struct uci_ptr -{ - enum uci_type target; - enum { - UCI_LOOKUP_DONE = (1 << 0), - UCI_LOOKUP_COMPLETE = (1 << 1), - UCI_LOOKUP_EXTENDED = (1 << 2), - } flags; - - struct uci_package *p; - struct uci_section *s; - struct uci_option *o; - struct uci_element *last; - - const char *package; - const char *section; - const char *option; - const char *value; -}; - - -/* linked list handling */ -#ifndef offsetof -#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) -#endif - -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - */ -#ifndef container_of -#define container_of(ptr, type, member) \ - ((type *) ((char *)ptr - offsetof(type,member))) -#endif - - -/** - * uci_list_entry: casts an uci_list pointer to the containing struct. - * @_type: config, section or option - * @_ptr: pointer to the uci_list struct - */ -#define list_to_element(ptr) \ - container_of(ptr, struct uci_element, list) - -/** - * uci_foreach_entry: loop through a list of uci elements - * @_list: pointer to the uci_list struct - * @_ptr: iteration variable, struct uci_element - * - * use like a for loop, e.g: - * uci_foreach(&list, p) { - * ... - * } - */ -#define uci_foreach_element(_list, _ptr) \ - for(_ptr = list_to_element((_list)->next); \ - &_ptr->list != (_list); \ - _ptr = list_to_element(_ptr->list.next)) - -/** - * uci_foreach_entry_safe: like uci_foreach_safe, but safe for deletion - * @_list: pointer to the uci_list struct - * @_tmp: temporary variable, struct uci_element * - * @_ptr: iteration variable, struct uci_element * - * - * use like a for loop, e.g: - * uci_foreach(&list, p) { - * ... - * } - */ -#define uci_foreach_element_safe(_list, _tmp, _ptr) \ - for(_ptr = list_to_element((_list)->next), \ - _tmp = list_to_element(_ptr->list.next); \ - &_ptr->list != (_list); \ - _ptr = _tmp, _tmp = list_to_element(_ptr->list.next)) - -/** - * uci_list_empty: returns true if a list is empty - * @list: list head - */ -#define uci_list_empty(list) ((list)->next == (list)) - -/* wrappers for dynamic type handling */ -#define uci_type_backend UCI_TYPE_BACKEND -#define uci_type_history UCI_TYPE_HISTORY -#define uci_type_package UCI_TYPE_PACKAGE -#define uci_type_section UCI_TYPE_SECTION -#define uci_type_option UCI_TYPE_OPTION - -/* element typecasting */ -#ifdef UCI_DEBUG_TYPECAST -static const char *uci_typestr[] = { - [uci_type_backend] = "backend", - [uci_type_history] = "history", - [uci_type_package] = "package", - [uci_type_section] = "section", - [uci_type_option] = "option", -}; - -static void uci_typecast_error(int from, int to) -{ - fprintf(stderr, "Invalid typecast from '%s' to '%s'\n", uci_typestr[from], uci_typestr[to]); -} - -#define BUILD_CAST(_type) \ - static inline struct uci_ ## _type *uci_to_ ## _type (struct uci_element *e) \ - { \ - if (e->type != uci_type_ ## _type) { \ - uci_typecast_error(e->type, uci_type_ ## _type); \ - } \ - return (struct uci_ ## _type *) e; \ - } - -BUILD_CAST(backend) -BUILD_CAST(history) -BUILD_CAST(package) -BUILD_CAST(section) -BUILD_CAST(option) - -#else -#define uci_to_backend(ptr) container_of(ptr, struct uci_backend, e) -#define uci_to_history(ptr) container_of(ptr, struct uci_history, e) -#define uci_to_package(ptr) container_of(ptr, struct uci_package, e) -#define uci_to_section(ptr) container_of(ptr, struct uci_section, e) -#define uci_to_option(ptr) container_of(ptr, struct uci_option, e) -#endif - -/** - * uci_alloc_element: allocate a generic uci_element, reserve a buffer and typecast - * @ctx: uci context - * @type: {package,section,option} - * @name: string containing the name of the element - * @datasize: additional buffer size to reserve at the end of the struct - */ -#define uci_alloc_element(ctx, type, name, datasize) \ - uci_to_ ## type (uci_alloc_generic(ctx, uci_type_ ## type, name, sizeof(struct uci_ ## type) + datasize)) - -#define uci_dataptr(ptr) \ - (((char *) ptr) + sizeof(*ptr)) - -#endif diff --git a/mote/v1/openwrt/package/luci/host/usr/include/uci_config.h b/mote/v1/openwrt/package/luci/host/usr/include/uci_config.h deleted file mode 100644 index 0dd76cc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/include/uci_config.h +++ /dev/null @@ -1,3 +0,0 @@ -#define UCI_PLUGIN_SUPPORT 1 -#undef UCI_DEBUG -#undef UCI_DEBUG_TYPECAST diff --git a/mote/v1/openwrt/package/luci/host/usr/include/uci_list.h b/mote/v1/openwrt/package/luci/host/usr/include/uci_list.h deleted file mode 100644 index 2959a06..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/include/uci_list.h +++ /dev/null @@ -1,601 +0,0 @@ -#ifndef _LINUX_LIST_H -#define _LINUX_LIST_H - -#include -/** - * container_of - cast a member of a structure out to the containing structure - * @ptr: the pointer to the member. - * @type: the type of the container struct this is embedded in. - * @member: the name of the member within the struct. - * - */ -#ifndef container_of -#define container_of(ptr, type, member) ( \ - (type *)( (char *)ptr - offsetof(type,member) )) -#endif - - -/* - * Simple doubly linked list implementation. - * - * Some of the internal functions ("__xxx") are useful when - * manipulating whole lists rather than single entries, as - * sometimes we already know the next/prev entries and we can - * generate better code by using them directly rather than - * using the generic single-entry routines. - */ - -struct list_head { - struct list_head *next, *prev; -}; - -#define LIST_HEAD_INIT(name) { &(name), &(name) } - -#define LIST_HEAD(name) \ - struct list_head name = LIST_HEAD_INIT(name) - -static inline void INIT_LIST_HEAD(struct list_head *list) -{ - list->next = list; - list->prev = list; -} - -/* - * Insert a new entry between two known consecutive entries. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static inline void __list_add(struct list_head *new, - struct list_head *prev, - struct list_head *next) -{ - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; -} - -/** - * list_add - add a new entry - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -static inline void list_add(struct list_head *new, struct list_head *head) -{ - __list_add(new, head, head->next); -} - - -/** - * list_add_tail - add a new entry - * @new: new entry to be added - * @head: list head to add it before - * - * Insert a new entry before the specified head. - * This is useful for implementing queues. - */ -static inline void list_add_tail(struct list_head *new, struct list_head *head) -{ - __list_add(new, head->prev, head); -} - - -/* - * Delete a list entry by making the prev/next entries - * point to each other. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static inline void __list_del(struct list_head * prev, struct list_head * next) -{ - next->prev = prev; - prev->next = next; -} - -/** - * list_del - deletes entry from list. - * @entry: the element to delete from the list. - * Note: list_empty() on entry does not return true after this, the entry is - * in an undefined state. - */ -static inline void list_del(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - entry->next = NULL; - entry->prev = NULL; -} - -/** - * list_replace - replace old entry by new one - * @old : the element to be replaced - * @new : the new element to insert - * - * If @old was empty, it will be overwritten. - */ -static inline void list_replace(struct list_head *old, - struct list_head *new) -{ - new->next = old->next; - new->next->prev = new; - new->prev = old->prev; - new->prev->next = new; -} - -static inline void list_replace_init(struct list_head *old, - struct list_head *new) -{ - list_replace(old, new); - INIT_LIST_HEAD(old); -} - -/** - * list_del_init - deletes entry from list and reinitialize it. - * @entry: the element to delete from the list. - */ -static inline void list_del_init(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - INIT_LIST_HEAD(entry); -} - -/** - * list_move - delete from one list and add as another's head - * @list: the entry to move - * @head: the head that will precede our entry - */ -static inline void list_move(struct list_head *list, struct list_head *head) -{ - __list_del(list->prev, list->next); - list_add(list, head); -} - -/** - * list_move_tail - delete from one list and add as another's tail - * @list: the entry to move - * @head: the head that will follow our entry - */ -static inline void list_move_tail(struct list_head *list, - struct list_head *head) -{ - __list_del(list->prev, list->next); - list_add_tail(list, head); -} - -/** - * list_is_last - tests whether @list is the last entry in list @head - * @list: the entry to test - * @head: the head of the list - */ -static inline int list_is_last(const struct list_head *list, - const struct list_head *head) -{ - return list->next == head; -} - -/** - * list_empty - tests whether a list is empty - * @head: the list to test. - */ -static inline int list_empty(const struct list_head *head) -{ - return head->next == head; -} - -/** - * list_empty_careful - tests whether a list is empty and not being modified - * @head: the list to test - * - * Description: - * tests whether a list is empty _and_ checks that no other CPU might be - * in the process of modifying either member (next or prev) - * - * NOTE: using list_empty_careful() without synchronization - * can only be safe if the only activity that can happen - * to the list entry is list_del_init(). Eg. it cannot be used - * if another CPU could re-list_add() it. - */ -static inline int list_empty_careful(const struct list_head *head) -{ - struct list_head *next = head->next; - return (next == head) && (next == head->prev); -} - -static inline void __list_splice(struct list_head *list, - struct list_head *head) -{ - struct list_head *first = list->next; - struct list_head *last = list->prev; - struct list_head *at = head->next; - - first->prev = head; - head->next = first; - - last->next = at; - at->prev = last; -} - -/** - * list_splice - join two lists - * @list: the new list to add. - * @head: the place to add it in the first list. - */ -static inline void list_splice(struct list_head *list, struct list_head *head) -{ - if (!list_empty(list)) - __list_splice(list, head); -} - -/** - * list_splice_init - join two lists and reinitialise the emptied list. - * @list: the new list to add. - * @head: the place to add it in the first list. - * - * The list at @list is reinitialised - */ -static inline void list_splice_init(struct list_head *list, - struct list_head *head) -{ - if (!list_empty(list)) { - __list_splice(list, head); - INIT_LIST_HEAD(list); - } -} - -/** - * list_entry - get the struct for this entry - * @ptr: the &struct list_head pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list_struct within the struct. - */ -#define list_entry(ptr, type, member) \ - container_of(ptr, type, member) - -/** - * list_first_entry - get the first element from a list - * @ptr: the list head to take the element from. - * @type: the type of the struct this is embedded in. - * @member: the name of the list_struct within the struct. - * - * Note, that list is expected to be not empty. - */ -#define list_first_entry(ptr, type, member) \ - list_entry((ptr)->next, type, member) - -/** - * list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop cursor. - * @head: the head for your list. - */ -#define list_for_each(pos, head) \ - for (pos = (head)->next; pos != (head); \ - pos = pos->next) - -/** - * __list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop cursor. - * @head: the head for your list. - * - * This variant differs from list_for_each() in that it's the - * simplest possible list iteration code, no prefetching is done. - * Use this for code that knows the list to be very short (empty - * or 1 entry) most of the time. - */ -#define __list_for_each(pos, head) \ - for (pos = (head)->next; pos != (head); pos = pos->next) - -/** - * list_for_each_prev - iterate over a list backwards - * @pos: the &struct list_head to use as a loop cursor. - * @head: the head for your list. - */ -#define list_for_each_prev(pos, head) \ - for (pos = (head)->prev; pos != (head); \ - pos = pos->prev) - -/** - * list_for_each_safe - iterate over a list safe against removal of list entry - * @pos: the &struct list_head to use as a loop cursor. - * @n: another &struct list_head to use as temporary storage - * @head: the head for your list. - */ -#define list_for_each_safe(pos, n, head) \ - for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, n = pos->next) - -/** - * list_for_each_prev_safe - iterate over a list backwards safe against removal of list entry - * @pos: the &struct list_head to use as a loop cursor. - * @n: another &struct list_head to use as temporary storage - * @head: the head for your list. - */ -#define list_for_each_prev_safe(pos, n, head) \ - for (pos = (head)->prev, n = pos->prev; \ - pos != (head); \ - pos = n, n = pos->prev) - -/** - * list_for_each_entry - iterate over list of given type - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry(pos, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) - -/** - * list_for_each_entry_reverse - iterate backwards over list of given type. - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry_reverse(pos, head, member) \ - for (pos = list_entry((head)->prev, typeof(*pos), member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.prev, typeof(*pos), member)) - -/** - * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue() - * @pos: the type * to use as a start point - * @head: the head of the list - * @member: the name of the list_struct within the struct. - * - * Prepares a pos entry for use as a start point in list_for_each_entry_continue(). - */ -#define list_prepare_entry(pos, head, member) \ - ((pos) ? : list_entry(head, typeof(*pos), member)) - -/** - * list_for_each_entry_continue - continue iteration over list of given type - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Continue to iterate over list of given type, continuing after - * the current position. - */ -#define list_for_each_entry_continue(pos, head, member) \ - for (pos = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) - -/** - * list_for_each_entry_continue_reverse - iterate backwards from the given point - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Start to iterate over list of given type backwards, continuing after - * the current position. - */ -#define list_for_each_entry_continue_reverse(pos, head, member) \ - for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ - &pos->member != (head); \ - pos = list_entry(pos->member.prev, typeof(*pos), member)) - -/** - * list_for_each_entry_from - iterate over list of given type from the current point - * @pos: the type * to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type, continuing from current position. - */ -#define list_for_each_entry_from(pos, head, member) \ - for (; &pos->member != (head); \ - pos = list_entry(pos->member.next, typeof(*pos), member)) - -/** - * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - */ -#define list_for_each_entry_safe(pos, n, head, member) \ - for (pos = list_entry((head)->next, typeof(*pos), member), \ - n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, typeof(*n), member)) - -/** - * list_for_each_entry_safe_continue - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type, continuing after current point, - * safe against removal of list entry. - */ -#define list_for_each_entry_safe_continue(pos, n, head, member) \ - for (pos = list_entry(pos->member.next, typeof(*pos), member), \ - n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, typeof(*n), member)) - -/** - * list_for_each_entry_safe_from - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Iterate over list of given type from current point, safe against - * removal of list entry. - */ -#define list_for_each_entry_safe_from(pos, n, head, member) \ - for (n = list_entry(pos->member.next, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.next, typeof(*n), member)) - -/** - * list_for_each_entry_safe_reverse - * @pos: the type * to use as a loop cursor. - * @n: another type * to use as temporary storage - * @head: the head for your list. - * @member: the name of the list_struct within the struct. - * - * Iterate backwards over list of given type, safe against removal - * of list entry. - */ -#define list_for_each_entry_safe_reverse(pos, n, head, member) \ - for (pos = list_entry((head)->prev, typeof(*pos), member), \ - n = list_entry(pos->member.prev, typeof(*pos), member); \ - &pos->member != (head); \ - pos = n, n = list_entry(n->member.prev, typeof(*n), member)) - -/* - * Double linked lists with a single pointer list head. - * Mostly useful for hash tables where the two pointer list head is - * too wasteful. - * You lose the ability to access the tail in O(1). - */ - -struct hlist_head { - struct hlist_node *first; -}; - -struct hlist_node { - struct hlist_node *next, **pprev; -}; - -#define HLIST_HEAD_INIT { .first = NULL } -#define HLIST_HEAD(name) struct hlist_head name = { .first = NULL } -#define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL) -static inline void INIT_HLIST_NODE(struct hlist_node *h) -{ - h->next = NULL; - h->pprev = NULL; -} - -static inline int hlist_unhashed(const struct hlist_node *h) -{ - return !h->pprev; -} - -static inline int hlist_empty(const struct hlist_head *h) -{ - return !h->first; -} - -static inline void __hlist_del(struct hlist_node *n) -{ - struct hlist_node *next = n->next; - struct hlist_node **pprev = n->pprev; - *pprev = next; - if (next) - next->pprev = pprev; -} - -static inline void hlist_del(struct hlist_node *n) -{ - __hlist_del(n); - n->next = NULL; - n->pprev = NULL; -} - -static inline void hlist_del_init(struct hlist_node *n) -{ - if (!hlist_unhashed(n)) { - __hlist_del(n); - INIT_HLIST_NODE(n); - } -} - - -static inline void hlist_add_head(struct hlist_node *n, struct hlist_head *h) -{ - struct hlist_node *first = h->first; - n->next = first; - if (first) - first->pprev = &n->next; - h->first = n; - n->pprev = &h->first; -} - - -/* next must be != NULL */ -static inline void hlist_add_before(struct hlist_node *n, - struct hlist_node *next) -{ - n->pprev = next->pprev; - n->next = next; - next->pprev = &n->next; - *(n->pprev) = n; -} - -static inline void hlist_add_after(struct hlist_node *n, - struct hlist_node *next) -{ - next->next = n->next; - n->next = next; - next->pprev = &n->next; - - if(next->next) - next->next->pprev = &next->next; -} - -#define hlist_entry(ptr, type, member) container_of(ptr,type,member) - -#define hlist_for_each(pos, head) \ - for (pos = (head)->first; pos; pos = pos->next) - -#define hlist_for_each_safe(pos, n, head) \ - for (pos = (head)->first; pos; pos = n) - -/** - * hlist_for_each_entry - iterate over list of given type - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. - * @head: the head for your list. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry(tpos, pos, head, member) \ - for (pos = (head)->first; pos && \ - ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = pos->next) - -/** - * hlist_for_each_entry_continue - iterate over a hlist continuing after current point - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_continue(tpos, pos, member) \ - for (pos = (pos)->next; pos && \ - ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = pos->next) - -/** - * hlist_for_each_entry_from - iterate over a hlist continuing from current point - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_from(tpos, pos, member) \ - for (; pos && \ - ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = pos->next) - -/** - * hlist_for_each_entry_safe - iterate over list of given type safe against removal of list entry - * @tpos: the type * to use as a loop cursor. - * @pos: the &struct hlist_node to use as a loop cursor. - * @n: another &struct hlist_node to use as temporary storage - * @head: the head for your list. - * @member: the name of the hlist_node within the struct. - */ -#define hlist_for_each_entry_safe(tpos, pos, n, head, member) \ - for (pos = (head)->first; \ - pos && ({ n = pos->next; 1; }) && \ - ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ - pos = n) - -#endif diff --git a/mote/v1/openwrt/package/luci/host/usr/include/ucimap.h b/mote/v1/openwrt/package/luci/host/usr/include/ucimap.h deleted file mode 100644 index 43f54e0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/include/ucimap.h +++ /dev/null @@ -1,125 +0,0 @@ -/* - * ucimap - library for mapping uci sections into data structures - * Copyright (C) 2008 Felix Fietkau - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 - * as published by the Free Software Foundation - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ -#include -#include "uci_list.h" -#include "uci.h" - -#ifndef ARRAY_SIZE -#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) -#endif - -#define BITFIELD_SIZE(_fields) (((_fields) / 8) + 1) - -#define CLR_BIT(_name, _bit) do { \ - _name[(_bit) / 8] &= ~(1 << ((_bit) % 8)); \ -} while (0) - -#define SET_BIT(_name, _bit) do { \ - _name[(_bit) / 8] |= (1 << ((_bit) % 8)); \ -} while (0) - -#define TEST_BIT(_name, _bit) \ - (_name[(_bit) / 8] & (1 << ((_bit) % 8))) - -#define OPTMAP_OPTION(_maptype, _type, _field, ...) \ - { \ - .type = _maptype, \ - .name = #_field, \ - .offset = offsetof(_type, _field), \ - __VA_ARGS__ \ - } - -struct uci_sectmap; -struct uci_optmap; - -struct uci_map { - struct uci_sectmap **sections; - unsigned int n_sections; - struct list_head sdata; - struct list_head fixup; - - void *priv; /* user data */ -}; - -enum ucimap_type { - /* types */ - UCIMAP_SIMPLE = 0x00, - UCIMAP_LIST = 0x10, - UCIMAP_TYPE = 0xf0, /* type mask */ - - /* subtypes */ - UCIMAP_STRING = 0x0, - UCIMAP_BOOL = 0x1, - UCIMAP_INT = 0x2, - UCIMAP_SECTION = 0x3, - UCIMAP_SUBTYPE = 0xf, /* subtype mask */ -}; - -union uci_datamap { - int i; - bool b; - const char *s; - void *section; - struct list_head list; -}; - -struct uci_listmap { - struct list_head list; - union uci_datamap data; -}; - -struct uci_sectmap { - /* type string for the uci section */ - const char *type; - - /* length of the struct to map into */ - unsigned int alloc_len; - - /* give the caller time to initialize the preallocated struct */ - int (*init_section)(struct uci_map *map, void *section, struct uci_section *s); - - /* pass the fully processed struct to the callback after the section end */ - int (*add_section)(struct uci_map *map, void *section); - - /* let the callback clean up its own stuff in the section */ - int (*free_section)(struct uci_map *map, void *section); - - /* list of option mappings for this section */ - struct uci_optmap *options; - unsigned int n_options; -}; - -struct uci_optmap { - unsigned int offset; - const char *name; - enum ucimap_type type; - union { - struct { - int base; - int min; - int max; - } i; - struct { - int maxlen; - } s; - struct uci_sectmap *sm; - } data; -}; - -extern int ucimap_init(struct uci_map *map); -extern void ucimap_cleanup(struct uci_map *map); -extern void ucimap_set_changed(void *section, void *field); -extern int ucimap_store_section(struct uci_map *map, struct uci_package *p, void *section); -extern void ucimap_parse(struct uci_map *map, struct uci_package *pkg); - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/boa/luci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/boa/luci.lua deleted file mode 100644 index 2bb9313..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/boa/luci.lua +++ /dev/null @@ -1,66 +0,0 @@ -module("luci-plugin", package.seeall) - -function normalize(path) - local newpath - while newpath ~= path do - if (newpath) then - path = newpath - end - newpath = string.gsub(path, "/[^/]+/../", "/") - end - return newpath -end - -function init(path) - -- NB: path points to ROOT/usr/lib/boa, change it to /usr/lib/lua - root = normalize(path .. '/../../../') - path = normalize(path .. '/../lua/') - package.cpath = path..'?.so;'..package.cpath - package.path = path..'?.lua;'..package.path - - require("luci.dispatcher") - require("luci.sgi.webuci") - require("luci.model.uci") - - if (root ~= '/') then - -- Entering dummy mode - luci.model.uci.cursor = function(config, ...) - return uci.cursor(config or root .. "/etc/config", ...) - end - - luci.sys.hostname = function() return "" end - luci.sys.loadavg = function() return 0,0,0,0,0 end - luci.sys.reboot = function() return end - luci.sys.sysinfo = function() return "","","" end - luci.sys.syslog = function() return "" end - - luci.sys.net.arptable = function() return {} end - luci.sys.net.devices = function() return {} end - luci.sys.net.routes = function() return {} end - luci.sys.wifi.getiwconfig = function() return {} end - luci.sys.wifi.iwscan = function() return {} end - - luci.sys.user.checkpasswd = function() return true end - end -end - -function prepare_req(uri) - luci.dispatcher.createindex() - env = {} - env.REQUEST_URI = uri - -- TODO: setting luci-plugin.reload = true allows this function to trigger a context reload -end - -function handle_req(context) - env.SERVER_PROTOCOL = context.server_proto - env.REMOTE_ADDR = context.remote_addr - env.REQUEST_METHOD = context.request_method - env.PATH_INFO = context.uri - env.REMOTE_PORT = context.remote_port - env.SERVER_ADDR = context.server_addr - env.HTTP_COOKIE = context.cookie - env.HTTP_ACCEPT = context.http_accept - env.SCRIPT_NAME = env.REQUEST_URI:sub(1, #env.REQUEST_URI - #env.PATH_INFO) - - luci.sgi.webuci.run(env, vars) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/ltn12.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/ltn12.lua deleted file mode 100644 index b42689a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/ltn12.lua +++ /dev/null @@ -1,292 +0,0 @@ ------------------------------------------------------------------------------ --- LTN12 - Filters, sources, sinks and pumps. --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: ltn12.lua,v 1.31 2006/04/03 04:45:42 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module ------------------------------------------------------------------------------ -local string = require("string") -local table = require("table") -local base = _G -module("ltn12") - -filter = {} -source = {} -sink = {} -pump = {} - --- 2048 seems to be better in windows... -BLOCKSIZE = 2048 -_VERSION = "LTN12 1.0.1" - ------------------------------------------------------------------------------ --- Filter stuff ------------------------------------------------------------------------------ --- returns a high level filter that cycles a low-level filter -function filter.cycle(low, ctx, extra) - base.assert(low) - return function(chunk) - local ret - ret, ctx = low(ctx, chunk, extra) - return ret - end -end - --- chains a bunch of filters together --- (thanks to Wim Couwenberg) -function filter.chain(...) - local n = table.getn(arg) - local top, index = 1, 1 - local retry = "" - return function(chunk) - retry = chunk and retry - while true do - if index == top then - chunk = arg[index](chunk) - if chunk == "" or top == n then return chunk - elseif chunk then index = index + 1 - else - top = top+1 - index = top - end - else - chunk = arg[index](chunk or "") - if chunk == "" then - index = index - 1 - chunk = retry - elseif chunk then - if index == n then return chunk - else index = index + 1 end - else base.error("filter returned inappropriate nil") end - end - end - end -end - ------------------------------------------------------------------------------ --- Source stuff ------------------------------------------------------------------------------ --- create an empty source -local function empty() - return nil -end - -function source.empty() - return empty -end - --- returns a source that just outputs an error -function source.error(err) - return function() - return nil, err - end -end - --- creates a file source -function source.file(handle, io_err) - if handle then - return function() - local chunk = handle:read(BLOCKSIZE) - if not chunk then handle:close() end - return chunk - end - else return source.error(io_err or "unable to open file") end -end - --- turns a fancy source into a simple source -function source.simplify(src) - base.assert(src) - return function() - local chunk, err_or_new = src() - src = err_or_new or src - if not chunk then return nil, err_or_new - else return chunk end - end -end - --- creates string source -function source.string(s) - if s then - local i = 1 - return function() - local chunk = string.sub(s, i, i+BLOCKSIZE-1) - i = i + BLOCKSIZE - if chunk ~= "" then return chunk - else return nil end - end - else return source.empty() end -end - --- creates rewindable source -function source.rewind(src) - base.assert(src) - local t = {} - return function(chunk) - if not chunk then - chunk = table.remove(t) - if not chunk then return src() - else return chunk end - else - table.insert(t, chunk) - end - end -end - -function source.chain(src, f) - base.assert(src and f) - local last_in, last_out = "", "" - local state = "feeding" - local err - return function() - if not last_out then - base.error('source is empty!', 2) - end - while true do - if state == "feeding" then - last_in, err = src() - if err then return nil, err end - last_out = f(last_in) - if not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - elseif last_out ~= "" then - state = "eating" - if last_in then last_in = "" end - return last_out - end - else - last_out = f(last_in) - if last_out == "" then - if last_in == "" then - state = "feeding" - else - base.error('filter returned ""') - end - elseif not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - else - return last_out - end - end - end - end -end - --- creates a source that produces contents of several sources, one after the --- other, as if they were concatenated --- (thanks to Wim Couwenberg) -function source.cat(...) - local src = table.remove(arg, 1) - return function() - while src do - local chunk, err = src() - if chunk then return chunk end - if err then return nil, err end - src = table.remove(arg, 1) - end - end -end - ------------------------------------------------------------------------------ --- Sink stuff ------------------------------------------------------------------------------ --- creates a sink that stores into a table -function sink.table(t) - t = t or {} - local f = function(chunk, err) - if chunk then table.insert(t, chunk) end - return 1 - end - return f, t -end - --- turns a fancy sink into a simple sink -function sink.simplify(snk) - base.assert(snk) - return function(chunk, err) - local ret, err_or_new = snk(chunk, err) - if not ret then return nil, err_or_new end - snk = err_or_new or snk - return 1 - end -end - --- creates a file sink -function sink.file(handle, io_err) - if handle then - return function(chunk, err) - if not chunk then - handle:close() - return 1 - else return handle:write(chunk) end - end - else return sink.error(io_err or "unable to open file") end -end - --- creates a sink that discards data -local function null() - return 1 -end - -function sink.null() - return null -end - --- creates a sink that just returns an error -function sink.error(err) - return function() - return nil, err - end -end - --- chains a sink with a filter -function sink.chain(f, snk) - base.assert(f and snk) - return function(chunk, err) - if chunk ~= "" then - local filtered = f(chunk) - local done = chunk and "" - while true do - local ret, snkerr = snk(filtered, err) - if not ret then return nil, snkerr end - if filtered == done then return 1 end - filtered = f(done) - end - else return 1 end - end -end - ------------------------------------------------------------------------------ --- Pump stuff ------------------------------------------------------------------------------ --- pumps one chunk from the source to the sink -function pump.step(src, snk) - local chunk, src_err = src() - local ret, snk_err = snk(chunk, src_err) - if chunk and ret then return 1 - else return nil, src_err or snk_err end -end - --- pumps all data from a source to a sink, using a step function -function pump.all(src, snk, step) - base.assert(src and snk) - step = step or pump.step - while true do - local ret, err = step(src, snk) - if not ret then - if err then return nil, err - else return 1 end - end - end -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/config.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/config.lua deleted file mode 100644 index 2738cf5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/config.lua +++ /dev/null @@ -1,34 +0,0 @@ -------------------------------------------------------------------------------- --- LuaDoc configuration file. This file contains the default options for --- luadoc operation. These options can be overriden by the command line tool --- @see luadoc.print_help --- @release $Id: config.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -module "luadoc.config" - -------------------------------------------------------------------------------- --- Default options --- @class table --- @name default_options --- @field output_dir default output directory for generated documentation, used --- by several doclets --- @field taglet parser used to analyze source code input --- @field doclet documentation generator --- @field template_dir directory with documentation templates, used by the html --- doclet --- @field verbose command line tool configuration to output processing --- information - -local default_options = { - output_dir = "", - taglet = "luadoc.taglet.standard", - doclet = "luadoc.doclet.html", - -- TODO: find a way to define doclet specific options - template_dir = "luadoc/doclet/html/", - nomodules = false, - nofiles = false, - verbose = true, -} - -return default_options diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/debug.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/debug.lua deleted file mode 100644 index 33966cb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/debug.lua +++ /dev/null @@ -1,46 +0,0 @@ ------------------------------------------------------------------ --- LuaDoc debugging facilities. --- @release $Id: debug.lua 3941 2008-12-23 21:39:38Z jow $ ------------------------------------------------------------------ - -module "luadoc.doclet.debug" - -function printline() - print(string.rep('-', 79)) -end - ------------------------------------------------------------------ --- Print debug information about document --- @param doc Table with the structured documentation. - -function start (doc) - print("Files:") - for _, filepath in ipairs(doc.files) do - print('\t', filepath) - end - printline() - - print("Modules:") - for _, modulename in ipairs(doc.modules) do - print('\t', modulename) - end - printline() - - for i, v in pairs(doc.files) do - print('\t', i, v) - end - printline() - for i, v in pairs(doc.files[doc.files[1]]) do - print(i, v) - end - - printline() - for i, v in pairs(doc.files[doc.files[1]].doc[1]) do - print(i, v) - end - printline() - print("Params") - for i, v in pairs(doc.files[doc.files[1]].doc[1].param) do - print(i, v) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/formatter.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/formatter.lua deleted file mode 100644 index 40a7ce0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/formatter.lua +++ /dev/null @@ -1,84 +0,0 @@ -------------------------------------------------------------------------------- --- Doclet to format source code according to LuaDoc standard tags. This doclet --- (re)write .lua files adding missing standard tags. Texts are formatted to --- 80 columns and function parameters are added based on code analysis. --- --- @release $Id: formatter.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local util = require "luadoc.util" -local assert, ipairs, pairs, type = assert, ipairs, pairs, type -local string = require"string" -local table = require"table" - -module "luadoc.doclet.formatter" - -options = { - output_dir = "./", -} - -------------------------------------------------------------------------------- --- Assembly the output filename for an input file. --- TODO: change the name of this function -function out_file (filename) - local h = filename - h = options.output_dir..h - return h -end - -------------------------------------------------------------------------------- --- Generate a new lua file for each input lua file. If the user does not --- specify a different output directory input files will be rewritten. --- @param doc documentation table - -function start (doc) - local todo = "" - - -- Process files - for i, file_doc in ipairs(doc.files) do - -- assembly the filename - local filename = out_file(file_doc.name) - luadoc.logger:info(string.format("generating file `%s'", filename)) - - -- TODO: confirm file overwrite - local f = posix.open(filename, "w") - assert(f, string.format("could not open `%s' for writing", filename)) - - for _, block in ipairs(file_doc.doc) do - - -- write reorganized comments - f:write(string.rep("-", 80).."\n") - - -- description - f:write(util.comment(util.wrap(block.description, 77))) - f:write("\n") - - if block.class == "function" then - -- parameters - table.foreachi(block.param, function (_, param_name) - f:write(util.comment(util.wrap(string.format("@param %s %s", param_name, block.param[param_name] or todo), 77))) - f:write("\n") - end) - - -- return - if type(block.ret) == "table" then - table.foreachi(block.ret, function (_, ret) - f:write(util.comment(util.wrap(string.format("@return %s", ret), 77)).."\n") - end) - else - f:write(util.comment(util.wrap(string.format("@return %s", block.ret or todo), 77)).."\n") - end - end - - -- TODO: usage - -- TODO: see - - -- write code - for _, line in ipairs(block.code) do - f:write(line.."\n") - end - end - - f:close() - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html.lua deleted file mode 100644 index cd55e2e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html.lua +++ /dev/null @@ -1,275 +0,0 @@ -------------------------------------------------------------------------------- --- Doclet that generates HTML output. This doclet generates a set of html files --- based on a group of templates. The main templates are: ---
    ---
  • index.lp: index of modules and files;
  • ---
  • file.lp: documentation for a lua file;
  • ---
  • module.lp: documentation for a lua module;
  • ---
  • function.lp: documentation for a lua function. This is a --- sub-template used by the others.
  • ---
--- --- @release $Id: html.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type = assert, getfenv, ipairs, loadstring, pairs, setfenv, tostring, tonumber, type -local io = require"io" -local posix = require "posix" -local lp = require "luadoc.lp" -local luadoc = require"luadoc" -local package = package -local string = require"string" -local table = require"table" - -module "luadoc.doclet.html" - -------------------------------------------------------------------------------- --- Looks for a file `name' in given path. Removed from compat-5.1 --- @param path String with the path. --- @param name String with the name to look for. --- @return String with the complete path of the file found --- or nil in case the file is not found. - -local function search (path, name) - for c in string.gfind(path, "[^;]+") do - c = string.gsub(c, "%?", name) - local f = io.open(c) - if f then -- file exist? - f:close() - return c - end - end - return nil -- file not found -end - -------------------------------------------------------------------------------- --- Include the result of a lp template into the current stream. - -function include (template, env) - -- template_dir is relative to package.path - local templatepath = options.template_dir .. template - - -- search using package.path (modified to search .lp instead of .lua - local search_path = string.gsub(package.path, "%.lua", "") - local templatepath = search(search_path, templatepath) - assert(templatepath, string.format("template `%s' not found", template)) - - env = env or {} - env.table = table - env.io = io - env.lp = lp - env.ipairs = ipairs - env.tonumber = tonumber - env.tostring = tostring - env.type = type - env.luadoc = luadoc - env.options = options - - return lp.include(templatepath, env) -end - -------------------------------------------------------------------------------- --- Returns a link to a html file, appending "../" to the link to make it right. --- @param html Name of the html file to link to --- @return link to the html file - -function link (html, from) - local h = html - from = from or "" - string.gsub(from, "/", function () h = "../" .. h end) - return h -end - -------------------------------------------------------------------------------- --- Returns the name of the html file to be generated from a module. --- Files with "lua" or "luadoc" extensions are replaced by "html" extension. --- @param modulename Name of the module to be processed, may be a .lua file or --- a .luadoc file. --- @return name of the generated html file for the module - -function module_link (modulename, doc, from) - -- TODO: replace "." by "/" to create directories? - -- TODO: how to deal with module names with "/"? - assert(modulename) - assert(doc) - from = from or "" - - if doc.modules[modulename] == nil then --- logger:error(string.format("unresolved reference to module `%s'", modulename)) - return - end - - local href = "modules/" .. modulename .. ".html" - string.gsub(from, "/", function () href = "../" .. href end) - return href -end - -------------------------------------------------------------------------------- --- Returns the name of the html file to be generated from a lua(doc) file. --- Files with "lua" or "luadoc" extensions are replaced by "html" extension. --- @param to Name of the file to be processed, may be a .lua file or --- a .luadoc file. --- @param from path of where am I, based on this we append ..'s to the --- beginning of path --- @return name of the generated html file - -function file_link (to, from) - assert(to) - from = from or "" - - local href = to - href = string.gsub(href, "lua$", "html") - href = string.gsub(href, "luadoc$", "html") - href = "files/" .. href - string.gsub(from, "/", function () href = "../" .. href end) - return href -end - -------------------------------------------------------------------------------- --- Returns a link to a function or to a table --- @param fname name of the function or table to link to. --- @param doc documentation table --- @param kind String specying the kinf of element to link ("functions" or "tables"). - -function link_to (fname, doc, module_doc, file_doc, from, kind) - assert(fname) - assert(doc) - from = from or "" - kind = kind or "functions" - - if file_doc then - for _, func_name in pairs(file_doc[kind]) do - if func_name == fname then - return file_link(file_doc.name, from) .. "#" .. fname - end - end - end - - if module_doc and module_doc[kind] then - for func_name, tbl in pairs(module_doc[kind]) do - if func_name == fname then - return "#" .. fname - end - end - end - - local _, _, modulename, fname = string.find(fname, "^(.-)[%.%:]?([^%.%:]*)$") - assert(fname) - - -- if fname does not specify a module, use the module_doc - if string.len(modulename) == 0 and module_doc then - modulename = module_doc.name - end - - local module_doc = doc.modules[modulename] - if not module_doc then --- logger:error(string.format("unresolved reference to function `%s': module `%s' not found", fname, modulename)) - return - end - - for _, func_name in pairs(module_doc[kind]) do - if func_name == fname then - return module_link(modulename, doc, from) .. "#" .. fname - end - end - --- logger:error(string.format("unresolved reference to function `%s' of module `%s'", fname, modulename)) -end - -------------------------------------------------------------------------------- --- Make a link to a file, module or function - -function symbol_link (symbol, doc, module_doc, file_doc, from) - assert(symbol) - assert(doc) - - local href = --- file_link(symbol, from) or - module_link(symbol, doc, from) or - link_to(symbol, doc, module_doc, file_doc, from, "functions") or - link_to(symbol, doc, module_doc, file_doc, from, "tables") - - if not href then - logger:error(string.format("unresolved reference to symbol `%s'", symbol)) - end - - return href or "" -end - -------------------------------------------------------------------------------- --- Assembly the output filename for an input file. --- TODO: change the name of this function -function out_file (filename) - local h = filename - h = string.gsub(h, "lua$", "html") - h = string.gsub(h, "luadoc$", "html") - h = "files/" .. h --- h = options.output_dir .. string.gsub (h, "^.-([%w_]+%.html)$", "%1") - h = options.output_dir .. h - return h -end - -------------------------------------------------------------------------------- --- Assembly the output filename for a module. --- TODO: change the name of this function -function out_module (modulename) - local h = modulename .. ".html" - h = "modules/" .. h - h = options.output_dir .. h - return h -end - ------------------------------------------------------------------ --- Generate the output. --- @param doc Table with the structured documentation. - -function start (doc) - -- Generate index file - if (#doc.files > 0 or #doc.modules > 0) and (not options.noindexpage) then - local filename = options.output_dir.."index.html" - logger:info(string.format("generating file `%s'", filename)) - local f = posix.open(filename, "w") - assert(f, string.format("could not open `%s' for writing", filename)) - io.output(f) - include("index.lp", { doc = doc }) - f:close() - end - - -- Process modules - if not options.nomodules then - for _, modulename in ipairs(doc.modules) do - local module_doc = doc.modules[modulename] - -- assembly the filename - local filename = out_module(modulename) - logger:info(string.format("generating file `%s'", filename)) - - local f = posix.open(filename, "w") - assert(f, string.format("could not open `%s' for writing", filename)) - io.output(f) - include("module.lp", { doc = doc, module_doc = module_doc }) - f:close() - end - end - - -- Process files - if not options.nofiles then - for _, filepath in ipairs(doc.files) do - local file_doc = doc.files[filepath] - -- assembly the filename - local filename = out_file(file_doc.name) - logger:info(string.format("generating file `%s'", filename)) - - local f = posix.open(filename, "w") - assert(f, string.format("could not open `%s' for writing", filename)) - io.output(f) - include("file.lp", { doc = doc, file_doc = file_doc} ) - f:close() - end - end - - -- copy extra files - local f = posix.open(options.output_dir.."luadoc.css", "w") - io.output(f) - include("luadoc.css") - f:close() -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/constant.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/constant.lp deleted file mode 100644 index 2e35392..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/constant.lp +++ /dev/null @@ -1,28 +0,0 @@ -<% -if module_doc then - from = "modules/"..module_doc.name -elseif file_doc then - from = "files/.."..file_doc.name -else - from = "" -end -%> - -
<%=const.private and "local " or ""%><%=const.name:gsub(".+%.","")%>
-
-<%=const.description or ""%> - -<%if type(const.see) == "string" then %> -

See also:

- <%=const.see%> -<%elseif type(const.see) == "table" and #const.see > 0 then %> -

See also:

- -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/file.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/file.lp deleted file mode 100644 index 67926b4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/file.lp +++ /dev/null @@ -1,112 +0,0 @@ - - - - Reference - - - - - -
- -
- -
-
-
- -
- - - -
- -

File <%=file_doc.name%>

- -<%if file_doc.description then%> -

<%=file_doc.description%>

-<%end%> -<%if file_doc.author then%> -

<%= #file_doc.author>1 and "Authors" or "Author" %>: - -<%for _, author in ipairs(file_doc.author) do%> - -<%end%> -
<%= author %>
-

-<%end%> -<%if file_doc.copyright then%> -

Copyright ©<%=file_doc.copyright%>

-<%end%> -<%if file_doc.release then%> -

Release: <%=file_doc.release%>

-<%end%> - -<%if #file_doc.functions > 0 then%> -

Functions

- -<%for _, func_name in ipairs(file_doc.functions) do - local func_data = file_doc.functions[func_name]%> - - - - -<%end%> -
<%=func_data.private and "local " or ""%><%=func_name%> (<%=table.concat(func_data.param, ", ")%>)<%=func_data.summary%>
-<%end%> - - -<%if #file_doc.tables > 0 then%> -

Tables

- -<%for _, tab_name in ipairs(file_doc.tables) do%> - - - - -<%end%> -
<%=tab_name%><%=file_doc.tables[tab_name].summary%>
-<%end%> - - -
-
- - - -<%if #file_doc.functions > 0 then%> -

Functions

-
-<%for _, func_name in ipairs(file_doc.functions) do%> -<%=luadoc.doclet.html.include("function.lp", { doc=doc, file_doc=file_doc, func=file_doc.functions[func_name] })%> -<%end%> -
-<%end%> - - -<%if #file_doc.tables > 0 then%> -

Tables

-
-<%for _, tab_name in ipairs(file_doc.tables) do%> -<%=luadoc.doclet.html.include("table.lp", { doc=doc, file_doc=file_doc, tab=file_doc.tables[tab_name] })%> -<%end%> -
-<%end%> - - - -
- -
- -
-

Valid XHTML 1.0!

-
- -
- - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/function.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/function.lp deleted file mode 100644 index a870ff8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/function.lp +++ /dev/null @@ -1,64 +0,0 @@ -<% -if module_doc then - from = "modules/"..module_doc.name -elseif file_doc then - from = "files/.."..file_doc.name -else - from = "" -end -%> - -
<%=func.private and "local " or ""%><%=(oop and func.name:gsub("%.",":") or func.name:gsub(".+%.",""))%> (<%=table.concat(func.param or {}, ", ")%>)
-
-<%=func.description or ""%> - -<%if type(func.param) == "table" and #func.param > 0 then%> -

Parameters

-
    - <%for p = 1, #func.param do%> -
  • - <%=func.param[p]%>: <%=func.param[func.param[p]] or ""%> -
  • - <%end%> -
-<%end%> - - -<%if type(func.usage) == "string" then%> -

Usage:

-<%=func.usage%> -<%elseif type(func.usage) == "table" then%> -

Usage

-
    - <%for _, usage in ipairs(func.usage) do%> -
  • <%= usage %> - <%end%> -
-<%end%> - -<%if type(func.ret) == "string" then%> -

Return value:

-<%=func.ret%> -<%elseif type(func.ret) == "table" then%> -

Return values:

-
    - <%for _, ret in ipairs(func.ret) do%> -
  1. <%= ret %> - <%end%> -
-<%end%> - -<%if type(func.see) == "string" then %> -

See also:

- <%=func.see%> -<%elseif type(func.see) == "table" and #func.see > 0 then %> -

See also:

- -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/index.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/index.lp deleted file mode 100644 index b4b9f5c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/index.lp +++ /dev/null @@ -1,67 +0,0 @@ - - - - Reference - " type="text/css" /> - - - - -
- -
- -
-
-
- -
- - - -
- - -<%if not options.nomodules and #doc.modules > 0 then%> -

Modules

- - -<%for _, modulename in ipairs(doc.modules) do%> - - - - -<%end%> -
<%=modulename%><%=doc.modules[modulename].summary%>
-<%end%> - - - -<%if not options.nofiles and #doc.files > 0 then%> -

Files

- - -<%for _, filepath in ipairs(doc.files) do%> - - - - -<%end%> -
<%=filepath%>
-<%end%> - -
- -
- -
-

Valid XHTML 1.0!

-
- -
- - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/luadoc.css b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/luadoc.css deleted file mode 100644 index bc0f98a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/luadoc.css +++ /dev/null @@ -1,286 +0,0 @@ -body { - margin-left: 1em; - margin-right: 1em; - font-family: arial, helvetica, geneva, sans-serif; - background-color:#ffffff; margin:0px; -} - -code { - font-family: "Andale Mono", monospace; -} - -tt { - font-family: "Andale Mono", monospace; -} - -body, td, th { font-size: 11pt; } - -h1, h2, h3, h4 { margin-left: 0em; } - -textarea, pre, tt { font-size:10pt; } -body, td, th { color:#000000; } -small { font-size:0.85em; } -h1 { font-size:1.5em; } -h2 { font-size:1.25em; } -h3 { font-size:1.15em; } -h4 { font-size:1.06em; } - -a:link { font-weight:bold; color: #004080; text-decoration: none; } -a:visited { font-weight:bold; color: #006699; text-decoration: none; } -a:link:hover { text-decoration:underline; } -hr { color:#cccccc } -img { border-width: 0px; } - - -h3 { padding-top: 1em; } - -p { margin-left: 1em; } - -p.name { - font-family: "Andale Mono", monospace; - padding-top: 1em; - margin-left: 0em; -} - -blockquote { margin-left: 3em; } - -pre.example { - background-color: rgb(245, 245, 245); - border-top-width: 1px; - border-right-width: 1px; - border-bottom-width: 1px; - border-left-width: 1px; - border-top-style: solid; - border-right-style: solid; - border-bottom-style: solid; - border-left-style: solid; - border-top-color: silver; - border-right-color: silver; - border-bottom-color: silver; - border-left-color: silver; - padding: 1em; - margin-left: 1em; - margin-right: 1em; - font-family: "Andale Mono", monospace; - font-size: smaller; -} - - -hr { - margin-left: 0em; - background: #00007f; - border: 0px; - height: 1px; -} - -ul { list-style-type: disc; } - -table.index { border: 1px #00007f; } -table.index td { text-align: left; vertical-align: top; } -table.index ul { padding-top: 0em; margin-top: 0em; } - -table { - border: 1px solid black; - border-collapse: collapse; - margin-left: auto; - margin-right: auto; -} -th { - border: 1px solid black; - padding: 0.5em; -} -td { - border: 1px solid black; - padding: 0.5em; -} -div.header, div.footer { margin-left: 0em; } - -#container -{ - margin-left: 1em; - margin-right: 1em; - background-color: #f0f0f0; -} - -#product -{ - text-align: center; - border-bottom: 1px solid #cccccc; - background-color: #ffffff; -} - -#product big { - font-size: 2em; -} - -#product_logo -{ -} - -#product_name -{ -} - -#product_description -{ -} - -#main -{ - background-color: #f0f0f0; - border-left: 2px solid #cccccc; -} - -#navigation -{ - float: left; - width: 18em; - margin: 0; - vertical-align: top; - background-color: #f0f0f0; - overflow:visible; -} - -#navigation h1 { - background-color:#e7e7e7; - font-size:1.1em; - color:#000000; - text-align:left; - margin:0px; - padding:0.2em; - border-top:1px solid #dddddd; - border-bottom:1px solid #dddddd; -} - -#navigation ul -{ - font-size:1em; - list-style-type: none; - padding: 0; - margin: 1px; -} - -#navigation li -{ - text-indent: -1em; - margin: 0em 0em 0em 0.5em; - display: block; - padding: 3px 0px 0px 12px; -} - -#navigation li li a -{ - padding: 0px 3px 0px -1em; -} - -#content -{ - margin-left: 18em; - padding: 1em; - border-left: 2px solid #cccccc; - border-right: 2px solid #cccccc; - background-color: #ffffff; -} - -#about -{ - clear: both; - margin: 0; - padding: 5px; - border-top: 2px solid #cccccc; - background-color: #ffffff; -} - -@media print { - body { - font: 12pt "Times New Roman", "TimeNR", Times, serif; - } - a { font-weight:bold; color: #004080; text-decoration: underline; } - - #main { background-color: #ffffff; border-left: 0px; } - #container { margin-left: 2%; margin-right: 2%; background-color: #ffffff; } - - #content { margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; } - - #navigation { display: none; - } - pre.example { - font-family: "Andale Mono", monospace; - font-size: 10pt; - page-break-inside: avoid; - } -} - -table.module_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.module_list td.name { background-color: #f0f0f0; } -table.module_list td.summary { width: 100%; } - -table.file_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.file_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.file_list td.name { background-color: #f0f0f0; } -table.file_list td.summary { width: 100%; } - - -table.function_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.function_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.function_list td.name { background-color: #f0f0f0; } -table.function_list td.summary { width: 100%; } - - -table.table_list -{ - border-width: 1px; - border-style: solid; - border-color: #cccccc; - border-collapse: collapse; -} -table.table_list td -{ - border-width: 1px; - padding: 3px; - border-style: solid; - border-color: #cccccc; -} -table.table_list td.name { background-color: #f0f0f0; } -table.table_list td.summary { width: 100%; } - -dl.function dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.function dd {padding-bottom: 1em;} -dl.function h3 {padding: 0; margin: 0; font-size: medium;} - -dl.table dt {border-top: 1px solid #ccc; padding-top: 1em;} -dl.table dd {padding-bottom: 1em;} -dl.table h3 {padding: 0; margin: 0; font-size: medium;} - -#TODO: make module_list, file_list, function_list, table_list inherit from a list - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/menu.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/menu.lp deleted file mode 100644 index 0fe3652..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/menu.lp +++ /dev/null @@ -1,55 +0,0 @@ -<% -if module_doc then - from = "modules/"..module_doc.name -elseif file_doc then - from = "files/.."..file_doc.name -else - from = "" -end -%> - -

LuaDoc

-
    - <%if not module_doc and not file_doc then%> -
  • Index
  • - <%else%> -
  • ">Index
  • - <%end%> -
- - - -<%if not options.nomodules and #doc.modules > 0 then%> -

Modules

-
    -<%for _, modulename in ipairs(doc.modules) do - if module_doc and module_doc.name == modulename then%> -
  • <%=modulename%>
  • - <%else%> -
  • - <%=modulename%> -
  • -<% end -end%> -
-<%end%> - - - -<%if not options.nofiles and #doc.files > 0 then%> -

Files

-
    -<%for _, filepath in ipairs(doc.files) do - if file_doc and file_doc.name == filepath then%> -
  • <%=filepath%>
  • - <%else%> -
  • - <%=filepath%> -
  • -<% end -end%> -
-<%end%> - - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/module.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/module.lp deleted file mode 100644 index daa7086..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/module.lp +++ /dev/null @@ -1,120 +0,0 @@ - - - - Reference - - - - - -
- -
- -
-
-
- -
- - - -
- -

<%=( oop and "Object Instance" or "Class" )%> <%=module_doc.name%>

- -

<%=module_doc.description%>

-<%if module_doc.author then%> -

<%= #module_doc.author>1 and "Authors" or "Author" %>: - -<%for _, author in ipairs(module_doc.author) do%> - -<%end%> -
<%= author %>
-

-<%end%> -<%if module_doc.copyright then%> -

Copyright© <%=module_doc.copyright%>

-<%end%> -<%if module_doc.release then%> -

Release: <%=module_doc.release%>

-<%end%> - -<%if #module_doc.constants > 0 then %> -

Constants

- -<%for _, const_name in ipairs(module_doc.constants) do - local const_data = module_doc.constants[const_name]%> - - - - -<%end%> -
<%=const_data.private and "local " or ""%><%=(const_name:gsub(".+%.",""))%><%=const_data.summary%>
-<%end%> - -<%if #module_doc.functions > 0 then %> -

Functions

- -<%for _, func_name in ipairs(module_doc.functions) do - local func_data = module_doc.functions[func_name]%> - - - - -<%end%> -
<%=func_data.private and "local " or ""%><%=(oop and func_name:gsub("%.",":") or func_name:gsub(".+%.",""))%> (<%=table.concat(module_doc.functions[func_name].param or {}, ", ")%>)<%=module_doc.functions[func_name].summary%>
-<%end%> - - -<%if #module_doc.tables > 0 then%> -

Tables

- -<%for _, tab_name in ipairs(module_doc.tables) do%> - - - - -<%end%> -
<%=tab_name%><%=module_doc.tables[tab_name].summary%>
-<%end%> - - -
-
- -<%if #module_doc.functions > 0 then%> -

Functions

-
-<%for _, func_name in ipairs(module_doc.functions) do%> -<%=luadoc.doclet.html.include("function.lp", { doc=doc, module_doc=module_doc, func=module_doc.functions[func_name], oop=oop })%> -<%end%> -
-<%end%> - -<%if #module_doc.tables > 0 then%> -

Tables

-
-<%for _, tab_name in ipairs(module_doc.tables) do%> -<%=luadoc.doclet.html.include("table.lp", { doc=doc, module_doc=module_doc, tab=module_doc.tables[tab_name] })%> -<%end%> -
-<%end%> - - -
- -
- -
-

Valid XHTML 1.0!

-
- -
- - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/table.lp b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/table.lp deleted file mode 100644 index 5cd0239..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/html/table.lp +++ /dev/null @@ -1,15 +0,0 @@ -
<%=tab.name%>
-
<%=tab.description%> - -<%if type(tab.field) == "table" and #tab.field > 0 then%> -Fields -
    - <%for p = 1, #tab.field do%> -
  • - <%=tab.field[p]%>: <%=tab.field[tab.field[p]] or ""%> -
  • - <%end%> -
-<%end%> - -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/raw.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/raw.lua deleted file mode 100644 index 6c8ba6f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/doclet/raw.lua +++ /dev/null @@ -1,12 +0,0 @@ ------------------------------------------------------------------ --- @release $Id: raw.lua 3941 2008-12-23 21:39:38Z jow $ ------------------------------------------------------------------ - -module "luadoc.doclet.raw" - ------------------------------------------------------------------ --- Generate the output. --- @param doc Table with the structured documentation. - -function start (doc) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/init.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/init.lua deleted file mode 100644 index dedf379..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/init.lua +++ /dev/null @@ -1,50 +0,0 @@ -------------------------------------------------------------------------------- --- LuaDoc main function. --- @release $Id: init.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local require = require - -local util = require "luadoc.util" - -logger = {} - -module ("luadoc") - -------------------------------------------------------------------------------- --- LuaDoc version number. - -_COPYRIGHT = "Copyright (c) 2003-2007 The Kepler Project" -_DESCRIPTION = "Documentation Generator Tool for the Lua language" -_VERSION = "LuaDoc 3.0.1" - -------------------------------------------------------------------------------- --- Main function --- @see luadoc.doclet.html, luadoc.doclet.formatter, luadoc.doclet.raw --- @see luadoc.taglet.standard - -function main (files, options) - logger = util.loadlogengine(options) - - -- load config file - if options.config ~= nil then - -- load specified config file - dofile(options.config) - else - -- load default config file - require("luadoc.config") - end - - local taglet = require(options.taglet) - local doclet = require(options.doclet) - - -- analyze input - taglet.options = options - taglet.logger = logger - local doc = taglet.start(files) - - -- generate output - doclet.options = options - doclet.logger = logger - doclet.start(doc) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/lp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/lp.lua deleted file mode 100644 index f880ab7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/lp.lua +++ /dev/null @@ -1,130 +0,0 @@ ----------------------------------------------------------------------------- --- Lua Pages Template Preprocessor. --- --- @release $Id: lp.lua 3941 2008-12-23 21:39:38Z jow $ ----------------------------------------------------------------------------- - -local assert, error, getfenv, loadstring, setfenv = assert, error, getfenv, loadstring, setfenv -local find, format, gsub, strsub = string.find, string.format, string.gsub, string.sub -local concat, tinsert = table.concat, table.insert -local open = io.open - -module (...) - ----------------------------------------------------------------------------- --- function to do output -local outfunc = "io.write" --- accepts the old expression field: `$| |$' -local compatmode = true - --- --- Builds a piece of Lua code which outputs the (part of the) given string. --- @param s String. --- @param i Number with the initial position in the string. --- @param f Number with the final position in the string (default == -1). --- @return String with the correspondent Lua code which outputs the part of the string. --- -local function out (s, i, f) - s = strsub(s, i, f or -1) - if s == "" then return s end - -- we could use `%q' here, but this way we have better control - s = gsub(s, "([\\\n\'])", "\\%1") - -- substitute '\r' by '\'+'r' and let `loadstring' reconstruct it - s = gsub(s, "\r", "\\r") - return format(" %s('%s'); ", outfunc, s) -end - - ----------------------------------------------------------------------------- --- Translate the template to Lua code. --- @param s String to translate. --- @return String with translated code. ----------------------------------------------------------------------------- -function translate (s) - if compatmode then - s = gsub(s, "$|(.-)|%$", "") - s = gsub(s, "", "") - end - s = gsub(s, "<%%(.-)%%>", "") - local res = {} - local start = 1 -- start of untranslated part in `s' - while true do - local ip, fp, target, exp, code = find(s, "<%?(%w*)[ \t]*(=?)(.-)%?>", start) - if not ip then break end - tinsert(res, out(s, start, ip-1)) - if target ~= "" and target ~= "lua" then - -- not for Lua; pass whole instruction to the output - tinsert(res, out(s, ip, fp)) - else - if exp == "=" then -- expression? - tinsert(res, format(" %s(%s);", outfunc, code)) - else -- command - tinsert(res, format(" %s ", code)) - end - end - start = fp + 1 - end - tinsert(res, out(s, start)) - return concat(res) -end - - ----------------------------------------------------------------------------- --- Defines the name of the output function. --- @param f String with the name of the function which produces output. - -function setoutfunc (f) - outfunc = f -end - ----------------------------------------------------------------------------- --- Turns on or off the compatibility with old CGILua 3.X behavior. --- @param c Boolean indicating if the compatibility mode should be used. - -function setcompatmode (c) - compatmode = c -end - ----------------------------------------------------------------------------- --- Internal compilation cache. - -local cache = {} - ----------------------------------------------------------------------------- --- Translates a template into a Lua function. --- Does NOT execute the resulting function. --- Uses a cache of templates. --- @param string String with the template to be translated. --- @param chunkname String with the name of the chunk, for debugging purposes. --- @return Function with the resulting translation. - -function compile (string, chunkname) - local f, err = cache[string] - if f then return f end - f, err = loadstring (translate (string), chunkname) - if not f then error (err, 3) end - cache[string] = f - return f -end - ----------------------------------------------------------------------------- --- Translates and executes a template in a given file. --- The translation creates a Lua function which will be executed in an --- optionally given environment. --- @param filename String with the name of the file containing the template. --- @param env Table with the environment to run the resulting function. - -function include (filename, env) - -- read the whole contents of the file - local fh = assert (open (filename)) - local src = fh:read("*a") - fh:close() - -- translates the file into a function - local prog = compile (src, '@'..filename) - local _env - if env then - _env = getfenv (prog) - setfenv (prog, env) - end - prog () -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard.lua deleted file mode 100644 index d4654b7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard.lua +++ /dev/null @@ -1,565 +0,0 @@ -------------------------------------------------------------------------------- --- @release $Id: standard.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local assert, pairs, tostring, type = assert, pairs, tostring, type -local io = require "io" -local posix = require "posix" -local luadoc = require "luadoc" -local util = require "luadoc.util" -local tags = require "luadoc.taglet.standard.tags" -local string = require "string" -local table = require "table" - -module 'luadoc.taglet.standard' - -------------------------------------------------------------------------------- --- Creates an iterator for an array base on a class type. --- @param t array to iterate over --- @param class name of the class to iterate over - -function class_iterator (t, class) - return function () - local i = 1 - return function () - while t[i] and t[i].class ~= class do - i = i + 1 - end - local v = t[i] - i = i + 1 - return v - end - end -end - --- Patterns for function recognition -local identifiers_list_pattern = "%s*(.-)%s*" -local identifier_pattern = "[^%(%s]+" -local function_patterns = { - "^()%s*function%s*("..identifier_pattern..")%s*%("..identifiers_list_pattern.."%)", - "^%s*(local%s)%s*function%s*("..identifier_pattern..")%s*%("..identifiers_list_pattern.."%)", - "^()%s*("..identifier_pattern..")%s*%=%s*function%s*%("..identifiers_list_pattern.."%)", -} - -------------------------------------------------------------------------------- --- Checks if the line contains a function definition --- @param line string with line text --- @return function information or nil if no function definition found - -local function check_function (line) - line = util.trim(line) - - local info = table.foreachi(function_patterns, function (_, pattern) - local r, _, l, id, param = string.find(line, pattern) - if r ~= nil then - return { - name = id, - private = (l == "local"), - param = { } --util.split("%s*,%s*", param), - } - end - end) - - -- TODO: remove these assert's? - if info ~= nil then - assert(info.name, "function name undefined") - assert(info.param, string.format("undefined parameter list for function `%s'", info.name)) - end - - return info -end - -------------------------------------------------------------------------------- --- Checks if the line contains a module definition. --- @param line string with line text --- @param currentmodule module already found, if any --- @return the name of the defined module, or nil if there is no module --- definition - -local function check_module (line, currentmodule) - line = util.trim(line) - - -- module"x.y" - -- module'x.y' - -- module[[x.y]] - -- module("x.y") - -- module('x.y') - -- module([[x.y]]) - -- module(...) - - local r, _, modulename = string.find(line, "^module%s*[%s\"'(%[]+([^,\"')%]]+)") - if r then - -- found module definition - logger:debug(string.format("found module `%s'", modulename)) - return modulename - end - return currentmodule -end - --- Patterns for constant recognition -local constant_patterns = { - "^()%s*([A-Z][A-Z0-9_]*)%s*=", - "^%s*(local%s)%s*([A-Z][A-Z0-9_]*)%s*=", -} - -------------------------------------------------------------------------------- --- Checks if the line contains a constant definition --- @param line string with line text --- @return constant information or nil if no constant definition found - -local function check_constant (line) - line = util.trim(line) - - local info = table.foreachi(constant_patterns, function (_, pattern) - local r, _, l, id = string.find(line, pattern) - if r ~= nil then - return { - name = id, - private = (l == "local"), - } - end - end) - - -- TODO: remove these assert's? - if info ~= nil then - assert(info.name, "constant name undefined") - end - - return info -end - -------------------------------------------------------------------------------- --- Extracts summary information from a description. The first sentence of each --- doc comment should be a summary sentence, containing a concise but complete --- description of the item. It is important to write crisp and informative --- initial sentences that can stand on their own --- @param description text with item description --- @return summary string or nil if description is nil - -local function parse_summary (description) - -- summary is never nil... - description = description or "" - - -- append an " " at the end to make the pattern work in all cases - description = description.." " - - -- read until the first period followed by a space or tab - local summary = string.match(description, "(.-%.)[%s\t]") - - -- if pattern did not find the first sentence, summary is the whole description - summary = summary or description - - return summary -end - -------------------------------------------------------------------------------- --- @param f file handle --- @param line current line being parsed --- @param modulename module already found, if any --- @return current line --- @return code block --- @return modulename if found - -local function parse_code (f, line, modulename) - local code = {} - while line ~= nil do - if string.find(line, "^[\t ]*%-%-%-") then - -- reached another luadoc block, end this parsing - return line, code, modulename - else - -- look for a module definition - modulename = check_module(line, modulename) - - table.insert(code, line) - line = f:read() - end - end - -- reached end of file - return line, code, modulename -end - -------------------------------------------------------------------------------- --- Parses the information inside a block comment --- @param block block with comment field --- @return block parameter - -local function parse_comment (block, first_line, modulename) - - -- get the first non-empty line of code - local code = table.foreachi(block.code, function(_, line) - if not util.line_empty(line) then - -- `local' declarations are ignored in two cases: - -- when the `nolocals' option is turned on; and - -- when the first block of a file is parsed (this is - -- necessary to avoid confusion between the top - -- local declarations and the `module' definition. - if (options.nolocals or first_line) and line:find"^%s*local" then - return - end - return line - end - end) - - -- parse first line of code - if code ~= nil then - local func_info = check_function(code) - local module_name = check_module(code) - local const_info = check_constant(code) - if func_info then - block.class = "function" - block.name = func_info.name - block.param = func_info.param - block.private = func_info.private - elseif const_info then - block.class = "constant" - block.name = const_info.name - block.private = const_info.private - elseif module_name then - block.class = "module" - block.name = module_name - block.param = {} - else - block.param = {} - end - else - -- TODO: comment without any code. Does this means we are dealing - -- with a file comment? - end - - -- parse @ tags - local currenttag = "description" - local currenttext - - table.foreachi(block.comment, function (_, line) - line = util.trim_comment(line) - - local r, _, tag, text = string.find(line, "@([_%w%.]+)%s+(.*)") - if r ~= nil then - -- found new tag, add previous one, and start a new one - -- TODO: what to do with invalid tags? issue an error? or log a warning? - tags.handle(currenttag, block, currenttext) - - currenttag = tag - currenttext = text - else - currenttext = util.concat(currenttext, line) - assert(string.sub(currenttext, 1, 1) ~= " ", string.format("`%s', `%s'", currenttext, line)) - end - end) - tags.handle(currenttag, block, currenttext) - - -- extracts summary information from the description - block.summary = parse_summary(block.description) - assert(string.sub(block.description, 1, 1) ~= " ", string.format("`%s'", block.description)) - - if block.name and block.class == "module" then - modulename = block.name - end - - return block, modulename -end - -------------------------------------------------------------------------------- --- Parses a block of comment, started with ---. Read until the next block of --- comment. --- @param f file handle --- @param line being parsed --- @param modulename module already found, if any --- @return line --- @return block parsed --- @return modulename if found - -local function parse_block (f, line, modulename, first) - local block = { - comment = {}, - code = {}, - } - - while line ~= nil do - if string.find(line, "^[\t ]*%-%-") == nil then - -- reached end of comment, read the code below it - -- TODO: allow empty lines - line, block.code, modulename = parse_code(f, line, modulename) - - -- parse information in block comment - block, modulename = parse_comment(block, first, modulename) - - return line, block, modulename - else - table.insert(block.comment, line) - line = f:read() - end - end - -- reached end of file - - -- parse information in block comment - block, modulename = parse_comment(block, first, modulename) - - return line, block, modulename -end - -------------------------------------------------------------------------------- --- Parses a file documented following luadoc format. --- @param filepath full path of file to parse --- @param doc table with documentation --- @return table with documentation - -function parse_file (filepath, doc, handle, prev_line, prev_block, prev_modname) - local blocks = { prev_block } - local modulename = prev_modname - - -- read each line - local f = handle or io.open(filepath, "r") - local i = 1 - local line = prev_line or f:read() - local first = true - while line ~= nil do - - if string.find(line, "^[\t ]*%-%-%-") then - -- reached a luadoc block - local block, newmodname - line, block, newmodname = parse_block(f, line, modulename, first) - - if modulename and newmodname and newmodname ~= modulename then - doc = parse_file( nil, doc, f, line, block, newmodname ) - else - table.insert(blocks, block) - modulename = newmodname - end - else - -- look for a module definition - local newmodname = check_module(line, modulename) - - if modulename and newmodname and newmodname ~= modulename then - parse_file( nil, doc, f ) - else - modulename = newmodname - end - - -- TODO: keep beginning of file somewhere - - line = f:read() - end - first = false - i = i + 1 - end - - if not handle then - f:close() - end - - if filepath then - -- store blocks in file hierarchy - assert(doc.files[filepath] == nil, string.format("doc for file `%s' already defined", filepath)) - table.insert(doc.files, filepath) - doc.files[filepath] = { - type = "file", - name = filepath, - doc = blocks, - -- functions = class_iterator(blocks, "function"), - -- tables = class_iterator(blocks, "table"), - } - -- - local first = doc.files[filepath].doc[1] - if first and modulename then - doc.files[filepath].author = first.author - doc.files[filepath].copyright = first.copyright - doc.files[filepath].description = first.description - doc.files[filepath].release = first.release - doc.files[filepath].summary = first.summary - end - end - - -- if module definition is found, store in module hierarchy - if modulename ~= nil then - if modulename == "..." then - assert( filepath, "Can't determine name for virtual module from filepatch" ) - modulename = string.gsub (filepath, "%.lua$", "") - modulename = string.gsub (modulename, "/", ".") - end - if doc.modules[modulename] ~= nil then - -- module is already defined, just add the blocks - table.foreachi(blocks, function (_, v) - table.insert(doc.modules[modulename].doc, v) - end) - else - -- TODO: put this in a different module - table.insert(doc.modules, modulename) - doc.modules[modulename] = { - type = "module", - name = modulename, - doc = blocks, --- functions = class_iterator(blocks, "function"), --- tables = class_iterator(blocks, "table"), - author = first and first.author, - copyright = first and first.copyright, - description = "", - release = first and first.release, - summary = "", - } - - -- find module description - for m in class_iterator(blocks, "module")() do - doc.modules[modulename].description = util.concat( - doc.modules[modulename].description, - m.description) - doc.modules[modulename].summary = util.concat( - doc.modules[modulename].summary, - m.summary) - if m.author then - doc.modules[modulename].author = m.author - end - if m.copyright then - doc.modules[modulename].copyright = m.copyright - end - if m.release then - doc.modules[modulename].release = m.release - end - if m.name then - doc.modules[modulename].name = m.name - end - end - doc.modules[modulename].description = doc.modules[modulename].description or (first and first.description) or "" - doc.modules[modulename].summary = doc.modules[modulename].summary or (first and first.summary) or "" - end - - -- make functions table - doc.modules[modulename].functions = {} - for f in class_iterator(blocks, "function")() do - if f and f.name then - table.insert(doc.modules[modulename].functions, f.name) - doc.modules[modulename].functions[f.name] = f - end - end - - -- make tables table - doc.modules[modulename].tables = {} - for t in class_iterator(blocks, "table")() do - if t and t.name then - table.insert(doc.modules[modulename].tables, t.name) - doc.modules[modulename].tables[t.name] = t - end - end - - -- make constants table - doc.modules[modulename].constants = {} - for c in class_iterator(blocks, "constant")() do - if c and c.name then - table.insert(doc.modules[modulename].constants, c.name) - doc.modules[modulename].constants[c.name] = c - end - end - end - - if filepath then - -- make functions table - doc.files[filepath].functions = {} - for f in class_iterator(blocks, "function")() do - if f and f.name then - table.insert(doc.files[filepath].functions, f.name) - doc.files[filepath].functions[f.name] = f - end - end - - -- make tables table - doc.files[filepath].tables = {} - for t in class_iterator(blocks, "table")() do - if t and t.name then - table.insert(doc.files[filepath].tables, t.name) - doc.files[filepath].tables[t.name] = t - end - end - end - - return doc -end - -------------------------------------------------------------------------------- --- Checks if the file is terminated by ".lua" or ".luadoc" and calls the --- function that does the actual parsing --- @param filepath full path of the file to parse --- @param doc table with documentation --- @return table with documentation --- @see parse_file - -function file (filepath, doc) - local patterns = { "%.lua$", "%.luadoc$" } - local valid = table.foreachi(patterns, function (_, pattern) - if string.find(filepath, pattern) ~= nil then - return true - end - end) - - if valid then - logger:info(string.format("processing file `%s'", filepath)) - doc = parse_file(filepath, doc) - end - - return doc -end - -------------------------------------------------------------------------------- --- Recursively iterates through a directory, parsing each file --- @param path directory to search --- @param doc table with documentation --- @return table with documentation - -function directory (path, doc) - for f in posix.files(path) do - local fullpath = path .. "/" .. f - local attr = posix.stat(fullpath) - assert(attr, string.format("error stating file `%s'", fullpath)) - - if attr.type == "regular" then - doc = file(fullpath, doc) - elseif attr.type == "directory" and f ~= "." and f ~= ".." then - doc = directory(fullpath, doc) - end - end - return doc -end - --- Recursively sorts the documentation table -local function recsort (tab) - table.sort (tab) - -- sort list of functions by name alphabetically - for f, doc in pairs(tab) do - if doc.functions then - table.sort(doc.functions) - end - if doc.tables then - table.sort(doc.tables) - end - end -end - -------------------------------------------------------------------------------- - -function start (files, doc) - assert(files, "file list not specified") - - -- Create an empty document, or use the given one - doc = doc or { - files = {}, - modules = {}, - } - assert(doc.files, "undefined `files' field") - assert(doc.modules, "undefined `modules' field") - - table.foreachi(files, function (_, path) - local attr = posix.stat(path) - assert(attr, string.format("error stating path `%s'", path)) - - if attr.type == "regular" then - doc = file(path, doc) - elseif attr.type == "directory" then - doc = directory(path, doc) - end - end) - - -- order arrays alphabetically - recsort(doc.files) - recsort(doc.modules) - - return doc -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard/tags.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard/tags.lua deleted file mode 100644 index 293e186..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/taglet/standard/tags.lua +++ /dev/null @@ -1,178 +0,0 @@ -------------------------------------------------------------------------------- --- Handlers for several tags --- @release $Id: tags.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local luadoc = require "luadoc" -local util = require "luadoc.util" -local string = require "string" -local table = require "table" -local assert, type, tostring = assert, type, tostring - -module "luadoc.taglet.standard.tags" - -------------------------------------------------------------------------------- - -local function author (tag, block, text) - block[tag] = block[tag] or {} - if not text then - luadoc.logger:warn("author `name' not defined [["..text.."]]: skipping") - return - end - table.insert (block[tag], text) -end - -------------------------------------------------------------------------------- --- Set the class of a comment block. Classes can be "module", "function", --- "table". The first two classes are automatic, extracted from the source code - -local function class (tag, block, text) - block[tag] = text -end - -------------------------------------------------------------------------------- - -local function cstyle (tag, block, text) - block[tag] = text -end - -------------------------------------------------------------------------------- - -local function copyright (tag, block, text) - block[tag] = text -end - -------------------------------------------------------------------------------- - -local function description (tag, block, text) - block[tag] = text -end - -------------------------------------------------------------------------------- - -local function field (tag, block, text) - if block["class"] ~= "table" then - luadoc.logger:warn("documenting `field' for block that is not a `table'") - end - block[tag] = block[tag] or {} - - local _, _, name, desc = string.find(text, "^([_%w%.]+)%s+(.*)") - assert(name, "field name not defined") - - table.insert(block[tag], name) - block[tag][name] = desc -end - -------------------------------------------------------------------------------- --- Set the name of the comment block. If the block already has a name, issue --- an error and do not change the previous value - -local function name (tag, block, text) - if block[tag] and block[tag] ~= text then - luadoc.logger:error(string.format("block name conflict: `%s' -> `%s'", block[tag], text)) - end - - block[tag] = text -end - -------------------------------------------------------------------------------- --- Processes a parameter documentation. --- @param tag String with the name of the tag (it must be "param" always). --- @param block Table with previous information about the block. --- @param text String with the current line beeing processed. - -local function param (tag, block, text) - block[tag] = block[tag] or {} - -- TODO: make this pattern more flexible, accepting empty descriptions - local _, _, name, desc = string.find(text, "^([_%w%.]+)%s+(.*)") - if not name then - luadoc.logger:warn("parameter `name' not defined [["..text.."]]: skipping") - return - end - local i = table.foreachi(block[tag], function (i, v) - if v == name then - return i - end - end) - if i == nil then - luadoc.logger:warn(string.format("documenting undefined parameter `%s'", name)) - table.insert(block[tag], name) - end - block[tag][name] = desc -end - -------------------------------------------------------------------------------- - -local function release (tag, block, text) - block[tag] = text -end - -------------------------------------------------------------------------------- - -local function ret (tag, block, text) - tag = "ret" - if type(block[tag]) == "string" then - block[tag] = { block[tag], text } - elseif type(block[tag]) == "table" then - table.insert(block[tag], text) - else - block[tag] = text - end -end - -------------------------------------------------------------------------------- --- @see ret - -local function see (tag, block, text) - -- see is always an array - block[tag] = block[tag] or {} - - -- remove trailing "." - text = string.gsub(text, "(.*)%.$", "%1") - - local s = util.split("%s*,%s*", text) - - table.foreachi(s, function (_, v) - table.insert(block[tag], v) - end) -end - -------------------------------------------------------------------------------- --- @see ret - -local function usage (tag, block, text) - if type(block[tag]) == "string" then - block[tag] = { block[tag], text } - elseif type(block[tag]) == "table" then - table.insert(block[tag], text) - else - block[tag] = text - end -end - -------------------------------------------------------------------------------- - -local handlers = {} -handlers["author"] = author -handlers["class"] = class -handlers["cstyle"] = cstyle -handlers["copyright"] = copyright -handlers["description"] = description -handlers["field"] = field -handlers["name"] = name -handlers["param"] = param -handlers["release"] = release -handlers["return"] = ret -handlers["see"] = see -handlers["usage"] = usage - -------------------------------------------------------------------------------- - -function handle (tag, block, text) - if not handlers[tag] then - luadoc.logger:error(string.format("undefined handler for tag `%s'", tag)) - return - end --- assert(handlers[tag], string.format("undefined handler for tag `%s'", tag)) - return handlers[tag](tag, block, text) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/util.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/util.lua deleted file mode 100644 index 21470f5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luadoc/util.lua +++ /dev/null @@ -1,201 +0,0 @@ -------------------------------------------------------------------------------- --- General utilities. --- @release $Id: util.lua 3941 2008-12-23 21:39:38Z jow $ -------------------------------------------------------------------------------- - -local posix = require "posix" -local type, table, string, io, assert, tostring, setmetatable, pcall = type, table, string, io, assert, tostring, setmetatable, pcall - -------------------------------------------------------------------------------- --- Module with several utilities that could not fit in a specific module - -module "luadoc.util" - -------------------------------------------------------------------------------- --- Removes spaces from the begining and end of a given string --- @param s string to be trimmed --- @return trimmed string - -function trim (s) - return (string.gsub(s, "^%s*(.-)%s*$", "%1")) -end - -------------------------------------------------------------------------------- --- Removes spaces from the begining and end of a given string, considering the --- string is inside a lua comment. --- @param s string to be trimmed --- @return trimmed string --- @see trim --- @see string.gsub - -function trim_comment (s) - s = string.gsub(s, "%-%-+(.*)$", "%1") - return trim(s) -end - -------------------------------------------------------------------------------- --- Checks if a given line is empty --- @param line string with a line --- @return true if line is empty, false otherwise - -function line_empty (line) - return (string.len(trim(line)) == 0) -end - -------------------------------------------------------------------------------- --- Appends two string, but if the first one is nil, use to second one --- @param str1 first string, can be nil --- @param str2 second string --- @return str1 .. " " .. str2, or str2 if str1 is nil - -function concat (str1, str2) - if str1 == nil or string.len(str1) == 0 then - return str2 - else - return str1 .. " " .. str2 - end -end - -------------------------------------------------------------------------------- --- Split text into a list consisting of the strings in text, --- separated by strings matching delim (which may be a pattern). --- @param delim if delim is "" then action is the same as %s+ except that --- field 1 may be preceeded by leading whitespace --- @usage split(",%s*", "Anna, Bob, Charlie,Dolores") --- @usage split(""," x y") gives {"x","y"} --- @usage split("%s+"," x y") gives {"", "x","y"} --- @return array with strings --- @see table.concat - -function split(delim, text) - local list = {} - if string.len(text) > 0 then - delim = delim or "" - local pos = 1 - -- if delim matches empty string then it would give an endless loop - if string.find("", delim, 1) and delim ~= "" then - error("delim matches empty string!") - end - local first, last - while 1 do - if delim ~= "" then - first, last = string.find(text, delim, pos) - else - first, last = string.find(text, "%s+", pos) - if first == 1 then - pos = last+1 - first, last = string.find(text, "%s+", pos) - end - end - if first then -- found? - table.insert(list, string.sub(text, pos, first-1)) - pos = last+1 - else - table.insert(list, string.sub(text, pos)) - break - end - end - end - return list -end - -------------------------------------------------------------------------------- --- Comments a paragraph. --- @param text text to comment with "--", may contain several lines --- @return commented text - -function comment (text) - text = string.gsub(text, "\n", "\n-- ") - return "-- " .. text -end - -------------------------------------------------------------------------------- --- Wrap a string into a paragraph. --- @param s string to wrap --- @param w width to wrap to [80] --- @param i1 indent of first line [0] --- @param i2 indent of subsequent lines [0] --- @return wrapped paragraph - -function wrap(s, w, i1, i2) - w = w or 80 - i1 = i1 or 0 - i2 = i2 or 0 - assert(i1 < w and i2 < w, "the indents must be less than the line width") - s = string.rep(" ", i1) .. s - local lstart, len = 1, string.len(s) - while len - lstart > w do - local i = lstart + w - while i > lstart and string.sub(s, i, i) ~= " " do i = i - 1 end - local j = i - while j > lstart and string.sub(s, j, j) == " " do j = j - 1 end - s = string.sub(s, 1, j) .. "\n" .. string.rep(" ", i2) .. - string.sub(s, i + 1, -1) - local change = i2 + 1 - (i - j) - lstart = j + change - len = len + change - end - return s -end - -------------------------------------------------------------------------------- --- Opens a file, creating the directories if necessary --- @param filename full path of the file to open (or create) --- @param mode mode of opening --- @return file handle - -function posix.open (filename, mode) - local f = io.open(filename, mode) - if f == nil then - filename = string.gsub(filename, "\\", "/") - local dir = "" - for d in string.gfind(filename, ".-/") do - dir = dir .. d - posix.mkdir(dir) - end - f = io.open(filename, mode) - end - return f -end - - ----------------------------------------------------------------------------------- --- Creates a Logger with LuaLogging, if present. Otherwise, creates a mock logger. --- @param options a table with options for the logging mechanism --- @return logger object that will implement log methods - -function loadlogengine(options) - local logenabled = pcall(function() - require "logging" - require "logging.console" - end) - - local logging = logenabled and logging - - if logenabled then - if options.filelog then - logger = logging.file("luadoc.log") -- use this to get a file log - else - logger = logging.console("[%level] %message\n") - end - - if options.verbose then - logger:setLevel(logging.INFO) - else - logger:setLevel(logging.WARN) - end - - else - noop = {__index=function(...) - return function(...) - -- noop - end - end} - - logger = {} - setmetatable(logger, noop) - end - - return logger -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cacheloader.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cacheloader.lua deleted file mode 100644 index 1cdf534..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cacheloader.lua +++ /dev/null @@ -1,23 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: cacheloader.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -local config = require "luci.config" -local ccache = require "luci.ccache" - -module "luci.cacheloader" - -if config.ccache and config.ccache.enable == "1" then - ccache.cache_ondemand() -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cbi.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cbi.lua deleted file mode 100644 index d332603..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/cbi.lua +++ /dev/null @@ -1,1621 +0,0 @@ ---[[ -LuCI - Configuration Bind Interface - -Description: -Offers an interface for binding configuration values to certain -data types. Supports value and range validation and basic dependencies. - -FileId: -$Id: cbi.lua 4102 2009-01-20 00:54:28Z jow $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -module("luci.cbi", package.seeall) - -require("luci.template") -local util = require("luci.util") -require("luci.http") -require("luci.uvl") -require("luci.fs") - ---local event = require "luci.sys.event" -local uci = require("luci.model.uci") -local class = util.class -local instanceof = util.instanceof - -FORM_NODATA = 0 -FORM_PROCEED = 0 -FORM_VALID = 1 -FORM_INVALID = -1 -FORM_CHANGED = 2 - -AUTO = true - -CREATE_PREFIX = "cbi.cts." -REMOVE_PREFIX = "cbi.rts." - --- Loads a CBI map from given file, creating an environment and returns it -function load(cbimap, ...) - require("luci.fs") - local i18n = require "luci.i18n" - require("luci.config") - require("luci.util") - - local upldir = "/lib/uci/upload/" - local cbidir = luci.util.libpath() .. "/model/cbi/" - - assert(luci.fs.stat(cbimap) or luci.fs.stat(cbidir..cbimap..".lua"), - "Model not found!") - - local func, err = loadfile(cbimap) - if not func then - func, err = loadfile(cbidir..cbimap..".lua") - end - assert(func, err) - - luci.i18n.loadc("cbi") - luci.i18n.loadc("uvl") - - local env = { - translate=i18n.translate, - translatef=i18n.translatef, - arg={...} - } - - setfenv(func, setmetatable(env, {__index = - function(tbl, key) - return rawget(tbl, key) or _M[key] or _G[key] - end})) - - local maps = { func() } - local uploads = { } - local has_upload = false - - for i, map in ipairs(maps) do - if not instanceof(map, Node) then - error("CBI map returns no valid map object!") - return nil - else - map:prepare() - if map.upload_fields then - has_upload = true - for _, field in ipairs(map.upload_fields) do - uploads[ - field.config .. '.' .. - field.section.sectiontype .. '.' .. - field.option - ] = true - end - end - end - end - - if has_upload then - local uci = luci.model.uci.cursor() - local prm = luci.http.context.request.message.params - local fd, cbid - - luci.http.setfilehandler( - function( field, chunk, eof ) - if not field then return end - if field.name and not cbid then - local c, s, o = field.name:gmatch( - "cbid%.([^%.]+)%.([^%.]+)%.([^%.]+)" - )() - - if c and s and o then - local t = uci:get( c, s ) - if t and uploads[c.."."..t.."."..o] then - local path = upldir .. field.name - fd = io.open(path, "w") - if fd then - cbid = field.name - prm[cbid] = path - end - end - end - end - - if field.name == cbid and fd then - fd:write(chunk) - end - - if eof and fd then - fd:close() - fd = nil - cbid = nil - end - end - ) - end - - return maps -end - -local function _uvl_validate_section(node, name) - local co = node.map:get() - - luci.uvl.STRICT_UNKNOWN_OPTIONS = false - luci.uvl.STRICT_UNKNOWN_SECTIONS = false - - local function tag_fields(e) - if e.option and node.fields[e.option] then - if node.fields[e.option].error then - node.fields[e.option].error[name] = e - else - node.fields[e.option].error = { [name] = e } - end - elseif e.childs then - for _, c in ipairs(e.childs) do tag_fields(c) end - end - end - - local function tag_section(e) - local s = { } - for _, c in ipairs(e.childs) do - if c.childs and not c:is(luci.uvl.errors.ERR_DEPENDENCY) then - table.insert( s, c.childs[1]:string() ) - else - table.insert( s, c:string() ) - end - end - if #s > 0 then - if node.error then - node.error[name] = s - else - node.error = { [name] = s } - end - end - end - - local stat, err = node.map.validator:validate_section(node.config, name, co) - if err then - node.map.save = false - tag_fields(err) - tag_section(err) - end - -end - -local function _uvl_strip_remote_dependencies(deps) - local clean = {} - - for k, v in pairs(deps) do - k = k:gsub("%$config%.%$section%.", "") - if k:match("^[%w_]+$") and type(v) == "string" then - clean[k] = v - end - end - - return clean -end - - --- Node pseudo abstract class -Node = class() - -function Node.__init__(self, title, description) - self.children = {} - self.title = title or "" - self.description = description or "" - self.template = "cbi/node" -end - --- i18n helper -function Node._i18n(self, config, section, option, title, description) - - -- i18n loaded? - if type(luci.i18n) == "table" then - - local key = config and config:gsub("[^%w]+", "") or "" - - if section then key = key .. "_" .. section:lower():gsub("[^%w]+", "") end - if option then key = key .. "_" .. tostring(option):lower():gsub("[^%w]+", "") end - - self.title = title or luci.i18n.translate( key, option or section or config ) - self.description = description or luci.i18n.translate( key .. "_desc", "" ) - end -end - --- Prepare nodes -function Node.prepare(self, ...) - for k, child in ipairs(self.children) do - child:prepare(...) - end -end - --- Append child nodes -function Node.append(self, obj) - table.insert(self.children, obj) -end - --- Parse this node and its children -function Node.parse(self, ...) - for k, child in ipairs(self.children) do - child:parse(...) - end -end - --- Render this node -function Node.render(self, scope) - scope = scope or {} - scope.self = self - - luci.template.render(self.template, scope) -end - --- Render the children -function Node.render_children(self, ...) - for k, node in ipairs(self.children) do - node:render(...) - end -end - - ---[[ -A simple template element -]]-- -Template = class(Node) - -function Template.__init__(self, template) - Node.__init__(self) - self.template = template -end - -function Template.render(self) - luci.template.render(self.template, {self=self}) -end - - ---[[ -Map - A map describing a configuration file -]]-- -Map = class(Node) - -function Map.__init__(self, config, ...) - Node.__init__(self, ...) - Node._i18n(self, config, nil, nil, ...) - - self.config = config - self.parsechain = {self.config} - self.template = "cbi/map" - self.apply_on_parse = nil - self.readinput = true - - self.uci = uci.cursor() - self.save = true - - self.changed = false - - if not self.uci:load(self.config) then - error("Unable to read UCI data: " .. self.config) - end - - self.validator = luci.uvl.UVL() - self.scheme = self.validator:get_scheme(self.config) - -end - -function Map.formvalue(self, key) - return self.readinput and luci.http.formvalue(key) -end - -function Map.formvaluetable(self, key) - return self.readinput and luci.http.formvaluetable(key) -end - -function Map.get_scheme(self, sectiontype, option) - if not option then - return self.scheme and self.scheme.sections[sectiontype] - else - return self.scheme and self.scheme.variables[sectiontype] - and self.scheme.variables[sectiontype][option] - end -end - -function Map.submitstate(self) - return self:formvalue("cbi.submit") -end - --- Chain foreign config -function Map.chain(self, config) - table.insert(self.parsechain, config) -end - -function Map.state_handler(self, state) - return state -end - --- Use optimized UCI writing -function Map.parse(self, readinput, ...) - self.readinput = (readinput ~= false) - Node.parse(self, ...) - - if self.save then - for i, config in ipairs(self.parsechain) do - self.uci:save(config) - end - if self:submitstate() and (self.autoapply or luci.http.formvalue("cbi.apply")) then - for i, config in ipairs(self.parsechain) do - self.uci:commit(config) - - -- Refresh data because commit changes section names - self.uci:load(config) - end - if self.apply_on_parse then - self.uci:apply(self.parsechain) - else - self._apply = function() - local cmd = self.uci:apply(self.parsechain, true) - return io.popen(cmd) - end - end - - -- Reparse sections - Node.parse(self, true) - - end - for i, config in ipairs(self.parsechain) do - self.uci:unload(config) - end - if type(self.commit_handler) == "function" then - self:commit_handler(self:submitstate()) - end - end - - if self:submitstate() then - if self.save then - self.state = self.changed and FORM_CHANGED or FORM_VALID - else - self.state = FORM_INVALID - end - else - self.state = FORM_NODATA - end - - return self:state_handler(self.state) -end - -function Map.render(self, ...) - Node.render(self, ...) - if self._apply then - local fp = self._apply() - fp:read("*a") - fp:close() - end -end - --- Creates a child section -function Map.section(self, class, ...) - if instanceof(class, AbstractSection) then - local obj = class(self, ...) - self:append(obj) - return obj - else - error("class must be a descendent of AbstractSection") - end -end - --- UCI add -function Map.add(self, sectiontype) - return self.uci:add(self.config, sectiontype) -end - --- UCI set -function Map.set(self, section, option, value) - if option then - return self.uci:set(self.config, section, option, value) - else - return self.uci:set(self.config, section, value) - end -end - --- UCI del -function Map.del(self, section, option) - if option then - return self.uci:delete(self.config, section, option) - else - return self.uci:delete(self.config, section) - end -end - --- UCI get -function Map.get(self, section, option) - if not section then - return self.uci:get_all(self.config) - elseif option then - return self.uci:get(self.config, section, option) - else - return self.uci:get_all(self.config, section) - end -end - ---[[ -Compound - Container -]]-- -Compound = class(Node) - -function Compound.__init__(self, ...) - Node.__init__(self) - self.children = {...} -end - -function Compound.parse(self, ...) - local cstate, state = 0, 0 - - for k, child in ipairs(self.children) do - cstate = child:parse(...) - state = (not state or cstate < state) and cstate or state - end - - return state -end - - ---[[ -Delegator - Node controller -]]-- -Delegator = class(Node) -function Delegator.__init__(self, ...) - Node.__init__(self, ...) - self.nodes = {} - self.template = "cbi/delegator" -end - -function Delegator.state(self, name, node, transitor) - transitor = transitor or self.transistor_linear - local state = {node=node, name=name, transitor=transitor} - - assert(instanceof(node, Node), "Invalid node") - assert(not self.nodes[name], "Duplicate entry") - - self.nodes[name] = state - self:append(state) - - return state -end - -function Delegator.get(self, name) - return self.nodes[name] -end - -function Delegator.transistor_linear(self, state, cstate) - if cstate > 0 then - for i, child in ipairs(self.children) do - if state == child then - return self.children[i+1] - end - end - else - return state - end -end - -function Delegator.parse(self, ...) - local active = self:getactive() - assert(active, "Invalid state") - - local cstate = active.node:parse() - self.active = active.transistor(self, active.node, cstate) - - if not self.active then - return FORM_DONE - else - self.active:parse(false) - return FROM_PROCEED - end -end - -function Delegator.render(self, ...) - self.active.node:render(...) -end - -function Delegator.getactive(self) - return self:get(Map.formvalue(self, "cbi.delegated") - or (self.children[1] and self.children[1].name)) -end - ---[[ -Page - A simple node -]]-- - -Page = class(Node) -Page.__init__ = Node.__init__ -Page.parse = function() end - - ---[[ -SimpleForm - A Simple non-UCI form -]]-- -SimpleForm = class(Node) - -function SimpleForm.__init__(self, config, title, description, data) - Node.__init__(self, title, description) - self.config = config - self.data = data or {} - self.template = "cbi/simpleform" - self.dorender = true - self.pageaction = false - self.readinput = true -end - -SimpleForm.formvalue = Map.formvalue -SimpleForm.formvaluetable = Map.formvaluetable - -function SimpleForm.parse(self, readinput, ...) - self.readinput = (readinput ~= false) - if self:submitstate() then - Node.parse(self, 1, ...) - end - - local valid = true - for k, j in ipairs(self.children) do - for i, v in ipairs(j.children) do - valid = valid - and (not v.tag_missing or not v.tag_missing[1]) - and (not v.tag_invalid or not v.tag_invalid[1]) - and (not v.error) - end - end - - local state = - not self:submitstate() and FORM_NODATA - or valid and FORM_VALID - or FORM_INVALID - - self.dorender = not self.handle or self:handle(state, self.data) ~= false - return state -end - -function SimpleForm.render(self, ...) - if self.dorender then - Node.render(self, ...) - end -end - -function SimpleForm.submitstate(self) - return self:formvalue("cbi.submit") -end - -function SimpleForm.section(self, class, ...) - if instanceof(class, AbstractSection) then - local obj = class(self, ...) - self:append(obj) - return obj - else - error("class must be a descendent of AbstractSection") - end -end - --- Creates a child field -function SimpleForm.field(self, class, ...) - local section - for k, v in ipairs(self.children) do - if instanceof(v, SimpleSection) then - section = v - break - end - end - if not section then - section = self:section(SimpleSection) - end - - if instanceof(class, AbstractValue) then - local obj = class(self, section, ...) - obj.track_missing = true - section:append(obj) - return obj - else - error("class must be a descendent of AbstractValue") - end -end - -function SimpleForm.set(self, section, option, value) - self.data[option] = value -end - - -function SimpleForm.del(self, section, option) - self.data[option] = nil -end - - -function SimpleForm.get(self, section, option) - return self.data[option] -end - - -function SimpleForm.get_scheme() - return nil -end - - - ---[[ -AbstractSection -]]-- -AbstractSection = class(Node) - -function AbstractSection.__init__(self, map, sectiontype, ...) - Node.__init__(self, ...) - self.sectiontype = sectiontype - self.map = map - self.config = map.config - self.optionals = {} - self.defaults = {} - self.fields = {} - self.tag_error = {} - self.tag_invalid = {} - self.tag_deperror = {} - self.changed = false - - self.optional = true - self.addremove = false - self.dynamic = false -end - --- Appends a new option -function AbstractSection.option(self, class, option, ...) - -- Autodetect from UVL - if class == true and self.map:get_scheme(self.sectiontype, option) then - local vs = self.map:get_scheme(self.sectiontype, option) - if vs.type == "boolean" then - class = Flag - elseif vs.type == "list" then - class = DynamicList - elseif vs.type == "enum" or vs.type == "reference" then - class = ListValue - else - class = Value - end - end - - if instanceof(class, AbstractValue) then - local obj = class(self.map, self, option, ...) - - Node._i18n(obj, self.config, self.section or self.sectiontype, option, ...) - - self:append(obj) - self.fields[option] = obj - return obj - elseif class == true then - error("No valid class was given and autodetection failed.") - else - error("class must be a descendant of AbstractValue") - end -end - --- Parse optional options -function AbstractSection.parse_optionals(self, section) - if not self.optional then - return - end - - self.optionals[section] = {} - - local field = self.map:formvalue("cbi.opt."..self.config.."."..section) - for k,v in ipairs(self.children) do - if v.optional and not v:cfgvalue(section) then - if field == v.option then - field = nil - else - table.insert(self.optionals[section], v) - end - end - end - - if field and #field > 0 and self.dynamic then - self:add_dynamic(field) - end -end - --- Add a dynamic option -function AbstractSection.add_dynamic(self, field, optional) - local o = self:option(Value, field, field) - o.optional = optional -end - --- Parse all dynamic options -function AbstractSection.parse_dynamic(self, section) - if not self.dynamic then - return - end - - local arr = luci.util.clone(self:cfgvalue(section)) - local form = self.map:formvaluetable("cbid."..self.config.."."..section) - for k, v in pairs(form) do - arr[k] = v - end - - for key,val in pairs(arr) do - local create = true - - for i,c in ipairs(self.children) do - if c.option == key then - create = false - end - end - - if create and key:sub(1, 1) ~= "." then - self:add_dynamic(key, true) - end - end -end - --- Returns the section's UCI table -function AbstractSection.cfgvalue(self, section) - return self.map:get(section) -end - --- Push events -function AbstractSection.push_events(self) - --luci.util.append(self.map.events, self.events) - self.map.changed = true -end - --- Removes the section -function AbstractSection.remove(self, section) - self.map.autoapply = false - return self.map:del(section) -end - --- Creates the section -function AbstractSection.create(self, section) - local stat - - if section then - stat = section:match("^%w+$") and self.map:set(section, nil, self.sectiontype) - else - section = self.map:add(self.sectiontype) - stat = section - end - - if stat then - for k,v in pairs(self.children) do - if v.default then - self.map:set(section, v.option, v.default) - end - end - - for k,v in pairs(self.defaults) do - self.map:set(section, k, v) - end - end - - self.map.autoapply = false - - return stat -end - - -SimpleSection = class(AbstractSection) - -function SimpleSection.__init__(self, form, ...) - AbstractSection.__init__(self, form, nil, ...) - self.template = "cbi/nullsection" -end - - -Table = class(AbstractSection) - -function Table.__init__(self, form, data, ...) - local datasource = {} - datasource.config = "table" - self.data = data - - datasource.formvalue = Map.formvalue - datasource.formvaluetable = Map.formvaluetable - datasource.readinput = true - - function datasource.get(self, section, option) - return data[section] and data[section][option] - end - - function datasource.submitstate(self) - return Map.formvalue(self, "cbi.submit") - end - - function datasource.del(...) - return true - end - - function datasource.get_scheme() - return nil - end - - AbstractSection.__init__(self, datasource, "table", ...) - self.template = "cbi/tblsection" - self.rowcolors = true - self.anonymous = true -end - -function Table.parse(self, readinput) - self.map.readinput = (readinput ~= false) - for i, k in ipairs(self:cfgsections()) do - if self.map:submitstate() then - Node.parse(self, k) - end - end -end - -function Table.cfgsections(self) - local sections = {} - - for i, v in luci.util.kspairs(self.data) do - table.insert(sections, i) - end - - return sections -end - - - ---[[ -NamedSection - A fixed configuration section defined by its name -]]-- -NamedSection = class(AbstractSection) - -function NamedSection.__init__(self, map, section, stype, ...) - AbstractSection.__init__(self, map, stype, ...) - Node._i18n(self, map.config, section, nil, ...) - - -- Defaults - self.addremove = false - - -- Use defaults from UVL - if not self.override_scheme and self.map:get_scheme(self.sectiontype) then - local vs = self.map:get_scheme(self.sectiontype) - self.addremove = not vs.unique and not vs.required - self.dynamic = vs.dynamic - self.title = self.title or vs.title - self.description = self.description or vs.descr - end - - self.template = "cbi/nsection" - self.section = section -end - -function NamedSection.parse(self, novld) - local s = self.section - local active = self:cfgvalue(s) - - if self.addremove then - local path = self.config.."."..s - if active then -- Remove the section - if self.map:formvalue("cbi.rns."..path) and self:remove(s) then - self:push_events() - return - end - else -- Create and apply default values - if self.map:formvalue("cbi.cns."..path) then - self:create(s) - return - end - end - end - - if active then - AbstractSection.parse_dynamic(self, s) - if self.map:submitstate() then - Node.parse(self, s) - - if not novld and not self.override_scheme and self.map.scheme then - _uvl_validate_section(self, s) - end - end - AbstractSection.parse_optionals(self, s) - - if self.changed then - self:push_events() - end - end -end - - ---[[ -TypedSection - A (set of) configuration section(s) defined by the type - addremove: Defines whether the user can add/remove sections of this type - anonymous: Allow creating anonymous sections - validate: a validation function returning nil if the section is invalid -]]-- -TypedSection = class(AbstractSection) - -function TypedSection.__init__(self, map, type, ...) - AbstractSection.__init__(self, map, type, ...) - Node._i18n(self, map.config, type, nil, ...) - - self.template = "cbi/tsection" - self.deps = {} - self.anonymous = false - - -- Use defaults from UVL - if not self.override_scheme and self.map:get_scheme(self.sectiontype) then - local vs = self.map:get_scheme(self.sectiontype) - self.addremove = not vs.unique and not vs.required - self.dynamic = vs.dynamic - self.anonymous = not vs.named - self.title = self.title or vs.title - self.description = self.description or vs.descr - end -end - --- Return all matching UCI sections for this TypedSection -function TypedSection.cfgsections(self) - local sections = {} - self.map.uci:foreach(self.map.config, self.sectiontype, - function (section) - if self:checkscope(section[".name"]) then - table.insert(sections, section[".name"]) - end - end) - - return sections -end - --- Limits scope to sections that have certain option => value pairs -function TypedSection.depends(self, option, value) - table.insert(self.deps, {option=option, value=value}) -end - -function TypedSection.parse(self, novld) - if self.addremove then - -- Remove - local crval = REMOVE_PREFIX .. self.config - local name = self.map:formvaluetable(crval) - for k,v in pairs(name) do - if k:sub(-2) == ".x" then - k = k:sub(1, #k - 2) - end - if self:cfgvalue(k) and self:checkscope(k) then - self:remove(k) - end - end - end - - local co - for i, k in ipairs(self:cfgsections()) do - AbstractSection.parse_dynamic(self, k) - if self.map:submitstate() then - Node.parse(self, k, novld) - - if not novld and not self.override_scheme and self.map.scheme then - _uvl_validate_section(self, k) - end - end - AbstractSection.parse_optionals(self, k) - end - - if self.addremove then - -- Create - local created - local crval = CREATE_PREFIX .. self.config .. "." .. self.sectiontype - local name = self.map:formvalue(crval) - if self.anonymous then - if name then - created = self:create() - end - else - if name then - -- Ignore if it already exists - if self:cfgvalue(name) then - name = nil; - end - - name = self:checkscope(name) - - if not name then - self.err_invalid = true - end - - if name and #name > 0 then - created = self:create(name) and name - if not created then - self.invalid_cts = true - end - end - end - end - - if created then - AbstractSection.parse_optionals(self, created) - end - end - - if created or self.changed then - self:push_events() - end -end - --- Verifies scope of sections -function TypedSection.checkscope(self, section) - -- Check if we are not excluded - if self.filter and not self:filter(section) then - return nil - end - - -- Check if at least one dependency is met - if #self.deps > 0 and self:cfgvalue(section) then - local stat = false - - for k, v in ipairs(self.deps) do - if self:cfgvalue(section)[v.option] == v.value then - stat = true - end - end - - if not stat then - return nil - end - end - - return self:validate(section) -end - - --- Dummy validate function -function TypedSection.validate(self, section) - return section -end - - ---[[ -AbstractValue - An abstract Value Type - null: Value can be empty - valid: A function returning the value if it is valid otherwise nil - depends: A table of option => value pairs of which one must be true - default: The default value - size: The size of the input fields - rmempty: Unset value if empty - optional: This value is optional (see AbstractSection.optionals) -]]-- -AbstractValue = class(Node) - -function AbstractValue.__init__(self, map, section, option, ...) - Node.__init__(self, ...) - self.section = section - self.option = option - self.map = map - self.config = map.config - self.tag_invalid = {} - self.tag_missing = {} - self.tag_reqerror = {} - self.tag_error = {} - self.deps = {} - --self.cast = "string" - - self.track_missing = false - self.rmempty = true - self.default = nil - self.size = nil - self.optional = false -end - -function AbstractValue.prepare(self) - -- Use defaults from UVL - if not self.override_scheme - and self.map:get_scheme(self.section.sectiontype, self.option) then - local vs = self.map:get_scheme(self.section.sectiontype, self.option) - if self.cast == nil then - self.cast = (vs.type == "list") and "list" or "string" - end - self.title = self.title or vs.title - self.description = self.description or vs.descr - if self.default == nil then - self.default = vs.default - end - - if vs.depends and not self.override_dependencies then - for i, deps in ipairs(vs.depends) do - deps = _uvl_strip_remote_dependencies(deps) - if next(deps) then - self:depends(deps) - end - end - end - end - - self.cast = self.cast or "string" -end - --- Add a dependencie to another section field -function AbstractValue.depends(self, field, value) - local deps - if type(field) == "string" then - deps = {} - deps[field] = value - else - deps = field - end - - table.insert(self.deps, {deps=deps, add=""}) -end - --- Generates the unique CBID -function AbstractValue.cbid(self, section) - return "cbid."..self.map.config.."."..section.."."..self.option -end - --- Return whether this object should be created -function AbstractValue.formcreated(self, section) - local key = "cbi.opt."..self.config.."."..section - return (self.map:formvalue(key) == self.option) -end - --- Returns the formvalue for this object -function AbstractValue.formvalue(self, section) - return self.map:formvalue(self:cbid(section)) -end - -function AbstractValue.additional(self, value) - self.optional = value -end - -function AbstractValue.mandatory(self, value) - self.rmempty = not value -end - -function AbstractValue.parse(self, section, novld) - local fvalue = self:formvalue(section) - local cvalue = self:cfgvalue(section) - - if fvalue and #fvalue > 0 then -- If we have a form value, write it to UCI - fvalue = self:transform(self:validate(fvalue, section)) - if not fvalue and not novld then - if self.error then - self.error[section] = "invalid" - else - self.error = { [section] = "invalid" } - end - self.map.save = false - end - if fvalue and not (fvalue == cvalue) then - if self:write(section, fvalue) then - -- Push events - self.section.changed = true - --luci.util.append(self.map.events, self.events) - end - end - else -- Unset the UCI or error - if self.rmempty or self.optional then - if self:remove(section) then - -- Push events - self.section.changed = true - --luci.util.append(self.map.events, self.events) - end - elseif cvalue ~= fvalue and not novld then - self:write(section, fvalue or "") - if self.error then - self.error[section] = "missing" - else - self.error = { [section] = "missing" } - end - self.map.save = false - end - end -end - --- Render if this value exists or if it is mandatory -function AbstractValue.render(self, s, scope) - if not self.optional or self:cfgvalue(s) or self:formcreated(s) then - scope = scope or {} - scope.section = s - scope.cbid = self:cbid(s) - scope.striptags = luci.util.striptags - - scope.ifattr = function(cond,key,val) - if cond then - return string.format( - ' %s="%s"', tostring(key), - luci.util.pcdata(tostring( val - or scope[key] - or (type(self[key]) ~= "function" and self[key]) - or "" )) - ) - else - return '' - end - end - - scope.attr = function(...) - return scope.ifattr( true, ... ) - end - - Node.render(self, scope) - end -end - --- Return the UCI value of this object -function AbstractValue.cfgvalue(self, section) - local value = self.map:get(section, self.option) - if not value then - return nil - elseif not self.cast or self.cast == type(value) then - return value - elseif self.cast == "string" then - if type(value) == "table" then - return value[1] - end - elseif self.cast == "table" then - return luci.util.split(value, "%s+", nil, true) - end -end - --- Validate the form value -function AbstractValue.validate(self, value) - return value -end - -AbstractValue.transform = AbstractValue.validate - - --- Write to UCI -function AbstractValue.write(self, section, value) - return self.map:set(section, self.option, value) -end - --- Remove from UCI -function AbstractValue.remove(self, section) - return self.map:del(section, self.option) -end - - - - ---[[ -Value - A one-line value - maxlength: The maximum length -]]-- -Value = class(AbstractValue) - -function Value.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/value" - self.keylist = {} - self.vallist = {} -end - -function Value.value(self, key, val) - val = val or key - table.insert(self.keylist, tostring(key)) - table.insert(self.vallist, tostring(val)) -end - - --- DummyValue - This does nothing except being there -DummyValue = class(AbstractValue) - -function DummyValue.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/dvalue" - self.value = nil -end - -function DummyValue.cfgvalue(self, section) - local value - if self.value then - if type(self.value) == "function" then - value = self:value(section) - else - value = self.value - end - else - value = AbstractValue.cfgvalue(self, section) - end - return value -end - -function DummyValue.parse(self) - -end - - ---[[ -Flag - A flag being enabled or disabled -]]-- -Flag = class(AbstractValue) - -function Flag.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/fvalue" - - self.enabled = "1" - self.disabled = "0" -end - --- A flag can only have two states: set or unset -function Flag.parse(self, section) - local fvalue = self:formvalue(section) - - if fvalue then - fvalue = self.enabled - else - fvalue = self.disabled - end - - if fvalue == self.enabled or (not self.optional and not self.rmempty) then - if not(fvalue == self:cfgvalue(section)) then - self:write(section, fvalue) - end - else - self:remove(section) - end -end - - - ---[[ -ListValue - A one-line value predefined in a list - widget: The widget that will be used (select, radio) -]]-- -ListValue = class(AbstractValue) - -function ListValue.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/lvalue" - - self.keylist = {} - self.vallist = {} - self.size = 1 - self.widget = "select" -end - -function ListValue.prepare(self, ...) - AbstractValue.prepare(self, ...) - if not self.override_scheme - and self.map:get_scheme(self.section.sectiontype, self.option) then - local vs = self.map:get_scheme(self.section.sectiontype, self.option) - if self.value and vs.valuelist and not self.override_values then - for k, v in ipairs(vs.valuelist) do - local deps = {} - if not self.override_dependencies - and vs.enum_depends and vs.enum_depends[v.value] then - for i, dep in ipairs(vs.enum_depends[v.value]) do - table.insert(deps, _uvl_strip_remote_dependencies(dep)) - end - end - self:value(v.value, v.title or v.value, unpack(deps)) - end - end - end -end - -function ListValue.value(self, key, val, ...) - if luci.util.contains(self.keylist, key) then - return - end - - val = val or key - table.insert(self.keylist, tostring(key)) - table.insert(self.vallist, tostring(val)) - - for i, deps in ipairs({...}) do - table.insert(self.deps, {add = "-"..key, deps=deps}) - end -end - -function ListValue.validate(self, val) - if luci.util.contains(self.keylist, val) then - return val - else - return nil - end -end - - - ---[[ -MultiValue - Multiple delimited values - widget: The widget that will be used (select, checkbox) - delimiter: The delimiter that will separate the values (default: " ") -]]-- -MultiValue = class(AbstractValue) - -function MultiValue.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/mvalue" - - self.keylist = {} - self.vallist = {} - - self.widget = "checkbox" - self.delimiter = " " -end - -function MultiValue.render(self, ...) - if self.widget == "select" and not self.size then - self.size = #self.vallist - end - - AbstractValue.render(self, ...) -end - -function MultiValue.value(self, key, val) - if luci.util.contains(self.keylist, key) then - return - end - - val = val or key - table.insert(self.keylist, tostring(key)) - table.insert(self.vallist, tostring(val)) -end - -function MultiValue.valuelist(self, section) - local val = self:cfgvalue(section) - - if not(type(val) == "string") then - return {} - end - - return luci.util.split(val, self.delimiter) -end - -function MultiValue.validate(self, val) - val = (type(val) == "table") and val or {val} - - local result - - for i, value in ipairs(val) do - if luci.util.contains(self.keylist, value) then - result = result and (result .. self.delimiter .. value) or value - end - end - - return result -end - - -StaticList = class(MultiValue) - -function StaticList.__init__(self, ...) - MultiValue.__init__(self, ...) - self.cast = "table" - self.valuelist = self.cfgvalue - - if not self.override_scheme - and self.map:get_scheme(self.section.sectiontype, self.option) then - local vs = self.map:get_scheme(self.section.sectiontype, self.option) - if self.value and vs.values and not self.override_values then - for k, v in pairs(vs.values) do - self:value(k, v) - end - end - end -end - -function StaticList.validate(self, value) - value = (type(value) == "table") and value or {value} - - local valid = {} - for i, v in ipairs(value) do - if luci.util.contains(self.keylist, v) then - table.insert(valid, v) - end - end - return valid -end - - -DynamicList = class(AbstractValue) - -function DynamicList.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/dynlist" - self.cast = "table" - self.keylist = {} - self.vallist = {} -end - -function DynamicList.value(self, key, val) - val = val or key - table.insert(self.keylist, tostring(key)) - table.insert(self.vallist, tostring(val)) -end - -function DynamicList.formvalue(self, section) - local value = AbstractValue.formvalue(self, section) - value = (type(value) == "table") and value or {value} - - local valid = {} - for i, v in ipairs(value) do - if v and #v > 0 - and not self.map:formvalue("cbi.rle."..section.."."..self.option.."."..i) - and not self.map:formvalue("cbi.rle."..section.."."..self.option.."."..i..".x") then - table.insert(valid, v) - end - end - - return valid -end - - ---[[ -TextValue - A multi-line value - rows: Rows -]]-- -TextValue = class(AbstractValue) - -function TextValue.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/tvalue" -end - ---[[ -Button -]]-- -Button = class(AbstractValue) - -function Button.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/button" - self.inputstyle = nil - self.rmempty = true -end - - -FileUpload = class(AbstractValue) - -function FileUpload.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/upload" - if not self.map.upload_fields then - self.map.upload_fields = { self } - else - self.map.upload_fields[#self.map.upload_fields+1] = self - end -end - -function FileUpload.formcreated(self, section) - return AbstractValue.formcreated(self, section) or - self.map:formvalue("cbi.rlf."..section.."."..self.option) or - self.map:formvalue("cbi.rlf."..section.."."..self.option..".x") -end - -function FileUpload.cfgvalue(self, section) - local val = AbstractValue.cfgvalue(self, section) - if val and luci.fs.access(val) then - return val - end - return nil -end - -function FileUpload.formvalue(self, section) - local val = AbstractValue.formvalue(self, section) - if val then - if not self.map:formvalue("cbi.rlf."..section.."."..self.option) and - not self.map:formvalue("cbi.rlf."..section.."."..self.option..".x") - then - return val - end - luci.fs.unlink(val) - self.value = nil - end - return nil -end - -function FileUpload.remove(self, section) - local val = AbstractValue.formvalue(self, section) - if val and luci.fs.access(val) then luci.fs.unlink(val) end - return AbstractValue.remove(self, section) -end - - -FileBrowser = class(AbstractValue) - -function FileBrowser.__init__(self, ...) - AbstractValue.__init__(self, ...) - self.template = "cbi/browser" -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ccache.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ccache.lua deleted file mode 100644 index 4db3b39..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ccache.lua +++ /dev/null @@ -1,86 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ccache.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -local io = require "io" -local util = require "luci.util" -local posix = require "posix" -local debug = require "debug" -local string = require "string" -local package = require "package" - -local type, loadfile = type, loadfile - - -module "luci.ccache" - -function cache_ondemand(...) - if debug.getinfo(1, 'S').source ~= "=?" then - cache_enable(...) - end -end - -function cache_enable(cachepath, mode) - cachepath = cachepath or "/tmp/luci-modulecache" - mode = mode or "r--r--r--" - - local loader = package.loaders[2] - local uid = posix.getpid("uid") - - if not posix.stat(cachepath) then - posix.mkdir(cachepath) - end - - local function _encode_filename(name) - local encoded = "" - for i=1, #name do - encoded = encoded .. ("%2X" % string.byte(name, i)) - end - return encoded - end - - local function _load_sane(file) - local stat = posix.stat(file) - if stat and stat.uid == uid and stat.mode == mode then - return loadfile(file) - end - end - - local function _write_sane(file, func) - if posix.getpid("uid") == uid then - local fp = io.open(file, "w") - if fp then - fp:write(util.get_bytecode(func)) - fp:close() - posix.chmod(file, mode) - end - end - end - - package.loaders[2] = function(mod) - local encoded = cachepath .. "/" .. _encode_filename(mod) - local modcons = _load_sane(encoded) - - if modcons then - return modcons - end - - -- No cachefile - modcons = loader(mod) - if type(modcons) == "function" then - _write_sane(encoded, modcons) - end - return modcons - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/config.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/config.lua deleted file mode 100644 index 58e182e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/config.lua +++ /dev/null @@ -1,42 +0,0 @@ ---[[ -LuCI - Configuration - -Description: -Some LuCI configuration values read from uci file "luci" - - -FileId: -$Id: config.lua 3857 2008-12-05 15:37:39Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local util = require "luci.util" -module("luci.config", - function(m) - if pcall(require, "luci.model.uci") then - local config = util.threadlocal() - setmetatable(m, { - __index = function(tbl, key) - if not config[key] then - config[key] = luci.model.uci.cursor():get_all("luci", key) - end - return config[key] - end - }) - end - end) diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/filebrowser.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/filebrowser.lua deleted file mode 100644 index 4c19b46..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/filebrowser.lua +++ /dev/null @@ -1,20 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: filebrowser.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -module("luci.controller.admin.filebrowser", package.seeall) - -function index() - entry( {"admin", "filebrowser"}, template("cbi/filebrowser") ).leaf = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/index.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/index.lua deleted file mode 100644 index 41f423c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/index.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: index.lua 4041 2009-01-16 12:39:50Z Cyrus $ -]]-- -module("luci.controller.admin.index", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - local root = node() - if not root.target then - root.target = alias("admin") - root.index = true - end - - entry({"about"}, template("about")).i18n = "admin-core" - - local page = node("admin") - page.target = alias("admin", "index") - page.title = i18n("administration", "Administration") - page.order = 10 - page.i18n = "admin-core" - page.sysauth = "root" - page.sysauth_authenticator = "htmlauth" - page.ucidata = true - page.index = true - - local page = node("admin", "index") - page.target = template("admin_index/index") - page.title = i18n("overview", "Übersicht") - page.order = 10 - page.index = true - - local page = node("admin", "index", "luci") - page.target = cbi("admin_index/luci") - page.title = i18n("a_i_ui", "Oberfläche") - page.order = 10 - - entry({"admin", "index", "components"}, call("redir_components"), i18n("luci_components", "LuCI Components"), 20) - entry({"admin", "index", "logout"}, call("action_logout"), i18n("logout"), 90) -end - -function redir_components() - luci.http.redirect(luci.dispatcher.build_url("admin", "system", "packages")..'?update=1&query=luci') -end - -function action_logout() - local dsp = require "luci.dispatcher" - local sauth = require "luci.sauth" - if dsp.context.authsession then - sauth.kill(dsp.context.authsession) - dsp.context.urltoken.stok = nil - end - - luci.http.header("Set-Cookie", "sysauth=; path=" .. dsp.build_url()) - luci.http.redirect(luci.dispatcher.build_url()) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/network.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/network.lua deleted file mode 100644 index 6d12abb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/network.lua +++ /dev/null @@ -1,97 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: network.lua 3995 2009-01-04 15:47:53Z Cyrus $ -]]-- -module("luci.controller.admin.network", package.seeall) - -function index() - require("luci.i18n") - local uci = require("luci.model.uci").cursor() - local i18n = luci.i18n.translate - - local page = node("admin", "network") - page.target = alias("admin", "network", "network") - page.title = i18n("network") - page.order = 50 - page.index = true - - local page = node("admin", "network", "vlan") - page.target = cbi("admin_network/vlan") - page.title = i18n("a_n_switch") - page.order = 20 - - local page = entry({"admin", "network", "wireless"}, arcombine(cbi("admin_network/wireless"), cbi("admin_network/wifi")), i18n("wifi"), 15) - page.i18n = "wifi" - page.leaf = true - page.subindex = true - - uci:foreach("wireless", "wifi-device", - function (section) - local ifc = section[".name"] - entry({"admin", "network", "wireless", ifc}, - true, - ifc:upper()).i18n = "wifi" - end - ) - - local page = entry({"admin", "network", "network"}, arcombine(cbi("admin_network/network"), cbi("admin_network/ifaces")), i18n("interfaces", "Schnittstellen"), 10) - page.leaf = true - page.subindex = true - - uci:foreach("network", "interface", - function (section) - local ifc = section[".name"] - if ifc ~= "loopback" then - entry({"admin", "network", "network", ifc}, - true, - ifc:upper()) - end - end - ) - - local page = node("admin", "network", "dhcp") - page.target = cbi("admin_network/dhcp") - page.title = "DHCP" - page.order = 30 - page.subindex = true - - entry( - {"admin", "network", "dhcp", "leases"}, - cbi("admin_network/dhcpleases"), - i18n("dhcp_leases") - ) - - local page = node("admin", "network", "hosts") - page.target = cbi("admin_network/hosts") - page.title = i18n("hostnames", "Hostnames") - page.order = 40 - - local page = node("admin", "network", "routes") - page.target = cbi("admin_network/routes") - page.title = i18n("a_n_routes") - page.order = 50 - page.leaf = true - - entry( - {"admin", "network", "routes", "static"}, - function() end, - i18n("a_n_routes_static") - ) - - entry( - {"admin", "network", "conntrack"}, - form("admin_network/conntrack"), - i18n("a_n_conntrack"), - 60 - ) - -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/services.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/services.lua deleted file mode 100644 index 6f4fa77..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/services.lua +++ /dev/null @@ -1,54 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: services.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- -module("luci.controller.admin.services", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - local page = node("admin", "services", "crontab") - page.target = form("admin_services/crontab") - page.title = i18n("a_s_crontab") - page.order = 50 - - local page = node("admin", "services") - page.target = template("admin_services/index") - page.title = i18n("services", "Dienste") - page.order = 40 - page.index = true - - if luci.fs.access("/etc/config/lucittpd") then - local page = node("admin", "services", "lucittpd") - page.target = cbi("admin_services/lucittpd") - page.title = "LuCIttpd" - page.order = 10 - end - - if luci.fs.access("/etc/config/httpd") then - local page = node("admin", "services", "httpd") - page.target = cbi("admin_services/httpd") - page.title = "Busybox HTTPd" - page.order = 11 - end - - local page = node("admin", "services", "dropbear") - page.target = cbi("admin_services/dropbear") - page.title = "Dropbear SSHd" - page.order = 20 - - local page = node("admin", "services", "dnsmasq") - page.target = cbi("admin_services/dnsmasq") - page.title = "Dnsmasq" - page.order = 30 -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/status.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/status.lua deleted file mode 100644 index 8133013..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/status.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: status.lua 3792 2008-11-16 22:46:25Z jow $ -]]-- -module("luci.controller.admin.status", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - entry({"admin", "status"}, template("admin_status/index"), i18n("status", "Status"), 20).index = true - entry({"admin", "status", "syslog"}, call("action_syslog"), i18n("syslog", "Systemprotokoll"), 1) - entry({"admin", "status", "dmesg"}, call("action_dmesg"), i18n("dmesg", "Kernelprotokoll"), 2) -end - -function action_syslog() - local syslog = luci.sys.syslog() - luci.template.render("admin_status/syslog", {syslog=syslog}) -end - -function action_dmesg() - local dmesg = luci.sys.dmesg() - luci.template.render("admin_status/dmesg", {dmesg=dmesg}) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/system.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/system.lua deleted file mode 100644 index 9d4422d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/system.lua +++ /dev/null @@ -1,235 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: system.lua 4065 2009-01-17 13:21:50Z Cyrus $ -]]-- -module("luci.controller.admin.system", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - entry({"admin", "system"}, alias("admin", "system", "system"), i18n("system"), 30).index = true - entry({"admin", "system", "system"}, cbi("admin_system/system"), i18n("system"), 1) - entry({"admin", "system", "packages"}, call("action_packages"), i18n("a_s_packages"), 10) - entry({"admin", "system", "packages", "ipkg"}, form("admin_system/ipkg")) - entry({"admin", "system", "passwd"}, form("admin_system/passwd"), i18n("a_s_changepw"), 20) - entry({"admin", "system", "sshkeys"}, form("admin_system/sshkeys"), i18n("a_s_sshkeys"), 30) - entry({"admin", "system", "processes"}, form("admin_system/processes"), i18n("process_head"), 45) - entry({"admin", "system", "fstab"}, cbi("admin_system/fstab"), i18n("a_s_fstab"), 50) - - if luci.fs.isdirectory("/sys/class/leds") then - entry({"admin", "system", "leds"}, cbi("admin_system/leds"), i18n("leds", "LEDs"), 60) - end - - entry({"admin", "system", "backup"}, call("action_backup"), i18n("a_s_backup"), 70) - entry({"admin", "system", "upgrade"}, call("action_upgrade"), i18n("a_s_flash"), 80) - entry({"admin", "system", "reboot"}, call("action_reboot"), i18n("reboot"), 90) -end - -function action_packages() - local ipkg = require("luci.model.ipkg") - local void = nil - local submit = luci.http.formvalue("submit") - - - -- Search query - local query = luci.http.formvalue("query") - query = (query ~= '') and query or nil - - - -- Packets to be installed - local install = submit and luci.http.formvaluetable("install") - - -- Install from URL - local url = luci.http.formvalue("url") - if url and url ~= '' and submit then - if not install then - install = {} - end - install[url] = 1 - end - - -- Do install - if install then - for k, v in pairs(install) do - void, install[k] = ipkg.install(k) - end - end - - - -- Remove packets - local remove = submit and luci.http.formvaluetable("remove") - if remove then - for k, v in pairs(remove) do - void, remove[k] = ipkg.remove(k) - end - end - - - -- Update all packets - local update = luci.http.formvalue("update") - if update then - void, update = ipkg.update() - end - - - -- Upgrade all packets - local upgrade = luci.http.formvalue("upgrade") - if upgrade then - void, upgrade = ipkg.upgrade() - end - - - -- Package info - local info = luci.model.ipkg.info(query and "*"..query.."*") - info = info or {} - local pkgs = {} - - -- Sort after status and name - for k, v in pairs(info) do - local x = 0 - for i, j in pairs(pkgs) do - local vins = (v.Status and v.Status.installed) - local jins = (j.Status and j.Status.installed) - if vins ~= jins then - if vins then - break - end - else - if j.Package > v.Package then - break - end - end - x = i - end - table.insert(pkgs, x+1, v) - end - - luci.template.render("admin_system/packages", {pkgs=pkgs, query=query, - install=install, remove=remove, update=update, upgrade=upgrade}) -end - -function action_backup() - local reset_avail = os.execute([[grep '"rootfs_data"' /proc/mtd >/dev/null 2>&1]]) == 0 - local restore_cmd = "gunzip | tar -xC/ >/dev/null 2>&1" - local backup_cmd = "tar -c %s | gzip 2>/dev/null" - - local restore_fpi - luci.http.setfilehandler( - function(meta, chunk, eof) - if not restore_fpi then - restore_fpi = io.popen(restore_cmd, "w") - end - if chunk then - restore_fpi:write(chunk) - end - if eof then - restore_fpi:close() - end - end - ) - - local upload = luci.http.formvalue("archive") - local backup = luci.http.formvalue("backup") - local reset = reset_avail and luci.http.formvalue("reset") - - if upload and #upload > 0 then - luci.template.render("admin_system/applyreboot") - luci.sys.reboot() - elseif backup then - luci.util.perror(backup_cmd:format(_keep_pattern())) - local backup_fpi = io.popen(backup_cmd:format(_keep_pattern()), "r") - luci.http.header('Content-Disposition', 'attachment; filename="backup-%s-%s.tar.gz"' % { - luci.sys.hostname(), os.date("%Y-%m-%d")}) - luci.http.prepare_content("application/x-targz") - luci.ltn12.pump.all(luci.ltn12.source.file(backup_fpi), luci.http.write) - elseif reset then - luci.template.render("admin_system/applyreboot") - luci.util.exec("mtd -r erase rootfs_data") - else - luci.template.render("admin_system/backup", {reset_avail = reset_avail}) - end -end - -function action_passwd() - local p1 = luci.http.formvalue("pwd1") - local p2 = luci.http.formvalue("pwd2") - local stat = nil - - if p1 or p2 then - if p1 == p2 then - stat = luci.sys.user.setpasswd("root", p1) - else - stat = 10 - end - end - - luci.template.render("admin_system/passwd", {stat=stat}) -end - -function action_reboot() - local reboot = luci.http.formvalue("reboot") - luci.template.render("admin_system/reboot", {reboot=reboot}) - if reboot then - luci.sys.reboot() - end -end - -function action_upgrade() - require("luci.model.uci") - - local ret - local plat = luci.fs.mtime("/lib/upgrade/platform.sh") - local tmpfile = "/tmp/firmware.img" - local keep_avail = true - - local file - luci.http.setfilehandler( - function(meta, chunk, eof) - if not file then - file = io.open(tmpfile, "w") - end - if chunk then - file:write(chunk) - end - if eof then - file:close() - end - end - ) - - local fname = luci.http.formvalue("image") - local keepcfg = keep_avail and luci.http.formvalue("keepcfg") - - if plat and fname then - ret = function() - return luci.sys.flash(tmpfile, keepcfg and _keep_pattern()) - end - end - - luci.http.prepare_content("text/html") - luci.template.render("admin_system/upgrade", {sysupgrade=plat, ret=ret, keep_avail=keep_avail}) -end - -function _keep_pattern() - local kpattern = "" - local files = luci.model.uci.cursor():get_all("luci", "flash_keep") - if files then - kpattern = "" - for k, v in pairs(files) do - if k:sub(1,1) ~= "." and luci.fs.glob(v) then - kpattern = kpattern .. " " .. v - end - end - end - return kpattern -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/uci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/uci.lua deleted file mode 100644 index ddecd9b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/admin/uci.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: uci.lua 3650 2008-10-29 19:40:40Z jow $ -]]-- -module("luci.controller.admin.uci", package.seeall) - -function index() - local i18n = luci.i18n.translate - local redir = luci.http.formvalue("redir", true) or - luci.dispatcher.build_url(unpack(luci.dispatcher.context.request)) - - entry({"admin", "uci"}, nil, i18n("config")) - entry({"admin", "uci", "changes"}, call("action_changes"), i18n("changes"), 40).query = {redir=redir} - entry({"admin", "uci", "revert"}, call("action_revert"), i18n("revert"), 30).query = {redir=redir} - entry({"admin", "uci", "apply"}, call("action_apply"), i18n("apply"), 20).query = {redir=redir} - entry({"admin", "uci", "saveapply"}, call("action_apply"), i18n("saveapply"), 10).query = {redir=redir} -end - -function convert_changes(changes) - local util = require "luci.util" - - local ret - for r, tbl in pairs(changes) do - for s, os in pairs(tbl) do - for o, v in pairs(os) do - ret = (ret and ret.."\n" or "") .. "%s%s.%s%s%s" % { - v == "" and "-" or "", - r, - s, - o ~= ".type" and "."..o or "", - v ~= "" and "="..util.pcdata(v) or "" - } - end - end - end - return ret -end - -function action_changes() - local changes = convert_changes(luci.model.uci.cursor():changes()) - luci.template.render("admin_uci/changes", {changes=changes}) -end - -function action_apply() - local path = luci.dispatcher.context.path - local uci = luci.model.uci.cursor() - local changes = uci:changes() - local reload = {} - - -- Collect files to be applied and commit changes - for r, tbl in pairs(changes) do - table.insert(reload, r) - if path[#path] ~= "apply" then - uci:load(r) - uci:commit(r) - uci:unload(r) - end - end - - local function _reload() - local cmd = uci:apply(reload, true) - return io.popen(cmd) - end - - luci.template.render("admin_uci/apply", {changes=convert_changes(changes), reload=_reload}) -end - - -function action_revert() - local uci = luci.model.uci.cursor() - local changes = uci:changes() - - -- Collect files to be reverted - for r, tbl in pairs(changes) do - uci:load(r) - uci:revert(r) - uci:unload(r) - end - - luci.template.render("admin_uci/revert", {changes=convert_changes(changes)}) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ddns.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ddns.lua deleted file mode 100644 index e964c5e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ddns.lua +++ /dev/null @@ -1,32 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ddns.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.ddns", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("ddns") - if not luci.fs.access("/etc/config/ddns") then - return - end - - local page = entry({"admin", "services", "ddns"}, cbi("ddns/ddns"), luci.i18n.translate("ddns"), 60) - page.i18n = "ddns" - page.dependent = true - - - local page = entry({"mini", "network", "ddns"}, cbi("ddns/ddnsmini", {autoapply=true}), luci.i18n.translate("ddns"), 60) - page.i18n = "ddns" - page.dependent = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ffwizard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ffwizard.lua deleted file mode 100644 index f0e700d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ffwizard.lua +++ /dev/null @@ -1,21 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ffwizard.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - -module "luci.controller.ffwizard" - -function index() - entry({"admin", "freifunk", "ffwizard"}, form("ffwizard"), "Freifunkassistent", 50) -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/freifunk/freifunk.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/freifunk/freifunk.lua deleted file mode 100644 index 5bd7821..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/freifunk/freifunk.lua +++ /dev/null @@ -1,192 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: freifunk.lua 4152 2009-01-26 10:21:20Z Cyrus $ -]]-- -module("luci.controller.freifunk.freifunk", package.seeall) - -function index() - local i18n = luci.i18n.translate - - local page = node() - page.lock = true - page.target = alias("freifunk") - page.subindex = true - page.index = false - - local page = node("freifunk") - page.title = "Freifunk" - page.target = alias("freifunk", "index") - page.order = 5 - page.setuser = "nobody" - page.setgroup = "nogroup" - page.i18n = "freifunk" - page.index = true - - local page = node("freifunk", "index") - page.target = template("freifunk/index") - page.title = "Übersicht" - page.order = 10 - page.indexignore = true - - local page = node("freifunk", "index", "contact") - page.target = template("freifunk/contact") - page.title = "Kontakt" - - - local page = node("freifunk", "status") - page.target = form("freifunk/public_status") - page.title = "Status" - page.order = 20 - page.i18n = "admin-core" - page.setuser = false - page.setgroup = false - - entry({"freifunk", "status.json"}, call("jsonstatus")) - - assign({"freifunk", "olsr"}, {"admin", "status", "olsr"}, "OLSR", 30) - - if luci.fs.access("/etc/config/luci_statistics") then - assign({"freifunk", "graph"}, {"admin", "statistics", "graph"}, i18n("stat_statistics", "Statistiken"), 40) - end - - assign({"mini", "freifunk"}, {"admin", "freifunk"}, "Freifunk", 15) - entry({"admin", "freifunk"}, alias("admin", "freifunk", "index"), "Freifunk", 15) - local page = node("admin", "freifunk", "index") - page.target = cbi("freifunk/freifunk") - page.title = "Freifunk" - page.order = 30 - - local page = node("admin", "freifunk", "contact") - page.target = cbi("freifunk/contact") - page.title = "Kontakt" - page.order = 40 -end - -local function fetch_olsrd() - local sys = require "luci.sys" - local util = require "luci.util" - local table = require "table" - local rawdata = sys.httpget("http://127.0.0.1:2006/") - - if #rawdata == 0 then - if luci.fs.access("/proc/net/ipv6_route", "r") then - rawdata = sys.httpget("http://[::1]:2006/") - if #rawdata == 0 then - return nil - end - else - return nil - end - end - - local data = {} - - local tables = util.split(util.trim(rawdata), "\r?\n\r?\n", nil, true) - - - for i, tbl in ipairs(tables) do - local lines = util.split(tbl, "\r?\n", nil, true) - local name = table.remove(lines, 1):sub(8) - local keys = util.split(table.remove(lines, 1), "\t") - local split = #keys - 1 - - data[name] = {} - - for j, line in ipairs(lines) do - local fields = util.split(line, "\t", split) - data[name][j] = {} - for k, key in pairs(keys) do - data[name][j][key] = fields[k] - end - - if data[name][j].Linkcost then - data[name][j].LinkQuality, - data[name][j].NLQ, - data[name][j].ETX = - data[name][j].Linkcost:match("([%w.]+)/([%w.]+)[%s]+([%w.]+)") - end - end - end - - return data -end - -function jsonstatus() - local root = {} - local sys = require "luci.sys" - local uci = require "luci.model.uci" - local util = require "luci.util" - local http = require "luci.http" - local json = require "luci.json" - local ltn12 = require "luci.ltn12" - local version = require "luci.version" - local webadmin = require "luci.tools.webadmin" - - local cursor = uci.cursor_state() - - local ffzone = webadmin.firewall_find_zone("freifunk") - local ffznet = ffzone and cursor:get("firewall", ffzone, "network") - local ffwifs = ffznet and util.split(ffznet, " ") or {} - - - root.protocol = 1 - - root.system = { - uptime = {sys.uptime()}, - loadavg = {sys.loadavg()}, - sysinfo = {sys.sysinfo()}, - hostname = sys.hostname() - } - - root.firmware = { - luciname=version.luciname, - luciversion=version.luciversion, - distname=version.distname, - distversion=version.distversion - } - - root.freifunk = {} - cursor:foreach("freifunk", "public", function(s) - root.freifunk[s[".name"]] = s - end) - - cursor:foreach("system", "system", function(s) - root.geo = { - latitude = s.latitude, - longitude = s.longitude - } - end) - - root.network = {} - root.wireless = {devices = {}, interfaces = {}, status = {}} - local wifs = root.wireless.interfaces - local wifidata = luci.sys.wifi.getiwconfig() or {} - local netdata = luci.sys.net.deviceinfo() or {} - - for _, vif in ipairs(ffwifs) do - root.network[vif] = cursor:get_all("network", vif) - root.wireless.devices[vif] = cursor:get_all("wireless", vif) - cursor:foreach("wireless", "wifi-iface", function(s) - if s.device == vif and s.network == vif then - wifs[#wifs+1] = s - if s.ifname then - root.wireless.status[s.ifname] = wifidata[s.ifname] - end - end - end) - end - - root.olsrd = fetch_olsrd() - - http.prepare_content("application/json") - ltn12.pump.all(json.Encoder(root):source(), http.write) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/hd_idle.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/hd_idle.lua deleted file mode 100644 index 10a3963..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/hd_idle.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI hd-idle -(c) 2008 Yanira - -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 - -$Id: hd_idle.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.hd_idle", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("hd_idle") - if not luci.fs.access("/etc/config/hd-idle") then - return - end - - local page = entry({"admin", "services", "hd_idle"}, cbi("hd_idle"), luci.i18n.translate("hd_idle", "hd-idle"), 60) - page.i18n = "hd_idle" - page.dependent = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/init.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/init.lua deleted file mode 100644 index caae2ba..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/init.lua +++ /dev/null @@ -1,29 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: init.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.init", package.seeall) - -function index() - if not luci.fs.access("/etc/rc.common") then - return - end - - require("luci.i18n") - luci.i18n.loadc("initmgr") - - entry( - {"admin", "system", "init"}, form("init/init"), - luci.i18n.translate("initmgr", "Init Scripts") - ).i18n = "initmgr" -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/livestats.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/livestats.lua deleted file mode 100644 index cb7a6a3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/livestats.lua +++ /dev/null @@ -1,29 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: livestats.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -module("luci.controller.livestats", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("livestats") - - entry( {"admin", "status", "wifistat"}, template("livestats/wireless"), luci.i18n.translate("livestats_stat_wireless"), 90 ).i18n = "livestats" - entry( {"admin", "status", "trafstat"}, template("livestats/traffic"), luci.i18n.translate("livestats_stat_traffic"), 91 ).i18n = "livestats" - entry( {"admin", "status", "loadavg"}, template("livestats/loadavg"), luci.i18n.translate("livestats_stat_loadavg"), 92 ).i18n = "livestats" - - entry( {"mini", "network", "wifistat"}, template("livestats/wireless"), luci.i18n.translate("livestats_stat_wireless"), 90 ).i18n = "livestats" - entry( {"mini", "network", "trafstat"}, template("livestats/traffic"), luci.i18n.translate("livestats_stat_traffic"), 91 ).i18n = "livestats" - entry( {"mini", "system", "loadavg"}, template("livestats/loadavg"), luci.i18n.translate("livestats_stat_loadavg"), 92 ).i18n = "livestats" -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_fw/luci_fw.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_fw/luci_fw.lua deleted file mode 100644 index 2be03d6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_fw/luci_fw.lua +++ /dev/null @@ -1,13 +0,0 @@ -module("luci.controller.luci_fw.luci_fw", package.seeall) - -function index() - require("luci.i18n").loadc("luci-fw") - local i18n = luci.i18n.translate - - entry({"admin", "network", "firewall"}, alias("admin", "network", "firewall", "zones"), i18n("fw_fw"), 60).i18n = "luci-fw" - entry({"admin", "network", "firewall", "zones"}, cbi("luci_fw/zones"), i18n("fw_zones"), 10) - entry({"admin", "network", "firewall", "redirect"}, arcombine(cbi("luci_fw/redirect"), cbi("luci_fw/rrule")), i18n("fw_redirect"), 30).leaf = true - entry({"admin", "network", "firewall", "rule"}, arcombine(cbi("luci_fw/traffic"), cbi("luci_fw/trule")), i18n("fw_traffic"), 20).leaf = true - - entry({"mini", "network", "portfw"}, cbi("luci_fw/miniportfw", {autoapply=true}), i18n("fw_portfw", "Portweiterleitung"), 70).i18n = "luci-fw" -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_statistics/luci_statistics.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_statistics/luci_statistics.lua deleted file mode 100644 index f9fd60a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/luci_statistics/luci_statistics.lua +++ /dev/null @@ -1,198 +0,0 @@ ---[[ - -Luci statistics - statistics controller module -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: luci_statistics.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.luci_statistics.luci_statistics", package.seeall) - -function index() - - require("luci.fs") - require("luci.util") - require("luci.i18n") - require("luci.statistics.datatree") - - -- load language files - luci.i18n.loadc("rrdtool") - luci.i18n.loadc("statistics") - - -- get rrd data tree - local tree = luci.statistics.datatree.Instance() - - -- override entry(): check for existance .so where is derived from the called path - function _entry( path, ... ) - local file = path[5] or path[4] - if luci.fs.access( "/usr/lib/collectd/" .. file .. ".so" ) then - entry( path, ... ) - end - end - - -- override i18n(): try to translate stat_ or fall back to - function _i18n( str ) - return luci.i18n.translate( "stat_" .. str, str ) - end - - -- our collectd menu - local collectd_menu = { - output = { "rrdtool", "network", "unixsock", "csv" }, - system = { "exec", "email", "cpu", "df", "disk", "irq", "processes", "load" }, - network = { "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless" } - } - - -- create toplevel menu nodes - local st = entry({"admin", "statistics"}, call("statistics_index"), _i18n("statistics"), 80) - st.i18n = "statistics" - st.index = true - - entry({"admin", "statistics", "collectd"}, cbi("luci_statistics/collectd"), _i18n("collectd"), 10).subindex = true - - - -- populate collectd plugin menu - local index = 1 - for section, plugins in luci.util.kspairs( collectd_menu ) do - entry( - { "admin", "statistics", "collectd", section }, - call( "statistics_" .. section .. "plugins" ), - _i18n( section .. "plugins" ), - index * 10 - ).index = true - - for j, plugin in luci.util.vspairs( plugins ) do - _entry( - { "admin", "statistics", "collectd", section, plugin }, - cbi("luci_statistics/" .. plugin ), - _i18n( plugin ), - j * 10 - ) - end - - index = index + 1 - end - - -- output views - local page = entry( { "admin", "statistics", "graph" }, call("statistics_index"), _i18n("graphs"), 80) - page.i18n = "statistics" - page.setuser = "nobody" - page.setgroup = "nogroup" - - local vars = luci.http.formvalue(nil, true) - local span = vars.timespan or nil - - for i, plugin in luci.util.vspairs( tree:plugins() ) do - - -- get plugin instances - local instances = tree:plugin_instances( plugin ) - - -- plugin menu entry - entry( - { "admin", "statistics", "graph", plugin }, - call("statistics_render"), _i18n( plugin ), i - ).query = { timespan = span } - - -- if more then one instance is found then generate submenu - if #instances > 1 then - for j, inst in luci.util.vspairs(instances) do - -- instance menu entry - entry( - { "admin", "statistics", "graph", plugin, inst }, - call("statistics_render"), inst, j - ).query = { timespan = span } - end - end - end -end - -function statistics_index() - luci.template.render("admin_statistics/index") -end - -function statistics_outputplugins() - local plugins = { } - - for i, p in ipairs({ "rrdtool", "network", "unixsock", "csv" }) do - plugins[p] = luci.i18n.translate( "stat_" .. p, p ) - end - - luci.template.render("admin_statistics/outputplugins", {plugins=plugins}) -end - -function statistics_systemplugins() - local plugins = { } - - for i, p in ipairs({ "exec", "email", "df", "disk", "irq", "processes", "cpu" }) do - plugins[p] = luci.i18n.translate( "stat_" .. p, p ) - end - - luci.template.render("admin_statistics/systemplugins", {plugins=plugins}) -end - -function statistics_networkplugins() - local plugins = { } - - for i, p in ipairs({ "interface", "netlink", "iptables", "tcpconns", "ping", "dns", "wireless" }) do - plugins[p] = luci.i18n.translate( "stat_" .. p, p ) - end - - luci.template.render("admin_statistics/networkplugins", {plugins=plugins}) -end - - -function statistics_render() - - require("luci.statistics.rrdtool") - require("luci.template") - require("luci.model.uci") - - local vars = luci.http.formvalue() - local req = luci.dispatcher.context.request - local path = luci.dispatcher.context.path - local uci = luci.model.uci.cursor() - local spans = luci.util.split( uci:get( "luci_statistics", "collectd_rrdtool", "RRATimespans" ), "%s+", nil, true ) - local span = vars.timespan or uci:get( "luci_statistics", "rrdtool", "default_timespan" ) or spans[1] - local graph = luci.statistics.rrdtool.Graph( luci.util.parse_units( span ) ) - - local plugin, instances - local images = { } - - -- find requested plugin and instance - for i, p in ipairs( luci.dispatcher.context.path ) do - if luci.dispatcher.context.path[i] == "graph" then - plugin = luci.dispatcher.context.path[i+1] - instances = { luci.dispatcher.context.path[i+2] } - end - end - - -- no instance requested, find all instances - if #instances == 0 then - instances = { graph.tree:plugin_instances( plugin )[1] } - - -- index instance requested - elseif instances[1] == "-" then - instances[1] = "" - end - - - -- render graphs - for i, inst in ipairs( instances ) do - for i, img in ipairs( graph:render( plugin, inst ) ) do - table.insert( images, graph:strippngpath( img ) ) - end - end - - luci.template.render( "public_statistics/graph", { - images = images, - plugin = plugin, - timespans = spans, - current_timespan = span - } ) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/index.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/index.lua deleted file mode 100644 index 686d148..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/index.lua +++ /dev/null @@ -1,53 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -module("luci.controller.mini.index", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - local root = node() - if not root.lock then - root.target = alias("mini") - root.index = true - end - - entry({"about"}, template("about")).i18n = "admin-core" - - --[[ - local page = entry({"mini"}, alias("mini", "index"), i18n("essentials", "Essentials"), 10) - page.i18n = "admin-core" - page.sysauth = "root" - page.sysauth_authenticator = "htmlauth" - page.index = true - ]]-- - --entry({"mini", "index"}, alias("mini", "index", "index"), i18n("overview"), 10).index = true - --entry({"mini", "index", "index"}, form("mini/index"), i18n("general"), 1).ignoreindex = true - --entry({"system", "luci"}, cbi("mini/luci", {autoapply=true}), i18n("settings"), 10) - --entry({"mini", "index", "logout"}, call("action_logout"), i18n("logout")) -end - -function action_logout() - local dsp = require "luci.dispatcher" - local sauth = require "luci.sauth" - if dsp.context.authsession then - sauth.kill(dsp.context.authsession) - dsp.context.urltoken.stok = nil - end - - luci.http.header("Set-Cookie", "sysauth=; path=" .. dsp.build_url()) - luci.http.redirect(luci.dispatcher.build_url()) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/network.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/network.lua deleted file mode 100644 index 054b1ed..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/network.lua +++ /dev/null @@ -1,26 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: network.lua 3674 2008-10-31 09:35:53Z Cyrus $ -]]-- - -module("luci.controller.mini.network", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - -- entry({"network"}, alias("mini", "network", "index"), i18n("network"), 20).index = true - entry({"network"}, cbi("mini/network", {autoapply=true}), i18n("network"), 1) - entry({"wifi"}, cbi("mini/wifi", {autoapply=true}), i18n("wifi"), 10).i18n="wifi" - -- entry({"network", "dhcp"}, cbi("mini/dhcp", {autoapply=true}), "DHCP", 20) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/system.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/system.lua deleted file mode 100644 index 3723a4b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mini/system.lua +++ /dev/null @@ -1,24 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: system.lua 3743 2008-11-09 20:09:31Z Cyrus $ -]]-- - -module("luci.controller.mini.system", package.seeall) - -function index() - luci.i18n.loadc("admin-core") - local i18n = luci.i18n.translate - - entry({"system"}, cbi("mini/system", {autoapply=true}), i18n("system"), 1) - -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mmc_over_gpio.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mmc_over_gpio.lua deleted file mode 100644 index 9c86bfd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/mmc_over_gpio.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI mmc_over_gpio -(c) 2008 Yanira - -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 - -$Id: mmc_over_gpio.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.mmc_over_gpio", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("mmc_over_gpio") - if not luci.fs.access("/etc/config/mmc_over_gpio") then - return - end - - local page = entry({"admin", "system", "mmc_over_gpio"}, cbi("mmc_over_gpio"), luci.i18n.translate("mmc_over_gpio", "mmc_over_gpio"), 60) - page.i18n = "mmc_over_gpio" - page.dependent = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ntpc.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ntpc.lua deleted file mode 100644 index 46595a7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ntpc.lua +++ /dev/null @@ -1,32 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ntpc.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.ntpc", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("ntpc") - if not luci.fs.access("/etc/config/ntpclient") then - return - end - - local page = entry({"admin", "system", "ntpc"}, cbi("ntpc/ntpc"), luci.i18n.translate("ntpc"), 50) - page.i18n = "ntpc" - page.dependent = true - - - local page = entry({"mini", "system", "ntpc"}, cbi("ntpc/ntpcmini", {autoapply=true}), luci.i18n.translate("ntpc"), 50) - page.i18n = "ntpc" - page.dependent = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/olsr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/olsr.lua deleted file mode 100644 index 652f6b9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/olsr.lua +++ /dev/null @@ -1,225 +0,0 @@ -module("luci.controller.olsr", package.seeall) - -function index() - if not luci.fs.access("/etc/config/olsrd") then - return - end - - require("luci.i18n").loadc("olsr") - local i18n = luci.i18n.translate - - local page = node("admin", "status", "olsr") - page.target = call("action_index") - page.title = "OLSR" - page.i18n = "olsr" - page.subindex = true - - local page = node("admin", "status", "olsr", "routes") - page.target = call("action_routes") - page.title = i18n("olsr_routes", "Routen") - page.order = 10 - - local page = node("admin", "status", "olsr", "topology") - page.target = call("action_topology") - page.title = i18n("olsr_topology", "Topologie") - page.order = 20 - - local page = node("admin", "status", "olsr", "hna") - page.target = call("action_hna") - page.title = "HNA" - page.order = 30 - - local page = node("admin", "status", "olsr", "mid") - page.target = call("action_mid") - page.title = "MID" - page.order = 50 - - local ol = entry( - {"admin", "services", "olsrd"}, - cbi("olsr/olsrd"), "OLSR" - ) - ol.i18n = "olsr" - ol.subindex = true - - entry( - {"admin", "services", "olsrd", "hna"}, - cbi("olsr/olsrdhna"), "HNA Announcements" - ) - - oplg = entry( - {"admin", "services", "olsrd", "plugins"}, - cbi("olsr/olsrdplugins"), "Plugins" - ) - oplg.i18n = "olsr" - oplg.leaf = true - oplg.subindex = true - - local uci = require("luci.model.uci").cursor() - uci:foreach("olsrd", "LoadPlugin", - function (section) - local lib = section.library - entry( - {"admin", "services", "olsrd", "plugins", lib }, - cbi("olsr/olsrdplugins"), - nil --'Plugin "%s"' % lib:gsub("^olsrd_",""):gsub("%.so.+$","") - ) - end - ) -end - -function action_index() - local data = fetch_txtinfo("links") - - if not data or not data.Links then - luci.template.render("status-olsr/error_olsr") - return nil - end - - local function compare(a, b) - local c = tonumber(a.Cost) - local d = tonumber(b.Cost) - - if not c or c == 0 then - return false - end - - if not d or d == 0 then - return true - end - - return c < d - end - - table.sort(data.Links, compare) - - luci.template.render("status-olsr/index", {links=data.Links}) -end - -function action_routes() - local data = fetch_txtinfo("routes") - - if not data or not data.Routes then - luci.template.render("status-olsr/error_olsr") - return nil - end - - local function compare(a, b) - local c = tonumber(a.ETX) - local d = tonumber(b.ETX) - - if not c or c == 0 then - return false - end - - if not d or d == 0 then - return true - end - - return c < d - end - - table.sort(data.Routes, compare) - - luci.template.render("status-olsr/routes", {routes=data.Routes}) -end - -function action_topology() - local data = fetch_txtinfo("topology") - - if not data or not data.Topology then - luci.template.render("status-olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a["Dest. IP"] < b["Dest. IP"] - end - - table.sort(data.Topology, compare) - - luci.template.render("status-olsr/topology", {routes=data.Topology}) -end - -function action_hna() - local data = fetch_txtinfo("hna") - - if not data or not data.HNA then - luci.template.render("status-olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a.Destination < b.Destination - end - - table.sort(data.HNA, compare) - - luci.template.render("status-olsr/hna", {routes=data.HNA}) -end - -function action_mid() - local data = fetch_txtinfo("mid") - - if not data or not data.MID then - luci.template.render("status-olsr/error_olsr") - return nil - end - - local function compare(a, b) - return a["IP address"] < b["IP address"] - end - - table.sort(data.MID, compare) - - luci.template.render("status-olsr/mid", {mids=data.MID}) -end - - --- Internal -function fetch_txtinfo(otable) - require("luci.sys") - otable = otable or "" - local rawdata = luci.sys.httpget("http://127.0.0.1:2006/"..otable) - - if #rawdata == 0 then - if luci.fs.access("/proc/net/ipv6_route", "r") then - rawdata = luci.sys.httpget("http://[::1]:2006/"..otable) - if #rawdata == 0 then - return nil - end - else - return nil - end - end - - local data = {} - - local tables = luci.util.split(luci.util.trim(rawdata), "\r?\n\r?\n", nil, true) - - - for i, tbl in ipairs(tables) do - local lines = luci.util.split(tbl, "\r?\n", nil, true) - local name = table.remove(lines, 1):sub(8) - local keys = luci.util.split(table.remove(lines, 1), "\t") - local split = #keys - 1 - - data[name] = {} - - for j, line in ipairs(lines) do - local fields = luci.util.split(line, "\t", split) - data[name][j] = {} - for k, key in pairs(keys) do - data[name][j][key] = fields[k] - end - - if data[name][j].Linkcost then - data[name][j].LinkQuality, - data[name][j].NLQ, - data[name][j].ETX = - data[name][j].Linkcost:match("([%w.]+)/([%w.]+)[%s]+([%w.]+)") - end - end - end - - return data -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/p910nd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/p910nd.lua deleted file mode 100644 index 9dec110..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/p910nd.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI UVC Streamer -(c) 2008 Yanira - -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 - -$Id: p910nd.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.p910nd", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("p910nd") - if not luci.fs.access("/etc/config/p910nd") then - return - end - - local page = entry({"admin", "services", "p910nd"}, cbi("p910nd"), luci.i18n.translate("p910nd", "Printer server"), 60) - page.i18n = "p910nd" - page.dependent = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/polipo.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/polipo.lua deleted file mode 100644 index f521984..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/polipo.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Aleksandar Krsteski - -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 - -$Id: polipo.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.polipo", package.seeall) - -function index() - if not luci.fs.access("/etc/config/polipo") then - return - end - - require("luci.i18n") - luci.i18n.loadc("polipo") - local i18n = luci.i18n.translate - - local p = entry({"admin", "services", "polipo"}, cbi("polipo"), i18n("polipo", "Polipo")) - p.dependent = true - p.i18n = "polipo" -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/qos.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/qos.lua deleted file mode 100644 index 7299dfa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/qos.lua +++ /dev/null @@ -1,29 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: qos.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.qos", package.seeall) - -function index() - if not luci.fs.access("/etc/config/qos") then - return - end - - local page = entry({"admin", "network", "qos"}, cbi("qos/qos"), "QoS") - page.i18n = "qos" - page.dependent = true - - - local page = entry({"mini", "network", "qos"}, cbi("qos/qosmini", {autoapply=true}), "QoS") - page.i18n = "qos" - page.dependent = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/rpc.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/rpc.lua deleted file mode 100644 index a1d1b89..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/rpc.lua +++ /dev/null @@ -1,179 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: rpc.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -local require = require -local pairs = pairs -local print = print -local pcall = pcall -local table = table - -module "luci.controller.rpc" - -function index() - local function authenticator(validator, accs) - local auth = luci.http.formvalue("auth", true) - if auth then - local sdat = luci.sauth.read(auth) - user = loadstring(sdat)().user - if user and luci.util.contains(accs, user) then - return user, auth - end - end - luci.http.status(403, "Forbidden") - end - - local rpc = node("rpc") - rpc.sysauth = "root" - rpc.sysauth_authenticator = authenticator - rpc.notemplate = true - - entry({"rpc", "uci"}, call("rpc_uci")) - entry({"rpc", "uvl"}, call("rpc_uvl")) - entry({"rpc", "fs"}, call("rpc_fs")) - entry({"rpc", "sys"}, call("rpc_sys")) - entry({"rpc", "ipkg"}, call("rpc_ipkg")) - entry({"rpc", "auth"}, call("rpc_auth")).sysauth = false -end - -function rpc_auth() - local jsonrpc = require "luci.jsonrpc" - local sauth = require "luci.sauth" - local http = require "luci.http" - local sys = require "luci.sys" - local ltn12 = require "luci.ltn12" - local util = require "luci.util" - - local loginstat - - local server = {} - server.challenge = function(user, pass) - local sid, token, secret - - if sys.user.checkpasswd(user, pass) then - sid = sys.uniqueid(16) - token = sys.uniqueid(16) - secret = sys.uniqueid(16) - - http.header("Set-Cookie", "sysauth=" .. sid.."; path=/") - sauth.write(sid, util.get_bytecode({ - user=user, - token=token, - secret=secret - })) - end - - return sid and {sid=sid, token=token, secret=secret} - end - - server.login = function(...) - local challenge = server.challenge(...) - return challenge and challenge.sid - end - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(server, http.source()), http.write) -end - -function rpc_uci() - if not pcall(require, "luci.model.uci") then - luci.http.status(404, "Not Found") - return nil - end - local uci = require "luci.jsonrpcbind.uci" - local jsonrpc = require "luci.jsonrpc" - local http = require "luci.http" - local ltn12 = require "luci.ltn12" - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(uci, http.source()), http.write) -end - -function rpc_uvl() - if not pcall(require, "luci.uvl") then - luci.http.status(404, "Not Found") - return nil - end - local uvl = require "luci.jsonrpcbind.uvl" - local jsonrpc = require "luci.jsonrpc" - local http = require "luci.http" - local ltn12 = require "luci.ltn12" - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(uvl, http.source()), http.write) -end - -function rpc_fs() - local util = require "luci.util" - local io = require "io" - local fs2 = util.clone(require "luci.fs") - local jsonrpc = require "luci.jsonrpc" - local http = require "luci.http" - local ltn12 = require "luci.ltn12" - - function fs2.readfile(filename) - local stat, mime = pcall(require, "mime") - if not stat then - error("Base64 support not available. Please install LuaSocket.") - end - - local fp = io.open(filename) - if not fp then - return nil - end - - local output = {} - local sink = ltn12.sink.table(output) - local source = ltn12.source.chain(ltn12.source.file(fp), mime.encode("base64")) - return ltn12.pump.all(source, sink) and table.concat(output) - end - - function fs2.writefile(filename, data) - local stat, mime = pcall(require, "mime") - if not stat then - error("Base64 support not available. Please install LuaSocket.") - end - - local file = io.open(filename, "w") - local sink = file and ltn12.sink.chain(mime.decode("base64"), ltn12.sink.file(file)) - return sink and ltn12.pump.all(ltn12.source.string(data), sink) or false - end - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(fs2, http.source()), http.write) -end - -function rpc_sys() - local sys = require "luci.sys" - local jsonrpc = require "luci.jsonrpc" - local http = require "luci.http" - local ltn12 = require "luci.ltn12" - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(sys, http.source()), http.write) -end - -function rpc_ipkg() - if not pcall(require, "luci.model.ipkg") then - luci.http.status(404, "Not Found") - return nil - end - local ipkg = require "luci.model.ipkg" - local jsonrpc = require "luci.jsonrpc" - local http = require "luci.http" - local ltn12 = require "luci.ltn12" - - http.prepare_content("application/json") - ltn12.pump.all(jsonrpc.handle(ipkg, http.source()), http.write) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/samba.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/samba.lua deleted file mode 100644 index c5f5834..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/samba.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: samba.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.samba", package.seeall) - -function index() - if not luci.fs.access("/etc/config/samba") then - return - end - require("luci.i18n") - luci.i18n.loadc("samba") - - local page = entry({"admin", "services", "samba"}, cbi("samba"), luci.i18n.translate("samba")) - page.i18n = "samba" - page.dependent = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/siitwizard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/siitwizard.lua deleted file mode 100644 index 64c9b98..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/siitwizard.lua +++ /dev/null @@ -1,21 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: siitwizard.lua 3934 2008-12-23 05:18:08Z jow $ - -]]-- - -module "luci.controller.siitwizard" - -function index() - entry({"admin", "network", "siitwizard"}, form("siitwizard"), "SIIT 4over6 assistent", 99) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/splash/splash.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/splash/splash.lua deleted file mode 100644 index b046ff4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/splash/splash.lua +++ /dev/null @@ -1,29 +0,0 @@ -module("luci.controller.splash.splash", package.seeall) - -function index() - entry({"admin", "services", "splash"}, cbi("splash/splash"), "Client-Splash") - - node("splash").target = call("action_dispatch") - node("splash", "splash", "activate").target = call("action_activate") - node("splash", "splash", "splash").target = template("splash_splash/splash") -end - -function action_dispatch() - local mac = luci.sys.net.ip4mac(luci.http.getenv("REMOTE_ADDR")) or "" - local status = luci.util.execl("luci-splash status "..mac)[1] - if #mac > 0 and ( status == "whitelisted" or status == "lease" ) then - luci.http.redirect(luci.dispatcher.build_url()) - else - luci.http.redirect(luci.dispatcher.build_url("splash", "splash", "splash")) - end -end - -function action_activate() - local mac = luci.sys.net.ip4mac(luci.http.getenv("REMOTE_ADDR")) - if mac and luci.http.formvalue("accept") then - os.execute("luci-splash add "..mac.." >/dev/null 2>&1") - luci.http.redirect(luci.model.uci.cursor():get("freifunk", "community", "homepage")) - else - luci.http.redirect(luci.dispatcher.build_url()) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/tinyproxy.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/tinyproxy.lua deleted file mode 100644 index 4919c2a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/tinyproxy.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: tinyproxy.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.tinyproxy", package.seeall) - -function index() - if not luci.fs.access("/etc/config/tinyproxy") then - return - end - - local page = entry({"admin", "services", "tinyproxy"}, cbi("tinyproxy"), "Tinyproxy") - page.dependent = true - page.i18n = "tinyproxy" -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/upnp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/upnp.lua deleted file mode 100644 index 7343bcc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/upnp.lua +++ /dev/null @@ -1,30 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upnp.lua 3987 2009-01-02 21:35:25Z Cyrus $ -]]-- -module("luci.controller.upnp", package.seeall) - -function index() - if not luci.fs.access("/etc/config/upnpd") then - return - end - - local page = entry({"admin", "services", "upnp"}, cbi("upnp/upnp"), "UPNP") - page.i18n = "upnp" - page.dependent = true - - - local page = entry({"mini", "network", "upnp"}, cbi("upnp/upnpmini", {autoapply=true}), "UPNP") - page.i18n = "upnp" - page.dependent = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ushare.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ushare.lua deleted file mode 100644 index 702e446..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/ushare.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI uShare -(c) 2008 Yanira - -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 - -$Id: ushare.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.ushare", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("ushare") - if not luci.fs.access("/etc/config/ushare") then - return - end - - local page = entry({"admin", "services", "ushare"}, cbi("ushare"), luci.i18n.translate("ushare", "uShare"), 60) - page.i18n = "uvc_streamer" - page.dependent = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/uvc_streamer.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/uvc_streamer.lua deleted file mode 100644 index 7de7895..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/controller/uvc_streamer.lua +++ /dev/null @@ -1,28 +0,0 @@ ---[[ - -LuCI UVC Streamer -(c) 2008 Yanira - -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 - -$Id: uvc_streamer.lua 3987 2009-01-02 21:35:25Z Cyrus $ - -]]-- - -module("luci.controller.uvc_streamer", package.seeall) - -function index() - require("luci.i18n") - luci.i18n.loadc("uvc_streamer") - if not luci.fs.access("/etc/config/uvc-streamer") then - return - end - - local page = entry({"admin", "services", "uvc_streamer"}, cbi("uvc_streamer"), luci.i18n.translate("uvc_streamer", "UVC Streaming"), 60) - page.i18n = "uvc_streamer" - page.dependent = true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/debug.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/debug.lua deleted file mode 100644 index f991ab8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/debug.lua +++ /dev/null @@ -1,25 +0,0 @@ -local debug = require "debug" -local io = require "io" -local collectgarbage = collectgarbage - -module "luci.debug" -__file__ = debug.getinfo(1, 'S').source:sub(2) - --- Enables the memory tracer with given flags and returns a function to disable the tracer again -function trap_memtrace(flags) - flags = flags or "l" - local tracefile = io.open("/tmp/memtrace", "w") - - local function trap(what, line) - local info = debug.getinfo(2, "Sn") - tracefile:write(info.source..":"..line.."\t"..(info.namewhat or "").."\t"..(info.name or "").."\t"..collectgarbage("count").."\n") - end - - debug.sethook(trap, flags) - - return function() - debug.sethook() - tracefile:close() - end -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/dispatcher.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/dispatcher.lua deleted file mode 100644 index ab5e7a4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/dispatcher.lua +++ /dev/null @@ -1,720 +0,0 @@ ---[[ -LuCI - Dispatcher - -Description: -The request dispatcher and module dispatcher generators - -FileId: -$Id: dispatcher.lua 4189 2009-01-30 15:29:53Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - ---- LuCI web dispatcher. -local fs = require "luci.fs" -local sys = require "luci.sys" -local init = require "luci.init" -local util = require "luci.util" -local http = require "luci.http" - -module("luci.dispatcher", package.seeall) -context = util.threadlocal() - -authenticator = {} - --- Index table -local index = nil - --- Fastindex -local fi - - ---- Build the URL relative to the server webroot from given virtual path. --- @param ... Virtual path --- @return Relative URL -function build_url(...) - local path = {...} - local sn = http.getenv("SCRIPT_NAME") or "" - for k, v in pairs(context.urltoken) do - sn = sn .. "/;" .. k .. "=" .. http.urlencode(v) - end - return sn .. ((#path > 0) and "/" .. table.concat(path, "/") or "") -end - ---- Send a 404 error code and render the "error404" template if available. --- @param message Custom error message (optional) --- @return false -function error404(message) - luci.http.status(404, "Not Found") - message = message or "Not Found" - - require("luci.template") - if not luci.util.copcall(luci.template.render, "error404") then - luci.http.prepare_content("text/plain") - luci.http.write(message) - end - return false -end - ---- Send a 500 error code and render the "error500" template if available. --- @param message Custom error message (optional)# --- @return false -function error500(message) - luci.http.status(500, "Internal Server Error") - - require("luci.template") - if not luci.util.copcall(luci.template.render, "error500", {message=message}) then - luci.http.prepare_content("text/plain") - luci.http.write(message) - end - return false -end - -function authenticator.htmlauth(validator, accs, default) - local user = luci.http.formvalue("username") - local pass = luci.http.formvalue("password") - - if user and validator(user, pass) then - return user - end - - require("luci.i18n") - require("luci.template") - context.path = {} - luci.template.render("sysauth", {duser=default, fuser=user}) - return false - -end - ---- Dispatch an HTTP request. --- @param request LuCI HTTP Request object -function httpdispatch(request) - luci.http.context.request = request - context.request = {} - local pathinfo = http.urldecode(request:getenv("PATH_INFO") or "", true) - - for node in pathinfo:gmatch("[^/]+") do - table.insert(context.request, node) - end - - local stat, err = util.copcall(dispatch, context.request) - if not stat then - luci.util.perror(err) - error500(err) - end - - luci.http.close() - - --context._disable_memtrace() -end - ---- Dispatches a LuCI virtual path. --- @param request Virtual path -function dispatch(request) - --context._disable_memtrace = require "luci.debug".trap_memtrace() - local ctx = context - ctx.path = request - ctx.urltoken = ctx.urltoken or {} - - local conf = require "luci.config" - local lang = conf.main.lang - if lang == "auto" then - local aclang = http.getenv("HTTP_ACCEPT_LANGUAGE") or "" - for lpat in aclang:gmatch("[%w-]+") do - lpat = lpat and lpat:gsub("-", "_") - if conf.languages[lpat] then - lang = lpat - break - end - end - end - require "luci.i18n".setlanguage(lang) - - local c = ctx.tree - local stat - if not c then - c = createtree() - end - - local track = {} - local args = {} - ctx.args = args - ctx.requestargs = ctx.requestargs or args - local n - local t = true - local token = ctx.urltoken - local preq = {} - local freq = {} - - for i, s in ipairs(request) do - local tkey, tval - if t then - tkey, tval = s:match(";(%w+)=(.*)") - end - - if tkey then - token[tkey] = tval - else - t = false - preq[#preq+1] = s - freq[#freq+1] = s - c = c.nodes[s] - n = i - if not c then - break - end - - util.update(track, c) - - if c.leaf then - break - end - end - end - - if c and c.leaf then - for j=n+1, #request do - args[#args+1] = request[j] - freq[#freq+1] = request[j] - end - end - - ctx.requestpath = freq - ctx.path = preq - - if track.i18n then - require("luci.i18n").loadc(track.i18n) - end - - -- Init template engine - if (c and c.index) or not track.notemplate then - local tpl = require("luci.template") - local media = track.mediaurlbase or luci.config.main.mediaurlbase - if not pcall(tpl.Template, "themes/%s/header" % fs.basename(media)) then - media = nil - for name, theme in pairs(luci.config.themes) do - if name:sub(1,1) ~= "." and pcall(tpl.Template, - "themes/%s/header" % fs.basename(theme)) then - media = theme - end - end - assert(media, "No valid theme found") - end - - local viewns = setmetatable({}, {__index=function(table, key) - if key == "controller" then - return build_url() - elseif key == "REQUEST_URI" then - return build_url(unpack(ctx.requestpath)) - else - return rawget(table, key) or _G[key] - end - end}) - tpl.context.viewns = viewns - viewns.write = luci.http.write - viewns.include = function(name) tpl.Template(name):render(getfenv(2)) end - viewns.translate = function(...) return require("luci.i18n").translate(...) end - viewns.striptags = util.striptags - viewns.media = media - viewns.theme = fs.basename(media) - viewns.resource = luci.config.main.resourcebase - end - - track.dependent = (track.dependent ~= false) - assert(not track.dependent or not track.auto, "Access Violation") - - if track.sysauth then - local sauth = require "luci.sauth" - - local authen = type(track.sysauth_authenticator) == "function" - and track.sysauth_authenticator - or authenticator[track.sysauth_authenticator] - - local def = (type(track.sysauth) == "string") and track.sysauth - local accs = def and {track.sysauth} or track.sysauth - local sess = ctx.authsession - local verifytoken = false - if not sess then - sess = luci.http.getcookie("sysauth") - sess = sess and sess:match("^[A-F0-9]+$") - verifytoken = true - end - - local sdat = sauth.read(sess) - local user - - if sdat then - sdat = loadstring(sdat)() - if not verifytoken or ctx.urltoken.stok == sdat.token then - user = sdat.user - end - end - - if not util.contains(accs, user) then - if authen then - ctx.urltoken.stok = nil - local user, sess = authen(luci.sys.user.checkpasswd, accs, def) - if not user or not util.contains(accs, user) then - return - else - local sid = sess or luci.sys.uniqueid(16) - if not sess then - local token = luci.sys.uniqueid(16) - sauth.write(sid, util.get_bytecode({ - user=user, - token=token, - secret=luci.sys.uniqueid(16) - })) - ctx.urltoken.stok = token - end - luci.http.header("Set-Cookie", "sysauth=" .. sid.."; path="..build_url()) - ctx.authsession = sid - end - else - luci.http.status(403, "Forbidden") - return - end - else - ctx.authsession = sess - end - end - - if track.setgroup then - luci.sys.process.setgroup(track.setgroup) - end - - if track.setuser then - luci.sys.process.setuser(track.setuser) - end - - local target = nil - if c then - if type(c.target) == "function" then - target = c.target - elseif type(c.target) == "table" then - target = c.target.target - end - end - - if c and (c.index or type(target) == "function") then - ctx.dispatched = c - ctx.requested = ctx.requested or ctx.dispatched - end - - if c and c.index then - local tpl = require "luci.template" - - if util.copcall(tpl.render, "indexer", {}) then - return true - end - end - - if type(target) == "function" then - util.copcall(function() - local oldenv = getfenv(target) - local module = require(c.module) - local env = setmetatable({}, {__index= - - function(tbl, key) - return rawget(tbl, key) or module[key] or oldenv[key] - end}) - - setfenv(target, env) - end) - - if type(c.target) == "table" then - target(c.target, unpack(args)) - else - target(unpack(args)) - end - else - error404() - end -end - ---- Generate the dispatching index using the best possible strategy. -function createindex() - local path = luci.util.libpath() .. "/controller/" - local suff = ".lua" - - if luci.util.copcall(require, "luci.fastindex") then - createindex_fastindex(path, suff) - else - createindex_plain(path, suff) - end -end - ---- Generate the dispatching index using the fastindex C-indexer. --- @param path Controller base directory --- @param suffix Controller file suffix -function createindex_fastindex(path, suffix) - index = {} - - if not fi then - fi = luci.fastindex.new("index") - fi.add(path .. "*" .. suffix) - fi.add(path .. "*/*" .. suffix) - end - fi.scan() - - for k, v in pairs(fi.indexes) do - index[v[2]] = v[1] - end -end - ---- Generate the dispatching index using the native file-cache based strategy. --- @param path Controller base directory --- @param suffix Controller file suffix -function createindex_plain(path, suffix) - local controllers = util.combine( - luci.fs.glob(path .. "*" .. suffix) or {}, - luci.fs.glob(path .. "*/*" .. suffix) or {} - ) - - if indexcache then - local cachedate = fs.mtime(indexcache) - if cachedate then - local realdate = 0 - for _, obj in ipairs(controllers) do - local omtime = fs.mtime(path .. "/" .. obj) - realdate = (omtime and omtime > realdate) and omtime or realdate - end - - if cachedate > realdate then - assert( - sys.process.info("uid") == fs.stat(indexcache, "uid") - and fs.stat(indexcache, "mode") == "rw-------", - "Fatal: Indexcache is not sane!" - ) - - index = loadfile(indexcache)() - return index - end - end - end - - index = {} - - for i,c in ipairs(controllers) do - local module = "luci.controller." .. c:sub(#path+1, #c-#suffix):gsub("/", ".") - local mod = require(module) - local idx = mod.index - - if type(idx) == "function" then - index[module] = idx - end - end - - if indexcache then - fs.writefile(indexcache, util.get_bytecode(index)) - fs.chmod(indexcache, "a-rwx,u+rw") - end -end - ---- Create the dispatching tree from the index. --- Build the index before if it does not exist yet. -function createtree() - if not index then - createindex() - end - - local ctx = context - local tree = {nodes={}} - local modi = {} - - ctx.treecache = setmetatable({}, {__mode="v"}) - ctx.tree = tree - ctx.modifiers = modi - - -- Load default translation - require "luci.i18n".loadc("default") - - local scope = setmetatable({}, {__index = luci.dispatcher}) - - for k, v in pairs(index) do - scope._NAME = k - setfenv(v, scope) - v() - end - - local function modisort(a,b) - return modi[a].order < modi[b].order - end - - for _, v in util.spairs(modi, modisort) do - scope._NAME = v.module - setfenv(v.func, scope) - v.func() - end - - return tree -end - ---- Register a tree modifier. --- @param func Modifier function --- @param order Modifier order value (optional) -function modifier(func, order) - context.modifiers[#context.modifiers+1] = { - func = func, - order = order or 0, - module - = getfenv(2)._NAME - } -end - ---- Clone a node of the dispatching tree to another position. --- @param path Virtual path destination --- @param clone Virtual path source --- @param title Destination node title (optional) --- @param order Destination node order value (optional) --- @return Dispatching tree node -function assign(path, clone, title, order) - local obj = node(unpack(path)) - obj.nodes = nil - obj.module = nil - - obj.title = title - obj.order = order - - setmetatable(obj, {__index = _create_node(clone)}) - - return obj -end - ---- Create a new dispatching node and define common parameters. --- @param path Virtual path --- @param target Target function to call when dispatched. --- @param title Destination node title --- @param order Destination node order value (optional) --- @return Dispatching tree node -function entry(path, target, title, order) - local c = node(unpack(path)) - - c.target = target - c.title = title - c.order = order - c.module = getfenv(2)._NAME - - return c -end - ---- Fetch or create a new dispatching node. --- @param ... Virtual path --- @return Dispatching tree node -function node(...) - local c = _create_node({...}) - - c.module = getfenv(2)._NAME - c.auto = nil - - return c -end - -function _create_node(path, cache) - if #path == 0 then - return context.tree - end - - cache = cache or context.treecache - local name = table.concat(path, ".") - local c = cache[name] - - if not c then - local new = {nodes={}, auto=true, path=util.clone(path)} - local last = table.remove(path) - - c = _create_node(path, cache) - - c.nodes[last] = new - cache[name] = new - - return new - else - return c - end -end - --- Subdispatchers -- - ---- Create a redirect to another dispatching node. --- @param ... Virtual path destination -function alias(...) - local req = {...} - return function(...) - for _, r in ipairs({...}) do - req[#req+1] = r - end - - dispatch(req) - end -end - ---- Rewrite the first x path values of the request. --- @param n Number of path values to replace --- @param ... Virtual path to replace removed path values with -function rewrite(n, ...) - local req = {...} - return function(...) - local dispatched = util.clone(context.dispatched) - - for i=1,n do - table.remove(dispatched, 1) - end - - for i, r in ipairs(req) do - table.insert(dispatched, i, r) - end - - for _, r in ipairs({...}) do - dispatched[#dispatched+1] = r - end - - dispatch(dispatched) - end -end - - -local function _call(self, ...) - if #self.argv > 0 then - return getfenv()[self.name](unpack(self.argv), ...) - else - return getfenv()[self.name](...) - end -end - ---- Create a function-call dispatching target. --- @param name Target function of local controller --- @param ... Additional parameters passed to the function -function call(name, ...) - return {type = "call", argv = {...}, name = name, target = _call} -end - - -local _template = function(self, ...) - require "luci.template".render(self.view) -end - ---- Create a template render dispatching target. --- @param name Template to be rendered -function template(name) - return {type = "template", view = name, target = _template} -end - - -local function _cbi(self, ...) - local cbi = require "luci.cbi" - local tpl = require "luci.template" - local http = require "luci.http" - - local config = self.config or {} - local maps = cbi.load(self.model, ...) - - local state = nil - - for i, res in ipairs(maps) do - if config.autoapply then - res.autoapply = config.autoapply - end - local cstate = res:parse() - if not state or cstate < state then - state = cstate - end - end - - if config.on_valid_to and state and state > 0 and state < 2 then - http.redirect(config.on_valid_to) - return - end - - if config.on_changed_to and state and state > 1 then - http.redirect(config.on_changed_to) - return - end - - if config.on_success_to and state and state > 0 then - http.redirect(config.on_success_to) - return - end - - if config.state_handler then - if not config.state_handler(state, maps) then - return - end - end - - local pageaction = true - http.header("X-CBI-State", state or 0) - tpl.render("cbi/header", {state = state}) - for i, res in ipairs(maps) do - res:render() - if res.pageaction == false then - pageaction = false - end - end - tpl.render("cbi/footer", {pageaction=pageaction, state = state, autoapply = config.autoapply}) -end - ---- Create a CBI model dispatching target. --- @param model CBI model to be rendered -function cbi(model, config) - return {type = "cbi", config = config, model = model, target = _cbi} -end - - -local function _arcombine(self, ...) - local argv = {...} - local target = #argv > 0 and self.targets[2] or self.targets[1] - setfenv(target.target, self.env) - target:target(unpack(argv)) -end - ---- Create a combined dispatching target for non argv and argv requests. --- @param trg1 Overview Target --- @param trg2 Detail Target -function arcombine(trg1, trg2) - return {type = "arcombine", env = getfenv(), target = _arcombine, targets = {trg1, trg2}} -end - - -local function _form(self, ...) - local cbi = require "luci.cbi" - local tpl = require "luci.template" - local http = require "luci.http" - - local maps = luci.cbi.load(self.model, ...) - local state = nil - - for i, res in ipairs(maps) do - local cstate = res:parse() - if not state or cstate < state then - state = cstate - end - end - - http.header("X-CBI-State", state or 0) - tpl.render("header") - for i, res in ipairs(maps) do - res:render() - end - tpl.render("footer") -end - ---- Create a CBI form model dispatching target. --- @param model CBI form model tpo be rendered -function form(model) - return {type = "cbi", model = model, target = _form} -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/fs.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/fs.lua deleted file mode 100644 index c574e3d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/fs.lua +++ /dev/null @@ -1,270 +0,0 @@ ---[[ -LuCI - Filesystem tools - -Description: -A module offering often needed filesystem manipulation functions - -FileId: -$Id: fs.lua 4104 2009-01-20 10:19:22Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local io = require "io" -local os = require "os" -local ltn12 = require "luci.ltn12" -local posix = require "posix" - -local type = type - ---- LuCI filesystem library. -module "luci.fs" - ---- Test for file access permission on given path. --- @class function --- @name access --- @param str String value containing the path --- @return Number containing the return code, 0 on sucess or nil on error --- @return String containing the error description (if any) --- @return Number containing the os specific errno (if any) -access = posix.access - ---- Evaluate given shell glob pattern and return a table containing all matching --- file and directory entries. --- @class function --- @name glob --- @param filename String containing the path of the file to read --- @return Table containing file and directory entries or nil if no matches --- @return String containing the error description (if no matches) --- @return Number containing the os specific errno (if no matches) -glob = posix.glob - ---- Checks wheather the given path exists and points to a regular file. --- @param filename String containing the path of the file to test --- @return Boolean indicating wheather given path points to regular file -function isfile(filename) - return posix.stat(filename, "type") == "regular" -end - ---- Checks wheather the given path exists and points to a directory. --- @param dirname String containing the path of the directory to test --- @return Boolean indicating wheather given path points to directory -function isdirectory(dirname) - return posix.stat(dirname, "type") == "directory" -end - ---- Read the whole content of the given file into memory. --- @param filename String containing the path of the file to read --- @return String containing the file contents or nil on error --- @return String containing the error message on error -function readfile(filename) - local fp, err = io.open(filename) - - if fp == nil then - return nil, err - end - - local data = fp:read("*a") - fp:close() - return data -end - ---- Write the contents of given string to given file. --- @param filename String containing the path of the file to read --- @param data String containing the data to write --- @return Boolean containing true on success or nil on error --- @return String containing the error message on error -function writefile(filename, data) - local fp, err = io.open(filename, "w") - - if fp == nil then - return nil, err - end - - fp:write(data) - fp:close() - - return true -end - ---- Copies a file. --- @param source Source file --- @param dest Destination --- @return Boolean containing true on success or nil on error -function copy(source, dest) - return ltn12.pump.all( - ltn12.source.file(io.open(source)), - ltn12.sink.file(io.open(dest, "w")) - ) -end - ---- Renames a file. --- @param source Source file --- @param dest Destination --- @return Boolean containing true on success or nil on error -function rename(source, dest) - local stat, err, code = os.rename(source, dest) - if code == 18 then - stat, err, code = copy(source, dest) - if stat then - stat, err, code = unlink(source) - end - end - return stat, err, code -end - ---- Get the last modification time of given file path in Unix epoch format. --- @param path String containing the path of the file or directory to read --- @return Number containing the epoch time or nil on error --- @return String containing the error description (if any) --- @return Number containing the os specific errno (if any) -function mtime(path) - return posix.stat(path, "mtime") -end - ---- Set the last modification time of given file path in Unix epoch format. --- @param path String containing the path of the file or directory to read --- @param mtime Last modification timestamp --- @param atime Last accessed timestamp --- @return 0 in case of success nil on error --- @return String containing the error description (if any) --- @return Number containing the os specific errno (if any) -utime = posix.utime - ---- Return the last element - usually the filename - from the given path with --- the directory component stripped. --- @class function --- @name basename --- @param path String containing the path to strip --- @return String containing the base name of given path --- @see dirname -basename = posix.basename - ---- Return the directory component of the given path with the last element --- stripped of. --- @class function --- @name dirname --- @param path String containing the path to strip --- @return String containing the directory component of given path --- @see basename -dirname = posix.dirname - ---- Return a table containing all entries of the specified directory. --- @class function --- @name dir --- @param path String containing the path of the directory to scan --- @return Table containing file and directory entries or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -dir = posix.dir - ---- Create a new directory, recursively on demand. --- @param path String with the name or path of the directory to create --- @param recursive Create multiple directory levels (optional, default is true) --- @return Number with the return code, 0 on sucess or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -function mkdir(path, recursive) - if recursive then - local base = "." - - if path:sub(1,1) == "/" then - base = "" - path = path:gsub("^/+","") - end - - for elem in path:gmatch("([^/]+)/*") do - base = base .. "/" .. elem - - local stat = posix.stat( base ) - - if not stat then - local stat, errmsg, errno = posix.mkdir( base ) - - if type(stat) ~= "number" or stat ~= 0 then - return stat, errmsg, errno - end - else - if stat.type ~= "directory" then - return nil, base .. ": File exists", 17 - end - end - end - - return 0 - else - return posix.mkdir( path ) - end -end - ---- Remove the given empty directory. --- @class function --- @name rmdir --- @param path String containing the path of the directory to remove --- @return Number with the return code, 0 on sucess or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -rmdir = posix.rmdir - ---- Get information about given file or directory. --- @class function --- @name stat --- @param path String containing the path of the directory to query --- @return Table containing file or directory properties or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -stat = posix.stat - ---- Set permissions on given file or directory. --- @class function --- @name chmod --- @param path String containing the path of the directory --- @param perm String containing the permissions to set ([ugoa][+-][rwx]) --- @return Number with the return code, 0 on sucess or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -chmod = posix.chmod - ---- Create a hard- or symlink from given file (or directory) to specified target --- file (or directory) path. --- @class function --- @name link --- @param path1 String containing the source path to link --- @param path2 String containing the destination path for the link --- @param symlink Boolean indicating wheather to create a symlink (optional) --- @return Number with the return code, 0 on sucess or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -link = posix.link - ---- Remove the given file. --- @class function --- @name unlink --- @param path String containing the path of the file to remove --- @return Number with the return code, 0 on sucess or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -unlink = posix.unlink - ---- Retrieve target of given symlink. --- @class function --- @name readlink --- @param path String containing the path of the symlink to read --- @return String containing the link target or nil on error --- @return String containing the error description on error --- @return Number containing the os specific errno on error -readlink = posix.readlink diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http.lua deleted file mode 100644 index eecedcb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http.lua +++ /dev/null @@ -1,293 +0,0 @@ ---[[ -LuCI - HTTP-Interaction - -Description: -HTTP-Header manipulator and form variable preprocessor - -FileId: -$Id: http.lua 3838 2008-11-29 21:59:06Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local ltn12 = require "luci.ltn12" -local protocol = require "luci.http.protocol" -local util = require "luci.util" -local string = require "string" -local coroutine = require "coroutine" - -local pairs, tostring, error = pairs, tostring, error - ---- LuCI Web Framework high-level HTTP functions. -module "luci.http" - -context = util.threadlocal() - -Request = util.class() -function Request.__init__(self, env, sourcein, sinkerr) - self.input = sourcein - self.error = sinkerr - - - -- File handler - self.filehandler = function() end - - -- HTTP-Message table - self.message = { - env = env, - headers = {}, - params = protocol.urldecode_params(env.QUERY_STRING or ""), - } - - self.parsed_input = false -end - -function Request.formvalue(self, name, noparse) - if not noparse and not self.parsed_input then - self:_parse_input() - end - - if name then - return self.message.params[name] - else - return self.message.params - end -end - -function Request.formvaluetable(self, prefix) - local vals = {} - prefix = prefix and prefix .. "." or "." - - if not self.parsed_input then - self:_parse_input() - end - - local void = self.message.params[nil] - for k, v in pairs(self.message.params) do - if k:find(prefix, 1, true) == 1 then - vals[k:sub(#prefix + 1)] = tostring(v) - end - end - - return vals -end - -function Request.content(self) - if not self.parsed_input then - self:_parse_input() - end - - return self.message.content, self.message.content_length -end - -function Request.getcookie(self, name) - local c = string.gsub(";" .. (self:getenv("HTTP_COOKIE") or "") .. ";", "%s*;%s*", ";") - local p = ";" .. name .. "=(.-);" - local i, j, value = c:find(p) - return value and urldecode(value) -end - -function Request.getenv(self, name) - if name then - return self.message.env[name] - else - return self.message.env - end -end - -function Request.setfilehandler(self, callback) - self.filehandler = callback -end - -function Request._parse_input(self) - protocol.parse_message_body( - self.input, - self.message, - self.filehandler - ) - self.parsed_input = true -end - ---- Close the HTTP-Connection. -function close() - if not context.eoh then - context.eoh = true - coroutine.yield(3) - end - - if not context.closed then - context.closed = true - coroutine.yield(5) - end -end - ---- Return the request content if the request was of unknown type. --- @return HTTP request body --- @return HTTP request body length -function content() - return context.request:content() -end - ---- Get a certain HTTP input value or a table of all input values. --- @param name Name of the GET or POST variable to fetch --- @param noparse Don't parse POST data before getting the value --- @return HTTP input value or table of all input value -function formvalue(name, noparse) - return context.request:formvalue(name, noparse) -end - ---- Get a table of all HTTP input values with a certain prefix. --- @param prefix Prefix --- @return Table of all HTTP input values with given prefix -function formvaluetable(prefix) - return context.request:formvaluetable(prefix) -end - ---- Get the value of a certain HTTP-Cookie. --- @param name Cookie Name --- @return String containing cookie data -function getcookie(name) - return context.request:getcookie(name) -end - ---- Get the value of a certain HTTP environment variable --- or the environment table itself. --- @param name Environment variable --- @return HTTP environment value or environment table -function getenv(name) - return context.request:getenv(name) -end - ---- Set a handler function for incoming user file uploads. --- @param callback Handler function -function setfilehandler(callback) - return context.request:setfilehandler(callback) -end - ---- Send a HTTP-Header. --- @param key Header key --- @param value Header value -function header(key, value) - if not context.headers then - context.headers = {} - end - context.headers[key:lower()] = value - coroutine.yield(2, key, value) -end - ---- Set the mime type of following content data. --- @param mime Mimetype of following content -function prepare_content(mime) - if not context.headers or not context.headers["content-type"] then - if mime == "application/xhtml+xml" then - if not getenv("HTTP_ACCEPT") or - not getenv("HTTP_ACCEPT"):find("application/xhtml+xml", nil, true) then - mime = "text/html; charset=UTF-8" - end - header("Vary", "Accept") - end - header("Content-Type", mime) - end -end - ---- Get the RAW HTTP input source --- @return HTTP LTN12 source -function source() - return context.request.input -end - ---- Set the HTTP status code and status message. --- @param code Status code --- @param message Status message -function status(code, message) - code = code or 200 - message = message or "OK" - context.status = code - coroutine.yield(1, code, message) -end - ---- Send a chunk of content data to the client. --- This function is as a valid LTN12 sink. --- If the content chunk is nil this function will automatically invoke close. --- @param content Content chunk --- @param src_err Error object from source (optional) --- @see close -function write(content, src_err) - if not content then - if src_err then - error(src_err) - else - close() - end - return true - elseif #content == 0 then - return true - else - if not context.eoh then - if not context.status then - status() - end - if not context.headers or not context.headers["content-type"] then - header("Content-Type", "text/html; charset=utf-8") - end - if not context.headers["cache-control"] then - header("Cache-Control", "no-cache") - header("Expires", "0") - end - - - context.eoh = true - coroutine.yield(3) - end - coroutine.yield(4, content) - return true - end -end - ---- Redirects the client to a new URL and closes the connection. --- @param url Target URL -function redirect(url) - status(302, "Found") - header("Location", url) - close() -end - ---- Create a querystring out of a table of key - value pairs. --- @param table Query string source table --- @return Encoded HTTP query string -function build_querystring(table) - local s="?" - - for k, v in pairs(table) do - s = s .. urlencode(k) .. "=" .. urlencode(v) .. "&" - end - - return s -end - ---- Return the URL-decoded equivalent of a string. --- @param str URL-encoded string --- @param no_plus Don't decode + to " " --- @return URL-decoded string --- @see urlencode -urldecode = protocol.urldecode - ---- Return the URL-encoded equivalent of a string. --- @param str Source string --- @return URL-encoded string --- @see urldecode -urlencode = protocol.urlencode diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol.lua deleted file mode 100644 index ba365d2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol.lua +++ /dev/null @@ -1,690 +0,0 @@ ---[[ - -HTTP protocol implementation for LuCI -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: protocol.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - ---- LuCI http protocol class. --- This class contains several functions useful for http message- and content --- decoding and to retrive form data from raw http messages. -module("luci.http.protocol", package.seeall) - -local ltn12 = require("luci.ltn12") - -HTTP_MAX_CONTENT = 1024*8 -- 8 kB maximum content size - ---- Decode an urlencoded string - optionally without decoding --- the "+" sign to " " - and return the decoded string. --- @param str Input string in x-www-urlencoded format --- @param no_plus Don't decode "+" signs to spaces --- @return The decoded string --- @see urlencode -function urldecode( str, no_plus ) - - local function __chrdec( hex ) - return string.char( tonumber( hex, 16 ) ) - end - - if type(str) == "string" then - if not no_plus then - str = str:gsub( "+", " " ) - end - - str = str:gsub( "%%([a-fA-F0-9][a-fA-F0-9])", __chrdec ) - end - - return str -end - ---- Extract and split urlencoded data pairs, separated bei either "&" or ";" --- from given url or string. Returns a table with urldecoded values. --- Simple parameters are stored as string values associated with the parameter --- name within the table. Parameters with multiple values are stored as array --- containing the corresponding values. --- @param url The url or string which contains x-www-urlencoded form data --- @param tbl Use the given table for storing values (optional) --- @return Table containing the urldecoded parameters --- @see urlencode_params -function urldecode_params( url, tbl ) - - local params = tbl or { } - - if url:find("?") then - url = url:gsub( "^.+%?([^?]+)", "%1" ) - end - - for pair in url:gmatch( "[^&;]+" ) do - - -- find key and value - local key = urldecode( pair:match("^([^=]+)") ) - local val = urldecode( pair:match("^[^=]+=(.+)$") ) - - -- store - if type(key) == "string" and key:len() > 0 then - if type(val) ~= "string" then val = "" end - - if not params[key] then - params[key] = val - elseif type(params[key]) ~= "table" then - params[key] = { params[key], val } - else - table.insert( params[key], val ) - end - end - end - - return params -end - ---- Encode given string to x-www-urlencoded format. --- @param str String to encode --- @return String containing the encoded data --- @see urldecode -function urlencode( str ) - - local function __chrenc( chr ) - return string.format( - "%%%02x", string.byte( chr ) - ) - end - - if type(str) == "string" then - str = str:gsub( - "([^a-zA-Z0-9$_%-%.%+!*'(),])", - __chrenc - ) - end - - return str -end - ---- Encode each key-value-pair in given table to x-www-urlencoded format, --- separated by "&". Tables are encoded as parameters with multiple values by --- repeating the parameter name with each value. --- @param tbl Table with the values --- @return String containing encoded values --- @see urldecode_params -function urlencode_params( tbl ) - local enc = "" - - for k, v in pairs(tbl) do - if type(v) == "table" then - for i, v2 in ipairs(v) do - enc = enc .. ( #enc > 0 and "&" or "" ) .. - urlencode(k) .. "=" .. urlencode(v2) - end - else - enc = enc .. ( #enc > 0 and "&" or "" ) .. - urlencode(k) .. "=" .. urlencode(v) - end - end - - return enc -end - --- (Internal function) --- Initialize given parameter and coerce string into table when the parameter --- already exists. --- @param tbl Table where parameter should be created --- @param key Parameter name --- @return Always nil -local function __initval( tbl, key ) - if tbl[key] == nil then - tbl[key] = "" - elseif type(tbl[key]) == "string" then - tbl[key] = { tbl[key], "" } - else - table.insert( tbl[key], "" ) - end -end - --- (Internal function) --- Append given data to given parameter, either by extending the string value --- or by appending it to the last string in the parameter's value table. --- @param tbl Table containing the previously initialized parameter value --- @param key Parameter name --- @param chunk String containing the data to append --- @return Always nil --- @see __initval -local function __appendval( tbl, key, chunk ) - if type(tbl[key]) == "table" then - tbl[key][#tbl[key]] = tbl[key][#tbl[key]] .. chunk - else - tbl[key] = tbl[key] .. chunk - end -end - --- (Internal function) --- Finish the value of given parameter, either by transforming the string value --- or - in the case of multi value parameters - the last element in the --- associated values table. --- @param tbl Table containing the previously initialized parameter value --- @param key Parameter name --- @param handler Function which transforms the parameter value --- @return Always nil --- @see __initval --- @see __appendval -local function __finishval( tbl, key, handler ) - if handler then - if type(tbl[key]) == "table" then - tbl[key][#tbl[key]] = handler( tbl[key][#tbl[key]] ) - else - tbl[key] = handler( tbl[key] ) - end - end -end - - --- Table of our process states -local process_states = { } - --- Extract "magic", the first line of a http message. --- Extracts the message type ("get", "post" or "response"), the requested uri --- or the status code if the line descripes a http response. -process_states['magic'] = function( msg, chunk, err ) - - if chunk ~= nil then - -- ignore empty lines before request - if #chunk == 0 then - return true, nil - end - - -- Is it a request? - local method, uri, http_ver = chunk:match("^([A-Z]+) ([^ ]+) HTTP/([01]%.[019])$") - - -- Yup, it is - if method then - - msg.type = "request" - msg.request_method = method:lower() - msg.request_uri = uri - msg.http_version = tonumber( http_ver ) - msg.headers = { } - - -- We're done, next state is header parsing - return true, function( chunk ) - return process_states['headers']( msg, chunk ) - end - - -- Is it a response? - else - - local http_ver, code, message = chunk:match("^HTTP/([01]%.[019]) ([0-9]+) ([^\r\n]+)$") - - -- Is a response - if code then - - msg.type = "response" - msg.status_code = code - msg.status_message = message - msg.http_version = tonumber( http_ver ) - msg.headers = { } - - -- We're done, next state is header parsing - return true, function( chunk ) - return process_states['headers']( msg, chunk ) - end - end - end - end - - -- Can't handle it - return nil, "Invalid HTTP message magic" -end - - --- Extract headers from given string. -process_states['headers'] = function( msg, chunk ) - - if chunk ~= nil then - - -- Look for a valid header format - local hdr, val = chunk:match( "^([A-Za-z][A-Za-z0-9%-_]+): +(.+)$" ) - - if type(hdr) == "string" and hdr:len() > 0 and - type(val) == "string" and val:len() > 0 - then - msg.headers[hdr] = val - - -- Valid header line, proceed - return true, nil - - elseif #chunk == 0 then - -- Empty line, we won't accept data anymore - return false, nil - else - -- Junk data - return nil, "Invalid HTTP header received" - end - else - return nil, "Unexpected EOF" - end -end - - ---- Creates a ltn12 source from the given socket. The source will return it's --- data line by line with the trailing \r\n stripped of. --- @param sock Readable network socket --- @return Ltn12 source function -function header_source( sock ) - return ltn12.source.simplify( function() - - local chunk, err, part = sock:receive("*l") - - -- Line too long - if chunk == nil then - if err ~= "timeout" then - return nil, part - and "Line exceeds maximum allowed length" - or "Unexpected EOF" - else - return nil, err - end - - -- Line ok - elseif chunk ~= nil then - - -- Strip trailing CR - chunk = chunk:gsub("\r$","") - - return chunk, nil - end - end ) -end - ---- Decode a mime encoded http message body with multipart/form-data --- Content-Type. Stores all extracted data associated with its parameter name --- in the params table withing the given message object. Multiple parameter --- values are stored as tables, ordinary ones as strings. --- If an optional file callback function is given then it is feeded with the --- file contents chunk by chunk and only the extracted file name is stored --- within the params table. The callback function will be called subsequently --- with three arguments: --- o Table containing decoded (name, file) and raw (headers) mime header data --- o String value containing a chunk of the file data --- o Boolean which indicates wheather the current chunk is the last one (eof) --- @param src Ltn12 source function --- @param msg HTTP message object --- @param filecb File callback function (optional) --- @return Value indicating successful operation (not nil means "ok") --- @return String containing the error if unsuccessful --- @see parse_message_header -function mimedecode_message_body( src, msg, filecb ) - - if msg and msg.env.CONTENT_TYPE then - msg.mime_boundary = msg.env.CONTENT_TYPE:match("^multipart/form%-data; boundary=(.+)$") - end - - if not msg.mime_boundary then - return nil, "Invalid Content-Type found" - end - - - local tlen = 0 - local inhdr = false - local field = nil - local store = nil - local lchunk = nil - - local function parse_headers( chunk, field ) - - local stat - repeat - chunk, stat = chunk:gsub( - "^([A-Z][A-Za-z0-9%-_]+): +([^\r\n]+)\r\n", - function(k,v) - field.headers[k] = v - return "" - end - ) - until stat == 0 - - chunk, stat = chunk:gsub("^\r\n","") - - -- End of headers - if stat > 0 then - if field.headers["Content-Disposition"] then - if field.headers["Content-Disposition"]:match("^form%-data; ") then - field.name = field.headers["Content-Disposition"]:match('name="(.-)"') - field.file = field.headers["Content-Disposition"]:match('filename="(.+)"$') - end - end - - if not field.headers["Content-Type"] then - field.headers["Content-Type"] = "text/plain" - end - - if field.name and field.file and filecb then - __initval( msg.params, field.name ) - __appendval( msg.params, field.name, field.file ) - - store = filecb - elseif field.name then - __initval( msg.params, field.name ) - - store = function( hdr, buf, eof ) - __appendval( msg.params, field.name, buf ) - end - else - store = nil - end - - return chunk, true - end - - return chunk, false - end - - local function snk( chunk ) - - tlen = tlen + ( chunk and #chunk or 0 ) - - if msg.env.CONTENT_LENGTH and tlen > tonumber(msg.env.CONTENT_LENGTH) + 2 then - return nil, "Message body size exceeds Content-Length" - end - - if chunk and not lchunk then - lchunk = "\r\n" .. chunk - - elseif lchunk then - local data = lchunk .. ( chunk or "" ) - local spos, epos, found - - repeat - spos, epos = data:find( "\r\n--" .. msg.mime_boundary .. "\r\n", 1, true ) - - if not spos then - spos, epos = data:find( "\r\n--" .. msg.mime_boundary .. "--\r\n", 1, true ) - end - - - if spos then - local predata = data:sub( 1, spos - 1 ) - - if inhdr then - predata, eof = parse_headers( predata, field ) - - if not eof then - return nil, "Invalid MIME section header" - elseif not field.name then - return nil, "Invalid Content-Disposition header" - end - end - - if store then - store( field, predata, true ) - end - - - field = { headers = { } } - found = found or true - - data, eof = parse_headers( data:sub( epos + 1, #data ), field ) - inhdr = not eof - end - until not spos - - if found then - if #data > 78 then - lchunk = data:sub( #data - 78 + 1, #data ) - data = data:sub( 1, #data - 78 ) - - if store then - store( field, data, false ) - else - return nil, "Invalid MIME section header" - end - else - lchunk, data = data, nil - end - else - if inhdr then - lchunk, eof = parse_headers( data, field ) - inhdr = not eof - else - store( field, lchunk, false ) - lchunk, chunk = chunk, nil - end - end - end - - return true - end - - return ltn12.pump.all( src, snk ) -end - ---- Decode an urlencoded http message body with application/x-www-urlencoded --- Content-Type. Stores all extracted data associated with its parameter name --- in the params table withing the given message object. Multiple parameter --- values are stored as tables, ordinary ones as strings. --- @param src Ltn12 source function --- @param msg HTTP message object --- @return Value indicating successful operation (not nil means "ok") --- @return String containing the error if unsuccessful --- @see parse_message_header -function urldecode_message_body( src, msg ) - - local tlen = 0 - local lchunk = nil - - local function snk( chunk ) - - tlen = tlen + ( chunk and #chunk or 0 ) - - if msg.env.CONTENT_LENGTH and tlen > tonumber(msg.env.CONTENT_LENGTH) + 2 then - return nil, "Message body size exceeds Content-Length" - elseif tlen > HTTP_MAX_CONTENT then - return nil, "Message body size exceeds maximum allowed length" - end - - if not lchunk and chunk then - lchunk = chunk - - elseif lchunk then - local data = lchunk .. ( chunk or "&" ) - local spos, epos - - repeat - spos, epos = data:find("^.-[;&]") - - if spos then - local pair = data:sub( spos, epos - 1 ) - local key = pair:match("^(.-)=") - local val = pair:match("=([^%s]*)%s*$") - - if key and #key > 0 then - __initval( msg.params, key ) - __appendval( msg.params, key, val ) - __finishval( msg.params, key, urldecode ) - end - - data = data:sub( epos + 1, #data ) - end - until not spos - - lchunk = data - end - - return true - end - - return ltn12.pump.all( src, snk ) -end - ---- Try to extract an http message header including information like protocol --- version, message headers and resulting CGI environment variables from the --- given ltn12 source. --- @param src Ltn12 source function --- @return HTTP message object --- @see parse_message_body -function parse_message_header( src ) - - local ok = true - local msg = { } - - local sink = ltn12.sink.simplify( - function( chunk ) - return process_states['magic']( msg, chunk ) - end - ) - - -- Pump input data... - while ok do - - -- get data - ok, err = ltn12.pump.step( src, sink ) - - -- error - if not ok and err then - return nil, err - - -- eof - elseif not ok then - - -- Process get parameters - if ( msg.request_method == "get" or msg.request_method == "post" ) and - msg.request_uri:match("?") - then - msg.params = urldecode_params( msg.request_uri ) - else - msg.params = { } - end - - -- Populate common environment variables - msg.env = { - CONTENT_LENGTH = msg.headers['Content-Length']; - CONTENT_TYPE = msg.headers['Content-Type'] or msg.headers['Content-type']; - REQUEST_METHOD = msg.request_method:upper(); - REQUEST_URI = msg.request_uri; - SCRIPT_NAME = msg.request_uri:gsub("?.+$",""); - SCRIPT_FILENAME = ""; -- XXX implement me - SERVER_PROTOCOL = "HTTP/" .. string.format("%.1f", msg.http_version); - QUERY_STRING = msg.request_uri:match("?") - and msg.request_uri:gsub("^.+?","") or "" - } - - -- Populate HTTP_* environment variables - for i, hdr in ipairs( { - 'Accept', - 'Accept-Charset', - 'Accept-Encoding', - 'Accept-Language', - 'Connection', - 'Cookie', - 'Host', - 'Referer', - 'User-Agent', - } ) do - local var = 'HTTP_' .. hdr:upper():gsub("%-","_") - local val = msg.headers[hdr] - - msg.env[var] = val - end - end - end - - return msg -end - ---- Try to extract and decode a http message body from the given ltn12 source. --- This function will examine the Content-Type within the given message object --- to select the appropriate content decoder. --- Currently the application/x-www-urlencoded and application/form-data --- mime types are supported. If the encountered content encoding can't be --- handled then the whole message body will be stored unaltered as "content" --- property within the given message object. --- @param src Ltn12 source function --- @param msg HTTP message object --- @param filecb File data callback (optional, see mimedecode_message_body()) --- @return Value indicating successful operation (not nil means "ok") --- @return String containing the error if unsuccessful --- @see parse_message_header -function parse_message_body( src, msg, filecb ) - -- Is it multipart/mime ? - if msg.env.REQUEST_METHOD == "POST" and msg.env.CONTENT_TYPE and - msg.env.CONTENT_TYPE:match("^multipart/form%-data") - then - - return mimedecode_message_body( src, msg, filecb ) - - -- Is it application/x-www-form-urlencoded ? - elseif msg.env.REQUEST_METHOD == "POST" and msg.env.CONTENT_TYPE and - msg.env.CONTENT_TYPE:match("^application/x%-www%-form%-urlencoded") - then - return urldecode_message_body( src, msg, filecb ) - - - -- Unhandled encoding - -- If a file callback is given then feed it chunk by chunk, else - -- store whole buffer in message.content - else - - local sink - - -- If we have a file callback then feed it - if type(filecb) == "function" then - sink = filecb - - -- ... else append to .content - else - msg.content = "" - msg.content_length = 0 - - sink = function( chunk, err ) - if chunk then - if ( msg.content_length + #chunk ) <= HTTP_MAX_CONTENT then - msg.content = msg.content .. chunk - msg.content_length = msg.content_length + #chunk - return true - else - return nil, "POST data exceeds maximum allowed length" - end - end - return true - end - end - - -- Pump data... - while true do - local ok, err = ltn12.pump.step( src, sink ) - - if not ok and err then - return nil, err - elseif not err then - return true - end - end - - return true - end -end - ---- Table containing human readable messages for several http status codes. --- @class table -statusmsg = { - [200] = "OK", - [206] = "Partial Content", - [301] = "Moved Permanently", - [302] = "Found", - [304] = "Not Modified", - [400] = "Bad Request", - [403] = "Forbidden", - [404] = "Not Found", - [405] = "Method Not Allowed", - [408] = "Request Time-out", - [411] = "Length Required", - [412] = "Precondition Failed", - [416] = "Requested range not satisfiable", - [500] = "Internal Server Error", - [503] = "Server Unavailable", -} diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/conditionals.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/conditionals.lua deleted file mode 100644 index 24d6d16..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/conditionals.lua +++ /dev/null @@ -1,154 +0,0 @@ ---[[ - -HTTP protocol implementation for LuCI - RFC2616 / 14.19, 14.24 - 14.28 -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: conditionals.lua 3652 2008-10-29 19:41:33Z jow $ - -]]-- - ---- LuCI http protocol implementation - HTTP/1.1 bits. --- This class provides basic ETag handling and implements most of the --- conditional HTTP/1.1 headers specified in RFC2616 Sct. 14.24 - 14.28 . -module("luci.http.protocol.conditionals", package.seeall) - -local date = require("luci.http.protocol.date") - - ---- Implement 14.19 / ETag. --- @param stat A file.stat structure --- @return String containing the generated tag suitable for ETag headers -function mk_etag( stat ) - if stat ~= nil then - return string.format( '"%x-%x-%x"', stat.ino, stat.size, stat.mtime ) - end -end - ---- 14.24 / If-Match --- Test whether the given message object contains an "If-Match" header and --- compare it against the given stat object. --- @param req HTTP request message object --- @param stat A file.stat object --- @return Boolean indicating wheather the precondition is ok --- @return Alternative status code if the precondition failed -function if_match( req, stat ) - local h = req.headers - local etag = mk_etag( stat ) - - -- Check for matching resource - if type(h['If-Match']) == "string" then - for ent in h['If-Match']:gmatch("([^, ]+)") do - if ( ent == '*' or ent == etag ) and stat ~= nil then - return true - end - end - - return false, 412 - end - - return true -end - ---- 14.25 / If-Modified-Since --- Test whether the given message object contains an "If-Modified-Since" header --- and compare it against the given stat object. --- @param req HTTP request message object --- @param stat A file.stat object --- @return Boolean indicating wheather the precondition is ok --- @return Alternative status code if the precondition failed --- @return Table containing extra HTTP headers if the precondition failed -function if_modified_since( req, stat ) - local h = req.headers - - -- Compare mtimes - if type(h['If-Modified-Since']) == "string" then - local since = date.to_unix( h['If-Modified-Since'] ) - - if stat == nil or since < stat.mtime then - return true - end - - return false, 304, { - ["ETag"] = mk_etag( stat ); - ["Date"] = date.to_http( os.time() ); - ["Last-Modified"] = date.to_http( stat.mtime ) - } - end - - return true -end - ---- 14.26 / If-None-Match --- Test whether the given message object contains an "If-None-Match" header and --- compare it against the given stat object. --- @param req HTTP request message object --- @param stat A file.stat object --- @return Boolean indicating wheather the precondition is ok --- @return Alternative status code if the precondition failed --- @return Table containing extra HTTP headers if the precondition failed -function if_none_match( req, stat ) - local h = req.headers - local etag = mk_etag( stat ) - - -- Check for matching resource - if type(h['If-None-Match']) == "string" then - for ent in h['If-None-Match']:gmatch("([^, ]+)") do - if ( ent == '*' or ent == etag ) and stat ~= nil then - if req.request_method == "get" or - req.request_method == "head" - then - return false, 304, { - ["ETag"] = mk_etag( stat ); - ["Date"] = date.to_http( os.time() ); - ["Last-Modified"] = date.to_http( stat.mtime ) - } - else - return false, 412 - end - end - end - end - - return true -end - ---- 14.27 / If-Range --- The If-Range header is currently not implemented due to the lack of general --- byte range stuff in luci.http.protocol . This function will always return --- false, 412 to indicate a failed precondition. --- @param req HTTP request message object --- @param stat A file.stat object --- @return Boolean indicating wheather the precondition is ok --- @return Alternative status code if the precondition failed -function if_range( req, stat ) - -- Sorry, no subranges (yet) - return false, 412 -end - ---- 14.28 / If-Unmodified-Since --- Test whether the given message object contains an "If-Unmodified-Since" --- header and compare it against the given stat object. --- @param req HTTP request message object --- @param stat A file.stat object --- @return Boolean indicating wheather the precondition is ok --- @return Alternative status code if the precondition failed -function if_unmodified_since( req, stat ) - local h = req.headers - - -- Compare mtimes - if type(h['If-Unmodified-Since']) == "string" then - local since = date.to_unix( h['If-Unmodified-Since'] ) - - if stat ~= nil and since <= stat.mtime then - return false, 412 - end - end - - return true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/date.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/date.lua deleted file mode 100644 index 11a2475..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/date.lua +++ /dev/null @@ -1,115 +0,0 @@ ---[[ - -HTTP protocol implementation for LuCI - date handling -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: date.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - ---- LuCI http protocol implementation - date helper class. --- This class contains functions to parse, compare and format http dates. -module("luci.http.protocol.date", package.seeall) - -require("luci.sys.zoneinfo") - - -MONTHS = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", - "Sep", "Oct", "Nov", "Dec" -} - ---- Return the time offset in seconds between the UTC and given time zone. --- @param tz Symbolic or numeric timezone specifier --- @return Time offset to UTC in seconds -function tz_offset(tz) - - if type(tz) == "string" then - - -- check for a numeric identifier - local s, v = tz:match("([%+%-])([0-9]+)") - if s == '+' then s = 1 else s = -1 end - if v then v = tonumber(v) end - - if s and v then - return s * 60 * ( math.floor( v / 100 ) * 60 + ( v % 100 ) ) - - -- lookup symbolic tz - elseif luci.sys.zoneinfo.OFFSET[tz:lower()] then - return luci.sys.zoneinfo.OFFSET[tz:lower()] - end - - end - - -- bad luck - return 0 -end - ---- Parse given HTTP date string and convert it to unix epoch time. --- @param data String containing the date --- @return Unix epoch time -function to_unix(date) - - local wd, day, mon, yr, hr, min, sec, tz = date:match( - "([A-Z][a-z][a-z]), ([0-9]+) " .. - "([A-Z][a-z][a-z]) ([0-9]+) " .. - "([0-9]+):([0-9]+):([0-9]+) " .. - "([A-Z0-9%+%-]+)" - ) - - if day and mon and yr and hr and min and sec then - -- find month - local month = 1 - for i = 1, 12 do - if MONTHS[i] == mon then - month = i - break - end - end - - -- convert to epoch time - return tz_offset(tz) + os.time( { - year = yr, - month = month, - day = day, - hour = hr, - min = min, - sec = sec - } ) - end - - return 0 -end - ---- Convert the given unix epoch time to valid HTTP date string. --- @param time Unix epoch time --- @return String containing the formatted date -function to_http(time) - return os.date( "%a, %d %b %Y %H:%M:%S GMT", time ) -end - ---- Compare two dates which can either be unix epoch times or HTTP date strings. --- @param d1 The first date or epoch time to compare --- @param d2 The first date or epoch time to compare --- @return -1 - if d1 is lower then d2 --- @return 0 - if both dates are equal --- @return 1 - if d1 is higher then d2 -function compare(d1, d2) - - if d1:match("[^0-9]") then d1 = to_unix(d1) end - if d2:match("[^0-9]") then d2 = to_unix(d2) end - - if d1 == d2 then - return 0 - elseif d1 < d2 then - return -1 - else - return 1 - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/mime.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/mime.lua deleted file mode 100644 index 49f02b8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/http/protocol/mime.lua +++ /dev/null @@ -1,98 +0,0 @@ ---[[ - -HTTP protocol implementation for LuCI - mime handling -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: mime.lua 2641 2008-07-22 01:15:39Z jow $ - -]]-- - ---- LuCI http protocol implementation - mime helper class. --- This class provides functions to guess mime types from file extensions and --- vice versa. -module("luci.http.protocol.mime", package.seeall) - -require("luci.util") - ---- MIME mapping table containg extension - mimetype relations. --- @class table -MIME_TYPES = { - ["txt"] = "text/plain"; - ["js"] = "text/javascript"; - ["css"] = "text/css"; - ["htm"] = "text/html"; - ["html"] = "text/html"; - ["patch"] = "text/x-patch"; - ["c"] = "text/x-csrc"; - ["h"] = "text/x-chdr"; - ["o"] = "text/x-object"; - ["ko"] = "text/x-object"; - - ["bmp"] = "image/bmp"; - ["gif"] = "image/gif"; - ["png"] = "image/png"; - ["jpg"] = "image/jpeg"; - ["jpeg"] = "image/jpeg"; - ["svg"] = "image/svg+xml"; - - ["zip"] = "application/zip"; - ["pdf"] = "application/pdf"; - ["xml"] = "application/xml"; - ["doc"] = "application/msword"; - ["ppt"] = "application/vnd.ms-powerpoint"; - ["xls"] = "application/vnd.ms-excel"; - ["odt"] = "application/vnd.oasis.opendocument.text"; - ["odp"] = "application/vnd.oasis.opendocument.presentation"; - ["pl"] = "application/x-perl"; - ["sh"] = "application/x-shellscript"; - ["php"] = "application/x-php"; - ["deb"] = "application/x-deb"; - ["iso"] = "application/x-cd-image"; - ["tgz"] = "application/x-compressed-tar"; - - ["mp3"] = "audio/mpeg"; - ["ogg"] = "audio/x-vorbis+ogg"; - ["wav"] = "audio/x-wav"; - - ["mpg"] = "video/mpeg"; - ["mpeg"] = "video/mpeg"; - ["avi"] = "video/x-msvideo"; -} - ---- Extract extension from a filename and return corresponding mime-type or --- "application/octet-stream" if the extension is unknown. --- @param filename The filename for which the mime type is guessed --- @return String containign the determined mime type -function to_mime(filename) - if type(filename) == "string" then - local ext = filename:match("[^%.]+$") - - if ext and MIME_TYPES[ext:lower()] then - return MIME_TYPES[ext:lower()] - end - end - - return "application/octet-stream" -end - ---- Return corresponding extension for a given mime type or nil if the --- given mime-type is unknown. --- @param mimetype The mimetype to retrieve the extension from --- @return String with the extension or nil for unknown type -function to_ext(mimetype) - if type(mimetype) == "string" then - for ext, type in luci.util.kspairs( MIME_TYPES ) do - if type == mimetype then - return ext - end - end - end - - return nil -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd.lua deleted file mode 100644 index 609ae68..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd.lua +++ /dev/null @@ -1,126 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - core -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: httpd.lua 2974 2008-08-27 17:45:58Z Cyrus $ - -]]-- - -module("luci.httpd", package.seeall) -require("socket") - -THREAD_IDLEWAIT = 0.01 -THREAD_TIMEOUT = 90 -THREAD_LIMIT = nil - -local reading = {} -local clhandler = {} -local erhandler = {} - -local threadc = 0 -local threads = {} -local threadm = {} -local threadi = {} - -local _meta = {__mode = "k"} -setmetatable(threadm, _meta) -setmetatable(threadi, _meta) - - -function Socket(ip, port) - local sock, err = socket.bind( ip, port ) - - if sock then - sock:settimeout( 0, "t" ) - end - - return sock, err -end - -function corecv(socket, ...) - threadi[socket] = true - - while true do - local chunk, err, part = socket:receive(...) - - if err ~= "timeout" then - threadi[socket] = false - return chunk, err, part - end - - coroutine.yield() - end -end - -function cosend(socket, chunk, i, ...) - threadi[socket] = true - i = i or 1 - - while true do - local stat, err, sent = socket:send(chunk, i, ...) - - if err ~= "timeout" then - threadi[socket] = false - return stat, err, sent - else - i = sent and (sent + 1) or i - end - - coroutine.yield() - end -end - -function register(socket, s_clhandler, s_errhandler) - table.insert(reading, socket) - clhandler[socket] = s_clhandler - erhandler[socket] = s_errhandler -end - -function run() - while true do - step() - end -end - -function step() - local idle = true - if not THREAD_LIMIT or threadc < THREAD_LIMIT then - local now = os.time() - for i, server in ipairs(reading) do - local client = server:accept() - if client then - threadm[client] = now - threadc = threadc + 1 - threads[client] = coroutine.create(clhandler[server]) - end - end - end - - for client, thread in pairs(threads) do - coroutine.resume(thread, client) - local now = os.time() - if coroutine.status(thread) == "dead" then - threadc = threadc - 1 - threads[client] = nil - elseif threadm[client] and threadm[client] + THREAD_TIMEOUT < now then - threads[client] = nil - threadc = threadc - 1 - client:close() - elseif not threadi[client] then - threadm[client] = now - idle = false - end - end - - if idle then - socket.sleep(THREAD_IDLEWAIT) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/file.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/file.lua deleted file mode 100644 index 50e9a58..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/file.lua +++ /dev/null @@ -1,199 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - file handler -(c) 2008 Steven Barth -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: file.lua 2510 2008-07-05 20:12:24Z jow $ - -]]-- - -module("luci.httpd.handler.file", package.seeall) - -require("luci.httpd.module") -require("luci.http.protocol.date") -require("luci.http.protocol.mime") -require("luci.http.protocol.conditionals") -require("luci.fs") -local ltn12 = require("luci.ltn12") - -Simple = luci.util.class(luci.httpd.module.Handler) -Response = luci.httpd.module.Response - -function Simple.__init__(self, docroot, dirlist) - luci.httpd.module.Handler.__init__(self) - self.docroot = docroot - self.dirlist = dirlist and true or false - self.proto = luci.http.protocol - self.mime = luci.http.protocol.mime - self.date = luci.http.protocol.date - self.cond = luci.http.protocol.conditionals -end - -function Simple.getfile(self, uri) - local file = self.docroot .. uri:gsub("%.%./+", "") - local stat = luci.fs.stat(file) - - return file, stat -end - -function Simple.handle_get(self, request, sourcein, sinkerr) - local file, stat = self:getfile( self.proto.urldecode( request.env.PATH_INFO, true ) ) - - if stat then - if stat.type == "regular" then - - -- Generate Entity Tag - local etag = self.cond.mk_etag( stat ) - - -- Check conditionals - local ok, code, hdrs - - ok, code, hdrs = self.cond.if_modified_since( request, stat ) - if ok then - ok, code, hdrs = self.cond.if_match( request, stat ) - if ok then - ok, code, hdrs = self.cond.if_unmodified_since( request, stat ) - if ok then - ok, code, hdrs = self.cond.if_none_match( request, stat ) - if ok then - local f, err = io.open(file) - - if f then - -- Send Response - return Response( - 200, { - ["Date"] = self.date.to_http( os.time() ); - ["Last-Modified"] = self.date.to_http( stat.mtime ); - ["Content-Type"] = self.mime.to_mime( file ); - ["Content-Length"] = stat.size; - ["ETag"] = etag; - } - ), ltn12.source.file(f) - else - return self:failure( 403, err:gsub("^.+: ", "") ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - - elseif stat.type == "directory" then - - local ruri = request.request_uri:gsub("/$","") - local duri = self.proto.urldecode( ruri, true ) - local root = self.docroot:gsub("/$","") - - -- check for index files - local index_candidates = { - "index.html", "index.htm", "default.html", "default.htm", - "index.txt", "default.txt" - } - - -- try to find an index file and redirect to it - for i, candidate in ipairs( index_candidates ) do - local istat = luci.fs.stat( - root .. "/" .. duri .. "/" .. candidate - ) - - if istat ~= nil and istat.type == "regular" then - return Response( 301, { - ["Location"] = ruri .. "/" .. candidate - } ), ltn12.source.empty() - end - end - - - local html = string.format( - '\n' .. - '\n' .. - '\n' .. - '\n' .. - 'Index of %s/\n' .. - '

Index of %s/


    ', - duri, duri - ) - - local entries = luci.fs.dir( file ) - - if type(entries) == "table" then - for i, e in luci.util.spairs( - entries, function(a,b) - if entries[a] == '..' then - return true - elseif entries[b] == '..' then - return false - else - return ( entries[a] < entries[b] ) - end - end - ) do - if e ~= '.' and ( e == '..' or e:sub(1,1) ~= '.' ) then - local estat = luci.fs.stat( file .. "/" .. e ) - - if estat.type == "directory" then - html = html .. string.format( - '
  • %s/ ' .. - '(directory)
    ' .. - 'Changed: %s

  • ', - ruri, self.proto.urlencode( e ), e, - self.date.to_http( estat.mtime ) - ) - else - html = html .. string.format( - '
  • %s ' .. - '(%s)
    ' .. - 'Size: %i Bytes | ' .. - 'Changed: %s

  • ', - ruri, self.proto.urlencode( e ), e, - self.mime.to_mime( e ), - estat.size, self.date.to_http( estat.mtime ) - ) - end - end - end - - html = html .. '

' - - return Response( - 200, { - ["Date"] = self.date.to_http( os.time() ); - ["Content-Type"] = "text/html; charset=ISO-8859-15"; - } - ), ltn12.source.string(html) - else - return self:failure(403, "Permission denied") - end - else - return self:failure(403, "Unable to transmit " .. stat.type .. " " .. file) - end - else - return self:failure(404, "No such file: " .. file) - end -end - -function Simple.handle_head(self, ...) - local response, sourceout = self:handle_get(...) - return response -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/luci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/luci.lua deleted file mode 100644 index e662d3f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/handler/luci.lua +++ /dev/null @@ -1,96 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - luci handler -(c) 2008 Steven Barth - -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 - -$Id: luci.lua 3680 2008-11-01 10:53:51Z Cyrus $ - -]]-- - -module("luci.httpd.handler.luci", package.seeall) - -require("luci.dispatcher") -require("luci.http") -require("luci.http.protocol.date") -local ltn12 = require("luci.ltn12") - -Luci = luci.util.class(luci.httpd.module.Handler) -Response = luci.httpd.module.Response - -function Luci.__init__(self, limit) - luci.httpd.module.Handler.__init__(self) - self.limit = limit or 5 - self.running = {} - setmetatable(self.running, {__mode = "k"}) -end - -function Luci.handle_head(self, ...) - local response, sourceout = self:handle_get(...) - return response -end - -function Luci.handle_post(self, ...) - return self:handle_get(...) -end - -function Luci.handle_get(self, request, sourcein, sinkerr) - local r = luci.http.Request( - request.env, - sourcein, - sinkerr - ) - - local res, id, data1, data2 = true, 0, nil, nil - local headers = {} - local status = 200 - local active = true - - local x = coroutine.create(luci.dispatcher.httpdispatch) - while not id or id < 3 do - coroutine.yield() - - res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - status = 500 - headers["Content-Type"] = "text/plain" - local err = {id} - return Response( status, headers ), function() return table.remove(err) end - end - - if id == 1 then - status = data1 - elseif id == 2 then - headers[data1] = data2 - end - end - - local function iter() - local res, id, data = coroutine.resume(x) - if not res then - return nil, id - elseif not id or not active then - return true - elseif id == 5 then - active = false - - while (coroutine.resume(x)) do - end - - return nil - elseif id == 4 then - return data - end - if coroutine.status(x) == "dead" then - return nil - end - end - - return Response(status, headers), iter -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/module.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/module.lua deleted file mode 100644 index 7f4580a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/module.lua +++ /dev/null @@ -1,136 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: module.lua 2476 2008-06-29 16:15:26Z Cyrus $ -]]-- -module("luci.httpd.module", package.seeall) -require("luci.util") -require("luci.http.protocol") -local ltn12 = require("luci.ltn12") - - - --- Server handler implementation -Handler = luci.util.class() - --- Constructor -function Handler.__init__(self) - self.filters = {} - self.handler = {} -end - - --- Adds a filter to the filter chain -function Handler.addfilter(self, filter) - table.insert(self.filters, filter) -end - - --- Creates a failure reply -function Handler.failure(self, code, message) - local response = Response(code, { ["Content-Type"] = "text/plain" }) - local sourceout = ltn12.source.string(message) - - return response, sourceout -end - --- Processes a request -function Handler.process(self, request, sourcein, sinkerr, ...) - local stat, response, sourceout - - -- Process incoming filters - for i, f in ipairs(self.filters) do - local i = f:get("input") - - if i then - sourcein = ltn12.source.chain(sourcein, i) - end - - if f.request then - f:request(request) - end - end - - -- Detect request Method - local hname = "handle_" .. request.request_method - if self[hname] then - -- Run the handler - stat, response, sourceout = luci.util.copcall( - self[hname], self, request, sourcein, sinkerr, ... - ) - - -- Check for any errors - if not stat then - response, sourceout = self:failure(500, response) - end - else - response, sourceout = self:failure(405, luci.http.protocol.statusmsg[405]) - end - - -- Check data - if not luci.util.instanceof(response, Response) then - response, sourceout = self:failure(500, "Core error: Invalid module response!") - end - - -- Process outgoing filters - for i, f in ipairs(self.filters) do - local o = f:get("output") - - if o then - sourceout = ltn12.source.chain(sourceout, o) - end - - if f.response then - f:response(response) - end - end - - return response, sourceout -end - - - --- Server Filter implementation -Filter = luci.util.class() - -function Filter.get(self, name) - return self[name] and function(...) return self[name](self, ...) end -end - --- Filters the incoming body stream --- abstract function Filter.input(chunk) - --- Filters the outgoing body stream --- abstract function Filter.output(chunk) - --- Filters the request object --- abstract function Filter.request(request) - --- Filters the response object --- abstract function Filter.response(response) - - - --- Handler Response -Response = luci.util.class() - -function Response.__init__(self, status, headers) - self.status = tonumber(status) or 200 - self.headers = (type(headers) == "table") and headers or {} -end - -function Response.addheader(self, key, value) - self.headers[key] = value -end - -function Response.setstatus(self, status) - self.status = status -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/server.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/server.lua deleted file mode 100644 index efd5374..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/httpd/server.lua +++ /dev/null @@ -1,241 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - helper class -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: server.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - -module("luci.httpd.server", package.seeall) -require("socket") -require("socket.http") -require("luci.util") - -READ_BUFSIZE = 1024 -VERSION = 0.2 - - -VHost = luci.util.class() - -function VHost.__init__(self, handler) - self.handler = handler - self.dhandler = {} -end - -function VHost.process(self, request, sourcein, sinkerr, ...) - local handler = self.handler - - local uri = request.env.REQUEST_URI:match("^([^?]*)") - - -- SCRIPT_NAME - request.env.SCRIPT_NAME = "" - - -- Call URI part - request.env.PATH_INFO = uri - - for k, dhandler in pairs(self.dhandler) do - if k == uri or k.."/" == uri:sub(1, #k+1) then - handler = dhandler - request.env.SCRIPT_NAME = k - request.env.PATH_INFO = uri:sub(#k+1) - break; - end - end - - if handler then - return handler:process(request, sourcein, sinkerr, ...) - end -end - - -function VHost.set_default_handler(self, handler) - self.handler = handler -end - - -function VHost.set_handler(self, match, handler) - self.dhandler[match] = handler -end - - - -Server = luci.util.class() - -function Server.__init__(self, host) - self.host = host - self.vhosts = {} -end - -function Server.set_default_vhost(self, vhost) - self.host = vhost -end - --- Sets a vhost -function Server.set_vhost(self, name, vhost) - self.vhosts[name] = vhost -end - -function Server.create_daemon_handlers(self) - return function(...) return self:process(...) end, - function(...) return self:error_overload(...) end -end - - -function Server.error(self, socket, code, msg) - hcode = tostring(code) - - socket:send( "HTTP/1.0 " .. hcode .. " " .. - luci.http.protocol.statusmsg[code] .. "\r\n" ) - socket:send( "Connection: close\r\n" ) - socket:send( "Content-Type: text/plain\r\n\r\n" ) - - if msg then - socket:send( "HTTP-Error " .. code .. ": " .. msg .. "\r\n" ) - end -end - -function Server.error_overload(self, socket) - self:error(socket, 503, "Too many simultaneous connections") -end - - -function Server.process( self, client ) - - -- Setup sockets and sources - local thread = { - receive = function(self, ...) return luci.httpd.corecv(client, ...) end, - send = function(self, ...) return luci.httpd.cosend(client, ...) end, - close = function(self, ...) return client:close(...) end, - getfd = function(self, ...) return client:getfd(...) end, - dirty = function(self, ...) return client:dirty(...) end - } - - client:settimeout( 0 ) - - local sourcein = ltn12.source.empty() - local sourcehdr = luci.http.protocol.header_source( thread ) - local sinkerr = ltn12.sink.file( io.stderr ) - - local close = false - - local reading = { client } - - local message, err - - repeat - -- parse headers - message, err = luci.http.protocol.parse_message_header( sourcehdr ) - - if not message then - self:error( thread, 400, err ) - break - end - - -- keep-alive - if message.http_version == 1.1 then - close = (message.env.HTTP_CONNECTION == "close") - else - close = not message.env.HTTP_CONNECTION or message.env.HTTP_CONNECTION == "close" - end - - if message.request_method == "get" or message.request_method == "head" then - -- Be happy - - elseif message.request_method == "post" then - -- If we have a HTTP/1.1 client and an Expect: 100-continue header then - -- respond with HTTP 100 Continue message - if message.http_version == 1.1 and message.headers['Expect'] and - message.headers['Expect'] == '100-continue' - then - thread:send("HTTP/1.1 100 Continue\r\n\r\n") - end - - if message.headers['Transfer-Encoding'] and - message.headers['Transfer-Encoding'] ~= "identity" then - sourcein = socket.source("http-chunked", thread) - elseif message.env.CONTENT_LENGTH then - sourcein = socket.source("by-length", thread, - tonumber(message.env.CONTENT_LENGTH)) - else - self:error( thread, 411, luci.http.protocol.statusmsg[411] ) - break; - end - - -- FIXME: Close for POST requests - close = true - else - self:error( thread, 405, luci.http.protocol.statusmsg[405] ) - break; - - end - - - local host = self.vhosts[message.env.HTTP_HOST] or self.host - if not host then - self:error( thread, 500, "Unable to find matching host" ) - break; - end - - local response, sourceout = host:process( - message, sourcein, sinkerr, - client, io.stderr - ) - if not response then - self:error( thread, 500, "Error processing handler" ) - end - - -- Post process response - local sinkmode = close and "close-when-done" or "keep-open" - - if sourceout then - if not response.headers["Content-Length"] then - if message.http_version == 1.1 then - response.headers["Transfer-Encoding"] = "chunked" - sinkmode = "http-chunked" - else - close = true - sinkmode = "close-when-done" - end - end - end - - if close then - response.headers["Connection"] = "close" - end - - - local sinkout = socket.sink(sinkmode, thread) - - local header = - message.env.SERVER_PROTOCOL .. " " .. - tostring(response.status) .. " " .. - luci.http.protocol.statusmsg[response.status] .. "\r\n" - - header = header .. "Server: LuCI HTTPd/" .. tostring(VERSION) .. "\r\n" - - - for k,v in pairs(response.headers) do - header = header .. k .. ": " .. v .. "\r\n" - end - - thread:send(header .. "\r\n") - - if sourceout then - local eof = false - repeat - coroutine.yield() - eof = not ltn12.pump.step(sourceout, sinkout) - until eof - end - until close - - client:close() -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n.lua deleted file mode 100644 index b031d82..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n.lua +++ /dev/null @@ -1,98 +0,0 @@ ---[[ -LuCI - Internationalisation - -Description: -A very minimalistic but yet effective internationalisation module - -FileId: -$Id: i18n.lua 3652 2008-10-29 19:41:33Z jow $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - ---- LuCI translation library. -module("luci.i18n", package.seeall) -require("luci.util") - -table = {} -i18ndir = luci.util.libpath() .. "/i18n/" -loaded = {} -context = luci.util.threadlocal() -default = "en" - ---- Clear the translation table. -function clear() - table = {} -end - ---- Load a translation and copy its data into the translation table. --- @param file Language file --- @param lang Two-letter language code --- @param force Force reload even if already loaded (optional) --- @return Success status -function load(file, lang, force) - lang = lang and lang:gsub("_", "-") or "" - if force or not loaded[lang] or not loaded[lang][file] then - local f = loadfile(i18ndir .. file .. "." .. lang .. ".lua") - if f then - table[lang] = table[lang] or {} - setfenv(f, table[lang]) - f() - loaded[lang] = loaded[lang] or {} - loaded[lang][file] = true - return true - else - return false - end - else - return true - end -end - ---- Load a translation file using the default translation language. --- Alternatively load the translation of the fallback language. --- @param file Language file --- @param force Force reload even if already loaded (optional) -function loadc(file, force) - load(file, default, force) - return load(file, context.lang, force) -end - ---- Set the context default translation language. --- @param lang Two-letter language code -function setlanguage(lang) - context.lang = lang:gsub("_", "-") -end - ---- Return the translated value for a specific translation key. --- @param key Translation key --- @param def Default translation --- @return Translated string -function translate(key, def) - return (table[context.lang] and table[context.lang][key]) - or (table[default] and table[default][key]) - or def -end - ---- Return the translated value for a specific translation key and use it as sprintf pattern. --- @param key Translation key --- @param default Default translation --- @param ... Format parameters --- @return Translated and formatted string -function translatef(key, default, ...) - return translate(key, default):format(...) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.de.lua deleted file mode 100644 index ccfdc01..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.de.lua +++ /dev/null @@ -1,346 +0,0 @@ -a_i_i_admin1 = 'Dies ist der Administrationsbereich von LuCI.' -a_i_i_admin2 = 'LuCI ist eine freie, flexible und benutzerfreundliche grafische Oberfläche zur Konfiguration von OpenWrt Kamikaze.' -a_i_i_admin3 = 'Auf den folgenden Seiten können alle wichtigen Einstellungen des Routers vorgenommen werden.' -a_i_i_admin4 = 'Hinweis: In LuCI werden getätigte Änderungen erst nach einem Klick auf Änderungen - Speichern & Anwenden angewandt.' -a_i_i_admin5 = 'Wir sind natürlich stets darum bemüht, diese Oberfläche noch besser und intuitiver zu Gestalten und freuen uns über jegliche Art von Feedback oder Verbesserungsvorschlägen.' -a_i_i_admin6 = 'Und nun wünschen wir viel Spaß mit dem Router!' -a_i_i_hello = 'Hallo!' -a_i_i_team = 'Das LuCI-Team' -a_i_keepflash = 'Zu übernehmende Dateien bei Firmwareupgrade' -a_i_keepflash1 = 'Die folgenden Dateien und Verzeichnisse werden beim Aktualisieren der Firmware über die Oberfläche automatisch in die neue Firmware übernommen.' -a_i_luci1 = 'Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden.' -a_i_ucicommit = 'UCI-Befehle beim Anwenden' -a_i_ucicommit1 = 'Beim Anwenden der Konfiguration aus der Oberflächliche heraus können automatisch die relevanten Dienste neugestart werden, sodass Änderungen sofort nach dem Anwenden aktiv werden und der Router nicht erst neugestartet werden muss.' -a_i_ui = 'Benutzeroberfläche' -a_n_i_bridge = 'Netzwerkbrücke' -a_n_i_bridge1 = 'überbrückt angegebene Schnittstelle(n)' -a_n_ifaces1 = 'An dieser Stelle können die einzelnen Schnittstellen des Netzwerkes konfiguriert werden. Es können mehrere Schnittstellen zu einer Brücke zusammengefasst werden, indem diese durch Leerzeichen getrennt aufgezählt werden und ein entsprechender Haken im Feld Netzwerkbrücke gesetzt wird. Es können VLANs in der Notation SCHNITTSTELLE.VLANNR (z.B.: eth0.1) verwendet werden.' -a_n_ptp = 'Punkt-zu-Punkt Verbindungen' -a_n_ptp1 = 'Punkt-zu-Punkt Verbindungen über PPPoE oder PPTP werden häufig dazu verwendet, um über DSL o.ä. Techniken eine Verbindung zum Internetgateway eines Internetzugangsanbieters aufzubauen.' -a_n_r_netmask1 = 'falls Ziel ein Netzwerk ist' -a_n_r_target1 = 'Host-IP oder Netzwerk' -a_n_r_target6 = 'IPv6 Host- oder Netzwerk-Addresse (CIDR)' -a_n_routes = 'Routen' -a_n_routes4 = 'IPv4 Routen' -a_n_routes6 = 'IPv6 Routen' -a_n_routes1 = 'Routen geben an, über welche Schnittstelle und welches Gateway ein bestimmter Host oder ein bestimmtes Netzwerk erreicht werden kann.' -a_n_routes_static = 'Statische Routen' -a_n_routes_static4 = 'Statische IPv4 Routen' -a_n_routes_static6 = 'Statische IPv6 Routen' -a_n_routes_kernel4 = 'Aktive IPv4-Routen' -a_n_routes_kernel6 = 'Aktive IPv6-Routen' -a_n_switch = 'Switch' -a_n_switch1 = 'Die Netzwerkschnittstellen am Router können zu verschienden VLANs zusammengefasst werden, in denen Geräte miteinander direkt kommunizieren können. VLANs werden auch häufig dazu genutzt, um Netzwerke voneiander zu trennen. So ist oftmals eine Schnittstelle als Uplink zu einem größerem Netz, wie dem Internet vorkonfiguriert und die anderen Schnittstellen bilden ein VLAN für das lokale Netzwerk.' -a_n_conntrack = 'Aktive Verbindungen' -a_n_conntrack_desc = 'Diese Seite gibt eine Ãœbersicht über aktive Netzwerkverbindungen.' -a_network1 = 'In diesem Bereich finden sich alle netzwerkbezogenen Einstellungen.' -a_network2 = 'Der Netzwerkswitch kann bei den meisten Routern frei konfiguriert und in mehrere VLANs aufgeteilt werden.' -a_network3 = 'Schnittstellen und PPPoE/PPTP-Einstellungen ermöglichen die freie Organisation des Netzwerks und die Anbindung an ein WAN.' -a_network4 = 'DHCP ermöglichst die automatische Netzwerkkonfiguration von Rechnern im (W)LAN.' -a_network5 = 'Portweiterleitung und Firewall erlauben eine effektive Absicherung des Netzes, bei gleichzeitiger Bereitstellung von externen Diensten.' -a_s_changepw = 'Passwort ändern' -a_s_changepw1 = 'Ändert das Passwort des Systemverwalters (Benutzer "root")' -a_s_changepw_changed = 'Passwort erfolgreich geändert' -a_s_changepw_nomatch = 'Passwörter stimmen nicht überein' -a_s_desc = 'An dieser Stelle können Grundeinstellungen des Systems wie Hostname oder Zeitzone vorgenommen werden.' -a_s_flash = 'Upgrade' -a_s_flash_flashed = 'Flashvorgang erfolgreich. Router startet neu...' -a_s_flash_flasherr = 'Flashvorgang fehlgeschlagen' -a_s_flash_fwimage = 'Firmwareimage' -a_s_flash_received = 'Abbild empfangen. Starte Flashvorgang. SCHALTEN SIE DAS GERÄT NICHT AUS!' -a_s_flash_inprogress = 'Schreibe Firmware...' -a_s_flash_fwupgrade = 'Firmware aktualisieren' -a_s_flash_keepcfg = 'Konfigurationsdateien übernehmen' -a_s_flash_notimplemented = 'Diese Funktion steht leider (noch) nicht zur Verfügung.' -a_s_flash_upgrade1 = 'Ersetzt die installierte Firmware (das Betriebssystem des Routers) durch ein neues. Das Format der Firmware ist plattformabhängig.' -a_s_fstab = 'Einhängepunkte' -a_s_fstab_active = 'Eingehängte Dateisysteme' -a_s_fstab_used = 'Benutzt' -a_s_fstab_avail = 'Verfügbar' -a_s_fstab_device1 = 'Die Gerätedatei des Speichers oder der Partition (z.B.: /dev/sda)' -a_s_fstab_fs1 = 'Das Dateisystem mit dem der Speicher formatiert ist (z.B.: ext3)' -a_s_fstab_mountpoint = 'Einhängepunkt' -a_s_fstab_mountpoints = 'Einhängepunkte' -a_s_fstab_mountpoints1 = 'Einhängepunkte bestimmen, an welcher Stelle des Dateisystems bestimmte Laufwerke und Speicher zur Verwendung eingebunden werden.' -a_s_fstab_swap1 = 'Falls der Arbeitsspeicher des Routers nicht ausreicht, kann dieser nicht benutzte Daten zeitweise auf einem SWAP-Laufwerk auslagern um so die effektive Größe des Arbeitsspeichers zu erhöhen. Die Auslagerung der Daten ist natürlich bedeutend langsamer als direkte Arbeitsspeicherzugriffe.' -a_s_i_system1 = 'Hier finden sich Einstellungen, die das System selbst, dessen Kennung, installierte Software und Hardware, Authentifizierung oder eingehängte Speicher betreffen.' -a_s_i_system2 = 'Diese Einstellungen definieren die Grundlage des Systems, auf dem die installierte Software aufbaut.' -a_s_i_system3 = 'Beachte bitte, dass eine fehlerhafte Konfiguration den Start des Routers verhindern oder dich vom Zugriff auf diesen ausschließen kann.' -a_s_p_ipkg = 'OPKG-Konfiguration' -a_s_p_ipkg_pkglists = 'Paketlisten' -a_s_p_ipkg_targets = 'Installationsziele' -a_s_packages = 'Paketverwaltung' -a_s_packages_do = 'Aktionen ausführen' -a_s_packages_install = 'Installation von' -a_s_packages_installurl = 'Paket herunterladen und installieren' -a_s_packages_ipkg = 'Paketlisten und Installationsziele bearbeiten' -a_s_packages_name = 'Paketname' -a_s_packages_remove = 'Deinstallation von' -a_s_packages_search = 'Paket suchen' -a_s_packages_update = 'Paketlisten aktualisieren' -a_s_packages_updatelist = 'Paketlisten aktualisieren' -a_s_packages_upgrade = 'Installierte Pakete aktualisieren' -a_s_reboot1 = 'Startet das Betriebssystem des Routers neu.' -a_s_reboot_do = 'Neustart durchführen' -a_s_reboot_running = 'Bitte warten: Neustart wird durchgeführt...' -a_s_reboot_u = 'Warnung: Es gibt ungespeicherte Änderungen, die beim Neustart verloren gehen!' -a_s_sshkeys = 'SSH-Schlüssel' -a_s_sshkeys1 = 'Hier können öffentliche SSH-Schlüssel (einer pro Zeile) zur Authentifizierung abgelegt werden.' -a_srv_d_pwauth = 'Passwortanmeldung' -a_srv_d_pwauth1 = 'Erlaube Anmeldung per Passwort' -a_srv_dropbear1 = 'Der SSH-Server ermöglicht Shell-Zugriff über das Netzwerk und bietet einen integrierten SCP-Dienst.' -a_srv_http1 = 'Ein kleiner Webserver, der für die Bereitstellung von LuCI genutzt werden kann.' -a_srv_http_authrealm = 'Anmeldeaufforderung' -a_srv_http_authrealm1 = 'Aufforderungstext zum Anmelden im Administrationsbereich' -a_srv_http_config1 = '/etc/httpd.conf wenn leer' -a_srv_http_root = 'Wurzelverzeichnis' -a_srv_http_keepalive = 'Keep-Alive aktivieren' -a_srv_http_timeout = 'Verbindungszeitlimit' -a_srv_http_path = 'Pluginpfad' -a_srv_lucittpd = 'Ein schlanker HTTP/1.1 webserver in C und Lua geschrieben um LuCI zu betreiben.' -a_srv_services1 = 'Dienste und Dämonen stellen bestimmte Funktionalitäten auf dem Router zur Verfügung.' -a_srv_services2 = 'Es handelt sich hierbei meist um Netzwerkserver, die verschiedene Aufgaben auf dem Router erfüllen, beispielsweise Shell-Zugang ermöglichen oder diese Weboberfläche per HTTP anbieten.' -a_st_i_status1 = 'Hier finden sich Informationen über den aktuellen Status des Systems, beispielsweise Prozessortakt, Speicherauslastung und Netzwerkschnittstellen.' -a_st_i_status2 = 'Zusätzlich können hier Protokolldaten, des Kernels und diverser Systemdienste eingesehen werden, um deren Zustand zu kontrollieren.' -a_w_devices1 = 'An dieser Stelle können eingebaute WLAN-Geräte konfiguriert werden.' -a_w_apisolation = 'AP-Isolation' -a_w_apisolation1 = 'Unterbindet Client-Client-Verkehr' -a_w_athburst = 'Atheros-Frameburst' -a_w_brcmburst = 'Broadcom-Frameburst' -a_w_channel = 'Funkkanal' -a_w_connlimit = 'Verbindungslimit' -a_w_countrycode = 'Ländercode' -a_w_distance1 = 'Distanz zum am weitesten entfernten Funkpartner (m)' -a_w_diversity = 'Diversität' -a_w_hideessid = 'ESSID verstecken' -a_w_netid = 'Netzkennung (ESSID)' -a_w_network1 = 'WLAN-Netz zu Netzwerk hinzufügen' -a_w_networks1 = 'Pro WLAN-Gerät können mehrere Netze bereitgestellt werden. Es sollte beachtet werden, dass es hardware- / treiberspezifische Einschränkungen gibt. So kann pro WLAN-Gerät in der Regel entweder 1 Ad-Hoc-Zugang ODER bis zu 3 Access-Point und 1 Client-Zugang gleichzeitig erstellt werden.' -a_w_netmanual = ' - Neues Netzwerk erstellen - ' -a_w_radiusport = 'Radius-Port' -a_w_radiussrv = 'Radius-Server' -a_w_rxantenna = 'Empfangsantenne' -a_w_txantenna = 'Sendeantenne' -a_w_txpwr = 'Sendeleistung' -a_w_wifi1 = 'Hier finden sich Konfiugrationsmöglichkeiten für Drahtlos-Netzwerke nach dem WLAN-Standard.' -a_w_wifi2 = '802.11b/g/a/n-Geräte können so einfach in das bestehende physische Netzwerk integriert werden. Die Unterstützung von virtuellen Adaptern ermöglicht auch den Einsatz als Wireless-Repeater oder von mehreren Netzwerken gleichzeitig auf einem Gerät.' -a_w_wifi3 = 'Es werden Managed, Client, Ad-Hoc und WDS-Modus unterstützt sowie WPA und WPA2-Verschlüsselung zur gesicherten Kommunikation.' -a_w_ap = 'Access Point' -a_w_adhoc = 'Ad-Hoc' -a_w_client = 'Client' -a_w_ahdemo = 'Pseudo Ad-Hoc (ahdemo)' -a_w_monitor = 'Monitor' -a_w_wds = 'WDS' -accept = 'Annehmen' -aliases = 'Aliasse' -bitrate = 'Bitrate' -c_contributors = 'Mitwirkende Entwickler' -c_leaddev = 'Leitende Entwicklung' -c_lucidesc = 'LuCI ist eine Sammlung freier Lua-Software einschließlich eines MVC-Webframeworks und einer Weboberfläche für eingebettete Geräte. Luci steht unter der Apache-Lizenz.' -c_projecthome = 'Projekt Homepage' -c_thanksto = 'Dank an' -configure = 'Konfigurieren' -contact = 'Kontakt' -contact1 = 'Diese Daten sind auf der öffentlichen Kontaktseite sichtbar. Bitte gib an, wie man dich am besten kontaktieren kann. Diese Informationen sollten nach der Picopeering Vereinbarung mindestens deine E-Mail-Adresse enthalten. Damit dein Knoten durch Topographieprogramme erfasst werden kann, gib bitte deine Geokoordinaten oder zumindest deine Straße und Hausnummer unter Standort an.' -coord = 'Koordinaten' -coord1 = 'Bitte als Breite;Länge (z.B: 51.5;12.9) angeben' -cpu = 'Prozessor' -decline = 'Ablehnen' -defroutes = 'Standardrouten' -destination = 'Ziel' -dhcp_dhcp_dynamicdhcp = 'Dynamisches DHCP' -dhcp_dhcp_force = 'Start erzwingen' -dhcp_dhcp_ignore = 'Schnittstelle ignorieren' -dhcp_dhcp_ignore_desc = 'DHCP für dieses Netzwerk deaktivieren' -dhcp_dhcp_leasetime = 'Laufzeit' -dhcp_dhcp_dhcpoption = 'DHCP-Optionen' -dhcp_dhcp_dhcpoption_desc = 'Siehe "dnsmasq --help dhcp" für eine Liste verfügbarer Optionen.' -dhcp_dhcp_limit_desc = 'Anzahl zu vergebender Adressen -1' -dhcp_dhcp_start_desc = 'Erste vergebene Adresse (letztes Oktett)' -dhcp_dnsmasq_addnhosts = 'Zusätzliche Hostdatei' -dhcp_dnsmasq_authoritative = 'Authoritativ' -dhcp_dnsmasq_authoritative_desc = 'Dies ist der einzige DHCP im lokalen Netz' -dhcp_dnsmasq_boguspriv = 'Private Anfragen filtern' -dhcp_dnsmasq_boguspriv_desc = 'Reverse DNS-Anfragen für lokale Netze nicht weiterleiten' -dhcp_dnsmasq_dhcpleasemax = 'max. DHCP-Leases' -dhcp_dnsmasq_dnsforwardmax = 'gleichzeitige Abfragen' -dhcp_dnsmasq_domain = 'Lokale Domain' -dhcp_dnsmasq_domainneeded = 'Anfragen nur mit Domain' -dhcp_dnsmasq_domainneeded_desc = 'Anfragen ohne Domainnamen nicht weiterleiten' -dhcp_dnsmasq_ednspacket_max = 'max. EDNS.0 Paketgröße' -dhcp_dnsmasq_expandhosts = 'Erweitere Hosts' -dhcp_dnsmasq_expandhosts_desc = 'Fügt Domainnamen zu einfachen Hosteinträgen in der Resolvdatei hinzu' -dhcp_dnsmasq_filterwin2k = 'Windowsanfragen filtern' -dhcp_dnsmasq_filterwin2k_desc = 'nutzlose DNS-Anfragen aktueller Windowssysteme filtern' -dhcp_dnsmasq_leasefile = 'Leasedatei' -dhcp_dnsmasq_leasefile_desc = 'Speicherort für vergebenen DHCP-Adressen' -dhcp_dnsmasq_local = 'Lokale Server' -dhcp_dnsmasq_localisequeries = 'Lokalisiere Anfragen' -dhcp_dnsmasq_localisequeries_desc = 'Gibt die Adresse eines Hostnamen entsprechend seines Subnetzes zurück' -dhcp_dnsmasq_logqueries = 'Schreibe Abfragelog' -dhcp_dnsmasq_nohosts = 'Ignoriere /etc/hosts' -dhcp_dnsmasq_nonegcache = 'Unbekannte nicht cachen' -dhcp_dnsmasq_nonegcache_desc = 'Negative DNS-Antworten nicht zwischenspeichern' -dhcp_dnsmasq_noresolv = 'Ignoriere Resolvdatei' -dhcp_dnsmasq_port = 'DNS-Port' -dhcp_dnsmasq_queryport = 'Abfrageport' -dhcp_dnsmasq_readethers = 'Verwende /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Lese Informationen aus /etc/ethers um den DHCP-Server zu konfigurieren' -dhcp_dnsmasq_resolvfile = 'Resolvdatei' -dhcp_dnsmasq_resolvfile_desc = 'Lokale DNS-Datei' -dhcp_dnsmasq_strictorder = 'Strikte Reihenfolge' -dhcp_dnsmasq_strictorder_desc = 'DNS-Server werden strikt der Reihenfolge in der Resolvdatei nach abgefragt' -dhcp_dnsmasq_enabletftp = 'TFTP-Server aktivieren' -dhcp_dnsmasq_tftproot = 'TFTP-Server Wurzelverzeichnis' -dhcp_dnsmasq_dhcpboot = 'Netzwerk-Boot Abbild' -file = 'Datei' -frag = 'Frag.' -frequency = 'Frequenz' -iface = 'Schnittstelle' -iwscan = 'WLAN-Scan' -iwscan1 = 'Drahtlosnetzwerke in der lokalen Umgebung des Routers:' -iwscan_encr = 'Vers.' -iwscan_link = 'Verb.' -iwscan_noise = 'Rausch' -iwscan_signal = 'Signal' -link = 'Verb.' -dhcp_leases = 'Zuweisungen' -luci_ethers = 'Statische Einträge' -dhcp_timeremain = 'Verbleibende Gültigkeit' -dhcp_leases_active = 'Aktive Zuweisungen' -network_interface_prereq = 'Für die Unterstützung von UMTS/GPRS muss "comgt", für PPPoE "ppp-mod-pppoe", für PPPoA "ppp-mod-pppoa" und für PPtP "pptp" installiert sein' -network_interface_prereq_mini = 'Für die Unterstützung von PPPoE muss "ppp-mod-pppoe" und für PPtP "pptp" installiert sein' -network_interface_demand = 'Automatische Trennung' -network_interface_demand_desc = 'Zeit (in s) nach der die Verbindung bei Inaktivität getrennt wird' -network_interface_keepalive = 'Keep-Alive' -network_interface_keepalive_desc = 'Anzahl fehlgeschlagener Verbindungstests nach der automatisch neu verbunden wird' -network_interface_server = 'PPTP-Server' -network_interface_device = 'Modemgerät' -network_interface_device_desc = 'Geräteknoten des Modems, z.B. /dev/ttyUSB0' -network_interface_defaultroute = 'Standardroute ersetzen' -network_interface_defaultroute_desc = 'Lässt pppd die aktuelle Standardroute ersetzen und über die PPP Schnittstelle leiten' -network_interface_peerdns = 'DNS der Gegenstelle nutzen' -network_interface_peerdns_desc = 'Konfiguriert den lokalen DNS-Server so, dass er die von der Gegenstelle angekündigten Nameserver-Adressen nutzt' -network_interface_ipv6 = 'IPv6 für die PPP-Verbindung aktivieren' -network_interface_connect = 'Verbindungs-Script' -network_interface_connect_desc = 'Lässt pppd das angegebene Script nach dem Aufbau der PPP Verbindung abarbeiten' -network_interface_disconnect = 'Trennuns-Script' -network_interface_disconnect_desc = 'Lässt pppd das angegebene Script vor dem Trennen der PPP Verbindung abarbeiten' -network_interface_pppd_options = 'Weitere pppd Optionen' -network_interface_pppd_options_desc = 'Hier können zusätzliche Kommandozeilenargumente für pppd angegeben werden' -network_interface_apn = 'Zugriffspunkt (APN)' -network_interface_pincode = 'PIN-Code' -network_interface_pincode_desc = 'Stellen Sie sicher das die richtige PIN hier eingetragen wird, sonst könnte die SIM-Karte gesperrt werden!' -network_interface_service = 'Dienstart' -network_interface_maxwait = 'Initialisierungszeit' -network_interface_maxwait_desc = 'Zeit in Sekunden um auf die Initialisierung des Modems zu warten bevor ein Verbindungsversuch unternommen wird' -network_switch_desc = 'Die zu einem VLAN gehörenden Schnittstellen werden durch Leerzeichen getrennt. Die Schnittstelle mit der höchsten Nummer (meistens 5) bildet in der Regel die Verbindung zur internen Netzschnittstelle des Routers. Bei Geräten mit 5 Schnittstellen ist in der Regel die Schnittstelle mit der niedrigsten Nummer (0) die standardmäßige Uplinkschnittstelle des Routers.' -network_interface_encaps = 'PPPoA Kapselung' - -noise = 'Rausch' -power = 'Leistung' -routes = 'Routen' -routes_gateway = 'Gateway' -routes_metric = 'Metrik' -routes_netmask = 'Netzmaske' -rts = 'RTS' -signal = 'Signal' -status = 'Status' -system_type = 'Systemtyp' -texteditor = 'Texteditor' -uci_applied = 'Die folgenden Änderungen wurden übernommen' -uci_reverted = 'Die folgenden Änderungen wurden verworfen' -m_n_local = 'Lokales Netz' -m_n_inet = 'Internetverbindung' -m_n_route = 'Weiterleiten' -m_n_bridge = 'Ãœberbrücken' -m_w_ap = 'Anbieten (Access Point)' -m_w_adhoc = 'Unabhängig (Ad-Hoc)' -m_w_client = 'Einklinken (Client)' -m_w_wds = 'Verteilen (WDS)' -m_w_clientmode = 'Verbindungsmodus' -system_system_logsize = 'Größe des Systemprotokollpuffers' -system_system_logip = 'Externer Systemprotokollserver' -system_system_conloglevel = 'Protokollausgabelevel' -system_system_conloglevel_desc = 'Level auf der Konsole ausgegebener Meldungen' -m_i_processor = 'Prozessor' -m_i_memory = 'Hauptspeicher' -m_i_systemtime = 'Lokale Zeit' -m_i_uptime = 'Laufzeit' -m_n_d_firstaddress = 'Erste vergebene Adresse' -m_n_d_numleases = 'Anzahl vergebener Adressen' -routingtable = 'Routingtabelle' -wlanscan = 'WLAN-Scan' -m_n_keepalive = 'automatisch neu verbinden' -m_n_dialondemand = 'trennen bei Inaktivität nach' -m_n_pptp_server = 'PPTP-Server' -a_s_applyreboot1 = 'Änderungen angewandt.' -a_s_backup = 'Sichern / Wiederherstellen' -a_s_backup_backup = 'Sicherung erstellen' -a_s_backup_archive = 'Sicherungsarchiv' -a_s_backup_reset = 'Grundeinstellungen wiederherstellen' -a_s_backup_reset1 = 'Alle aktuellen Einstellungen verwerfen und Grundeinstellungen wiederherstellen?' -a_s_backup_restore = 'Sicherung wiederherstellen' -a_s_backup1 = 'Auf dieser Seite können Sicherungen der Konfiguration erstellt und eingespielt werden und - wenn möglich - die Grundeinstellungen wiederhergestellt werden.' -leds = 'LED Konfiguration' -leds_desc = 'Passt das Verhalten der Geräte-LEDs an - wenn dies möglich ist.' -system_led_name = 'LED Name' -system_led_sysfs = 'LED Gerät' -system_led_default = 'Grundzustand' -system_led_default_desc = 'ausgewählt = an' -system_led_trigger = 'Auslöser' -system_led_trigger_none = 'Keiner' -system_led_trigger_defaulton = 'Immer an' -system_led_trigger_timer = 'Taktgeber' -system_led_trigger_heartbeat = 'Herzschlag (Mittlere Systemlast)' -system_led_trigger_netdev = 'Netzwerkschnittstelle' -system_led_delayoff = 'Einschaltverzögerung' -system_led_delayoff_desc = 'Zeit (in ms) die die LED deaktiviert ist' -system_led_delayon = 'Ausschaltverzögerung' -system_led_delayon_desc = 'Zeit (in ms) die die LED aktiviert ist' -system_led_dev = 'Schnittstelle' -system_led_mode = 'Auslösemodus' -system_led_mode_link = 'Verbindung hergestellt' -system_led_mode_tx = 'Senden' -system_led_mode_rx = 'Empfangen' -network_interface_up = 'Aktiv' -network_interface_hwaddr = 'MAC-Adresse' -network_interface_hwaddr_desc = 'Hardware Adresse' -network_interface_txrx = 'Traffic' -network_interface_txrx_desc = 'gesendet / empfangen' -network_interface_err = 'Fehler' -network_interface_err_desc = 'TX / RX' -network_interface_fwzone = 'Firewallzone anlegen / zuweisen' -network_interface_fwzone_desc = 'Diese Schnittstelle gehört bis jetzt zu keiner Firewallzone.' -process_head = 'Prozesse' -process_descr = 'Diese Tabelle gibt eine Ãœbersicht über aktuell laufende Systemprozeese und deren Status.' -process_pid = 'PID' -process_owner = 'Besitzer' -process_command = 'Befehl' -process_cpu = 'CPU-Nutzung (%)' -process_mem = 'Speichernutzung (%)' -process_hup = 'Auflegen' -process_term = 'Beenden' -process_kill = 'Töten' -mem_cached = 'gecached' -mem_buffered = 'gepuffert' -mem_free = 'frei' -a_s_crontab = 'Geplante Aufgaben' -a_s_crontab1 = 'Dies ist die System-Crontab in der geplante Aufgaben definiert werden können.' -a_w_nasid = 'NAS ID' -a_w_cacert = 'Pfad zum CA-Zertifikat' -a_w_eaptype = 'EAP-Methode' -a_w_tlsprivkey = 'Pfad zum Privaten Schlüssel' -a_w_tlsprivkeypwd = 'Passwort des Privaten Schlüssels' -a_w_peapauth = 'PEAP-Authentifizierung' -a_w_peapidentity = 'PEAP-Identitäz' -a_w_peappassword = 'PEAP-Passwort' -a_w_create = 'Netzwerk anlegen' -hostnames = 'Rechnernamen' -hostnames_entries = 'Host-Einträge' -hostnames_hostname = 'Rechnername' -hostnames_address = 'IP-Adresse' -luci_components = "LuCI Komponenten" -m_n_mssfix = "Segmentgrößen Clamping" -m_n_mssfix_desc = "Behebt Probleme bei nicht erreichbaren Webseiten, Absenden von Formularen oder anderes unerwartetes Verhalten für einige ISPs." -dhcp_desc = 'Mit DHCP können Netzwerkteilnehmer automatisch Einstellungen wie IP-Adresse, Präfix, DNS-Server, usw. beziehen.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua deleted file mode 100644 index 7decbfe..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.en.lua +++ /dev/null @@ -1,330 +0,0 @@ -uci_applied = 'The following changes have been applied' -uci_reverted = 'The following changes have been reverted' -a_i_ui = 'User Interface' -c_lucidesc = 'LuCI is a collection of free Lua software including an MVC-Webframework and webinterface for embedded devices. LuCI is licensed under the Apache-License.' -c_projecthome = 'Project Homepage' -c_leaddev = 'Lead Development' -c_contributors = 'Contributing Developers' -c_thanksto = 'Thanks To' -a_i_i_hello = 'Hello!' -a_i_i_admin1 = 'This is the administration area of LuCI.' -a_i_i_admin2 = 'LuCI is a free, flexible, and user friendly graphical interface for configuring OpenWrt Kamikaze.' -a_i_i_admin3 = 'On the following pages you can adjust all important settings of your router.' -a_i_i_admin4 = 'Notice: In LuCI changes have to be confirmed by clicking Changes - Save & Apply before being applied.' -a_i_i_admin5 = 'As we always want to improve this interface we are looking forward to your feedback and suggestions.' -a_i_i_admin6 = 'And now have fun with your router!' -a_i_i_team = 'The LuCI Team' -a_i_luci1 = 'Here you can customize the settings and the functionality of LuCI.' -a_i_ucicommit = 'Post-commit actions' -a_i_ucicommit1 = 'These commands will be executed automatically when a given UCI configuration is committed allowing changes to be applied instantly.' -a_i_keepflash = 'Files to be kept when flashing a new firmware' -a_i_keepflash1 = 'When flashing a new firmware with LuCI these files will be added to the new firmware installation.' -a_st_i_status1 = 'Here you can find information about the current system status like CPU clock frequency, memory usage or network interface data.' -a_st_i_status2 = 'Also kernel or service logfiles can be viewed here to get an overview over their current state.' -iwscan = 'Wifi-Scan' -iwscan1 = 'Wifi networks detected by this Fluksometer' -iwscan_encr = 'Encr.' -iwscan_link = 'Link' -iwscan_signal = 'Signal' -iwscan_noise = 'Noise' -routes = 'Routes' -routes_netmask = 'Netmask' -routes_gateway = 'Gateway' -routes_metric = 'Metric' -a_s_desc = 'Here you can configure the basic aspects of your device like its hostname or the timezone.' -a_s_packages = 'Software' -a_s_changepw = 'Admin Password' -a_s_p_ipkg = 'OPKG-Configuration' -a_s_sshkeys = 'SSH-Keys' -a_s_fstab = 'Mount Points' -a_s_flash = 'Flash Firmware' -a_s_i_system1 = 'Change settings related to the system itself, its identification, installed hard- and software, authentication or mount points.' -a_s_i_system2 = 'These settings define the base of your system.' -a_s_i_system3 = 'Pay attention as any misconfiguration here may prevent your device from booting or may lock yourself out of it.' -a_s_packages_do = 'Perform Actions' -a_s_packages_install = 'Install' -a_s_packages_installurl = 'Download and install package' -a_s_packages_ipkg = 'Edit package lists and installation targets' -a_s_packages_name = 'Package name' -a_s_packages_remove = 'Remove' -a_s_packages_search = 'Find package' -a_s_packages_update = 'Package lists updated' -a_s_packages_updatelist = 'Update package lists' -a_s_packages_upgrade = 'Upgrade installed packages' -a_s_p_ipkg_pkglists = 'Package lists' -a_s_p_ipkg_targets = 'Installation targets' -a_s_changepw1 = 'Change the password of the system administrator (User root)' -a_s_changepw_changed = 'Password successfully changed' -a_s_changepw_nomatch = 'Error: Passwords do not match' -a_s_sshkeys1 = 'Here you can paste public SSH-Keys (one per line) for SSH public-key authentication.' -a_s_fstab_mountpoints = 'Mount Points' -a_s_fstab_mountpoints1 = 'Mount Points define at which point a memory device will be attached to the filesystem' -a_s_fstab_active = 'Mounted file systems' -a_s_fstab_used = 'Used' -a_s_fstab_avail = 'Available' -a_s_fstab_mountpoint = 'Mount Point' -a_s_fstab_device1 = 'The device file of the memory or partition (e.g. /dev/sda1)' -a_s_fstab_fs1 = 'The filesystem that was used to format the memory (e.g. ext3)' -a_s_fstab_swap1 = 'If your physical memory is insufficient unused data can be temporarily swapped to a swap-device resulting in a higher amount of usable RAM. Be aware that swapping data is a very slow process as the swap-device cannot be accessed with the high datarates of the RAM.' -a_s_flash_flashed = 'Firmware successfully flashed. Rebooting device...' -a_s_flash_flasherr = 'Failed to flash' -a_s_flash_fwimage = 'Firmware image' -a_s_flash_received = 'Image received. About to start flashing process. DO NOT POWER OFF THE DEVICE!' -a_s_flash_inprogress = 'Writing firmware...' -a_s_flash_fwupgrade = 'Flash Firmware' -a_s_flash_keepcfg = 'Keep configuration files' -a_s_flash_notimplemented = 'Sorry, this function is not (yet) available for your platform.' -a_s_flash_upgrade1 = 'Replaces the installed firmware with a new one. The firmware format is platform-dependent.' -a_s_reboot1 = 'Reboots the operating system of your device' -a_s_reboot_do = 'Perform reboot' -a_s_reboot_running = 'Please wait: Device rebooting...' -a_s_reboot_u = 'Warning: There are unsaved changes that will be lost while rebooting!' -a_s_applyreboot1 = 'Changes applied.' -a_s_backup = 'Backup / Restore' -a_s_backup_backup = 'Create backup' -a_s_backup_archive = 'Backup Archive' -a_s_backup_reset = 'Reset router to defaults' -a_s_backup_reset1 = 'Proceed reverting all settings and resetting to firmware defaults?' -a_s_backup_restore = 'Restore backup' -a_s_backup1 = 'Here you can backup and restore your router configuration and - if possible - reset the router to the default settings.' -a_srv_http = 'HTTP-Server' -a_srv_ssh = 'SSH-Server' -a_srv_services1 = 'Services and daemons perform certain tasks on your device.' -a_srv_services2 = 'Most of them are network servers, that offer a certain service for your device or network like shell access, serving webpages like LuCI, doing mesh routing, sending e-mails, ...' -a_srv_http1 = 'A small webserver which can be used to serve LuCI.' -a_srv_http_authrealm = 'Authentication Realm' -a_srv_http_authrealm1 = 'The realm which will be displayed at the authentication prompt for protected pages.' -a_srv_http_config1 = 'defaults to /etc/httpd.conf' -a_srv_http_root = 'Document root' -a_srv_dropbear1 = 'Dropbear offers SSH network shell access and an integrated SCP server' -a_srv_d_pwauth = 'Password authentication' -a_srv_d_pwauth1 = 'Allow SSH password authentication' -a_w_channel = 'Channel' -a_w_wifi1 = 'On this pages you can find configuration options for WLAN based wireless networks.' -a_w_wifi2 = 'You can easily integrate your 802.11a/b/g/n-devices into your physical network and use the virtual adapter support to build wireless repeaters or offer several networks with one device.' -a_w_wifi3 = 'There is support for Managed, Client, Ad-Hoc and WDS operating modes as well as WPA and WPA2 encryption for secure communnication.' -a_w_devices1 = 'Here you can configure installed wifi devices.' -a_w_txantenna = 'Transmit Antenna' -a_w_rxantenna = 'Receive Antenna' -a_w_distance1 = 'Distance to furthest station (in meter)' -a_w_diversity = 'Diversity' -a_w_countrycode = 'Country Code' -a_w_connlimit = 'Connection Limit' -a_w_networks1 = 'You can run several wifi networks with one device. Be aware that there are certain hardware and driverspecific restrictions. Normally you can operate 1 Ad-Hoc or up to 3 Master-Mode and 1 Client-Mode network simultaneously.' -a_w_netid = 'Network Name (ESSID)' -a_w_network1 = 'Add the Wifi network to physical network' -a_w_netmanual = ' - Create new Network - ' -a_w_txpwr = 'Transmit Power' -a_w_brcmburst = 'Broadcom Frameburst' -a_w_athburst = 'Atheros Frameburst' -a_w_radiussrv = 'RadiusServer' -a_w_radiusport = 'Radius-Port' -a_w_apisolation = 'AP-Isolation' -a_w_apisolation1 = 'Prevents Client to Client communication' -a_w_hideessid = 'Hide ESSID' -a_w_ap = 'Access Point' -a_w_adhoc = 'Ad-Hoc' -a_w_ahdemo = 'Pseudo Ad-Hoc (ahdemo)' -a_w_client = 'Client' -a_w_wds = 'WDS' -a_w_monitor = 'Monitor' -dhcp_dnsmasq_desc = 'Dnsmasq is a combined DHCP-Server and DNS-Forwarder for NAT firewalls' -dhcp_dnsmasq_domainneeded = 'Domain required' -dhcp_dnsmasq_domainneeded_desc = 'Don't forward DNS-Requests without DNS-Name' -dhcp_dnsmasq_authoritative = 'Authoritative' -dhcp_dnsmasq_authoritative_desc = 'This is the only DHCP in the local network' -dhcp_dnsmasq_boguspriv = 'Filter private' -dhcp_dnsmasq_boguspriv_desc = 'Don't forward reverse lookups for local networks' -dhcp_dnsmasq_filterwin2k = 'Filter useless' -dhcp_dnsmasq_filterwin2k_desc = 'filter useless DNS-queries of Windows-systems' -dhcp_dnsmasq_localisequeries = 'Localise queries' -dhcp_dnsmasq_localisequeries_desc = 'localises the hostname depending on its subnet' -dhcp_dnsmasq_local = 'Local Server' -dhcp_dnsmasq_domain = 'Local Domain' -dhcp_dnsmasq_expandhosts = 'Expand Hosts' -dhcp_dnsmasq_expandhosts_desc = 'adds domain names to hostentries in the resolv file' -dhcp_dnsmasq_nonegcache = 'don't cache unknown' -dhcp_dnsmasq_nonegcache_desc = 'prevents caching of negative DNS-replies' -dhcp_dnsmasq_readethers = 'Use /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Read /etc/ethers to configure the DHCP-Server' -dhcp_dnsmasq_leasefile = 'Leasefile' -dhcp_dnsmasq_leasefile_desc = 'file where given DHCP-leases will be stored' -dhcp_dnsmasq_resolvfile = 'Resolvfile' -dhcp_dnsmasq_resolvfile_desc = 'local DNS file' -dhcp_dnsmasq_nohosts = 'Ignore /etc/hosts' -dhcp_dnsmasq_strictorder = 'Strict order' -dhcp_dnsmasq_strictorder_desc = 'DNS-Server will be queried in the order of the resolvfile' -dhcp_dnsmasq_logqueries = 'Log queries' -dhcp_dnsmasq_noresolv = 'Ignore resolve file' -dhcp_dnsmasq_dnsforwardmax = 'concurrent queries' -dhcp_dnsmasq_port = 'DNS-Port' -dhcp_dnsmasq_ednspacket_max = 'max. EDNS0 paket size' -dhcp_dnsmasq_dhcpleasemax = 'max. DHCP-Leases' -dhcp_dnsmasq_addnhosts = 'additional hostfile' -dhcp_dnsmasq_queryport = 'query port' -dhcp_dnsmasq_enabletftp = 'Enable TFTP-Server' -dhcp_dnsmasq_tftproot = 'TFTP-Server Root' -dhcp_dnsmasq_dhcpboot = 'Network Boot Image' -a_n_switch = 'Switch' -a_n_conntrack = 'Active Connections' -a_n_conntrack_desc = 'This page gives an overview over currently active network connections.' -a_n_routes = 'Routes' -a_n_routes4 = 'IPv4 Routes' -a_n_routes6 = 'IPv6 Routes' -a_network1 = 'In this area you find all network-related settings.' -a_network2 = 'On most routers the network switch can be freely configured and splitted up into several VLANs.' -a_network3 = 'Interfaces and PPPoE / PPTP-Settings allow a custom organisation of the network and connections to other networks like the internet.' -a_network4 = 'With DHCP devices in your local network can be automatically configured for network communication.' -a_network5 = 'Firewall and portforwarding can be used to secure your network while providing services to external networks.' -a_n_switch1 = 'The network ports on your router can be combined to several VLANs in which computers can communicate directly with each other. VLANs are often used to separate different network segments. Often there is by default one Uplink port for a connection to the next greater network like the internet and other ports for a local network.' -network_switch_desc = 'Ports belonging to a VLAN are separated with spaces. The port with the highest number (usually 5) is oftern the connection to the internal network interface of the router. On devices with 5 ports often the one with the lowest number (0) is the predefined Uplink port.' -a_n_ifaces1 = 'On this page you can configure the network interfaces. You can bridge several interfaces by ticking the "bridge interfaces" field and enter the names of several network interfaces separated by spaces. You can also use VLAN notation INTERFACE.VLANNR (e.g.: eth0.1).' -a_n_i_bridge = 'Bridge interfaces' -a_n_i_bridge1 = 'creates a bridge over specified interface(s)' -dhcp_desc = 'With DHCP network members can automatically receive their network settings (IP-address, netmask, DNS-server, ...).' -dhcp_dhcp_leasetime = 'Leasetime' -dhcp_dhcp_dynamicdhcp = 'Dynamic DHCP' -dhcp_dhcp_ignore = 'Ignore interface' -dhcp_dhcp_ignore_desc = 'disable DHCP for this interface' -dhcp_dhcp_force = 'Force' -dhcp_dhcp_start_desc = 'first address (last octet)' -dhcp_dhcp_limit_desc = 'number of leased addresses -1' -dhcp_dhcp_dhcpoption = 'DHCP-Options' -dhcp_dhcp_dhcpoption_desc = 'See "dnsmasq --help dhcp" for a list of available options.' -dhcp_leases = 'Leases' -luci_ethers = 'Static Leases' -dhcp_timeremain = 'Leasetime remaining' -dhcp_leases_active = 'Active Leases' -a_n_ptp = 'Point-to-Point Connections' -a_n_ptp1 = 'Point-to-Point connections with PPPoE or PPTP are often used to connect a device over DSL or similar technologies to an internet access point.' -network_interface_prereq = 'You need to install "comgt" for UMTS/GPRS, "ppp-mod-pppoe" for PPPoE, "ppp-mod-pppoa" for PPPoA or "pptp" for PPtP support' -network_interface_prereq_mini = 'You need to install "ppp-mod-pppoe" for PPPoE or "pptp" for PPtP support' -network_interface_server = 'PPTP-Server' -network_interface_demand = 'Automatic Disconnect' -network_interface_demand_desc = 'Time (in seconds) after which an unused connection will be closed' -network_interface_keepalive = 'Keep-Alive' -network_interface_keepalive_desc = 'Number of failed connection tests to initiate automatic reconnect' -network_interface_device = 'Modem device' -network_interface_device_desc = 'The device node of your modem, e.g. /dev/ttyUSB0' -network_interface_defaultroute = 'Replace default route' -network_interface_defaultroute_desc = 'Let pppd replace the current default route to use the PPP interface after successful connect' -network_interface_peerdns = 'Use peer DNS' -network_interface_peerdns_desc = 'Configure the local DNS server to use the name servers adverticed by the PPP peer' -network_interface_ipv6 = 'Enable IPv6 on PPP link' -network_interface_connect = 'Connect script' -network_interface_connect_desc = 'Let pppd run this script after establishing the PPP link' -network_interface_disconnect = 'Disconnect script' -network_interface_disconnect_desc = 'Let pppd run this script before tearing down the PPP link' -network_interface_pppd_options = 'Additional pppd options' -network_interface_pppd_options_desc = 'Specify additional command line arguments for pppd here' -network_interface_apn = 'Access point (APN)' -network_interface_pincode = 'PIN code' -network_interface_pincode_desc = 'Make sure that you provide the correct pin code here or you might lock your sim card!' -network_interface_service = 'Service type' -network_interface_maxwait = 'Setup wait time' -network_interface_maxwait_desc = 'Seconds to wait for the modem to become ready before attempting to connect' -network_interface_encaps = 'PPPoA Encapsulation' - -a_n_r_routes1 = 'Routes specify over which interface and gateway a certain host or network can be reached.' -a_n_routes_static = 'Static Routes' -a_n_routes_static4 = 'Static IPv4 Routes' -a_n_routes_static6 = 'Static IPv6 Routes' -a_n_routes_kernel4 = 'Active IPv4-Routes' -a_n_routes_kernel6 = 'Active IPv6-Routes' -a_n_r_target1 = 'Host-IP or Network' -a_n_r_target6 = 'IPv6-Address or Network (CIDR)' -a_n_r_netmask1 = 'if target is a network' -m_n_inet = 'Internet Connection' -m_n_local = 'Local Network' -m_n_route = 'Route' -m_n_brdige = 'Bridge' -m_w_ap = 'Provide (Access Point)' -m_w_adhoc = 'Independent (Ad-Hoc)' -m_w_client = 'Join (Client)' -m_w_wds = 'Distributed (WDS)' -m_w_clientmode = 'Clientmode' -system_system_logsize = 'System log buffer size' -system_system_logip = 'External system log server' -system_system_conloglevel = 'Log output level' -system_system_conloglevel_desc = 'Level of log messages on the console' -m_i_chipset = 'Chipset' -m_i_processor = 'Processor' -m_i_memory = 'Memory' -m_i_systemtime = 'System Time [UTC]' -m_i_uptime = 'Uptime' -m_n_d_firstaddress = 'First leased address' -m_n_d_numleases = 'Number of leased addresses' -routingtable = 'Routing table' -wlanscan = 'Wifi scan' -frequency = 'Frequency' -power = 'Power' -noise = 'Noise' -signal = 'Signal' -link = 'Link' -frag = 'Frag.' -rts = 'RTS' -bitrate = 'Bitrate' -m_n_keepalive = 'automatically reconnect' -m_n_dialondemand = 'disconnect when idle for' -m_n_pptp_server = 'PPTP-Server' -leds = 'LED Configuration' -leds_desc = 'Customizes the behaviour of the device LEDs if possible.' -system_led_name = 'LED Name' -system_led_sysfs = 'LED Device' -system_led_default = 'Default state' -system_led_default_desc = 'ticked = on' -system_led_trigger = 'Trigger' -system_led_trigger_none = 'None' -system_led_trigger_defaulton = 'Default On' -system_led_trigger_timer = 'Timer' -system_led_trigger_heartbeat = 'Heartbeat (Load Average)' -system_led_trigger_netdev = 'Network Device' -system_led_delayoff = 'Off-State Delay' -system_led_delayoff_desc = 'Time (in ms) the LED is off' -system_led_delayon = 'On-State Delay' -system_led_delayon_desc = 'Time (in ms) the LED is on' -system_led_dev = 'Device' -system_led_mode = 'Trigger Mode' -system_led_mode_link = 'Link On' -system_led_mode_tx = 'Transmit' -system_led_mode_rx = 'Receive' -network_interface_up = 'Active' -network_interface_hwaddr = 'MAC-Address' -network_interface_hwaddr_desc = 'Hardware Address' -network_interface_txrx = 'Traffic' -network_interface_txrx_desc = 'transmitted / received' -network_interface_err = 'Errors' -network_interface_err_desc = 'TX / RX' -network_interface_fwzone = 'Create / Assign firewall-zone' -network_interface_fwzone_desc = 'This interface does not belong to any firewall zone yet.' -process_head = 'Processes' -process_descr = 'This list gives an overview over currently running system processes and their status.' -process_pid = 'PID' -process_owner = 'Owner' -process_command = 'Command' -process_cpu = 'CPU usage (%)' -process_mem = 'Memory usage (%)' -process_hup = 'Hang Up' -process_term = 'Terminate' -process_kill = 'Kill' -mem_cached = 'cached' -mem_buffered = 'buffered' -mem_free = 'free' -a_s_crontab = 'Scheduled Tasks' -a_s_crontab1 = 'This is the system crontab in which scheduled tasks can be defined.' -a_w_nasid = 'NAS ID' -a_w_cacert = 'Path to CA-Certificate' -a_w_eaptype = 'EAP-Method' -a_w_tlsprivkey = 'Path to Private Key' -a_w_tlsprivkeypwd = 'Password of Private Key' -a_w_peapauth = 'PEAP-Authentication' -a_w_peapidentity = 'PEAP-Identity' -a_w_peappassword = 'PEAP-Password' -a_w_create = 'Create Network' -hostnames = 'Hostnames' -hostnames_entries = 'Host entries' -hostnames_hostname = 'Hostname' -hostnames_address = 'IP address' -luci_components = "LuCI Components" -m_n_mssfix = "Clamp Segment Size" -m_n_mssfix_desc = "Fixes problems with unreachable websites, submitting forms or other unexpected behaviour for some ISPs." diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.fr.lua deleted file mode 100644 index a4789a0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.fr.lua +++ /dev/null @@ -1,327 +0,0 @@ -uci_applied = 'Les changements suivants ont été appliqués' -uci_reverted = 'Les changements suivants ont été annulés' -a_i_ui = 'Interface utilisateur' -c_lucidesc = 'LuCI est une suite logicielle d'applications Lua software incluant un MVC-Webframework et une interface web pour équipements embarqués. Luci est sous license Apache.' -c_projecthome = 'Page d'accueil du projet' -c_leaddev = 'Développeurs principaux' -c_contributors = 'Contributeurs' -c_thanksto = 'Merci à' -a_i_i_hello = 'Bonjour !' -a_i_i_admin1 = 'Voici la page d'administration de LuCI.' -a_i_i_admin2 = 'LuCI est une interface graphique libre, flexible, et user friendly pour configurer OpenWrt Kamikaze.' -a_i_i_admin3 = 'Dans les pages suivantes vous pouvez ajuster tous les réglages importants de votre routeur.' -a_i_i_admin4 = 'Vous trouverez une page de navigation sur le côté gauche permettant d'accèder aux différentes pages de configuration.' -a_i_i_admin5 = 'Nous souhaitons améliorer l'interface de manière permanente, vos retours et suggestions sont primordiaux.' -a_i_i_admin6 = 'Et maintenant que la fête commence !' -a_i_i_team = 'L'équipe LuCI' -a_i_luci1 = 'Ici, vous pouvez personnaliser les réglages et les fonctionnalités de LuCI.' -a_i_ucicommit = 'Actions post-changements' -a_i_ucicommit1 = 'Ces commandes seront executées automatiquement lorsqu'une configuration UCI est appliquée, les changement prenant effet immédiatement.' -a_i_keepflash = 'Fichiers à conserver lors d'une mise à jour du firmware' -a_i_keepflash1 = 'Lors d'une nouvelle installation, ces fichiers seront ajoutés à la nouvelle installation.' -a_st_i_status1 = 'Ici, vous trouverez des informations sur l'état actuel du système comme la fréquence processeur, utilisation mémoire et trafic réseau.' -a_st_i_status2 = 'Les journaux des services ou du noyau peuvent être vus ici afin d'obtenir un aperçu de leur état.' -iwscan = 'Scan WLAN' -iwscan1 = 'Réseaux Wi-Fi dans votre environnement' -iwscan_encr = 'Chiffrement' -iwscan_link = 'Lien' -iwscan_signal = 'Signal' -iwscan_noise = 'Bruit' -routes = 'Routes' -routes_netmask = 'Masque réseau' -routes_gateway = 'Passerelle' -routes_metric = 'Metrique' -a_s_desc = 'Ici, vous pouvez configurer les aspects basiques de votre routeur comme son nom ou son fuseau horaire.' -a_s_packages = 'Logiciels' -a_s_changepw = 'Mot de passe administrateur' -a_s_p_ipkg = 'Configuration OPKG' -a_s_sshkeys = 'Clés SSH' -a_s_fstab = 'Points de montage' -a_s_flash = 'Mise à jour firmware' -a_s_i_system1 = 'Changements en rapport avec le système, son identification le logiciel/matériel installé, l'authentification ou points de montage.' -a_s_i_system2 = 'Ces réglages définissent la base de votre système.' -a_s_i_system3 = 'Soyez vigilent car un mauvais réglage peut empêcher votre équipement de démarrer, ou vous empêcher de vous y connecter.' -a_s_packages_do = 'Accomplir les actions' -a_s_packages_install = 'Installer' -a_s_packages_installurl = 'Télécharge et installe le paquet' -a_s_packages_ipkg = 'Editer la liste des paquets et le répertoire de destination' -a_s_packages_name = 'Nom du paquet' -a_s_packages_remove = 'Désinstaller' -a_s_packages_search = 'Trouver un paquet' -a_s_packages_update = 'Liste des paquets mise à jour' -a_s_packages_updatelist = 'Mettre à jour la liste des paquets' -a_s_packages_upgrade = 'Mettre à jour les paquets installés' -a_s_p_ipkg_pkglists = 'Listes de paquets' -a_s_p_ipkg_targets = 'Répertoires de destination' -a_s_changepw1 = 'Changer le mot de passe du système (Utilisateur "root")' -a_s_changepw_changed = 'Mot de passe changé avec succès' -a_s_changepw_nomatch = 'Erreur: les mots de passe ne correspondent pas' -a_s_sshkeys1 = 'Vous pouvez copier ici des clés SSH publiques (une par ligne) pour une authentification SSH sur clés publiques.' -a_s_fstab_mountpoints = 'Points de montage' -a_s_fstab_mountpoints1 = 'Les points de montage définissent l'attachement d'un périphérique au système de fichier.' -a_s_fstab_active = 'Systèmes de fichiers montés' -a_s_fstab_used = 'Utilisé' -a_s_fstab_avail = 'Disponible' -a_s_fstab_mountpoint = 'Point de montage' -a_s_fstab_device1 = 'Le périphérique de bloc contenant la partition (ex : /dev/sda1)' -a_s_fstab_fs1 = 'Le système de fichiers utilisé pour formatter le support de stockage (ex : ext3)' -a_s_fstab_swap1 = 'Si la mémoire physique n'est pas en quantité suffisante, les données inutilisées peuvent être temporairement transférée sur une partition d'échange, relevant la quantité de RAM disponible. Ce processus est lent car la mémoire d'échange ne peut être accédée aux taux de transfert de la RAM.' -a_s_flash_flashed = 'Firmware installé avec succès. Redémarrage...' -a_s_flash_flasherr = 'Programme lors de la programmation' -a_s_flash_fwimage = 'Image firmware' -a_s_flash_received = 'Image reçue. Début du processus de flashage. NE PAS ETEINDRE L'EQUIPEMENT !' -a_s_flash_inprogress = 'Ecriture du firmware...' -a_s_flash_fwupgrade = 'Mise à jour firmware' -a_s_flash_keepcfg = 'Conserver les fichiers de configuration' -a_s_flash_notimplemented = 'Désolé, cette fonction n'est pas (encore) disponible pour votre plateforme.' -a_s_flash_upgrade1 = 'Remplace les fichiers existants par les nouveaux. Le format du firmware est dépendant de la plateforme.' -a_s_reboot1 = 'Redémarrage du système d'exploitation de votre équipement' -a_s_reboot_do = 'Redémarrer' -a_s_reboot_running = 'Patientez s'il vous plaît: équipement en cours de redémarrage...' -a_s_reboot_u = 'Attention : il reste des changements non appliqués qui seront perdus après redémarrage !' -a_s_applyreboot1 = 'Changements appliqués.' -a_s_backup = 'Sauvegarder / Restaurer' -a_s_backup_backup = 'Créer une archive de sauvegarde' -a_s_backup_archive = 'Sauvegarder l'archive' -a_s_backup_reset = 'Revenir à la configuration par défaut du routeur' -a_s_backup_reset1 = 'Etes-vous sûr de vouloir revenir à la configuration par défaut du firmware ?' -a_s_backup_restore = 'Restaurer une sauvegarde' -a_s_backup1 = 'Ici, vous pouvez sauvegarder et restaurer la configuration de votre routeur et, si possible, restaurer la configuration par défaut du routeur.' -a_srv_http = 'Serveur HTTP' -a_srv_ssh = 'Serveur SSH' -a_srv_services1 = 'Les services et démons accomplissent certaines tâches sur votre équipement.' -a_srv_services2 = 'La plupart d'entre eux sont des serveurs réseaux, qui vous offrent certains services comme un accès shell, accéder à des pages comme LuCI, faire du routage mesh, envoyer des e-mails ...' -a_srv_http1 = 'Un serveur web léger qui peut être utilisé pour LuCI.' -a_srv_http_authrealm = 'Domaine d'authentification' -a_srv_http_authrealm1 = 'Le domaine qui sera affiché lors de la fenêtre d'authentification.' -a_srv_http_config1 = 'fichier de configuration par défaut : /etc/httpd.conf' -a_srv_http_root = 'Page racine' -a_srv_dropbear1 = 'Dropbear est un serveur SSH et intègre un serveur SCP' -a_srv_d_pwauth = 'Authentification par mot de passe' -a_srv_d_pwauth1 = 'Autoriser l'authentification SSH par mot de passe' -a_w_channel = 'Canal' -a_w_wifi1 = 'Dans cette page vous trouverez des options de configuration pour les réseau sans-fils.' -a_w_wifi2 = 'Vous pouvez facilement installer un périphérique 802.11a/b/g/n dans votre réseau physique existant et utiliser la gestion des interfaces virtuelles pour créer des répéteurs sans-fils ou fournir plusieurs réseaux avec un seul équipement.' -a_w_wifi3 = 'Les modes Point d'accès, Station, Ad-Hoc et WDS couplés aux chiffrements WPA et WPA2 sont gérés.' -a_w_devices1 = 'Ici vous pouvez configurer les équipements Wi-Fi installés.' -a_w_txantenna = 'Antenne transmission' -a_w_rxantenna = 'Antenne réception' -a_w_distance1 = 'Distance vers la station la plus éloignée (m)' -a_w_diversity = 'Diversité' -a_w_countrycode = 'Code pays' -a_w_connlimit = 'Limite de connexion' -a_w_networks1 = 'Vous pouvez faire fonctionner plusieurs réseaux Wi-Fi sur un seul équipement. Il existe des limitations matérielles et liées au pilote. En général vous pouvez faire fonctionner simultanément 1 réseau Ad-Hoc et 3 points d'accès simultanément.' -a_w_netid = 'Nom du réseau (ESSID)' -a_w_network1 = 'Ajouter ce réseau Wi-Fi au réseau physique' -a_w_netmanual = ' - Créer un nouveau réseau - ' -a_w_txpwr = 'Puissance d'émission' -a_w_brcmburst = 'Technologie Broadcom Frameburst' -a_w_athburst = 'Technologie Atheros Frameburst' -a_w_radiussrv = 'Serveur Radius' -a_w_radiusport = 'Port Radius' -a_w_apisolation = 'Isolation AP' -a_w_apisolation1 = 'Empêche la communication directe Client à Client' -a_w_hideessid = 'Cacher le ESSID' -a_w_ap = 'Point d'accès' -a_w_adhoc = 'Ad-Hoc' -a_w_ahdemo = 'Pseudo Ad-Hoc (ahdemo)' -a_w_client = 'Client' -a_w_wds = 'WDS' -a_w_monitor = 'Monitor' -dhcp_dnsmasq_desc = 'Dnsmasq est un serveur DHCP combiné à un requêteur DNS pour les pare-feu NAT' -dhcp_dnsmasq_domainneeded = 'Domain requis' -dhcp_dnsmasq_domainneeded_desc = 'Ne pas transmettre de requêtes DNS sans nom DNS' -dhcp_dnsmasq_authoritative = 'Authoritaire' -dhcp_dnsmasq_authoritative_desc = 'C'est le seul serveur DHCP sur le réseau local' -dhcp_dnsmasq_boguspriv = 'Filtrer les requêtes privées' -dhcp_dnsmasq_boguspriv_desc = 'Ne pas transmettre les requêtes de recherche inverse pour les réseaux locaux' -dhcp_dnsmasq_filterwin2k = 'Filtrer les requêtes inutiles' -dhcp_dnsmasq_filterwin2k_desc = 'filtre les requêtes inutiles émises par les systèmes Windows' -dhcp_dnsmasq_localisequeries = 'Localiser les requêtes' -dhcp_dnsmasq_localisequeries_desc = 'localiser la réponse suivant l'émetteur de la requête' -dhcp_dnsmasq_local = 'Serveur local' -dhcp_dnsmasq_domain = 'Domaine local' -dhcp_dnsmasq_expandhosts = 'Etendre le nom d'hôte' -dhcp_dnsmasq_expandhosts_desc = 'concatène le nom de domaine aux noms d'hôtes' -dhcp_dnsmasq_nonegcache = 'Ne pas mettre en cache les requêtes négatives' -dhcp_dnsmasq_nonegcache_desc = 'empêche la mise en cache de requêtes DNS erronnées' -dhcp_dnsmasq_readethers = 'Utiliser /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Lire /etc/ethers pour configurer le serveur DHCP' -dhcp_dnsmasq_leasefile = 'Fichier de baux' -dhcp_dnsmasq_leasefile_desc = 'fichier dans lequel les baux DHCP seront stockés' -dhcp_dnsmasq_resolvfile = 'Fichier de résolution' -dhcp_dnsmasq_resolvfile_desc = 'fichier de résolution local' -dhcp_dnsmasq_nohosts = 'Ignorer /etc/hosts' -dhcp_dnsmasq_strictorder = 'Ordre stricte' -dhcp_dnsmasq_strictorder_desc = 'Les serveurs DNS du fichier de résolution seront interrogés dans l'ordre' -dhcp_dnsmasq_logqueries = 'Journaliser les requêtes' -dhcp_dnsmasq_noresolv = 'Ignorer le fichier de résolution' -dhcp_dnsmasq_dnsforwardmax = 'Requêtes concurrentes maximum' -dhcp_dnsmasq_port = 'Port DNS' -dhcp_dnsmasq_ednspacket_max = 'taille maximum du paquet. EDNS.0 ' -dhcp_dnsmasq_dhcpleasemax = 'baux maximum' -dhcp_dnsmasq_addnhosts = 'fichiers de noms d'hôtes supplémentaires' -dhcp_dnsmasq_queryport = 'port de requête' -dhcp_dnsmasq_enabletftp = 'Activer le serveur TFTP' -dhcp_dnsmasq_tftproot = 'Racine du serveur TFTP' -dhcp_dnsmasq_dhcpboot = 'Image de démarrage réseau' -a_n_switch = 'Switch' -a_n_conntrack = 'Connexions Actives' -a_n_conntrack_desc = 'Cette page donne une vue d'ensemble des connexions réseaux actuellement actives.' -a_n_routes = 'Routes' -a_n_routes4 = 'IPv4 Routes' -a_n_routes6 = 'IPv6 Routes' -a_network1 = 'Dans cette section vous trouverez tous les réglages relatifs au réseau.' -a_network2 = 'Sur la plupart des routeurs, les ports des switchs peuvent être configurés et séparés en plusieurs VLANs.' -a_network3 = 'Les réglages des interfaces et du PPPoE / PPTP vous permettent une configuration personalisée du réseau.' -a_network4 = 'Les équipements utilisant DHCP dans votre réseau local peuvent être configurés automatique pour l'accès au réseau.' -a_network5 = 'Le pare-feu et la redirection de ports peuvent être utilisés pour fournir un service interne à un réseau extérieur.' -a_n_switch1 = 'Les ports de votre routeur peuvent être configurés pour combiner plusieurs VLANs dans lesquels les machines connectées peuvent dialoguer directement l'une avec l'autre. Les VLANs sont souvent utilisés pour séparer différences sous-réseaux. Bien souvent il y a un port d'uplink pour une connexion vers un réseau plus vaste, comme internet et les autres ports sont réservés au réseau local.' -network_switch_desc = 'Les ports appartenant à un VLAN sont séparés par des espaces. Le port ayant le numéro le plus élevé (5 en général) est souvent connecté à l'interface interne du routeur. Les équipements avec 5 ports ont souvent leur port 0 comme port d'uplink par défaut.' -a_n_ifaces1 = 'Dans cette page vous pourrez configurer les interfaces réseaux. Vous pouvez bridger différentes interfaces en cochant le champ "bridger les interfaces" et en saisissant les noms des interfaces réseau séparées par des espaces. Vous pouvez aussi utiliser la notation VLAN, INTERFACE.VLANNB (ex : eth0.1).' -a_n_i_bridge = 'Bridger les interfaces' -a_n_i_bridge1 = 'créer un bridge entre plusieurs interfaces' -dhcp_desc = 'Avec DHCP, les machines connectées au réseau peuvent recevoir leurs réglages réseau directement (adresse IP, masque de réseau, serveur DNS, ...)' -dhcp_dhcp_leasetime = 'Durée du bail' -dhcp_dhcp_dynamicdhcp = 'DHCP dynamique' -dhcp_dhcp_ignore = 'Ignorer l'interface' -dhcp_dhcp_ignore_desc = 'désactiver DHCP sur cette interface' -dhcp_dhcp_force = 'Forcer' -dhcp_dhcp_start_desc = 'première addresse (dernier octet)' -dhcp_dhcp_limit_desc = 'nombre d'adresses disponibles - 1' -dhcp_dhcp_dhcpoption = 'Options DHCP' -dhcp_dhcp_dhcpoption_desc = 'Voir "dnsmasq --help dhcp" pour une liste d'options disponibles.' -dhcp_leases = 'Baux' -luci_ethers = 'Baux Statiques' -dhcp_timeremain = 'Durée de validité' -dhcp_leases_active = 'Baux actifs' -a_n_ptp = 'Connexions Point-à-Point' -a_n_ptp1 = 'Les connexions Point-à-Point en PPPoE ou PPTP sont souvent utilisées pour connecter un équipement à internet sur du DSL ou une technologie similaire.' -network_interface_prereq = 'Vous avez besoin d'installer "comgt" pour le support UMTS/GPRS, "ppp-mod-pppoe" pour le PPPoE, "ppp-mod-pppoa" pour le PPPoA ou "pptp" pour le PPtP' -network_interface_prereq_mini = 'Vous avez besoin d'installer "ppp-mod-pppoe" pour le support PPPoE ou "pptp" pour le PPtP' -network_interface_server = 'Serveur PPTP' -network_interface_demand = 'Déconnexion automatique' -network_interface_demand_desc = 'Délai d'inactivité à partir duquel la connexion est coupée' -network_interface_keepalive = 'Maintenir la connexion' -network_interface_keepalive_desc = 'Reconnexion si la connexion est perdue' -network_interface_device = 'Interface Modem' -network_interface_device_desc = 'Le noeud d'interface de votre modem, e.g. /dev/ttyUSB0' -network_interface_defaultroute = 'Remplacer la route par défaut' -network_interface_defaultroute_desc = 'Laisser pppd remplacer la route par défaut courante pour utiliser l'interface PPP après l'établissement de la connexion' -network_interface_peerdns = 'Utiliser le DNS fourni' -network_interface_peerdns_desc = 'Configurer le serveur DNS local pour utiliser le serveur de nom fourni par le pair PPP' -network_interface_ipv6 = 'Activer l'IPv6 sur le lien PPP' -network_interface_connect = 'Script de Connexion' -network_interface_connect_desc = 'pppd exécutera ce script après l'établissement du lien PPP' -network_interface_disconnect = 'Script de Déconnexion' -network_interface_disconnect_desc = 'pppd exécutera ce script avant de déconnecter le lien PPP' -network_interface_pppd_options = 'Options pppd supplémentaires' -network_interface_pppd_options_desc = 'Spécifiez ici des arguments de ligne de commande supplémentaire pour pppd' -network_interface_apn = 'Point d'accès (APN)' -network_interface_pincode = 'code PIN' -network_interface_pincode_desc = 'Assurez-vous de fournir le bon code PIN ou vous pourriez bloquer votre carte SIM !' -network_interface_service = 'Type de service' -network_interface_maxwait = 'Délai d'initialisation' -network_interface_maxwait_desc = 'Secondes à attendre pour que le modem soit prêt avant d'essayer de se connecter' -a_n_r_routes1 = 'Avec les routes statiques vous pouvez spécifier à travers quelle interface ou passerelle un réseau peut être contacté.' -a_n_routes_static = 'Routes statiques' -a_n_routes_static4 = 'Routes IPv4 statiques' -a_n_routes_static6 = 'Routes IPv6 statiques' -a_n_routes_kernel4 = 'Routes IPv4 actives' -a_n_routes_kernel6 = 'Routes IPv6 actives' -a_n_r_target1 = 'adresse IP ou réseau' -a_n_r_target6 = 'adresse IPv6 ou réseau' -a_n_r_netmask1 = 'si la destination est un réseau' -m_n_inet = 'Connexion Internet' -m_n_local = 'Réseau Local' -m_n_route = 'Route' -m_n_brdige = 'Bridge' -m_w_ap = 'Point d'accès' -m_w_adhoc = 'Ad-Hoc' -m_w_client = 'Client' -m_w_wds = 'WDS' -m_w_clientmode = 'Mode client' -system_system_logsize = 'Taille de buffer du journal système' -system_system_logip = 'Serveur externe pour le journal système' -system_system_conloglevel = 'Niveau de gravité du journal' -system_system_conloglevel_desc = 'Niveau de gravité du journal système affiché sur la console' -m_i_processor = 'Processeur' -m_i_memory = 'Mémoire' -m_i_systemtime = 'Heure Locale' -m_i_uptime = 'Uptime' -m_n_d_firstaddress = 'Première adresse attribuée' -m_n_d_numleases = 'Nombre d'adresses attribuées' -routingtable = 'Table de routage' -wlanscan = 'Scan Wifi' -frequency = 'Fréquence' -power = 'Puissance' -noise = 'Bruit' -signal = 'Signal' -link = 'Lien' -frag = 'Frag.' -rts = 'RTS' -bitrate = 'Débit binaire' -m_n_keepalive = 'reconnecter automatiquement' -m_n_dialondemand = 'déconnecter après une inactivité de' -m_n_pptp_server = 'Serveur PPTP' -leds = 'Configuration des LEDs' -leds_desc = 'Personnaliser le comportement des LEDs si possible.' -system_led_name = 'Nom de la LED' -system_led_sysfs = 'Inteface de la LED' -system_led_default = 'Etat par défaut' -system_led_default_desc = 'ticked = on' -system_led_trigger = 'Clignotant' -system_led_trigger_none = 'Aucun' -system_led_trigger_defaulton = 'Allumé par défaut' -system_led_trigger_timer = 'Timer' -system_led_trigger_heartbeat = 'Heartbeat (Load Average)' -system_led_trigger_netdev = 'Interface Réseau' -system_led_delayoff = 'Délai de l'état Off' -system_led_delayoff_desc = 'Temps (en ms) pendant lequel la LED est éteinte' -system_led_delayon = 'Délai de l'état On' -system_led_delayon_desc = 'Temps (en ms) pendant lequel la LED est allumée' -system_led_dev = 'Interface' -system_led_mode = 'Mode Clignotant' -system_led_mode_link = 'Lien établi' -system_led_mode_tx = 'Transmet' -system_led_mode_rx = 'Reçoit' -network_interface_up = 'Active' -network_interface_hwaddr = 'Addresse MAC' -network_interface_hwaddr_desc = 'Addresse matériel' -network_interface_txrx = 'Trafic' -network_interface_txrx_desc = 'transmis / reçu' -network_interface_err = 'Erreurs' -network_interface_err_desc = 'TX / RX' -network_interface_fwzone = 'Créer / Assigner une zone du pare-feu' -network_interface_fwzone_desc = 'Cette interface n'appartient à aucune zone du pare-feu pour le moment.' -process_head = 'Processus' -process_descr = 'Cette liste donne une vue d'ensemble des processus en exécution et leur statut.' -process_pid = 'PID' -process_owner = 'Propriétaire' -process_command = 'Commande' -process_cpu = 'Utilisation CPU (%)' -process_mem = 'Utilisation Mémoire (%)' -process_hup = 'Signal (HUP)' -process_term = 'Terminer' -process_kill = 'Tuer' -mem_cached = 'mis en cache' -mem_buffered = 'bufferisé' -mem_free = 'libre' -a_s_crontab = 'Tâches Régulières' -a_s_crontab1 = 'Ceci est le système crontab avec lequel sont définies les tâches récurrentes.' -a_w_nasid = 'NAS ID' -a_w_cacert = 'Chemin de la CA' -a_w_eaptype = 'Méthode EAP' -a_w_tlsprivkey = 'Chemin de la clé privée' -a_w_tlsprivkeypwd = 'Mot de passe de la clé privée' -a_w_peapauth = 'Authentification' -a_w_peapidentity = 'Identité' -a_w_peappassword = 'Mot de passe' -a_w_create = 'Créer un réseau' -hostnames = 'Noms d'hôtes' -hostnames_entries = 'Entrées d'hôtes' -hostnames_hostname = 'Nom d'hôte' -hostnames_address = 'Adresse IP' -network_interface_encaps = 'PPPoA Encapsulation' -m_n_mssfix = "Clamp Segment Size" -m_n_mssfix_desc = "Fixes problems with unreachable websites, submitting forms or other unexpected behaviour for some ISPs." diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.it.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.it.lua deleted file mode 100644 index 2a62788..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.it.lua +++ /dev/null @@ -1,327 +0,0 @@ -uci_applied = 'Le seguenti modifiche sono state applicate' -uci_reverted = 'Le seguenti modifiche sono state annullate' -a_i_ui = 'Interfaccia utente' -c_lucidesc = 'LuCI è una collezione di software libero scritto in Lua comprendente un Webframework e interfaccia web MVC per dispositivi integrati. LuCI è rilasciato sotto la Apache-License.' -c_projecthome = 'Sito del progetto' -c_leaddev = 'Lead Development' -c_contributors = 'Contributing Developers' -c_thanksto = 'Ringraziamenti' -a_i_i_hello = 'Ciao!' -a_i_i_admin1 = 'Questa è l'area d'amministrazione di LuCI.' -a_i_i_admin2 = 'LuCI è un'interfaccia grafica gratuita, flessibile, e amichevole per configurare OpenWrt Kamikaze.' -a_i_i_admin3 = 'Nelle seguenti pagine puoi impostare tutti i settaggi più importanti del tuo router' -a_i_i_admin4 = 'Nota: Le modifiche devono essere confermate in LuCI cliccando Modifiche - Salva e Applica prima di essere applicate.' -a_i_i_admin5 = 'dal momento che vogliamo migliorare quest'interfaccia accettiamo suggerimenti.' -a_i_i_admin6 = 'Ed ora buon divertimento con il tuo router!' -a_i_i_team = 'Il Team di LuCI' -a_i_luci1 = 'Qui puoi personalizzare i settaggi e le funzionalità di LuCI.' -a_i_ucicommit = 'Azioni post-modifica' -a_i_ucicommit1 = 'Questi comandi verranno eseguiti automaticamente quando un comando di configurazione UCI viene applicato permettendo alle modifiche di essere applicate immediatamente.' -a_i_keepflash = 'Files da conservare quando si aggiorna un nuovo firmware' -a_i_keepflash1 = 'Quando si aggiorna un firmware con LuCI questi files verranno aggiunti al nuovo firmware.' -a_st_i_status1 = 'Qui puoi trovare informazione sullo stato del sistema come frequenza di clock della CPU, uso della memoria o dati della scheda di rete.' -a_st_i_status2 = 'Inoltre i log del kernel o dei servizi sono visualizzabili qui per avere un riassunto dello stato attuale.' -iwscan = 'Scansione WLAN' -iwscan1 = 'Reti Wifi nell'ambiente circostante' -iwscan_encr = 'Encr.' -iwscan_link = 'Collegamento' -iwscan_signal = 'Segnale' -iwscan_noise = 'Disturbo' -routes = 'Route' -routes_netmask = 'Maschera di rete' -routes_gateway = 'Gateway' -routes_metric = 'Metrica' -a_s_desc = 'Qui puoi configurare gli aspetti base del tuo dispositivo come l'hostname o il fuso orario.' -a_s_packages = 'Software' -a_s_changepw = 'Password di Amministratore' -a_s_p_ipkg = 'Configurazione di OPKG' -a_s_sshkeys = 'Chiavi SSHs' -a_s_fstab = 'Punti di mount' -a_s_flash = 'Aggiorna firmware' -a_s_i_system1 = 'Modifica impostazioni relative al sistema, la sua identificazione, installazioni hardware e software, autenticazione o punti di mount.' -a_s_i_system2 = 'Queste impostazioni definiscono la base del tuo sistema.' -a_s_i_system3 = 'Fai attenzione perchè una cattiva configurazione qui può impedire al tuo dispositivo di avviarsi o impedirti di entrarvi.' -a_s_packages_do = 'Esegui azioni' -a_s_packages_install = 'Installa' -a_s_packages_installurl = 'Scarica e installa pacchetto' -a_s_packages_ipkg = 'Modifica lista dei pacchetti e destinazione dell'installazione' -a_s_packages_name = 'Nome pacchetto' -a_s_packages_remove = 'Rimuovi' -a_s_packages_search = 'Cerca pacchetto' -a_s_packages_update = 'Lista pacchetti aggiornata' -a_s_packages_updatelist = 'Aggiorna lista pacchetti' -a_s_packages_upgrade = 'Upgrade installed packages' -a_s_p_ipkg_pkglists = 'Lista pacchetti' -a_s_p_ipkg_targets = 'Destinazione installazione' -a_s_changepw1 = 'Cambia la password dell'amministratore di sistema (Utente root)' -a_s_changepw_changed = 'Password cambiata con successo' -a_s_changepw_nomatch = 'Errore: le password non corrispondono' -a_s_sshkeys1 = 'Qui puoi incollare le tue chiavi SSH (una per linea) per l'autenticazione SSH a chiave pubblica.' -a_s_fstab_mountpoints = 'Punti di mount' -a_s_fstab_mountpoints1 = 'I punti di mount definiscono in quale punto un dispositivo di memoria verrà attaccato al tuo filesystem' -a_s_fstab_active = 'File system montati' -a_s_fstab_used = 'Usati' -a_s_fstab_avail = 'Disponibili' -a_s_fstab_mountpoint = 'Punto di mount' -a_s_fstab_device1 = 'Il file del dispositivo di memoria o della partizione (e.s. /dev/sda1)' -a_s_fstab_fs1 = 'Il filesystem usato per formattare la memoria (e.s. ext3)' -a_s_fstab_swap1 = 'Se la tua memoria è insufficiente i dati non usati possono venire temporaneamente spostati in un'area di swap risultando in un più grande quantitativo di RAM usabile. Sappi che spostare dati in swap è un processo molto lento e che il dispositivo di swap non può essere acceduto alle alte velocità della RAM.' -a_s_flash_flashed = 'Firmware aggiornato con successo. Riavvio il dispositivo...' -a_s_flash_flasherr = 'Aggiornamento fallito' -a_s_flash_fwimage = 'Firmware image' -a_s_flash_received = 'Firmware ricevuto. Mi preparo ad aggiornare il dispositivo. NON SPEGNERE IL DISPOSITIVO!' -a_s_flash_inprogress = 'Scrivendo il firmware...' -a_s_flash_fwupgrade = 'Aggiorna firmware' -a_s_flash_keepcfg = 'Mantieni files di configurazione' -a_s_flash_notimplemented = 'Spiacente, questa funzione non è (ancora) disponibile per la tua piattaforma.' -a_s_flash_upgrade1 = 'Sostituisce il firmware installato con uno nuovo. Il firmware è dipendente dalla piattaforma.' -a_s_reboot1 = 'Riavvia il sistema operativo del tuo dispositivo' -a_s_reboot_do = 'Esegui un riavvio' -a_s_reboot_running = 'Per favore attendi: Riavvio del dispositivo...' -a_s_reboot_u = 'Attenzione: Ci sono modifiche non salvate che verranno persi riavviando!' -a_s_applyreboot1 = 'Modifiche applicate.' -a_s_backup = 'Backup / Ripristina' -a_s_backup_backup = 'Crea un backup' -a_s_backup_archive = 'Archivio di backup' -a_s_backup_reset = 'Ripristina il router come predefinito' -a_s_backup_reset1 = 'Procedi annullando tutte le modifiche e resettando ai predefiniti del firmware?' -a_s_backup_restore = 'Ripristina backup' -a_s_backup1 = 'Qui puoi salvare e ripristinare la configurazione del tuo router e - se possibile - resettare il router con le impostazioni predefinite.' -a_srv_http = 'Server HTTP' -a_srv_ssh = 'Server SSH' -a_srv_services1 = 'Servizi e demoni svolgono alcune azioni sul tuo dispositivo.' -a_srv_services2 = 'Molti di loro sono servers, che offrono un determinato servizio al tuo dispositivo o alla tua rete come accesso shell, servire pagine web come LuCI, fare mesh routing, inviare e-mails, ...' -a_srv_http1 = 'Un piccolo webserver che può essere usato per servire LuCI.' -a_srv_http_authrealm = 'Authentication Realm' -a_srv_http_authrealm1 = 'Il realm che verrà visualizzato al prompt di autenticazione per le pagine protette.' -a_srv_http_config1 = 'predefinito /etc/httpd.conf' -a_srv_http_root = 'Radice dei documenti' -a_srv_dropbear1 = 'Dropbear offre accesso SSH e integra un server SCP' -a_srv_d_pwauth = 'Password di authenticazione' -a_srv_d_pwauth1 = 'Permetti autenticazione SSH tramite password' -a_w_channel = 'Canale' -a_w_wifi1 = 'In questa pagina puoi trovare impostazioni di configurazione per reti WLAN.' -a_w_wifi2 = 'Puoi facilmente integrare i tuoi dispositivi 802.11a/b/g/n-devices nella tua rete fisica e usare la scheda di rete virtuale per costruire ripetitori wireless o offrire più di una rete con un solo dispositivo.' -a_w_wifi3 = 'Sono supportate le modalità operative Managed, Client, Ad-Hoc and WDS come per la crittografia WPA e WPA2 per comunicazioni sicure.' -a_w_devices1 = 'Qui puoi configurare i tuoi dispositivi wireless installati.' -a_w_txantenna = 'Antenna trasmittente' -a_w_rxantenna = 'Antenna ricevente' -a_w_distance1 = 'Distanza della stazione più lontana (in metri)' -a_w_diversity = 'Diversity' -a_w_countrycode = 'Codice nazione' -a_w_connlimit = 'Limite connessioni' -a_w_networks1 = 'Puoi avere più reti wifi con un solo dispositivo. Sappi ceh ci sono alcune restrizioni relative all'hardware ed al driver.Normalmente puoi avere 1 rete Ad-Hoc o fino a 3 reti Master e uan rete in modalità Client contemporaneamente.' -a_w_netid = 'Nome rete (ESSID)' -a_w_network1 = 'Aggiungi la rete Wifi alla rete fisica' -a_w_netmanual = ' - Crea nuova rete - ' -a_w_txpwr = 'Potenza di trasmissione' -a_w_brcmburst = 'Frameburst Broadcom' -a_w_athburst = 'Frameburst Atheros' -a_w_radiussrv = 'Server Radius' -a_w_radiusport = 'Porta Radius' -a_w_apisolation = 'Isolazione AP' -a_w_apisolation1 = 'Impedisci la comunicazione fra Client' -a_w_hideessid = 'Nascondi ESSID' -a_w_ap = 'Access Point' -a_w_adhoc = 'Ad-Hoc' -a_w_ahdemo = 'Pseudo Ad-Hoc (ahdemo)' -a_w_client = 'Client' -a_w_wds = 'WDS' -a_w_monitor = 'Monitor' -dhcp_dnsmasq_desc = 'Dnsmasq è un server DHCP e forwarder DNS per firewall NAT' -dhcp_dnsmasq_domainneeded = 'Dominio richiesto' -dhcp_dnsmasq_domainneeded_desc = 'Non inoltrare le richieste DNS senza nome DNS' -dhcp_dnsmasq_authoritative = 'Autoritativo' -dhcp_dnsmasq_authoritative_desc = 'Questo è l'unico server DHCP nella tua rete locale' -dhcp_dnsmasq_boguspriv = 'Filtra privati' -dhcp_dnsmasq_boguspriv_desc = 'Non inoltrare richieste per le reti locali' -dhcp_dnsmasq_filterwin2k = 'Filtra inutili' -dhcp_dnsmasq_filterwin2k_desc = 'Filtra richieste DNS inutili di sistemi windows' -dhcp_dnsmasq_localisequeries = 'Localizza richieste' -dhcp_dnsmasq_localisequeries_desc = 'localizza l'hostname a seconda delle sue sottoreti' -dhcp_dnsmasq_local = 'Server locale' -dhcp_dnsmasq_domain = 'Dominio locale' -dhcp_dnsmasq_expandhosts = 'Espandi host' -dhcp_dnsmasq_expandhosts_desc = 'aggiungi nomi di dominio nel file resolv' -dhcp_dnsmasq_nonegcache = 'non tenere sconosciuti in cache' -dhcp_dnsmasq_nonegcache_desc = 'impedisci la cache di risposte DNS negative' -dhcp_dnsmasq_readethers = 'Usa /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Leggi /etc/ethers per configurare il server DHCP' -dhcp_dnsmasq_leasefile = 'File di lease' -dhcp_dnsmasq_leasefile_desc = 'file dove vengono salvati i lease DHCP assegnati' -dhcp_dnsmasq_resolvfile = 'File resolv' -dhcp_dnsmasq_resolvfile_desc = 'File DNS locale' -dhcp_dnsmasq_nohosts = 'Ignora /etc/hosts' -dhcp_dnsmasq_strictorder = 'Ordine severo' -dhcp_dnsmasq_strictorder_desc = 'I server DNS verranno contattati nell'ordine del file resolv' -dhcp_dnsmasq_logqueries = 'Logga richieste' -dhcp_dnsmasq_noresolv = 'Ignora file resolv' -dhcp_dnsmasq_dnsforwardmax = 'richieste contemporanee' -dhcp_dnsmasq_port = 'Porta DNS' -dhcp_dnsmasq_ednspacket_max = 'Dimensione massima pacchetto EDNS0' -dhcp_dnsmasq_dhcpleasemax = 'Numero massimo di lease DHCP' -dhcp_dnsmasq_addnhosts = 'file hosts aggiuntivo' -dhcp_dnsmasq_queryport = 'porta per le richieste' -dhcp_dnsmasq_enabletftp = 'Abilita server TFTP' -dhcp_dnsmasq_tftproot = 'Radice del server TFTP' -dhcp_dnsmasq_dhcpboot = 'Immagine boot da rete' -a_n_switch = 'Switch' -a_n_conntrack = 'Connessioni attive' -a_n_conntrack_desc = 'Questa pagina ti da una riassunto delle connessioni adesso attive.' -a_n_routes = 'Route' -a_n_routes4 = 'Route IPv4' -a_n_routes6 = 'Route IPv6' -a_network1 = 'In quest'area puoi trovare tutte le impostazioni relative alla rete.' -a_network2 = 'Su molti router lo switch può essere suddiviso liberamente in molte VLANs.' -a_network3 = 'Le impostazioni delle interfacce e di PPPoE / PPTP permettono una configurazione personalizzata della rete e delle connessioni ad altre reti come Internet.' -a_network4 = 'Con DHCP i dispositivi nella tua rete locale possono venire automaticamente configurati per la comunicazione in rete.' -a_network5 = 'Firewall e portforwarding possono essere usati per proteggere la tua rete offrendo servizi alle reti esterne.' -a_n_switch1 = 'Le porte di rete del tuo router possono essere combinate in molte VLAN nelle quali i computer possono comunicare direttamente fra di loro. Le VLAN sono spesso usate per separare segmenti di rete differenti. Spesso c'è come predefinita una porta per la connessione alla prossiam rete più grande come Internet e altre porte per le reti locali.' -network_switch_desc = 'Le porte che appartengono ad una VLAN sono separate con spazi. La porta con priorità più alta (di solito 5) è spesso la connessione all'interfaccia di rete più interna del router. Su dispositivi con 5 porte spesso la porta più bassa (0) è quella di Uplink.' -a_n_ifaces1 = 'In questa pagina puoi configurare le interfacce di rete.Puoi unire più interfacce spuntando la voce "unisci interfacce" e inserendo i nomi di più interfacce di rete separate da spazi. Puoi anche usare la notazione VLAN INTERFACCIA.VLANNUM (e.s.: eth0.1).' -a_n_i_bridge = 'Unisci interfacce' -a_n_i_bridge1 = 'Crea un bridge sulle interfacce selezionate' -dhcp_desc = 'Con DHCP i membri della rete possono ricevere automaticamente le loro impostazioni di rete (indirizzi IP, maschere di rete, server DNS, ...).' -dhcp_dhcp_leasetime = 'Tempo di lease' -dhcp_dhcp_dynamicdhcp = 'DHCP dinamico' -dhcp_dhcp_ignore = 'Ignora interfaccia' -dhcp_dhcp_ignore_desc = 'disabilita DHCP per queste interfacce' -dhcp_dhcp_force = 'Forza' -dhcp_dhcp_start_desc = 'primo indirizzo (ultimo ottetto)' -dhcp_dhcp_limit_desc = 'numero di indirizzi serviti -1' -dhcp_dhcp_dhcpoption = 'Opzioni DHCP' -dhcp_dhcp_dhcpoption_desc = 'Vedi "dnsmasq --help dhcp" per una lista di opzioni disponibile.' -dhcp_leases = 'Lease' -luci_ethers = 'Leases statici' -dhcp_timeremain = 'Tempo lease residuo' -dhcp_leases_active = 'Lease attivi' -a_n_ptp = 'Connessioni Point-to-Point' -a_n_ptp1 = 'Connessioni Point-to-Point con PPPoE o PPTP sono spesso usate per connettere un dispositivo su DSL o tecnologie simili ad un an access point internet.' -network_interface_prereq = 'Devi installare "comgt" per il supporto UMTS/GPRS, "ppp-mod-pppoe" per PPPoE, "ppp-mod-pppoa" per PPPoA e "pptp" per PPtP' -network_interface_prereq_mini = 'Devi installare "ppp-mod-pppoe" per il supporto PPPoE e "pptp" per PPtP' -network_interface_server = 'Server PPTP' -network_interface_demand = 'Disconnetti automaticamente' -network_interface_demand_desc = 'Tempo (in secondi) dopo il quale una connessione inattiva verrà chiusa' -network_interface_keepalive = 'Keep-Alive' -network_interface_keepalive_desc = 'Numero di test di connettività falliti prima di una riconnessione' -network_interface_device = 'Dispositivo modem' -network_interface_device_desc = 'Il device node del tuo modem, e.s. /dev/ttyUSB0' -network_interface_defaultroute = 'Sostituisci route di default' -network_interface_defaultroute_desc = 'Consenti a pppd di sostituire la route di default con la route corrente per usare l'interfaccia PPP dopo una connessione riuscita' -network_interface_peerdns = 'Usa DNS ottenuti' -network_interface_peerdns_desc = 'Configura il server DNS locale per usare i server DNSnegoziati da PPP' -network_interface_ipv6 = 'Attiva IPv6 sul collegamento PPP' -network_interface_connect = 'Script connessione' -network_interface_connect_desc = 'Permette a pppd di avviare questo script dopo l'avvenuta connessione PPP' -network_interface_disconnect = 'Script disconnessione' -network_interface_disconnect_desc = 'Permette a pppd di avviare questo script prima della disconnessione PPP' -network_interface_pppd_options = 'Opzioni pppd aggiuntive' -network_interface_pppd_options_desc = 'Specifica opzioni linea di comando aggiuntive per pppd qui' -network_interface_apn = 'Access point (APN)' -network_interface_pincode = 'Codice PIN' -network_interface_pincode_desc = 'Fai attenzione di inserire il codice PIN corretto qui o potresti bloccare la tua sim card!' -network_interface_service = 'Tipo di servizio' -network_interface_maxwait = 'Tempo di attesa inizializzazione' -network_interface_maxwait_desc = 'Secondi da attendere prima che il modem diventi pronto prima di provare a connettersi' -a_n_r_routes1 = 'Le route specificano attraverso quale interfaccia e gateway un certo host o rete può essere raggiunto.' -a_n_routes_static = 'Route statiche' -a_n_routes_static4 = 'Route statiche IPv4' -a_n_routes_static6 = 'Route statiche IPv6' -a_n_routes_kernel4 = 'Route IPv4 attive' -a_n_routes_kernel6 = 'Route IPv6 attive' -a_n_r_target1 = 'IP dell'host o rete' -a_n_r_target6 = 'Indirizzo IPv6 o rete (CIDR)' -a_n_r_netmask1 = 'se la destinazione è una rete' -m_n_inet = 'Connessione Internet' -m_n_local = 'Rete locale' -m_n_route = 'Route' -m_n_brdige = 'Bridge' -m_w_ap = 'Offri (Access Point)' -m_w_adhoc = 'Independente (Ad-Hoc)' -m_w_client = 'Partecipa (Client)' -m_w_wds = 'Distribuita (WDS)' -m_w_clientmode = 'Modalità client' -system_system_logsize = 'Dimensione buffer log di sistema' -system_system_logip = 'Server log di sistema esterno' -system_system_conloglevel = 'Livello output di log' -system_system_conloglevel_desc = 'Livello output di log sulla console' -m_i_processor = 'Processore' -m_i_memory = 'Memoria' -m_i_systemtime = 'Ora locale' -m_i_uptime = 'Uptime' -m_n_d_firstaddress = 'Primo indirizzo offerto' -m_n_d_numleases = 'Numero di indirizzi offerti' -routingtable = 'Tabella di routing' -wlanscan = 'Scansione Wifi' -frequency = 'Frequenza' -power = 'Potenza' -noise = 'Rumore' -signal = 'Segnale' -link = 'Collegamento' -frag = 'Framm.' -rts = 'RTS' -bitrate = 'Bitrate' -m_n_keepalive = 'riconnetti automaticamente' -m_n_dialondemand = 'disconnetti quando non usata per' -m_n_pptp_server = 'Server PPTP' -leds = 'Configurazione LED' -leds_desc = 'Personalizza la configurazione dei LED del sistema se possibile.' -system_led_name = 'Nome LED' -system_led_sysfs = 'Dispositivo LED' -system_led_default = 'Stato predefinito' -system_led_default_desc = 'spuntato = on' -system_led_trigger = 'Causa' -system_led_trigger_none = 'Nessuna' -system_led_trigger_defaulton = 'Predefinito on' -system_led_trigger_timer = 'Timer' -system_led_trigger_heartbeat = 'Battito (Carico medio)' -system_led_trigger_netdev = 'Dispositivo di rete' -system_led_delayoff = 'Tempo dello stato off' -system_led_delayoff_desc = 'Per quanto tempo (in ms) il LED è off' -system_led_delayon = 'Tempo dello stato on' -system_led_delayon_desc = 'Per quanto tempo (in ms) il LED è on' -system_led_dev = 'Dispositivo' -system_led_mode = 'Modalità causa' -system_led_mode_link = 'Collegamento on' -system_led_mode_tx = 'Trasmissione' -system_led_mode_rx = 'Ricezione' -network_interface_up = 'Attiva' -network_interface_hwaddr = 'Indirizzo MAC' -network_interface_hwaddr_desc = 'Hardware Address' -network_interface_txrx = 'Traffico' -network_interface_txrx_desc = 'transmessi / ricevuti' -network_interface_err = 'Errori' -network_interface_err_desc = 'TX / RX' -network_interface_fwzone = 'Crea / Assegna zona firewall' -network_interface_fwzone_desc = 'Questa interfaccia non appartiene a nessuna zona del firewall ancora.' -process_head = 'Processi' -process_descr = 'Questa lista da un riassunto dei processi correntemente attivi e del loro stato.' -process_pid = 'PID' -process_owner = 'Proprietario' -process_command = 'Comando' -process_cpu = 'Uso CPU (%)' -process_mem = 'Uso Memory (%)' -process_hup = 'Hangup' -process_term = 'Termina' -process_kill = 'Uccidi' -mem_cached = 'in cache' -mem_buffered = 'in buffer' -mem_free = 'libera' -a_s_crontab = 'Operazioni programmate' -a_s_crontab1 = 'Questa è la crontab del sistema nella quale possono essere definiti le operazioni da programmare.' -a_w_nasid = 'ID della NAS' -a_w_cacert = 'Percorso al certificato CA' -a_w_eaptype = 'Metodo EAP' -a_w_tlsprivkey = 'Percorso alla chiave privata' -a_w_tlsprivkeypwd = 'Password della chiave privata' -a_w_peapauth = 'Autenticazione PEAP' -a_w_peapidentity = 'Identità PEAP' -a_w_peappassword = 'Password PEAP' -a_w_create = 'Crea rete' -hostnames = 'Hostname' -hostnames_entries = 'Campi host' -hostnames_hostname = 'Hostname' -hostnames_address = 'Indirizzo IP' -network_interface_encaps = 'PPPoA Encapsulation' -m_n_mssfix = "Clamp Segment Size" -m_n_mssfix_desc = "Fixes problems with unreachable websites, submitting forms or other unexpected behaviour for some ISPs." diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.pt-br.lua deleted file mode 100644 index 585ba86..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.pt-br.lua +++ /dev/null @@ -1,327 +0,0 @@ -uci_applied = 'As seguintes alterações foram aplicadas' -uci_reverted = 'As seguintes alterações foram recuperadas' -a_i_ui = 'Interface do Usuário' -c_lucidesc = 'LuCI é uma coleção gratuita de softwares Lua incluindo um Framework Web MVC e uma Interface Web para equipamentos embarcados. LuCI é licenciado sob a Licença Apache.' -c_projecthome = 'Página do Projeto' -c_leaddev = 'Líder(es) do Desenvolvimento' -c_contributors = 'Desenvolvedores que Crontribuíram' -c_thanksto = 'Obrigado à' -a_i_i_hello = 'Olá!' -a_i_i_admin1 = 'Esta é a área de administração LuCI.' -a_i_i_admin2 = 'LuCI é gratuito, flexível e uma interface gráfica fácil de utilizar para configurar OpenWrt Kamikaze.' -a_i_i_admin3 = 'Nas próximas páginas você pode ajustar todas as definições importantes do seu roteador.' -a_i_i_admin4 = 'Aviso: No LuCI as alterações devem ser confirmadas clicando em Alterações - Salvar & Aplicar antes de serem aplicadas.' -a_i_i_admin5 = 'Como nós sempre queremos melhorar essa interface, estamos ansiosos para seus comentários e sugestões.' -a_i_i_admin6 = 'E agora divirta-se com o seu roteador!' -a_i_i_team = 'O Time do LuCI' -a_i_luci1 = 'Aqui você pode customizar as configurações e funcionalidades do LuCI.' -a_i_ucicommit = 'Ações pós-gravação' -a_i_ucicommit1 = 'Estes comandos são executados automaticamente quando uma determinada configuração da UCI está gravada, permitindo mudanças a serem aplicadas instantaneamente.' -a_i_keepflash = 'Arquivos que devem ser mantidos quando gravar um novo firmware.' -a_i_keepflash1 = 'Quando gravar um novo firmware com o LuCI estes arquivos serão adicionados ao novo firmware instalado.' -a_st_i_status1 = 'Aqui você pode encontrar informações sobre o estado atual do sistema, como CPU, frequência do relógio, uso de memória ou da interface de rede de dados.' -a_st_i_status2 = 'Também os arquivos de logs do kernel ou dos serviços podem serem vistos aqui para obter uma visão geral sobre o seu estado atual.' -iwscan = 'WLAN-Scan' -iwscan1 = 'Redes Wifi no seu ambiente local' -iwscan_encr = 'Encr.' -iwscan_link = 'Link' -iwscan_signal = 'Sinal' -iwscan_noise = 'Ruído' -routes = 'Rotas' -routes_netmask = 'Netmask' -routes_gateway = 'Gateway' -routes_metric = 'Métrica' -a_s_desc = 'Aqui você pode configurar os aspectos básicos do seu equipamento como o nome do host ou o fuso horário.' -a_s_packages = 'Software' -a_s_changepw = 'Senha do Admin' -a_s_p_ipkg = 'Configuração-OPKG' -a_s_sshkeys = 'Chaves-SSH' -a_s_fstab = 'Pontos de Montagem' -a_s_flash = 'Atualizar Firmware' -a_s_i_system1 = 'Altera as configurações relacionadas com o sistema em si, sua identificação, hardware e software instalados, autenticação ou pontos de montagem.' -a_s_i_system2 = 'Essas configurações definem a base do seu sistema.' -a_s_i_system3 = 'Preste atenção de que qualquer configuração errada aqui pode impedir o seu equipamento de inicilizar ou talvez bloquear seu acesso de fora à ele.' -a_s_packages_do = 'Executar Ações' -a_s_packages_install = 'Instalar' -a_s_packages_installurl = 'Fazer download e instalar pacote' -a_s_packages_ipkg = 'Editar listas de pacotes e destinos de instalação' -a_s_packages_name = 'Nome do Pacote' -a_s_packages_remove = 'Remover' -a_s_packages_search = 'Procurar pacote' -a_s_packages_update = 'Listas de pacotes atualizadas' -a_s_packages_updatelist = 'Atualizar listas de pacotes' -a_s_packages_upgrade = 'Atualizar os pacotes instalados' -a_s_p_ipkg_pkglists = 'Listas de pacotes' -a_s_p_ipkg_targets = 'Destino de Instalação' -a_s_changepw1 = 'Altera a senha do administrador do sistema (Usuário root)' -a_s_changepw_changed = 'Senha alterada com sucesso' -a_s_changepw_nomatch = 'Erro: As senhas estão diferentes' -a_s_sshkeys1 = 'Aqui você pode colar suas Chaves-SSH públicas (uma por linha) para a autenticação SSH por chave-pública.' -a_s_fstab_mountpoints = 'Pontos de Montagem' -a_s_fstab_mountpoints1 = 'Pontos de montagem definem em que ponto um dispositivo de memória será anexado ao sistema de arquivos' -a_s_fstab_active = 'Sistemas de arquivos montados' -a_s_fstab_used = 'Usado' -a_s_fstab_avail = 'Disponível' -a_s_fstab_mountpoint = 'Ponto de Montagem' -a_s_fstab_device1 = 'O arquivo do dispositivo de memória ou a partição (ex. /dev/sda1)' -a_s_fstab_fs1 = 'O sistema que foi usado para formatar a memória (ex. ext3)' -a_s_fstab_swap1 = 'Se a sua memória física for insuficiente, os dados poderão ser trocados temporariamente para um dispositivo swap, resultando em uma maior quantidade de memória utilizável RAM. Esteja ciente de que a troca de dados (swap) é um processo muito lento pois o dispositivo swap não pode ser acessado com um nível elevado de memória RAM.' -a_s_flash_flashed = 'Firmware gravado com sucesso. Reiniciando o equipamento...' -a_s_flash_flasherr = 'Falha na gravação' -a_s_flash_fwimage = 'Imagem do firmware' -a_s_flash_received = 'Imagem recebida. Durante o processo de gravação, NÃO DESLIGUE O EQUIPAMENTO!' -a_s_flash_inprogress = 'Gravando firmware...' -a_s_flash_fwupgrade = 'Atualizar Firmware' -a_s_flash_keepcfg = 'Manter arquivos de configuração' -a_s_flash_notimplemented = 'Desculpe, esta função não está (ainda) disponível para sua plataforma.' -a_s_flash_upgrade1 = 'Substitui o firmware instalado por um mais novo. O formato do firmware depende da plataforma.' -a_s_reboot1 = 'Reinicia o seu equipamento' -a_s_reboot_do = 'Executar reinicialização' -a_s_reboot_running = 'Por favor aguarde: Equipamento reiniciando...' -a_s_reboot_u = 'Aviso: Existem alterações não salvas que serão perdidas durante a reinicialização!' -a_s_applyreboot1 = 'Alterações aplicadas.' -a_s_backup = 'Backup / Restauração' -a_s_backup_backup = 'Criar backup' -a_s_backup_archive = 'Arquivo de backup' -a_s_backup_reset = 'Restaurar as configurações padrão do roteador' -a_s_backup_reset1 = 'Proceder com a restauração de as configurações padrões?' -a_s_backup_restore = 'Restaurar backup' -a_s_backup1 = 'Aqui você pode fazer o backup e restaurar as configurações do seu roteador e - se possível - restaurar seu roteador para as configurações padrão.' -a_srv_http = 'Servidor-HTTP' -a_srv_ssh = 'Servidor-SSH' -a_srv_services1 = 'Serviços e daemons executando diversas tarefas no seu equipamento.' -a_srv_services2 = 'A maioria deles são servidores de rede, que oferecem um determinado serviço para seu equipamento ou rede como acesso shell, servindo páginas web como o LuCI, fazendo roteamento, enviando e-mails, ...' -a_srv_http1 = 'Um pequeno servidor web que pode ser utilizado para servir a interface LuCI.' -a_srv_http_authrealm = 'Autenticação Realm' -a_srv_http_authrealm1 = 'O realm que será mostrado no prompt de autenticação das páginas protegidas.' -a_srv_http_config1 = 'padrão é /etc/httpd.conf' -a_srv_http_root = 'Diretório raiz' -a_srv_dropbear1 = 'Dropbear oferece um acesso shell seguro à rede (SSH) e um servidor SCP integrado' -a_srv_d_pwauth = 'Autenticação por senha' -a_srv_d_pwauth1 = 'Permitir autenticação SSH por senha' -a_w_channel = 'Canal' -a_w_wifi1 = 'Nesta página você encontrará opções de configuração WLAN baseada em redes sem fio.' -a_w_wifi2 = 'Você pode facilmente integrar seus equipamentos 802.11a/b/g/n com sua rede física e usar o adaptador virtual para construir repetidoras wireless ou oferecer várias redes com um equipamento.' -a_w_wifi3 = 'Há suporte para os modos Managed, Client, Ad-Hoc e WDS bem como encriptação WPA e WPA2 proteger a comunicação.' -a_w_devices1 = 'Aqui você pode configurar dispositivos wifi instalados wifi. ' -a_w_txantenna = 'Antena de Transmissão' -a_w_rxantenna = 'Antena para Recebimento' -a_w_distance1 = 'Distãncia para a estação mais distante (em metros)' -a_w_diversity = 'Diversidade' -a_w_countrycode = 'Código do País' -a_w_connlimit = 'Limite de Conexão' -a_w_networks1 = 'Você pode executar várias redes wifi com um dispositivo. Esteja ciente de que existem certas restrições de hardware e de driver específico. Normalmente você pode operar 1 rede Ad-Hoc ou até 3 redes Master-Mode e 1 Client-Mode simultaneamente.' -a_w_netid = 'Nome da Rede (ESSID)' -a_w_network1 = 'Adicione a rede Wifi à rede física' -a_w_netmanual = ' - Criar nova Rede - ' -a_w_txpwr = 'Potência de Transmissão' -a_w_brcmburst = 'Broadcom Frame Burst' -a_w_athburst = 'Atheros Frame Burst' -a_w_radiussrv = 'Servidor Radius' -a_w_radiusport = 'Porta-Radius' -a_w_apisolation = 'Isolamento do AP' -a_w_apisolation1 = 'Impede a comunicação de Cliente para Cliente' -a_w_hideessid = 'Ocultar ESSID' -a_w_ap = 'Access Point' -a_w_adhoc = 'Ad-Hoc' -a_w_ahdemo = 'Pseudo Ad-Hoc (ahdemo)' -a_w_client = 'Client' -a_w_wds = 'WDS' -a_w_monitor = 'Monitor' -dhcp_dnsmasq_desc = 'Dnsmasq é um combinado Servidor-DHCP e Encaminhador-DNS para firewalls NAT' -dhcp_dnsmasq_domainneeded = 'Domínio requerido' -dhcp_dnsmasq_domainneeded_desc = 'Não encaminhar Requisições-DNS sem o Nome do DNS' -dhcp_dnsmasq_authoritative = 'Autoritário' -dhcp_dnsmasq_authoritative_desc = 'Este é o único DHCP na rede local' -dhcp_dnsmasq_boguspriv = 'Filtro privado' -dhcp_dnsmasq_boguspriv_desc = 'Não encaminhar as pesquisas reversas para redes locais' -dhcp_dnsmasq_filterwin2k = 'Filtro de inutilidade' -dhcp_dnsmasq_filterwin2k_desc = 'Filtro de initulidades de consultas-DNS de sistemas windows' -dhcp_dnsmasq_localisequeries = 'Locallizar consultas' -dhcp_dnsmasq_localisequeries_desc = 'Localizar o hostname dependendo de sua sub-rede' -dhcp_dnsmasq_local = 'Servidor Local' -dhcp_dnsmasq_domain = 'Domínio Local' -dhcp_dnsmasq_expandhosts = 'Expandir Hosts' -dhcp_dnsmasq_expandhosts_desc = 'Adiciona os nomes dos domínios às entradas de hosts no arquivo resolv' -dhcp_dnsmasq_nonegcache = 'Não fazer cache desconhecido' -dhcp_dnsmasq_nonegcache_desc = 'Impede o cache de respostas-DNS negativas' -dhcp_dnsmasq_readethers = 'Usar /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Ler /etc/ethers para configurar o Servidor-DHCP' -dhcp_dnsmasq_leasefile = 'Arquivo Lease' -dhcp_dnsmasq_leasefile_desc = 'Arquivo onde os Leases-DHCP serão armazenados' -dhcp_dnsmasq_resolvfile = 'Arquivo Resolv' -dhcp_dnsmasq_resolvfile_desc = 'Arquivo local de DNS' -dhcp_dnsmasq_nohosts = 'Ignorar /etc/hosts' -dhcp_dnsmasq_strictorder = 'Ordem Exata' -dhcp_dnsmasq_strictorder_desc = 'Servidor-DNS será consultado na ordem do arquivo resolv' -dhcp_dnsmasq_logqueries = 'Log das consultas' -dhcp_dnsmasq_noresolv = 'Ignorar arquivo resolv' -dhcp_dnsmasq_dnsforwardmax = 'Consultas simultâneas' -dhcp_dnsmasq_port = 'Porta do DNS' -dhcp_dnsmasq_ednspacket_max = 'tamanho max. do pacote EDNS0' -dhcp_dnsmasq_dhcpleasemax = 'max. de DHCP-Leases' -dhcp_dnsmasq_addnhosts = 'arquivo host adicional' -dhcp_dnsmasq_queryport = 'porta para consulta' -dhcp_dnsmasq_enabletftp = 'Ativar servidor TFTP' -dhcp_dnsmasq_tftproot = 'Diretório raiz do servidor TFTP' -dhcp_dnsmasq_dhcpboot = 'Imagem para o boot remoto' -a_n_switch = 'Switch' -a_n_conntrack = 'Conexões Ativas' -a_n_conntrack_desc = 'Esta página fornece informações sobre as conexões de rede ativas.' -a_n_routes = 'Rotas' -a_n_routes4 = 'Rotas IPv4' -a_n_routes6 = 'Rotas IPv6' -a_network1 = 'Neste espaço você encontrará todas as configurações relacionadas à rede.' -a_network2 = 'Na maioria dos roteadores o switch de rede pode ser configurado livremente e dividos em diversas VLANs.' -a_network3 = 'Interfaces e Configurações-PPPoE / PPTP permite uma organização customizada da rede e conexões com outras redes, como a Internet.' -a_network4 = 'Com o DHCP dispositivos na sua rede local podem ser automaticamente configurados para a comunicação da rede.' -a_network5 = 'Firewall e redirecionamento de portas podem ser usados para proteger sua rede ao mesmo tempo que prestam serviços às redes externas.' -a_n_switch1 = 'As portas de rede do seu roteador podem ser combinadas com diversas VLANs em que os computadores podem se comunicar diretamente entre si. VLANs são frequentemente usadas para separar segmentos de redes diferentes. Muitas vezes é padrão uma porta Uplink para a conexão com a próxima maior rede, como a Internet e outras portas para uma rede local.' -network_switch_desc = 'Portas que pertencem a uma VLAN são separadas com espaços. A porta com o maior número (geralmente 5) é muitas vezes a conexão com a interface de rede interna do roteador. Em dispositivos com 5 portas muitas vezes a porta com o número mais baixo (0) é a porta predefinida como Uplink.' -a_n_ifaces1 = 'Nesta página você pode configurar as interfaces de rede. Você pode ter várias interfaces do tipo bridge, assinalando o campo "interfaces bridge" e entrar com os nomes de várias interfaces de rede separadas por espaços. Você pode também usar a notação para VLAN INTERFACE.VLANNR (ex.: eth0.1).' -a_n_i_bridge = 'Interfaces bridge' -a_n_i_bridge1 = 'cria uma bridge sobre determinada(s) interface(s)' -dhcp_desc = 'Com o DHCP membros da rede podem automaticamente receber suas configurações de rede (endereço-IP, netmask, servidor-DNS, ...).' -dhcp_dhcp_leasetime = 'Tempo de Lease' -dhcp_dhcp_dynamicdhcp = 'DHCP Dinâmico' -dhcp_dhcp_ignore = 'Ignorar Interface' -dhcp_dhcp_ignore_desc = 'desabilitar DHCP para esta interface' -dhcp_dhcp_force = 'Forçar' -dhcp_dhcp_start_desc = 'primeiro endereço (último octeto)' -dhcp_dhcp_limit_desc = 'número de endereços para lease -1' -dhcp_dhcp_dhcpoption = 'Opções-DHCP' -dhcp_dhcp_dhcpoption_desc = 'Veja "dnsmasq --help dhcp" para a lista disponível de opções.' -dhcp_leases = 'Leases' -luci_ethers = 'Leases Estáticos' -dhcp_timeremain = 'Tempo de lease restante' -dhcp_leases_active = 'Leases Ativos' -a_n_ptp = 'Conexões Ponto-a-Ponto' -a_n_ptp1 = 'Conexões Ponto-a-Ponto com PPPoE ou PPTP muitas vezes são usados para conectar um dispositivo sobre DSL ou tecnologia similar para um ponto de acesso à internet.' -network_interface_prereq = 'Você precisa instalar os pacotes "comgt" para UMTS/GPRS, "ppp-mod-pppoe" para PPPoE, "ppp-mod-pppoa" para PPPoA ou "pptp" para o suporte PPtP' -network_interface_prereq_mini = 'Você precisa instalar os pacotes "ppp-mod-pppoe" para PPPoE ou "pptp" para o suporte PPtP' -network_interface_server = 'Servidor-PPTP' -network_interface_demand = 'Desconexão Automática' -network_interface_demand_desc = 'Tempo (em segundos) para desconexão de uma conexão não mais utilizada' -network_interface_keepalive = 'Manter em Atividade' -network_interface_keepalive_desc = 'Número de falhas do teste de conexão para incializar uma reconexão automática' -network_interface_device = 'Dispositivo do Modem' -network_interface_device_desc = 'O caminho do dispostivo do seu modem, ex. /dev/ttyUSB0' -network_interface_defaultroute = 'Susbtituir a rota padrão' -network_interface_defaultroute_desc = 'Permitir o pppd substituir a rota padrão atual e usar a interface PPP como padrão após a conexão ser efetuada com sucesso' -network_interface_peerdns = 'Utilizar DNS do ponto' -network_interface_peerdns_desc = 'Configurar o servidor DNS local para usar o servidores de nomes fornecidos pelo ponto PPP' -network_interface_ipv6 = 'Ativar IPv6 no link PPP' -network_interface_connect = 'Script de conexão' -network_interface_connect_desc = 'Deixar o pppd executar este script após o estabelecimento do link PPP' -network_interface_disconnect = 'Script de desconexão' -network_interface_disconnect_desc = 'Deixar o pppd executar esse script antes de derrubar o link PPP' -network_interface_pppd_options = 'Opções adicionais do pppd' -network_interface_pppd_options_desc = 'Especificar argumentos adicionais por linha de comando para o pppd aqui' -network_interface_apn = 'Ponto de acesso (APN)' -network_interface_pincode = 'Código PIN' -network_interface_pincode_desc = 'Certifique-se de que você forneceu o código PIN correto aqui, ou você pode bloquear o seu cartão SIM!' -network_interface_service = 'Tipo do serviço' -network_interface_maxwait = 'Configurar tempo de espera' -network_interface_maxwait_desc = 'Segundos de espera para o modem ficar pronto antes de tentar se conectar' -a_n_r_routes1 = 'Rotas específicas sobre qual interface e gateway um determinado host ou rede pode ser alcançado.' -a_n_routes_static = 'Rotas Estáticas' -a_n_routes_static4 = 'Rotas Estáticas IPv4' -a_n_routes_static6 = 'Rotas Estáticas IPv6' -a_n_routes_kernel4 = 'Rotas-IPv4 ativas' -a_n_routes_kernel6 = 'Rotas-IPv6 ativas' -a_n_r_target1 = 'IP do host ou rede' -a_n_r_target6 = 'IPv6 do host ou rede' -a_n_r_netmask1 = 'se o destino for uma rede' -m_n_inet = 'Conexão com a Internet' -m_n_local = 'Rede Local' -m_n_route = 'Rota' -m_n_brdige = 'Bridge' -m_w_ap = 'Provedor (Access Point)' -m_w_adhoc = 'Independente (Ad-Hoc)' -m_w_client = 'Cliente (Client)' -m_w_wds = 'Distribuído (WDS)' -m_w_clientmode = 'Modo CLient' -system_system_logsize = 'Tamanho do buffer do sistema de log' -system_system_logip = 'Servidor externo do sistema de log' -system_system_conloglevel = 'Nível de saída do log' -system_system_conloglevel_desc = 'Nível das mensagens de log no console' -m_i_processor = 'Processador' -m_i_memory = 'Memória' -m_i_systemtime = 'Hora Local' -m_i_uptime = 'Uptime' -m_n_d_firstaddress = 'Primeiro endereço de lease' -m_n_d_numleases = 'Número de endereços de lease' -routingtable = 'Tebela de roteamento' -wlanscan = 'Procurar redes Wifi' -frequency = 'Frequência' -power = 'Potência' -noise = 'Ruído' -signal = 'Sinal' -link = 'Link' -frag = 'Frag.' -rts = 'RTS' -bitrate = 'Bitrate' -m_n_keepalive = 'reconectar automaticamente' -m_n_dialondemand = 'desconectar quando ocioso por' -m_n_pptp_server = 'Servidor-PPTP' -leds = 'Configuração do LED' -leds_desc = 'Customiza o comportamento do dispositivo de LEDs se possível.' -system_led_name = 'Nome do LED' -system_led_sysfs = 'Dispositivo do LED' -system_led_default = 'Estado padrão' -system_led_default_desc = 'selecionado como = ligado' -system_led_trigger = 'Evento' -system_led_trigger_none = 'Nenhum' -system_led_trigger_defaulton = 'Padrão Ligado' -system_led_trigger_timer = 'Contador' -system_led_trigger_heartbeat = 'Carga Média' -system_led_trigger_netdev = 'Dispositivo de Rede' -system_led_delayoff = 'Tempo no Estado Desligado' -system_led_delayoff_desc = 'Tempo (em ms) do LED desligado' -system_led_delayon = 'Tempo no Estado Ligado' -system_led_delayon_desc = 'Tempo (em ms) do LED ligado' -system_led_dev = 'Dispositivo' -system_led_mode = 'Modo do Evento' -system_led_mode_link = 'Link Ativo' -system_led_mode_tx = 'Transmitir' -system_led_mode_rx = 'Receber' -network_interface_up = 'Ativo' -network_interface_hwaddr = 'Endereço-MAC' -network_interface_hwaddr_desc = 'Endereço do Hardware' -network_interface_txrx = 'Tráfego' -network_interface_txrx_desc = 'transmitido / recebido' -network_interface_err = 'Erros' -network_interface_err_desc = 'TX / RX' -network_interface_fwzone = 'Criar / Atribuir à uma zona de firewall' -network_interface_fwzone_desc = 'Esta interface não pertence a nenhuma zona de firewall ainda.' -process_head = 'Processos' -process_descr = 'Esta lista fornece uma visão geral sobre os processos atualmente sendo executados no sistema.' -process_pid = 'PID' -process_owner = 'Dono' -process_command = 'Comando' -process_cpu = 'Uso da CPU (%)' -process_mem = 'Uso de memória (%)' -process_hup = 'Hang Up' -process_term = 'Terminar' -process_kill = 'Matar' -mem_cached = 'em cache' -mem_buffered = 'em buffer' -mem_free = 'livre' -a_s_crontab = 'Tarefas Agendadas' -a_s_crontab1 = 'Este é o sistema de agendamento de tarefas.' -a_w_nasid = 'NAS ID' -a_w_cacert = 'Caminho do Certificado CA' -a_w_eaptype = 'Método EAP' -a_w_tlsprivkey = 'Caminho da Chave Privada' -a_w_tlsprivkeypwd = 'Senha da Chave Privada' -a_w_peapauth = 'Autenticação PEAP' -a_w_peapidentity = 'Identidate-PEAP' -a_w_peappassword = 'Senha-PEAP' -a_w_create = 'Criar Rede' -hostnames = 'Hostnames' -hostnames_entries = 'Entrada do Host' -hostnames_hostname = 'Hostname' -hostnames_address = 'Endereço de IP' -network_interface_encaps = 'PPPoA Encapsulation' -m_n_mssfix = "Clamp Segment Size" -m_n_mssfix_desc = "Fixes problems with unreachable websites, submitting forms or other unexpected behaviour for some ISPs." diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.ru.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.ru.lua deleted file mode 100644 index 4961495..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/admin-core.ru.lua +++ /dev/null @@ -1,269 +0,0 @@ -uci_applied = 'Данные Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±Ñ‹Ð»Ð¸ принÑÑ‚Ñ‹' -uci_reverted = 'Данные Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±Ñ‹Ð»Ð¸ отвергнуты' -a_i_ui = 'ПользовательÑкий интерфейÑ' -c_lucidesc = 'LuCI Ñто Ñвободное Lua програмное обеÑпечение Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ MVC-Вебфреймворк и веб Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð²Ñтраиваемый в уÑтройÑтва. LuCI раÑпроÑтранÑетÑÑ Ð¿Ð¾Ð´ лицензией Apache-License.' -c_projecthome = 'ДомашнÑÑ Ñтраница проекта' -c_leaddev = 'Ведущие разработчики' -c_contributors = 'Помогавшие в разработке' -c_thanksto = 'БлагодарÑ' -a_i_i_hello = 'Добро пожаловать.' -a_i_i_admin1 = 'Это зона ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ LuCI.' -a_i_i_admin2 = 'LuCI Ñвободный, гибкий и дружелюбный грфичеÑкий Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð´Ð»Ñ Ð½Ð°Ñтройки OpenWrt Kamikaze.' -a_i_i_admin3 = 'С помощью Ñтих Ñтраниц вы можете изменить оÑновные наÑтройки вашего роутера.' -a_i_i_admin4 = 'Внимание: Ð’ LuCI Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°ÑŽÑ‚ÑÑ Ð¿Ð¾Ñле Ð½Ð°Ð¶Ð°Ñ‚Ð¸Ñ - ПринÑÑ‚ÑŒ.' -a_i_i_admin5 = 'Так же мы вÑегда желаем улучшить Ñтот интерфейÑ, мы вÑегда обратим внимание на ваши вопроÑÑ‹ и предложениÑ.' -a_i_i_admin6 = 'Ртеперь повеÑелитеÑÑŒ Ñо Ñвоим роутером!' -a_i_i_team = 'Команда LuCI' -a_i_luci1 = 'ЗдеÑÑŒ вы можете изменить наÑтройки и функциональноÑÑ‚ÑŒ LuCI.' -a_i_ucicommit = 'ЗапуÑк команд' -a_i_ucicommit1 = 'Эти команды будут запущенны автоматичеÑки когда Ð´Ð°Ð½Ð½Ð°Ñ UCI ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð° и Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð±ÑƒÐ´ÑƒÑ‚ принÑÑ‚Ñ‹.' -a_i_keepflash = 'Файлы которые необходимо Ñохранить при перепрошивании' -a_i_keepflash1 = 'ПоÑле перепрошивки LuCI Ñти файлы будут добавлены в обновлённую ÑиÑтему .' -a_st_i_status1 = 'ЗдеÑÑŒ вы можете найти информацию о текущей ÑтатиÑтики ÑиÑтемы вроде чаÑтоты процеÑÑора, иÑÐ¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð°Ð¼Ñти или Ñетевого интерфейÑа.' -a_st_i_status2 = 'Ртак же Ñдра или ÑервиÑов, ÑиÑтемный журнал может быть так же проÑмотрен здеÑÑŒ Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾ что бы получить полный обзор текущего ÑоÑтоÑÐ½Ð¸Ñ ÑиÑтемы.' -iwscan = 'WLAN-Сканирование' -iwscan1 = 'Обзор ÑущеÑтвующих Wi-Fi Ñетей' -iwscan_encr = 'Шифрование' -iwscan_link = 'СвÑзь' -iwscan_signal = 'Сигнал' -iwscan_noise = 'Шум' -routes = 'Маршруты' -routes_netmask = 'Ð¡ÐµÑ‚ÐµÐ²Ð°Ñ Ð¼Ð°Ñка' -routes_gateway = 'Шлюз' -routes_metric = 'Метрика' -a_s_desc = 'ЗдеÑÑŒ вы можете наÑтроить оÑновные параметры вашего уÑтройÑтва такие как Ð¸Ð¼Ñ Ñ…Ð¾Ñта или чаÑовой поÑÑ.' -a_s_packages = 'Программное обеÑпечение' -a_s_changepw = 'Пароль админиÑтратора' -a_s_p_ipkg = 'OPKG-ÐаÑтройка' -a_s_sshkeys = 'SSH-Ключи' -a_s_fstab = 'ДиÑковые разделы' -a_s_flash = 'Обновление прошивки' -a_s_i_system1 = 'Изменение наÑтроек ÑиÑтемы ÑвÑзанных Ñ Ñамоидентификацией, уÑÑ‚Ñтанвкой аппаратно и/или програмного обеÑпечениÑ, идентификацией или диÑковыми разделами.' -a_s_i_system2 = 'Эти наÑтройки определÑÑŽÑ‚ оÑнову вашей ÑиÑтемы.' -a_s_i_system3 = 'Ðеобходимо тчательно отнеÑтиÑÑŒ к нижеÑледующим наÑтройкам, в результате неправильной конфигурации которых вы можете потерÑÑ‚ÑŒ управление над ÑиÑтемой или уÑтройÑто может не загружатьÑÑ.' -a_s_packages_do = 'ПринÑÑ‚ÑŒ изменениÑ' -a_s_packages_install = 'УÑтановка' -a_s_packages_installurl = 'Загрузить и уÑтановить пакеты' -a_s_packages_ipkg = 'Изменить лиÑтинг пакетов и путей уÑтановки' -a_s_packages_name = 'Ð˜Ð¼Ñ Ð¿Ð°ÐºÐµÑ‚Ð°' -a_s_packages_remove = 'Удалить' -a_s_packages_search = 'Ðайти пакет' -a_s_packages_update = 'ЛиÑтинг пакетов обновлён' -a_s_packages_updatelist = 'Обновить лиÑтинг пакетов' -a_s_packages_upgrade = 'Заменить уÑтановленные пакеты' -a_s_p_ipkg_pkglists = 'ЛиÑтинг пакетов' -a_s_p_ipkg_targets = 'Путь уÑтановки' -a_s_changepw1 = 'Изменение Ð¿Ð°Ñ€Ð¾Ð»Ñ ÑиÑтемного админиÑтратора (Пользователь root)' -a_s_changepw_changed = 'Пароль уÑпешно изменён' -a_s_changepw_nomatch = 'Ошибка: Пароли не Ñовпадают' -a_s_sshkeys1 = 'ЗдеÑÑŒ вы можете вÑтавить публичный SSH-Ключ Ð´Ð»Ñ SSH публичной-ключевой аутентификации.' -a_s_fstab_mountpoints = 'Точки монтированиÑ' -a_s_fstab_mountpoints1 = 'Точки Ð¼Ð¾Ð½Ñ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÑÑŽÑ‚ к каком запоминающему уÑтройÑтву будет приÑоединена Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема' -a_s_fstab_active = 'Монтированные файловые ÑиÑтемы"' -a_s_fstab_used = 'ИÑпользованно"' -a_s_fstab_avail = 'ДоÑтупно"' -a_s_fstab_mountpoint = 'Точка приÑоединениÑ' -a_s_fstab_device1 = 'УÑтройÑтво или раздел (пример /dev/sda1)' -a_s_fstab_fs1 = 'Формат файловой ÑиÑтемы (пример ext3)' -a_s_fstab_swap1 = 'ЕÑли физичеÑкой RAM не хватает можно воÑпользоватьÑÑ Ð²Ñ€ÐµÐ¼ÐµÐ½Ð½Ñ‹Ð¼ хранением данных в файле-подкачке. Ð’ результате RAM памÑти будет доÑтупно в большем количеÑтве. Ðо помните, файл подкачки работает гораздо медленнее RAM так что не ждите обработки информации на ÑкороÑÑ‚ÑÑ… Ñравнимых Ñ RAM.' -a_s_flash_flashed = 'Прошивка уÑпешно обновленна. Перезагрузка уÑтройÑтва...' -a_s_flash_flasherr = 'Прошивка невозможна' -a_s_flash_fwimage = 'Файл прошивки' -a_s_flash_fwupgrade = 'Прошить' -a_s_flash_keepcfg = 'Сохранить конфигурационные файлы' -a_s_flash_notimplemented = 'Извините, Ñта Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¿Ð¾ÐºÐ° не доÑтупна на вашей платформе.' -a_s_flash_upgrade1 = 'ЗаменÑет уÑтановленную прошивку на новую. Формат прошивки платформо-завиÑимый.' -a_s_reboot1 = 'Сразу произойдёт перезагрузка вашей ÑиÑтемы' -a_s_reboot_do = 'Выполнить перезагрузку' -a_s_reboot_running = 'ПозалуйÑта подождите: УÑтройÑтво перезагружаетÑÑ...' -a_s_reboot_u = 'Внимание: ЕÑÑ‚ÑŒ неÑохранённые Ð¸Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ ÐºÐ¾Ñ‚Ð¾Ñ€Ñ‹Ðµ потерÑÑŽÑ‚ÑÑ Ð¿Ð¾Ñле перезагрузки!' -a_s_applyreboot1 = 'Ð˜Ð·Ð¼ÐµÐ½ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸Ð½ÑÑ‚Ñ‹.' -a_s_backup = 'Резервирование / ВоÑÑтановление' -a_s_backup_backup = 'Создать резервную копию' -a_s_backup_archive = 'Ðрхив воÑÑтановлениÑ' -a_s_backup_reset = 'СброÑить роутер к наÑтройкам по умолчанию' -a_s_backup_reset1 = 'Перейти к возврашению вÑех наÑтроек и уÑтановить наÑтройки по умолчанию?' -a_s_backup_restore = 'ВоÑÑтановить резервную копию' -a_s_backup1 = 'ЗдеÑÑŒ вы можете Ñделать резевную копию и воÑÑановить конфигурацию вашего роутера, еÑли Ñто возможно, или уÑтановить наÑтройки по умолчанию.' -a_srv_http = 'HTTP-Сервер' -a_srv_ssh = 'SSH-Сервер' -a_srv_services1 = 'СервиÑÑ‹ и демоны выполнÑющие определённые задачи на уÑтройÑтвах.' -a_srv_services2 = 'БольшинÑтво из них Ñетевые Ñерверы, которые выполнÑÑŽÑ‚ определённые задачи Ð´Ð»Ñ Ð²Ð°ÑˆÐ¸Ñ… уÑтройÑтв или Ñетей наподобие shell-доÑтупа, web-Ñтраниц таких как LuCI, выполнÑÑŽÑ‚ mesh-маршрутизацию, отправлÑÑŽÑ‚ пиÑьма , ...' -a_srv_http1 = 'Маленький веб-Ñервер, Ñлужащий Ð´Ð»Ñ Ð¿Ñ€ÐµÐ´Ð¾ÑÑ‚Ð°Ð²Ð»ÐµÐ½Ð¸Ñ LuCI.' -a_srv_http_authrealm = 'ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ð¾Ð½Ð½Ð°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ' -a_srv_http_authrealm1 = 'Что будет показано при авторизации на защищённых Ñтраницах.' -a_srv_http_config1 = 'по умолчанию /etc/httpd.conf' -a_srv_http_root = 'ÐšÐ¾Ñ€Ð½ÐµÐ²Ð°Ñ Ð¿Ð°Ð¿ÐºÐ°' -a_srv_dropbear1 = 'Dropbear Ñто SSH-Ñервер Ñо вÑтроенным SCP' -a_srv_d_pwauth = 'ÐÑƒÑ‚ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¿Ð¾ паролю' -a_srv_d_pwauth1 = 'Разрешить SSH аутентификацию по паролю' -a_w_channel = 'Канал' -a_w_wifi1 = 'Ðа Ñтой Ñтраничке можно наÑтроить WLAN оÑнованную на беÑпроводных ÑетÑÑ….' -a_w_wifi2 = 'Ð’Ñ‹ можете легко интегрировать ваши 802.11a/b/g/n-уÑтройÑтва в вашу физичеÑкую Ñеть и иÑпользовать виртуальные ÑтройÑтва Ð´Ð»Ñ Ð¿Ð¾ÑÑ‚Ñ€Ð¾ÐµÐ½Ð¸Ñ Ð±ÐµÑпроводных повторителей или ÑÐ¾Ð·Ð´Ð°Ð½Ð¸Ñ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð½Ñ‹Ñ… Ñетевых топологий на одном физичеÑком уÑтройÑтве.' -a_w_wifi3 = 'Поддерживаемые режимы: Точка, Клиент, Ad-Hoc и WDS, а так же WPA и WPA2 шифрование Ð´Ð»Ñ Ð¾Ð±ÐµÑÐ¿ÐµÑ‡ÐµÐ½Ð¸Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÑŒÑˆÐµÐ¹ безопаÑноÑти.' -a_w_devices1 = 'ЗдеÑÑŒ вы можете наÑтроить уÑтановленные Wi-Fi уÑтройÑтва.' -a_w_txantenna = 'ÐŸÐµÑ€ÐµÐ´Ð°ÑŽÑ‰Ð°Ñ Ð°Ð½Ñ‚ÐµÐ½Ð½Ð°' -a_w_rxantenna = 'ÐŸÑ€Ð¸Ð½Ð¸Ð¼Ð°ÑŽÑ‰Ð°Ñ Ð°Ð½Ñ‚ÐµÐ½Ð½Ð°' -a_w_distance1 = 'ДиÑÑ‚Ð°Ð½Ñ†Ð¸Ñ Ð´Ð¾ Ñамой дальней Ñтанции (в метрах)' -a_w_diversity = 'РазновидноÑÑ‚ÑŒ антенн' -a_w_countrycode = 'Код Ñтраны' -a_w_connlimit = 'Ограничение Ñоединений' -a_w_networks1 = 'Ð’Ñ‹ можете наÑтраивать различные wifi Ñети на одном уÑтройÑтве. Помните что еÑÑ‚ÑŒ определённые програмные и аппаратные ограничениÑ. Ðормально вы можете иÑпользовать например 1 Ad-Hoc или до 3 Точек и Ñимулированных 1 Клиента.' -a_w_netid = 'Ðазвание Ñети (ESSID)' -a_w_network1 = 'Добавить Wifi Ñеть в физичеÑкую Ñеть' -a_w_txpwr = 'МощьноÑÑ‚ÑŒ передатчика' -a_w_brcmburst = 'Broadcom Frameburst' -a_w_athburst = 'Atheros Frameburst' -a_w_radiussrv = 'RadiusServer' -a_w_radiusport = 'Radius-Port' -a_w_apisolation = 'AP-Isolation' -a_w_apisolation1 = 'Ðе позволÑет клиентам обмениватьÑÑ Ð´Ñ€ÑƒÐ³ Ñ Ð´Ñ€ÑƒÐ³Ð¾Ð¼ информацией' -a_w_hideessid = 'Скрыть ESSID' -a_w_ap = 'Точка доÑтупа' -a_w_adhoc = 'Ad-Hoc' -a_w_ahdemo = 'ПÑевдо Ad-Hoc (ahdemo)' -a_w_client = 'Клиент' -a_w_wds = 'WDS' -a_w_monitor = 'Monitor' -dhcp_dnsmasq_desc = 'Dnsmasq Ñодержит в Ñебе DHCP-Сервер и DNS-Forwarder Ð´Ð»Ñ NAT' -dhcp_dnsmasq_domainneeded = 'Domain required' -dhcp_dnsmasq_domainneeded_desc = 'Ðе форвардить DNS-запроÑÑ‹ без DNS-имени' -dhcp_dnsmasq_authoritative = 'Authoritative' -dhcp_dnsmasq_authoritative_desc = 'Только DHCP в локальной Ñети' -dhcp_dnsmasq_boguspriv = 'Filter private' -dhcp_dnsmasq_boguspriv_desc = 'не форвардить реверÑные-Ð´Ð½Ñ Ð·Ð°Ð¿Ñ€Ð¾ÑÑ‹ Ð´Ð»Ñ Ð»Ð¾ÐºÐ°Ð»ÑŒÐ½Ð¾Ð¹ Ñети' -dhcp_dnsmasq_filterwin2k = 'Filter useless' -dhcp_dnsmasq_filterwin2k_desc = 'фильтровать ненужные DNS-запроÑÑ‹ Windows-ÑиÑтем' -dhcp_dnsmasq_localisequeries = 'Localise queries' -dhcp_dnsmasq_localisequeries_desc = 'локализировать Ð¸Ð¼Ñ Ñ…Ð¾Ñта отноÑÑщегоÑÑ Ðº данной подÑети' -dhcp_dnsmasq_local = 'Локальный Ñервер' -dhcp_dnsmasq_domain = 'Локальный домен' -dhcp_dnsmasq_expandhosts = 'Expand Hosts' -dhcp_dnsmasq_expandhosts_desc = 'ДобавлÑÑ‚ÑŒ доменные имена в хоÑÑ‚Ñ‹' -dhcp_dnsmasq_nonegcache = 'Don't cache unknown' -dhcp_dnsmasq_nonegcache_desc = 'Запрещать кешировать негативные DNS-ответы' -dhcp_dnsmasq_readethers = 'Use /etc/ethers' -dhcp_dnsmasq_readethers_desc = 'Читать /etc/ethers Ð´Ð»Ñ Ð½Ð°Ñтройки DHCP-Сервера' -dhcp_dnsmasq_leasefile = 'Leasefile' -dhcp_dnsmasq_leasefile_desc = 'файл где выданные DHCP-leases хранÑÑ‚ÑÑ' -dhcp_dnsmasq_resolvfile = 'Resolvfile' -dhcp_dnsmasq_resolvfile_desc = 'Локальный DNS файл' -dhcp_dnsmasq_nohosts = 'Ignore /etc/hosts' -dhcp_dnsmasq_strictorder = 'Strict order' -dhcp_dnsmasq_strictorder_desc = 'DNS-Сервер будет обращатьÑÑ Ðº resolvfile' -dhcp_dnsmasq_logqueries = 'Log queries' -dhcp_dnsmasq_noresolv = 'Ignore resolvfile' -dhcp_dnsmasq_dnsforwardmax = 'concurrent queries' -dhcp_dnsmasq_port = 'DNS-Port' -dhcp_dnsmasq_ednspacket_max = 'max. EDNS0 размер пакета' -dhcp_dnsmasq_dhcpleasemax = 'max. DHCP-Leases' -dhcp_dnsmasq_addnhosts = 'дополнительный hostfile' -dhcp_dnsmasq_queryport = 'порт запроÑов' -a_n_switch = 'Свитч' -a_n_routes = 'МаршрутизациÑ' -a_n_routes4 = 'ÐœÐ°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ IPv4' -a_n_routes6 = 'ÐœÐ°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ IPv6' -a_n_routes1 = 'ÐœÐ°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ Ñлужит Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‡ÐµÑ€ÐµÐ· какой Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¸ шлюз можно пройти к определённому хоÑту или Ñегменту Ñети.' -a_network1 = 'Ð’ Ñтом разделе вы Ñможете найти вÑÑ‘ что каÑаетÑÑ Ð½Ð°Ñтроек Ñети.' -a_network2 = 'Ð’ большенÑтве роутеров Ñетевой Ñвитч может быть Ñвободно наÑтроен и добавлен в различные VLAN'Ñ‹.' -a_network3 = 'ÐаÑтройка PPPoE / PPTP позволÑет Ñети и Ñетевые ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ðº поÑтавщику уÑлуг Интернет.' -a_network4 = 'C DHCP уÑтройÑтва находÑщиеÑÑ Ð² вашей Ñети могут автоматичеÑки IP-адреÑа и вÑе необходимые наÑтройки.' -a_network5 = 'Файрволл и Ð¿Ñ€Ð¾Ð±Ñ€Ð¾Ñ Ð¿Ð¾Ñ€Ñ‚Ð¾Ð² иÑпользуетÑÑ Ð´Ð»Ñ ÑƒÐ²ÐµÐ»Ð¸Ñ‡ÐµÐ½Ð¸Ñ Ð½Ð°Ð´Ñ‘Ð¶Ð½Ð¾ÑÑ‚ÑŒ и гибкоÑти вашей Ñети.' -a_n_switch1 = 'Сетевые порты на вашем роутере могут маршрутизироватьÑÑ Ð² различные VLAN'Ñ‹ и ÑоединÑÑ‚ÑŒ компютеры напрÑмую. VLAN'Ñ‹ обычно иÑпользуют Ð´Ð»Ñ Ð»Ð¾Ð³Ð¸Ñ‡ÐµÑкого Ñ€Ð°Ð·Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ñетей.' -network_switch_desc = 'Порты принадлежашие VLAN'ам разделÑÑŽÑ‚ÑÑ Ð¿Ñ€Ð¾Ð±ÐµÐ»Ð°Ð¼Ð¸. Порт Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÑŒÑˆÐ¸Ð¼ значением (обычно 5) обычно иÑпользуют Ð´Ð»Ñ Ð²Ð½ÑƒÑ‚Ñ€ÐµÐ½Ð½Ð¸Ñ… Ñетей. Ðа уÑтройÑтвах Ñ 5 портами, порт Ñ Ð½Ð°Ð¸Ð¼ÐµÐ½ÑŒÑˆÐ¸Ð¼ значением (0) предназначен Ð´Ð»Ñ Uplink.' -a_n_ifaces1 = 'Ðа Ñтой Ñтраничке вы можете Ñконфигурировать Ñетевые интерфейÑÑ‹. Ð’Ñ‹ можете ÑоединÑÑ‚ÑŒ различные интерфейÑÑ‹ в "моÑÑ‚" Ð¿Ð¾Ð¼ÐµÑ‡Ð°Ñ Ð¸Ñ… как "МоÑÑ‚" и добавлÑÑ‚ÑŒ имена различных Ñетей принадлежащих Ñетевым интерфейÑам разделённые пробелом. Также вы можете иÑпользовать Ð¾Ð±Ð¾Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ VLAN'ов например INTERFACE.VLANNR (ÑƒÐºÐ°Ð·Ñ‹Ð²Ð°Ñ ÐºÐ°Ðº: eth0.1).' -a_n_i_bridge = 'МоÑÑ‚' -a_n_i_bridge1 = 'Ñоздаёт моÑÑ‚ Ð´Ð»Ñ Ð²Ñ‹Ð±Ñ€Ð°Ð½Ð½Ñ‹Ñ… Ñетевых интерфейÑов' -dhcp_desc = 'С помощью DHCP члены Ñетей могут автоматичеÑки получить такие наÑтройки как (IP-ÐдреÑ, Ñетевую маÑку, DNS-имÑ, ...).' -dhcp_dhcp_leasetime = 'Leasetime' -dhcp_dhcp_dynamicdhcp = 'Dynamic DHCP' -dhcp_dhcp_ignore = 'Ignore interface' -dhcp_dhcp_ignore_desc = 'отключить DHCP Ð´Ð»Ñ Ð´Ð°Ð½Ð½Ð¾Ð³Ð¾ интерфейÑа' -dhcp_dhcp_force = 'Force' -dhcp_dhcp_start_desc = 'первый Ð°Ð´Ñ€ÐµÑ (поÑледний октет)' -dhcp_dhcp_limit_desc = 'количеÑтво арендованных адреÑов -1' -dhcp_leases = 'Leases' -luci_ethers = 'Static Leases' -dhcp_timeremain = 'Leasetime remaining' -dhcp_leases_active = 'Active Leases' -a_n_ptp = 'Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ‚Ð¾Ñ‡ÐºÐ°-точка' -a_n_ptp1 = 'Ð¡Ð¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ‚Ð¸Ð¿Ð° PPPoE или PPTP обычно иÑпользуютÑÑ Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ñ‡ÐµÑ€ÐµÐ· DSL или подобные технологии Ð´Ð»Ñ Ð¿Ð¾Ð´ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ Ðº поÑтавщику уÑлуг Интернет.' -network_interface_server = 'PPTP-Сервер' -network_interface_demand = 'Automatic Disconnect' -network_interface_demand_desc = 'Ð’Ñ€ÐµÐ¼Ñ (в Ñек.) поÑле которого неиÑпользованное Ñоединение будет закрыто' -network_interface_keepalive = 'Keep-Alive' -network_interface_keepalive_desc = 'КоличеÑтво неудачных Ñоединений Ð´Ð»Ñ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð°Ñ†Ð¸Ð¸ переподÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ðº Ñерверу' -a_n_r_routes1 = 'ÐœÐ°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ Ñлужит Ð´Ð»Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»ÐµÐ½Ð¸Ñ Ñ‡ÐµÑ€ÐµÐ· какой Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð¸ шлюз можно пройти к определённому хоÑту или Ñегменту Ñети.' -a_n_routes_static = 'СтатичеÑÐºÐ°Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ' -a_n_routes_static4 = 'СтатичеÑÐºÐ°Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ IPv4' -a_n_routes_static6 = 'СтатичеÑÐºÐ°Ñ Ð¼Ð°Ñ€ÑˆÑ€ÑƒÑ‚Ð¸Ð·Ð°Ñ†Ð¸Ñ IPv6' -a_n_routes_kernel4 = 'Включение IPv4-Маршрутизации' -a_n_routes_kernel6 = 'Включение IPv6-Маршрутизации' -a_n_r_target1 = 'ХоÑÑ‚-IP или Ñеть' -a_n_r_target6 = 'ХоÑÑ‚-IPv6 или Ñеть' -a_n_r_netmask1 = 'еÑли Ñеть' -m_n_inet = 'Интернет Ñоединение' -m_n_local = 'Ð›Ð¾ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ñеть' -m_n_route = 'Маршрут' -m_n_brdige = 'МоÑÑ‚' -m_w_ap = 'ОбеÑпечивает (AP)' -m_w_adhoc = 'ÐезаыиÑÐ¸Ð¼Ð°Ñ (Ad-Hoc)' -m_w_client = 'ПриÑоединитьÑÑ (Client)' -m_w_wds = 'РаÑÐ¿Ñ€ÐµÐ´ÐµÐ»Ñ‘Ð½Ð½Ð°Ñ (WDS)' -m_w_clientmode = 'Режим клиента' -system_system_logsize = 'Размер буфера ÑиÑтемного журнала' -system_system_logip = 'Внешний Ñервер ÑиÑтемного журналированиÑ' -system_system_conloglevel = 'Уровень ÑиÑтемного логгированиÑ' -system_system_conloglevel_desc = 'Уровень ÑиÑтемного Ð»Ð¾Ð³Ð³Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½Ñоли' -m_i_processor = 'ПроцеÑÑор' -m_i_memory = 'ПамÑÑ‚ÑŒ' -m_i_systemtime = 'Локальное времÑ' -m_i_uptime = 'Ð’Ñ€ÐµÐ¼Ñ Ñ€Ð°Ð±Ð¾Ñ‚Ñ‹' -m_n_d_firstaddress = 'Первый арендованный адреÑ' -m_n_d_numleases = 'КоличеÑтво арендованных адреÑов' -routingtable = 'Таблица маршрутизации' -wlanscan = 'ПоиÑк Wi-Fi Ñетей' -frequency = 'ЧаÑтота' -power = 'МощьноÑÑ‚ÑŒ' -noise = 'Шум' -signal = 'Сигнал' -link = 'СвÑзь' -frag = 'Frag.' -rts = 'RTS' -bitrate = 'Битрейт' -m_n_keepalive = 'автоматичеÑки переподÑоединÑÑ‚ÑÑ' -m_n_dialondemand = 'отÑоединитьÑÑ ÐºÐ¾Ð³Ð´Ð° проÑтой длÑ' -m_n_pptp_server = 'PPTP-Сервер' -leds = 'ÐаÑтройка LED' -leds_desc = 'ÐаÑтройка Ð¿Ð¾Ð²ÐµÐ´ÐµÐ½Ð¸Ñ LED'ов еÑли Ñто возможно.' -system_led_name = 'LED ИмÑ' -system_led_sysfs = 'LED УÑтройÑтво' -system_led_default = 'СоÑтоÑние по умолчанию' -system_led_default_desc = 'мигание = включено' -system_led_trigger = 'Триггер' -system_led_trigger_none = 'нет' -system_led_trigger_defaulton = 'По умолчанию включено' -system_led_trigger_timer = 'Таймер' -system_led_trigger_heartbeat = 'Стук (СреднÑÑ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ°)' -system_led_trigger_netdev = 'Сетевое уÑтройÑтво' -system_led_delayoff = 'Задержка выключена' -system_led_delayoff_desc = 'Ð²Ñ€ÐµÐ¼Ñ (в мÑ) LED выключен' -system_led_delayon = 'Задержка включена' -system_led_delayon_desc = 'Ð²Ñ€ÐµÐ¼Ñ (в мÑ) LED включен' -system_led_dev = 'УÑтройÑтво' -system_led_mode = 'Триггерный режим' -system_led_mode_link = 'СвÑзь включена' -system_led_mode_tx = 'Передача' -system_led_mode_rx = 'Приём' -network_interface_up = 'Ðктивен' -network_interface_hwaddr = 'MAC-ÐдреÑ' -network_interface_hwaddr_desc = 'ÐÐ´Ñ€ÐµÑ ÑƒÑтройÑтва' -network_interface_txrx = 'Трафик' -network_interface_txrx_desc = 'передано / получено' -network_interface_err = 'Ошибок' -network_interface_err_desc = 'Перед. / Получ.' -network_interface_fwzone = 'Создать / Добавить Файрвол-зону' -network_interface_fwzone_desc = 'Этот Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð½Ðµ принадлежит ни к одной Файрвол-зоне.' -network_interface_encaps = 'PPPoA Encapsulation' -m_n_mssfix = "Clamp Segment Size" -m_n_mssfix_desc = "Fixes problems with unreachable websites, submitting forms or other unexpected behaviour for some ISPs." diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.de.lua deleted file mode 100644 index 7f7087b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.de.lua +++ /dev/null @@ -1,16 +0,0 @@ -cbi_add = 'Eintrag hinzufügen' -cbi_del = 'Eintrag entfernen' -cbi_replace = 'Eintrag ersetzen' -cbi_invalid = 'Ungültige Eingabe' -cbi_invalid_section = 'Validierung fehlgeschlagen: Bitte die Eingabefelder auf Fehler überprüfen.' -cbi_missing = 'Dieses Feld muss ausgefüllt werden' -cbi_deperror = 'Validierung fehlgeschlagen: Mindestens ein benötigtes Feld ist leer oder hat einen ungültigen Wert' -cbi_reqerror = 'Nicht erfüllte Abhängigkeit für dieses Feld' -cbi_addopt = '-- Zusätzliches Feld --' -cbi_sectempty = 'Diese Sektion enthält noch keine Einträge' -cbi_manual = '-- benutzerdefiniert --' -cbi_select = '-- Bitte auswählen --' -cbi_gorel = 'Gehe zu relevanter Konfigurationsseite' -cbi_applying = 'Änderungen werden angewandt' -cbi_upload = 'hochgeladene Datei' -cbi_browser = 'Datei suchen...' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.en.lua deleted file mode 100644 index 7e5ae15..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.en.lua +++ /dev/null @@ -1,17 +0,0 @@ -cbi_add = 'Add entry' -cbi_del = 'Remove entry' -cbi_replace = 'Replace entry' -cbi_invalid = 'Invalid input value' -cbi_invalid_section = 'Validation failed: Please check any input fields for mistakes.' -cbi_missing = 'This field is mandatory' -cbi_deperror = 'Validation failed: At least one mandatory field has no or an invalid value' -cbi_reqerror = 'A requirement for this option was not met' -cbi_addopt = '-- Additional Field --' -cbi_optional = ' (optional)' -cbi_sectempty = 'This section contains no values yet' -cbi_manual = '-- custom --' -cbi_select = '-- Please choose --' -cbi_gorel = 'Go to relevant configuration page' -cbi_applying = 'Applying changes' -cbi_upload = 'Uploaded File' -cbi_browser = 'Search file...' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.fr.lua deleted file mode 100644 index a62ccc9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.fr.lua +++ /dev/null @@ -1,17 +0,0 @@ -cbi_add = 'Ajouter une entrée' -cbi_del = 'Supprimer l'entrée' -cbi_replace = 'Remplacer l'entrée' -cbi_invalid = 'Erreur : donnée entrée invalide' -cbi_invalid_section = 'Erreur de validation : merci de vérifier les champs de saisie.' -cbi_missing = 'Ce champ est obligatoire' -cbi_deperror = 'Erreur de validation : au moins un champ est vide ou a une valeur incorrecte' -cbi_reqerror = 'Une spécification pour cette option n'a pu être vérifiée' -cbi_addopt = '-- Champ Supplémentaire --' -cbi_optional = ' (optionnel)' -cbi_sectempty = 'Cette section ne contient pas encore de valeur' -cbi_manual = '-- autre --' -cbi_select = '-- Choisir --' -cbi_gorel = 'Aller à la page de configuration correspondante' -cbi_applying = 'Changements en cours d'application' -cbi_upload = 'Fichier Uploadé' -cbi_browser = 'Chercher un fichier...' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.it.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.it.lua deleted file mode 100644 index 13174ae..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.it.lua +++ /dev/null @@ -1,17 +0,0 @@ -cbi_add = 'Aggiungi campo' -cbi_del = 'Rimuovi campo' -cbi_replace = 'Sostituisci campo' -cbi_invalid = 'Valore immesso non valido' -cbi_invalid_section = 'Validazione fallita: Per favore controlla i campi immessi.' -cbi_missing = 'Questo campo è obbligatorio' -cbi_deperror = 'Validazione fallita: Almeno un campo obbligatorio manca o è invalido' -cbi_reqerror = 'Un requisito per questa opzione non è stato soddisfatto' -cbi_addopt = '-- Campo aggiuntivo --' -cbi_optional = ' (opzionale)' -cbi_sectempty = 'Questa sezione non contiene ancora valori' -cbi_manual = '-- personalizzato --' -cbi_select = '-- Per favore scegli --' -cbi_gorel = 'Vai alla pagina di configurazione relativa' -cbi_applying = 'Applica modifiche' -cbi_upload = 'Invia file' -cbi_browser = 'Cerca file...' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.pt-br.lua deleted file mode 100644 index 2ac6ddf..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.pt-br.lua +++ /dev/null @@ -1,17 +0,0 @@ -cbi_add = 'Adicionar entrada' -cbi_del = 'Remover entrada' -cbi_replace = 'Substituir entrada' -cbi_invalid = 'Valor inválido' -cbi_invalid_section = 'A validação falhou: Por favor, verifique por erros em algum dos campos de entrada.' -cbi_missing = 'Este campo é obrigatório' -cbi_deperror = 'A validação falhou: É obrigatório pelo menos um campo com o valor correto.' -cbi_reqerror = 'Um requisito para esta opção não foi cumprido' -cbi_addopt = '-- Campo Adicional --' -cbi_optional = ' (opcional)' -cbi_sectempty = 'Esta seção não contêm valores ainda' -cbi_manual = '-- customizado --' -cbi_select = '-- Por favor escolha --' -cbi_gorel = 'Ir para a página relacionada à configuração' -cbi_applying = 'Aplicando mudanças' -cbi_upload = 'Fazer upload do arquivo' -cbi_browser = 'Procurar arquivo...' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.ru.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.ru.lua deleted file mode 100644 index 805699b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/cbi.ru.lua +++ /dev/null @@ -1,10 +0,0 @@ -cbi_add = 'Добавить' -cbi_del = 'Удалить' -cbi_invalid = 'Ошибка: Введёное значение не верно' -cbi_missing = 'Ошибка: Это поле обÑзательно к заполнению' -cbi_addopt = '-- Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð²ÐºÐ»Ð°Ð´ÐºÐ° --' -cbi_optional = ' (дополнительно)' -cbi_sectempty = 'Эта ÑÐµÐºÑ†Ð¸Ñ Ð¿Ð¾ÐºÐ° не Ñодержит значений' -cbi_manual = '-- выборочный --' -cbi_select = '-- ПожалуйÑта выберете --' -cbi_gorel = 'Перейти к Ñтранице конфигурации' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.de.lua deleted file mode 100644 index f731b7c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.de.lua +++ /dev/null @@ -1,8 +0,0 @@ -ddns = 'Dynamisches DNS' -ddns_desc = 'Dynamisches DNS erlaubt es, den Router bei dynamischer IP-Adresse über einen festen DNS-Namen zu erreichen.' -ddns_service_ipsource = 'Quelle der IP-Adresse' -ddns_service_checkinterval = 'Teste auf neue IP alle' -ddns_service_checkunit = 'Test-Zeiteinheit' -ddns_service_forceinterval = 'Erzwinge Aktualisierung alle' -ddns_service_forceunit = 'Erzwinge-Zeiteinheit' -ddns_service_updateurl = 'Eigene Update-URL' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.en.lua deleted file mode 100644 index b8afdf4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.en.lua +++ /dev/null @@ -1,8 +0,0 @@ -ddns = 'Dynamic DNS' -ddns_desc = 'Dynamic DNS allows that your router can be reached with a fixed hostname while having a dynamically changing IP-Address.' -ddns_service_ipsource = 'Source of IP-Address' -ddns_service_checkinterval = 'Check for changed IP every' -ddns_service_checkunit = 'Check-Time unit' -ddns_service_forceinterval = 'Force update every' -ddns_service_forceunit = 'Force-Time unit' -ddns_service_updateurl = 'Custom Update-URL' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.fr.lua deleted file mode 100644 index 8e5b6fa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.fr.lua +++ /dev/null @@ -1,8 +0,0 @@ -ddns = 'DNS Dynamique' -ddns_desc = 'Le DNS Dynamique permet au routeur d'être joint avec un nom d'hôte fixe bien que changeant dynamiquement d'adresse IP.' -ddns_service_ipsource = 'Source de l'adresse IP' -ddns_service_checkinterval = 'Vérifier l'adresse IP toutes les' -ddns_service_checkunit = 'Unité de temps' -ddns_service_forceinterval = 'Vérification forcée toutes les' -ddns_service_forceunit = 'Unité de temps' -ddns_service_updateurl = 'Url de mise à jour personnalisée' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.pt-br.lua deleted file mode 100644 index 58375c2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ddns.pt-br.lua +++ /dev/null @@ -1,8 +0,0 @@ -ddns = 'DNS Dinâmico' -ddns_desc = 'DNS dinâmico permite que o seu router possa ser encontrado a partir de um hostname fixo, mesmo usando um Endereço-IP dinâmico.' -ddns_service_ipsource = 'Origem do Endereço-IP' -ddns_service_checkinterval = 'Verificar a cada mudança de IP' -ddns_service_checkunit = 'Unidade de tempo para verificação' -ddns_service_forceinterval = 'Forçar atualização a cada' -ddns_service_forceunit = 'Unidade de tempo para atualização forçada' -ddns_service_updateurl = 'URL para atualização customizada' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.de.lua deleted file mode 100644 index 238cba5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.de.lua +++ /dev/null @@ -1,102 +0,0 @@ -skiplink1 = 'Zur Navigation springen' -skiplink2 = 'Zum Inhalt springen' -navigation = 'Navigation' -about = 'Ãœber' -add = 'Hinzufügen' -addresses = 'Adressen' -aliases = 'Aliasse' -all = 'alle' -administration = 'Administration' -essentials = 'Vereinfacht' -apply = 'Anwenden' -back = 'zurück' -basicsettings = 'Grundeinstellungen' -broadcast = 'IPv4-Broadcast' -changes = 'Änderungen' -channel = 'Kanal' -cidr6 = 'CIDR-Notation: Adresse/Prefix' -code = 'Code' -config = 'Konfiguration' -configfile = 'Konfigurationsdatei' -confirmation = 'Bestätigung' -delete = 'Löschen' -descr = 'Beschreibung' -design = 'Design' -destination = 'Ziel' -device = 'Gerät' -devices = 'Geräte' -disable = 'deaktivieren' -distance = 'Distanz' -dmesg = 'Kernelprotokoll' -dnsserver = 'DNS-Server' -edit = 'Bearbeiten' -enable = 'aktivieren' -encryption = 'Verschlüsselung' -error = 'Fehler' -filesystem = 'Dateisystem' -filter = 'Filter' -gateway = 'IPv4-Gateway' -gateway6 = 'IPv6-Gateway' -general = 'Allgemeines' -hostname = 'Hostname' -install = 'Installieren' -installed = 'installiert' -interface = 'Schnittstelle' -interfaces = 'Schnittstellen' -ipaddress = 'IPv4-Adresse' -ip6address = 'IPv6-Adresse' -legend = 'Legende' -library = 'Bibliothek' -load = 'Last' -login = 'Anmelden' -logout = 'Abmelden' -key = 'Schlüssel' -language = 'Sprache' -limit = 'Limit' -macaddress = 'MAC-Adresse' -manpage = 'siehe '%s' manpage' -metric = 'Metrik' -mode = 'Modus' -name = 'Name' -netmask = 'IPv4-Netzmaske' -network = 'Netzwerk' -networks = 'Netzwerke' -none = 'keine' -notinstalled = 'nicht installiert' -ok = 'OK' -options = 'Optionen' -overview = 'Ãœbersicht' -packagemanager = 'Packet-Manager' -password = 'Passwort' -path = 'Pfad' -port = 'Port' -ports = 'Ports' -protocol = 'Protokoll' -reboot = 'Neu Starten' -reset = 'Zurücksetzen' -revert = 'Verwerfen' -save = 'Speichern' -saveapply = 'Speichern & Anwenden' -scan = 'Scan' -service = 'Dienst' -services = 'Dienste' -settings = 'Einstellungen' -size = 'Größe' -source = 'Quelle' -start = 'Start' -static = 'statisch' -statistics = 'Statistiken' -status = 'Status' -submit = 'Absenden' -syslog = 'Systemprotokoll' -system = 'System' -target = 'Ziel' -timezone = 'Zeitzone' -type = 'Typ' -unknownerror = 'Unbekannter Fehler' -unsavedchanges = 'Ungespeicherte Änderungen' -username = 'Benutzername' -version = 'Version' -webui = 'Weboberfläche' -wifi = 'Drahtlos' -zone = 'Zone' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.en.lua deleted file mode 100644 index d923a88..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.en.lua +++ /dev/null @@ -1,102 +0,0 @@ -skiplink1 = 'Skip to navigation' -skiplink2 = 'Skip to content' -navigation = 'Navigation' -about = 'About' -add = 'Add' -addresses = 'Addresses' -aliases = 'Aliases' -all = 'all' -back = 'back' -administration = 'Administration' -essentials = 'Essentials' -apply = 'Apply' -basicsettings = 'Basic Settings' -broadcast = 'IPv4-Broadcast' -changes = 'Changes' -channel = 'Channel' -cidr6 = 'CIDR-Notation: address/prefix' -code = 'Code' -config = 'Configuration' -configfile = 'Configuration file' -confirmation = 'Confirmation' -delete = 'Delete' -descr = 'Description' -design = 'Design' -destination = 'Destination' -device = 'Device' -devices = 'Devices' -disable = 'disable' -distance = 'Distance' -dmesg = 'Kernel Log' -dnsserver = 'DNS-Server' -edit = 'Edit' -enable = 'enable' -encryption = 'Encryption' -error = 'Error' -filesystem = 'Filesystem' -filter = 'Filter' -gateway = 'IPv4-Gateway' -gateway6 = 'IPv6-Gateway' -general = 'General' -hostname = 'Hostname' -install = 'Install' -installed = 'installed' -interface = 'Interface' -interfaces = 'Interfaces' -ipaddress = 'IPv4-Address' -ip6address = 'IPv6-Address' -legend = 'Legend' -library = 'Library' -logout = 'Logout' -key = 'Key' -language = 'Language' -limit = 'Limit' -load = 'Load' -login = 'Login' -macaddress = 'MAC-Address' -manpage = 'see '%s' manpage' -metric = 'Metric' -mode = 'Mode' -name = 'Name' -netmask = 'IPv4-Netmask' -network = 'Network' -networks = 'Networks' -none = 'none' -notinstalled = 'not installed' -ok = 'OK' -options = 'Options' -overview = 'Overview' -packagemanager = 'Package Manager' -password = 'Password' -path = 'Path' -port = 'Port' -ports = 'Ports' -protocol = 'Protocol' -reboot = 'Reboot' -reset = 'Reset' -revert = 'Revert' -save = 'Save' -saveapply = 'Save & Apply' -scan = 'Scan' -service = 'Service' -services = 'Services' -settings = 'Settings' -size = 'Size' -source = 'Source' -start = 'Start' -static = 'static' -status = 'Status' -statistics = 'Statistics' -submit = 'Submit' -syslog = 'System Log' -system = 'System' -target = 'Target' -timezone = 'Timezone' -type = 'Type' -unknownerror = 'Unknown Error' -unsavedchanges = 'Unsaved Changes' -username = 'Username' -version = 'Version' -webui = 'Web UI' -wifi = 'Wifi' -zone = 'Zone' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.fr.lua deleted file mode 100644 index 8d9fa10..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.fr.lua +++ /dev/null @@ -1,99 +0,0 @@ -about = 'A propos' -add = 'Ajouter' -all = 'tous' -addresses = 'Adresses' -aliases = 'Alias' -back = 'retour' -administration = 'Administration' -essentials = 'Essentiel' -apply = 'Appliquer' -basicsettings = 'Paramètres de base' -broadcast = 'Broadcast IPv4' -changes = 'Changements' -channel = 'Canal' -cidr6 = 'Notation CIDR : adresse/prefixe' -code = 'Code' -config = 'Configuration' -configfile = 'Fichier de configuration' -confirmation = 'Confirmation' -delete = 'Effacer' -descr = 'Description' -design = 'Apparence' -destination = 'Destination' -device = 'Equipement' -devices = 'Equipements' -disable = 'désactiver' -distance = 'Distance' -dmesg = 'Journal du noyau' -dnsserver = 'Serveur DNS' -edit = 'Editer' -enable = 'activer' -encryption = 'Chiffrement' -error = 'Erreur' -filesystem = 'Système de fichiers' -filter = 'Filtrer' -gateway = 'Passerelle' -gateway6 = 'Passerelle IPv6' -general = 'Général' -hostname = 'Nom d'hôte' -install = 'Installer' -installed = 'installé' -interface = 'Interface' -interfaces = 'Interfaces' -ipaddress = 'Adresse IP' -ip6address = 'Adresse IPv6' -legend = 'Légende' -library = 'Bibliothèque' -logout = 'Déconnexion' -key = 'Clé' -language = 'Langue' -limit = 'Limite' -load = 'Charger' -login = 'Connexion' -macaddress = 'Adresse MAC' -manpage = 'voir la page de man de '%s'' -metric = 'Metrique' -mode = 'Mode' -name = 'Nom' -netmask = 'Masque réseau' -network = 'Réseau' -networks = 'Réseaux' -none = 'aucun' -notinstalled = 'pas installé' -ok = 'OK' -options = 'Options' -overview = 'Vue d'ensemble' -packagemanager = 'Gestionnaire de paquets' -password = 'Mot de passe' -path = 'Chemin' -port = 'Port' -ports = 'Ports' -protocol = 'Protocole' -reboot = 'Redémarrage' -reset = 'Remise à zéro' -revert = 'Revenir' -save = 'Sauvegarder' -saveapply = 'Sauvegarder et Appliquer' -scan = 'Scan' -service = 'Service' -services = 'Services' -settings = 'Réglages' -size = 'Taille' -source = 'Source' -start = 'Démarrer' -static = 'statique' -status = 'Status' -statistics = 'Statistiques' -submit = 'Soumettre' -syslog = 'Journal système' -system = 'Système' -target = 'Cible' -timezone = 'Fuseau horaire' -type = 'Type' -unknownerror = 'Erreur inconnue' -unsavedchanges = 'Changements non appliqués' -username = 'Nom d'utilisateur' -version = 'Version' -webui = 'IU Web' -wifi = 'Wi-Fi' -zone = 'Zone' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.it.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.it.lua deleted file mode 100644 index 7ffc729..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.it.lua +++ /dev/null @@ -1,102 +0,0 @@ -skiplink1 = 'Salta a navigazione' -skiplink2 = 'Salta a contenuto' -navigation = 'Navigazione' -about = 'Informazioni su' -add = 'Aggiungi' -addresses = 'Indirizzi' -aliases = 'Alias' -all = 'tutti' -back = 'indietro' -administration = 'Amministrazione' -essentials = 'Essenziali' -apply = 'Applica' -basicsettings = 'Impostazioni di base' -broadcast = 'Broadcast IPv4' -changes = 'Modifiche' -channel = 'Canale' -cidr6 = 'Notazione CIDR: indirizzo/prefisso' -code = 'Codice' -config = 'Configurazione' -configfile = 'File di configurazione' -confirmation = 'Conferma' -delete = 'Cancella' -descr = 'Descrizione' -design = 'Design' -destination = 'Destinazione' -device = 'Dispositivo' -devices = 'Dispositivi' -disable = 'disabilita' -distance = 'Distanza' -dmesg = 'Log del kernel' -dnsserver = 'Server DNS' -edit = 'Modifica' -enable = 'abilita' -encryption = 'Crittografia' -error = 'Errore' -filesystem = 'Filesystem' -filter = 'Filtro' -gateway = 'Gateway IPv4' -gateway6 = 'Gateway IPv6' -general = 'Generale' -hostname = 'Hostname' -install = 'Installa' -installed = 'installato' -interface = 'Interfaccia' -interfaces = 'Interfacce' -ipaddress = 'Indirizzo IPv4' -ip6address = 'Indirizzo IPv6' -legend = 'Legenda' -library = 'Libreria' -logout = 'Logout' -key = 'Chiave' -language = 'Lingua' -limit = 'Limite' -load = 'Carico' -login = 'Login' -macaddress = 'Indirizzo MAC' -manpage = 'leggi il manuale di '%s'' -metric = 'Metrica' -mode = 'Modalità' -name = 'Nome' -netmask = 'Maschera di rete IPv4' -network = 'Rete' -networks = 'Reti' -none = 'nessuna' -notinstalled = 'non installato' -ok = 'OK' -options = 'Opzioni' -overview = 'Riassunto' -packagemanager = 'Gestore pacchetti' -password = 'Password' -path = 'Percorso' -port = 'Porta' -ports = 'Porte' -protocol = 'Protocollo' -reboot = 'Riavvia' -reset = 'Reset' -revert = 'Ripristina' -save = 'Salva' -saveapply = 'Salva & applica' -scan = 'Scan' -service = 'Servizio' -services = 'Servizi' -settings = 'Impostazioni' -size = 'Dimensione' -source = 'Origine' -start = 'Inizio' -static = 'statico' -status = 'Stato' -statistics = 'Statistiche' -submit = 'Invia' -syslog = 'Log di sistema' -system = 'Sistema' -target = 'Destinazione' -timezone = 'Fuso orario' -type = 'Tipo' -unknownerror = 'Errore sconosciuto' -unsavedchanges = 'Modifiche non salvate' -username = 'Username' -version = 'Versione' -webui = 'UI web' -wifi = 'Wifi' -zone = 'Zona' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.pt-br.lua deleted file mode 100644 index 26672bd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.pt-br.lua +++ /dev/null @@ -1,103 +0,0 @@ -skiplink1 = 'Ir para a navegação' -skiplink2 = 'Ir para o conteúdo' -navigation = 'Navegação' -about = 'Sobre' -add = 'Adicionar' -addresses = 'Endereços' -aliases = 'Aliases' -all = 'todos' -allf = 'todas' -back = 'voltar' -administration = 'Administração' -essentials = 'Básico' -apply = 'Aplicar' -basicsettings = 'Configurações Básicas' -broadcast = 'Broadcast-IPv4' -changes = 'Alterações' -channel = 'Canal' -cidr6 = 'Notação-CIDR: endereço/prefixo' -code = 'Código' -config = 'Configuração' -configfile = 'Arquivo de configuração' -confirmation = 'Confirmação' -delete = 'Apagar' -descr = 'Descrição' -design = 'Tema' -destination = 'Destino' -device = 'Dispositivo' -devices = 'Dispositivos' -disable = 'desativar' -distance = 'Distância' -dmesg = 'Log do Kernel' -dnsserver = 'Servidor-DNS' -edit = 'Editar' -enable = 'ativar' -encryption = 'Criptografia' -error = 'Erro' -filesystem = 'Sistema de arquivo' -filter = 'Filtro' -gateway = 'Gateway-IPv4' -gateway6 = 'Gateway-IPv6' -general = 'Geral' -hostname = 'Hostname' -install = 'Instalar' -installed = 'instalado' -interface = 'Interface' -interfaces = 'Interfaces' -ipaddress = 'Endereço-IPv4' -ip6address = 'Endereço-IPv6' -legend = 'Legenda' -library = 'Biblioteca' -logout = 'Logout' -key = 'Chave' -language = 'Idioma' -limit = 'Limite' -load = 'Carga' -login = 'Login' -macaddress = 'Endereço-MAC' -manpage = 'veja sobre '%s' no manual' -metric = 'Métrica' -mode = 'Modo' -name = 'Nome' -netmask = 'Netmask-IPv4' -network = 'Rede' -networks = 'Redes' -none = 'nenhum' -notinstalled = 'não instalado' -ok = 'OK' -options = 'Opções' -overview = 'Visão geral' -packagemanager = 'Gerenciador de Pacotes' -password = 'Senha' -path = 'Caminho' -port = 'Porta' -ports = 'Portas' -protocol = 'Protocolo' -reboot = 'Reboot' -reset = 'Restaurar' -revert = 'Recuperar' -save = 'Salvar' -saveapply = 'Salvar & Aplicar' -scan = 'Scanear' -service = 'Serviço' -services = 'Serviços' -settings = 'Configurações' -size = 'Tamanho' -source = 'Origem' -start = 'Início' -static = 'estático' -status = 'Status' -statistics = 'Estatísticas' -submit = 'Enviar' -syslog = 'Log do Sistema' -system = 'Sistema' -target = 'Destino' -timezone = 'Fuso Horário' -type = 'Tipo' -unknownerror = 'Erro Desconhecido' -unsavedchanges = 'Alterações não Salvas' -username = 'Nome do usuário' -version = 'Versão' -webui = 'Web UI' -wifi = 'Wifi' -zone = 'Zona' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.ru.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.ru.lua deleted file mode 100644 index fe59e45..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/default.ru.lua +++ /dev/null @@ -1,95 +0,0 @@ -about = 'О программе' -add = 'Добавить' -addresses = 'ÐдреÑ' -aliases = 'СÑылка' -all = 'Ð’Ñе' -administration = 'Управление' -essentials = 'Essentials' -apply = 'ПринÑÑ‚ÑŒ' -basicsettings = 'Ðачальные УÑтановки' -broadcast = 'IPv4-Широковещательный' -changes = 'ИзменениÑ' -channel = 'Канал' -cidr6 = 'CIDR-Обозначение: адреÑ/префикÑ' -code = 'Код' -config = 'КонфигурациÑ' -configfile = 'Файл конфигурации' -confirmation = 'Подтверждение' -delete = 'Удалить' -descr = 'ОпиÑание' -design = 'Создание' -device = 'УÑтройÑтво' -devices = 'УÑтройÑтва' -disable = 'выключено' -distance = 'РаÑÑтоÑние' -dmesg = 'Kernel log' -dnsserver = 'DNS-Сервер' -edit = 'Редактировать' -enable = 'включено' -encryption = 'Шифрование' -error = 'Ошибка' -filesystem = 'Ð¤Ð°Ð¹Ð»Ð¾Ð²Ð°Ñ ÑиÑтема' -filter = 'Фильтр' -gateway = 'IPv4-Шлюз' -gateway6 = 'IPv6-Шлюз' -general = 'ОÑновной' -hostname = 'Ð˜Ð¼Ñ Ñ…Ð¾Ñта' -install = 'УÑтановка' -installed = 'уÑтановленные' -interface = 'ИнтерфейÑ' -interfaces = 'ИнтерфейÑÑ‹' -ipaddress = 'IPv4-ÐдреÑ' -ip6address = 'IPv6-ÐдреÑ' -legend = 'ÐадпиÑÑŒ' -library = 'Библиотека' -logout = 'Выход' -key = 'Ключ' -language = 'Язык' -limit = 'Предел' -load = 'Загрузка' -login = 'Вход' -macaddress = 'MAC-ÐдреÑ' -manpage = 'Ñмотрите '%s' руководÑтво' -metric = 'Метрика' -mode = 'Режим' -name = 'ИмÑ' -netmask = 'IPv4-МаÑка' -network = 'Сеть' -networks = 'Сети' -none = 'ничего' -notinstalled = 'не уÑтановленно' -ok = 'OK' -options = 'Опции' -overview = 'Обзор' -packagemanager = 'Менеджер пакетов' -password = 'Пароль' -path = 'Путь' -port = 'Порт' -ports = 'Порты' -protocol = 'Протокол' -reboot = 'Перезагрузка' -reset = 'СброÑ' -revert = 'Вернуть' -save = 'Сохранить' -saveapply = 'Сохранить & ПринÑÑ‚ÑŒ' -service = 'СервиÑ' -services = 'СервиÑÑ‹' -settings = 'ÐаÑтройки' -size = 'Размер' -start = 'Старт' -static = 'ÑтатичеÑкий' -status = 'СтатуÑ' -statistics = 'СтатиÑтика' -submit = 'Отправить' -syslog = 'СиÑтемный журнал' -system = 'СиÑтема' -target = 'Цель' -timezone = 'Ð’Ñ€ÐµÐ¼ÐµÐ½Ð½Ð°Ñ Ð·Ð¾Ð½Ð°' -type = 'Тип' -unknownerror = 'ÐеизвеÑÑ‚Ð½Ð°Ñ Ð¾ÑˆÐ¸Ð±ÐºÐ°' -unsavedchanges = 'ÐепринÑтые изменениÑ' -username = 'Ð˜Ð¼Ñ Ð¿Ð¾Ð»ÑŒÐ·Ð¾Ð²Ð°Ñ‚ÐµÐ»Ñ' -version = 'ВерÑиÑ' -webui = 'Web UI' -wifi = 'Wi-Fi' -zone = 'Зона' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.de.lua deleted file mode 100644 index 27382b3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.de.lua +++ /dev/null @@ -1,21 +0,0 @@ -ff_hellonet = 'Hallo und willkommen im Netz von' -ff_public1 = 'Wir sind eine Initiative zur Schaffung eines freien, offenen und unabhängigen Funknetzwerks auf WLAN-Basis.' -ff_public2 = 'Dies ist der Zugangspunkt ' -ff_public3 = 'Er wird betrieben von ' -ff_public4 = 'Weitere Informationen zur globalen Freifunkinitiative findest du unter' -ff_public5 = 'Hast du Interesse an diesem Projekt, dann wende dich an deine lokale Gemeinschaft' -ff_public6 = 'Der Internetzugang über das experimentelle Freifunknetz ist an technische und organisatorische Bedingungen geknüpft und deshalb möglicherweise nicht (immer) gewährleistet.' -ff_location = 'Standort' -ff_mail = 'E-Mail' -ff_mail1 = 'Bitte unbedingt angeben!' -ff_nickname = 'Pseudonym' -ff_name = 'Name' -ff_node = 'Knoten' -ff_note = 'Notiz' -ff_phone = 'Telefon' -ff_ram = 'Hauptspeicher' -ff_free = 'Frei' -ff_buffers = 'Buffers' -ff_cached = 'Cached' -ff_total = 'Gesamt' -ff_geocoord = 'Geokoordinaten' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.en.lua deleted file mode 100644 index cf3ae4d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/freifunk.en.lua +++ /dev/null @@ -1,21 +0,0 @@ -ff_hellonet = 'Hello and welcome in the network of' -ff_public1 = 'We are an initiative to establish a free, independent and open wireless mesh network.' -ff_public2 = 'This is the access point' -ff_public3 = 'It is operated by' -ff_public4 = 'You can find further information about the global Freifunk initiative at' -ff_public5 = 'If you are interested in our project then contact the local community' -ff_public6 = 'Internet access depends on technical and organisational conditions and may or may not work for you.' -ff_location = 'Location' -ff_mail = 'E-Mail' -ff_mail1 = 'You really should provide your address here!' -ff_nickname = 'Nickname' -ff_name = 'Realname' -ff_node = 'Node' -ff_note = 'Notice' -ff_phone = 'Phone' -ff_ram = 'Memory' -ff_free = 'Free' -ff_buffers = 'Buffers' -ff_cached = 'Cached' -ff_total = 'Total' -ff_geocoord = 'Coordinates' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.de.lua deleted file mode 100644 index ca276ab..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.de.lua +++ /dev/null @@ -1,7 +0,0 @@ -disk = 'Festplatte' -enable_debug = 'Debug-Ausgaben aktivieren' -hd_idle = 'hd-idle' -hd_idle_desc = 'hd-idle ist ein Hilfsprogramm um externe Festplatten nach einer festgelegten Leerlaufzeit herunter zu fahren.' -idle_time_interval = 'Leerlaufzeit' -idle_time_unit = 'Leerlaufzeiteinheit' -settings = 'Einstellungen' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.en.lua deleted file mode 100644 index 2ec7780..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.en.lua +++ /dev/null @@ -1,7 +0,0 @@ -disk = 'Disk' -enable_debug = 'Enable debug' -hd_idle = 'hd-idle' -hd_idle_desc = 'hd-idle is a utility program for spinning-down external disks after a period of idle time.' -idle_time_interval = 'Idle-Time' -idle_time_unit = 'Idle-Time unit' -settings = 'Settings' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.pt-br.lua deleted file mode 100644 index a1d253d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/hd_idle.pt-br.lua +++ /dev/null @@ -1,7 +0,0 @@ -disk = 'Disco' -enable_debug = 'Habilitar debug' -hd_idle = 'Hd-idle' -hd_idle_desc = 'Hd-idle é um programa utilitário para ativar o modo "economia de energia" (spinning-down) de discos externos após um período de ociosidade.' -idle_time_interval = 'Tempo de ociosidade' -idle_time_unit = 'Unidade do tempo de ociosidade' -settings = 'Configurações' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.de.lua deleted file mode 100644 index 13b6a4a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.de.lua +++ /dev/null @@ -1,5 +0,0 @@ -initmgr = 'Startscripte' -initmgr_desc = 'Hier können installierte Startscripte aktiviert oder deaktiviert werden. Änderungen werden erst mit einem Geräteneustart angewendet.
Warnung: Wenn essentialle Startscripte wie "network" deaktiviert werden könnte das Gerät unerreichbar werden!' -initmgr_index = 'Startpriorität' -initmgr_name = 'Startscript' -initmgr_enabled = 'Aktivieren/Deaktivieren' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.en.lua deleted file mode 100644 index 6e6da7b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.en.lua +++ /dev/null @@ -1,5 +0,0 @@ -initmgr = 'Initscripts' -initmgr_desc = 'You can enable or disable installed init scripts here. Changes will applied after a device reboot.
Warning: If you disable essential init scripts like "network", your device might become inaccesable!' -initmgr_index = 'Start priority' -initmgr_name = 'Initscript' -initmgr_enabled = 'Enable/Disable' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.pt-br.lua deleted file mode 100644 index f6e3d5d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/initmgr.pt-br.lua +++ /dev/null @@ -1,5 +0,0 @@ -initmgr = 'Scripts de Inicialização' -initmgr_desc = 'Você pode ativar ou desativar os scripts de inicialização instalados aqui. As mudanças serão aplicadas após a reinicialização do equipamento.
Aviso: Se você desativar algum script de inicialização essencial como por exemplo "rede/network", o dispositivo poderá tornar-se inacessível!' -initmgr_index = 'Prioridade de inicialização' -initmgr_name = 'Script de inicialização' -initmgr_enabled = 'Ativar/Desativar' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.de.lua deleted file mode 100644 index 33c1eb1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.de.lua +++ /dev/null @@ -1,8 +0,0 @@ -livestats_incoming = "eingehend" -livestats_outgoing = "ausgehend" -livestats_traffic = "Netzverkehr auf" -livestats_wifi = "Signal-Rauschabstand für" -livestats_loadavg = "Durchschnittliche Systemlast" -livestats_stat_wireless = "Echtzeit-Drahtlosstatus" -livestats_stat_traffic = "Echtzeit-Netzwerkverkehr" -livestats_stat_loadavg = "Echtzeit-Systemlast" \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.en.lua deleted file mode 100644 index 04d326a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/livestats.en.lua +++ /dev/null @@ -1,8 +0,0 @@ -livestats_incoming = "incoming" -livestats_outgoing = "outgoing" -livestats_traffic = "traffic on" -livestats_wifi = "signal-to-noise ratio for" -livestats_loadavg = "load average" -livestats_stat_wireless = "Realtime Wireless Status" -livestats_stat_traffic = "Realtime Network Traffic" -livestats_stat_loadavg = "Realtime System Load" \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.de.lua deleted file mode 100644 index 9659839..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.de.lua +++ /dev/null @@ -1,56 +0,0 @@ -fw_portfw = 'Portweiterleitung' -fw_redirect = 'Umleitungen' -fw_redirect_desc = 'Umleitungen erlauben es das Ziel von weitergeleiteten Paketen zu verändern.' -fw_forwarding = 'Zone-zu-Zone Verkehr' -fw_fw = 'Firewall' -fw_zone = 'Zone' -fw_zones = 'Zonen' -fw_custfwd = 'Erweiterte Weiterleitung' -firewall_rule = 'Erweiterte Regeln' -firewall_rule_desc = 'Mit erweiterten Regeln kann die Firewall an die eigenen Bedürfnisse angepasst werden. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert.' -fw_fw1 = 'Die Firewall erstellt Netzwerkzonen über bestimmte Netzwerkschnittstellen um den Netzverkehr zu trennen.' -fw_src = 'Quelle' -fw_dest = 'Ziel' -fw_traffic = 'Verkehrskontrolle' -fw_mtufix = 'MSS Clamping' -fw_dropinvalid = 'Ungültige Pakete verwerfen' -firewall_rule_src = 'Eingangszone' -firewall_rule_dest = 'Ausgangszone' -firewall_rule_srcip = 'Quelladresse' -firewall_rule_destip = 'Zieladresse' -firewall_rule_srcmac = 'Quell-MAC-Adresse' -firewall_rule_srcport = 'Quellport' -firewall_rule_destport = 'Zielport' -firewall_rule_target = 'Aktion' -fw_accept = 'annehmen' -fw_reject = 'zurückweisen' -fw_drop = 'verwerfen' -fw_portfw1 = 'Portweiterleitungen ermöglichen es interne Netzwerkdienste aus einem externen Netzwerk heraus erreichbar zu machen.' -firewall_redirect_src_desc = 'Externe Zone' -firewall_redirect_srcdport = 'Externer Port' -firewall_redirect_srcdport_desc = 'Port od. Erster-Letzter Port' -firewall_redirect_destip = 'Interne Adresse' -firewall_redirect_destip_desc = 'IP-Adresse' -firewall_redirect_destport = 'Interner Port (optional)' -firewall_redirect_destport_desc = 'Port od. Erster-Letzter Port' -firewall_redirect_srcip = 'Quelladresse' -firewall_redirect_srcmac = 'Quell-MAC-Adresse' -fw_forwarding1 = 'An dieser Stelle kann festgelegt zwischen welchen Zonen Netzverkehr hin und her fließen kann. Es werden nur neue Verbindungen betrachtet. Pakete, die zu bereits bestehenden Verbindungen gehören werden automatisch akzeptiert. Bei gelegentlich auftretenden Verbindungsproblemen kann MSS Clamping helfen, ansonsten sollte dies aus Performancegründen deaktiviert bleiben.' -firewall_forwarding_src = 'Eingang' -firewall_forwarding_dest = 'Ausgang' -firewall_defaults = 'Grundeinstellungen' -firewall_defaults_desc = 'Grundeinstellungen die verwendet werden, wenn keine andere Regel angewandt werden kann.' -firewall_defaults_synflood = 'Schutz vor SYN-flood-Attacken' -firewall_defaults_input = 'Eingehender Verkehr' -firewall_defaults_output = 'Ausgehender Verkehr' -firewall_defaults_forward = 'Weitergeleiteter Verkehr' -firewall_zone_desc = 'Zonen teilen das Netzwerk in mehrere Bereiche ein um Netzverkehr sicher zu trennen. Ein oder mehrere Netzwerke gehören zu einer Zone. Das MASQ-Flag legt fest, dass aller ausgehende Netzverkehr einer Zone NAT-maskiert wird.' -firewall_zone_input = 'Eingehender Verkehr' -firewall_zone_input_desc = 'Standardaktion' -firewall_zone_output = 'Ausgehender Verkehr' -firewall_zone_output_desc = 'Standardaktion' -firewall_zone_forward = 'Weitergeleiteter Verkehr' -firewall_zone_forward_desc = 'Standardaktion' -firewall_zone_masq = 'MASQ' -firewall_zone_network = 'Netzwerke' -firewall_zone_network_desc = 'verbundene Netzwerke' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.en.lua deleted file mode 100644 index 14bfa3c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.en.lua +++ /dev/null @@ -1,56 +0,0 @@ -fw_portfw = 'Port forwarding' -fw_redirect = 'Traffic Redirection' -fw_redirect_desc = 'Traffic redirection allows you to change the destination address of forwarded packets.' -fw_forwarding = 'Zone-to-Zone traffic' -fw_fw = 'Firewall' -fw_zone = 'Zone' -fw_zones = 'Zones' -fw_custfwd = 'Custom forwarding' -fw_fw1 = 'The firewall creates zones over your network interfaces to control network traffic flow.' -firewall_rule = 'Advanced Rules' -firewall_rule_desc = 'Advanced rules let you customize the firewall to your needs. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall.' -firewall_rule_src = 'Input Zone' -firewall_rule_dest = 'Output Zone' -firewall_rule_srcip = 'Source address' -firewall_rule_destip = 'Destination address' -firewall_rule_srcmac = 'Source MAC-Address' -firewall_rule_srcport = 'Source port' -firewall_rule_destport = 'Destination port' -firewall_rule_target = 'Action' -fw_accept = 'accept' -fw_reject = 'reject' -fw_drop = 'drop' -fw_src = 'Source' -fw_dest = 'Destination' -fw_traffic = 'Traffic Control' -fw_mtufix = 'MSS Clamping' -fw_dropinvalid = 'Drop invalid packets' -fw_portfw1 = 'Port forwarding allows to provide network services in the internal network to an external network.' -firewall_redirect_src_desc = 'External Zone' -firewall_redirect_srcdport = 'External port' -firewall_redirect_srcdport_desc = 'port or range as first-last' -firewall_redirect_srcip = 'Source address' -firewall_redirect_srcmac = 'Source MAC' -firewall_redirect_destip = 'Internal address' -firewall_redirect_destip_desc = 'IP-Address' -firewall_redirect_destport = 'Internal port (optional)' -firewall_redirect_destport_desc = 'port or range as first-last' -fw_forwarding1 = 'Here you can specify which network traffic is allowed to flow between network zones. Only new connections will be matched. Packets belonging to already open connections are automatically allowed to pass the firewall. If you experience occasional connection problems try enabling MSS Clamping otherwise disable it for performance reasons.' -firewall_forwarding_src = 'Input' -firewall_forwarding_dest = 'Output' -firewall_defaults = 'Defaults' -firewall_defaults_desc = 'These are the default settings that are used if no other rules match.' -firewall_defaults_synflood = 'SYN-flood protection' -firewall_defaults_input = 'Incoming Traffic' -firewall_defaults_output = 'Outgoing Traffic' -firewall_defaults_forward = 'Forwarded Traffic' -firewall_zone_desc = 'Zones part the network interfaces into certain isolated areas to separate network traffic. One or more networks can belong to a zone. The MASQ-flag enables NAT masquerading for all outgoing traffic on this zone.' -firewall_zone_input = 'Incoming Traffic' -firewall_zone_input_desc = 'Default Policy' -firewall_zone_output = 'Outgoing Traffic' -firewall_zone_output_desc = 'Default Policy' -firewall_zone_forward = 'Forwarded Traffic' -firewall_zone_forward_desc = 'Default Policy' -firewall_zone_masq = 'MASQ' -firewall_zone_network = 'Networks' -firewall_zone_network_desc = 'contained networks' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.fr.lua deleted file mode 100644 index a3b11e8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.fr.lua +++ /dev/null @@ -1,56 +0,0 @@ -fw_portfw = 'Redirection de port' -fw_redirect = 'Redirection de trafic' -fw_redirect_desc = 'La redirection de trafic vous permet de changer l'adresse de destination des paquets transférés.' -fw_forwarding = 'Trafic inter-zone' -fw_fw = 'Pare-Feu' -fw_zone = 'Zone' -fw_zones = 'Zones' -fw_custfwd = 'Transfert particulière' -fw_fw1 = 'Le pare-feu crée des zone à partir des interfaces réseaux pour controller le trafic réseau.' -firewall_rule = 'Règles Avancées' -firewall_rule_desc = 'Les règles avancées vous laisse personnaliser le pare-feu selon vos besoins. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.' -firewall_rule_src = 'Zone d'Entrée (Input)' -firewall_rule_dest = 'Zone de Sortie (Output)' -firewall_rule_srcip = 'Adresse source' -firewall_rule_destip = 'Adresse de destination' -firewall_rule_srcmac = 'Adresse MAC source' -firewall_rule_srcport = 'Port source' -firewall_rule_destport = 'Port de destination' -firewall_rule_target = 'Action' -fw_accept = 'accepter' -fw_reject = 'rejeter' -fw_drop = 'ignorer (drop)' -fw_src = 'Source' -fw_dest = 'Destination' -fw_traffic = 'Contrôle de Trafic' -fw_mtufix = 'MSS-Correction' -fw_dropinvalid = 'Drop incorrect packets' -fw_portfw1 = 'La redirection de port vous permet d'exposer des services réseaux de votre réseau local au réseau externe.' -firewall_redirect_src_desc = 'Zone externe' -firewall_redirect_srcdport = 'Port externe' -firewall_redirect_srcdport_desc = 'port ou plage de ports (premier-dernier)' -firewall_redirect_srcip = 'Adresse source' -firewall_redirect_srcmac = 'MAC source' -firewall_redirect_destip = 'Adresse interne' -firewall_redirect_destip_desc = 'Adresse IP' -firewall_redirect_destport = 'Port interne' -firewall_redirect_destport_desc = 'port ou plage de ports (premier-dernier)' -fw_forwarding1 = 'Ici, vous pouvez spécifier quel trafic réseau est autorisé à transiter entre les zones réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.' -firewall_forwarding_src = 'Entrée (Input)' -firewall_forwarding_dest = 'Sortie (Output)' -firewall_defaults = 'Défauts' -firewall_defaults_desc = 'Ceci sont les paramètres par défaut qui sont utilisés si aucune autre règle ne s'applique.' -firewall_defaults_synflood = 'Protection anti SYN-flood' -firewall_defaults_input = 'Trafic Entrant' -firewall_defaults_output = 'Trafic Sortant' -firewall_defaults_forward = 'Trafic Transféré' -firewall_zone_desc = 'Les zones partagent les interfaces réseaux en régions isolées pour séparer les trafic réseaux. Seules les nouvelles connexions seront prises en compte. Les paquets appartenant à des connexions déjà ouvertes sont automatiquement admises à passer le pare-feu.' -firewall_zone_input = 'Trafic Entrant' -firewall_zone_input_desc = 'Politique par Défaut' -firewall_zone_output = 'Trafic Sortant' -firewall_zone_output_desc = 'Politique par Défaut' -firewall_zone_forward = 'Trafic Transféré' -firewall_zone_forward_desc = 'Politique par Défaut' -firewall_zone_masq = 'MASQ' -firewall_zone_network = 'Réseaux' -firewall_zone_network_desc = 'réseaux compris' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.pt-br.lua deleted file mode 100644 index 3b38dc5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/luci-fw.pt-br.lua +++ /dev/null @@ -1,56 +0,0 @@ -fw_portfw = 'Redirecionamento de portas' -fw_redirect = 'Redirecionamento de Tráfego' -fw_redirect_desc = 'Redirecionamento do tráfego permite que você altere o endereço de destino dos pacotes enviados.' -fw_forwarding = 'Tráfego de Zona-para-Zona' -fw_fw = 'Firewall' -fw_zone = 'Zona' -fw_zones = 'Zonas' -fw_custfwd = 'Redirecionamento customizado' -fw_fw1 = 'O firewall cria zonas sobre suas interfaces de rede para controlar o fluxo do tráfego.' -firewall_rule = 'Regras Avançadas' -firewall_rule_desc = 'As regras avançadas permitem que você personalize o firewall de acordo com suas necessidades. Somente novas conexões serão processadas. Pacotes pertencentes às conexões já abertas estão automaticamente permitidos para passar pelo firewall.' -firewall_rule_src = 'Zona de Entrada' -firewall_rule_dest = 'Zona de Saída' -firewall_rule_srcip = 'Endereço de origem' -firewall_rule_destip = 'Endereço de destino' -firewall_rule_srcmac = 'Endereço-MAC de origem' -firewall_rule_srcport = 'Porta de origem' -firewall_rule_destport = 'Porta de destino' -firewall_rule_target = 'Ação' -fw_accept = 'aceitar' -fw_reject = 'rejeitar' -fw_drop = 'dropar' -fw_src = 'Origem' -fw_dest = 'Destino' -fw_traffic = 'Controle de Tráfego' -fw_mtufix = 'MSS-Correction' -fw_dropinvalid = 'Drop invalid packets' -fw_portfw1 = 'O redirecionamento de portas permite prover serviços de rede na rede interna para uma rede externa.' -firewall_redirect_src_desc = 'Zona Externa' -firewall_redirect_srcdport = 'Porta Externa' -firewall_redirect_srcdport_desc = 'porta ou intervalo primeira-última' -firewall_redirect_srcip = 'Endereço de origem' -firewall_redirect_srcmac = 'MAC de origem' -firewall_redirect_destip = 'Endereço interno' -firewall_redirect_destip_desc = 'Endereço-IP' -firewall_redirect_destport = 'Porta interna (opcional)' -firewall_redirect_destport_desc = 'porta ou intervalo primeira-última' -fw_forwarding1 = 'Aqui você pode especificar qual tráfego de rede será permitido para o fluxo entre zonas das redes. Somente novas conexões serão processadas. Pacotes pertencentes à conexões já abertas estão automaticamente permitidos para passar pelo firewall.' -firewall_forwarding_src = 'Entrada' -firewall_forwarding_dest = 'Saída' -firewall_defaults = 'Padrões' -firewall_defaults_desc = 'Estas são as configurações padrões, que serão usadas se não houver outras regras.' -firewall_defaults_synflood = 'Proteção SYN-flood' -firewall_defaults_input = 'Tráfego de Entrada' -firewall_defaults_output = 'Tráfego de Saída' -firewall_defaults_forward = 'Tráfego Redirecionado' -firewall_zone_desc = 'Zonas são interfaces de redes usadas para separar o tráfego da rede. Uma ou mais redes podem pertencer a uma zona. A flag-MASQ ativa o mascaramento NAT para todo o tráfego de saída desta zona.' -firewall_zone_input = 'Tráfego de Entrada' -firewall_zone_input_desc = 'Política Padrão' -firewall_zone_output = 'Tráfego de Saída' -firewall_zone_output_desc = 'Política Padrão' -firewall_zone_forward = 'Tráfego Redirecionado' -firewall_zone_forward_desc = 'Política Padrão' -firewall_zone_masq = 'MASQ' -firewall_zone_network = 'Redes' -firewall_zone_network_desc = 'redes contidas' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.de.lua deleted file mode 100644 index 543f98d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.de.lua +++ /dev/null @@ -1,3 +0,0 @@ -mmc_over_gpio = 'MMC/SD Treiberkonfiguration' -mmc_over_gpio_desc = 'Konfiguriert die Einstellungen des MMC/SD Karten Treibers' -settings = 'Einstellungen' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.en.lua deleted file mode 100644 index a1ee564..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.en.lua +++ /dev/null @@ -1,3 +0,0 @@ -mmc_over_gpio = 'MMC/SD driver configuration' -mmc_over_gpio_desc = 'MMC/SD driver configuration' -settings = 'Settings' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.pt-br.lua deleted file mode 100644 index 954a89d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/mmc_over_gpio.pt-br.lua +++ /dev/null @@ -1,3 +0,0 @@ -mmc_over_gpio = 'Configuração do driver MMC/SD' -mmc_over_gpio_desc = 'Configuração do driver MMC/SD' -settings = 'Configurações' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.de.lua deleted file mode 100644 index 42ca434..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.de.lua +++ /dev/null @@ -1,9 +0,0 @@ -ntpc = 'Zeitsynchronisation' -ntpc_desc = 'Synchronisiert die Systemzeit' -ntpc_timeserver = 'Zeitserver' -ntpc_interval = 'Aktualisierungsintervall (in s)' -ntpc_count = 'Anzahl der Zeitmessungen' -ntpc_count_desc = 'leer = unendlich' -ntpc_drift = 'Zeitgeberjustierung' -ntpc_drift_freq = 'Frequenzabweichung' -ntpc_current = 'Aktuelle Systemzeit' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.en.lua deleted file mode 100644 index 35e3904..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.en.lua +++ /dev/null @@ -1,9 +0,0 @@ -ntpc = 'Time Synchronisation' -ntpc_desc = 'Synchronizes the system time' -ntpc_timeserver = 'Time Server' -ntpc_interval = 'Update Interval (in s)' -ntpc_count = 'Count of Time Measurements' -ntpc_count_desc = 'empty = infinite' -ntpc_drift = 'Clock Adjustment' -ntpc_drift_freq = 'Offset Frequency' -ntpc_current = 'Current system time' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.pt-br.lua deleted file mode 100644 index be3ce5b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ntpc.pt-br.lua +++ /dev/null @@ -1,9 +0,0 @@ -ntpc = 'Sincronização de Horário' -ntpc_desc = 'Sincroniza a hora do sistema' -ntpc_timeserver = 'Servidor de Hora' -ntpc_interval = 'Intervalo de Atualização (em s)' -ntpc_count = 'Quantas vezes irá atualizar' -ntpc_count_desc = 'vazio = infinito' -ntpc_drift = 'Ajuste do Relógio' -ntpc_drift_freq = 'Frequência do Offset' -ntpc_current = 'Hora atual do sistema' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.de.lua deleted file mode 100644 index 4e652c8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.de.lua +++ /dev/null @@ -1,127 +0,0 @@ -olsrd = 'OLSR Daemon' -olsrd_neighbour_ip = 'Nachbar-IP' -olsrd_local_ip = 'Lokale Interface-IP' -olsrd_network = 'Angekündigtes Netzwerk' -olsrd_gateway = 'OLSR-Gateway' -olsrd_node = 'OLSR-Knoten' -olsrd_error = 'Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!' -olsrd_error_desc = 'Stellen Sie sicher das OLSRd läuft und das "txtinfo" Plugin auf Port 2006 geladen und "127.0.0.1" als Accept-Host gesetzt ist.' -olsrd_hna = 'OLSR - HNA-Ankündigungen' -olsrd_plugins = 'OLSR - Plugins' -olsrd_links = 'OLSR-Verbindungen' -olsrd_links_desc = 'Ãœbersicht über aktuell bestehende OLSR-Verbindungen' -olsrd_links_etx_desc = 'Zu erwartende Sendeversuche pro Paket' -olsrd_links_lq_desc = 'Erfolgsquote gesendeter Pakete' -olsrd_links_nlq_desc = 'Erfolgsquote empfangener Pakete' -olsrd_routes = 'Bekannte OLSR-Routen' -olsrd_routes_desc = 'Ãœbersicht über zur Zeit bekannte Routen zu anderen OLSR-Knoten' -olsrd_topology = 'Aktive OLSR-Knoten' -olsrd_topology_desc = 'Ãœbersicht über zur Zeit bekannte andere OLSR-Knoten' -olsrd_topology_lasthop = 'letzter Hop' -olsrd_hna2 = 'Aktive HNA-Ankündigungen' -olsrd_hna_desc = 'Ãœbersicht über zur Zeit aktive OLSR-Netzwerk-Ankündigungen' -olsrd_mid = 'Aktive MID-Ankündigungen' -olsrd_mid_desc = 'Ãœbersicht über bekannte Mehrfachschnittstellenmeldungen' -olsrd_mid_aliases = 'Sekundäre OLSR Schnittstellen' -olsrd_etx_ff = 'Freifunk' -olsrd_etx_float = 'Gleitkomma' -olsrd_etx_fpm = 'Festkomma' -olsrd_olsrd = 'Allgemeine Einstellungen' -olsrd_olsrd_allownoint = 'Start ohne Netzwerk' -olsrd_olsrd_clearscreen = 'Ansicht zurücksetzen' -olsrd_olsrd_debuglevel = 'Debugmodus' -olsrd_olsrd_fibmetric = 'FIB-Metrik' -olsrd_olsrd_ipversion = 'Internet Protokoll' -olsrd_olsrd_linkqualityaging = 'VQ-Alterung' -olsrd_olsrd_linkqualityalgorithm = 'VQ-Algorithmus' -olsrd_olsrd_linkqualitydijkstralimit = 'VQ-Dijkstralimit' -olsrd_olsrd_linkqualityfisheye = 'VQ-Fisheye' -olsrd_olsrd_linkqualitylevel = 'VQ-Level' -olsrd_olsrd_linkqualitylevel_1 = 'MPR-Auswahl' -olsrd_olsrd_linkqualitylevel_2 = 'MPR-Auswahl und Routing' -olsrd_olsrd_linkqualitywinsize = 'VQ-Fenstergröße' -olsrd_olsrd_mprcoverage = 'MPR-Erfassung' -olsrd_olsrd_pollrate = 'Abfragerate' -olsrd_olsrd_tcredundancy = 'TC-Redundanz' -olsrd_olsrd_tcredundancy_0 = 'MPR-Selektoren' -olsrd_olsrd_tcredundancy_1 = 'MPR-Selektoren und MPR' -olsrd_olsrd_tcredundancy_2 = 'Alle Nachbarn' -olsrd_olsrd_usehysteresis = 'Hysterese aktivieren' -olsrd_olsrd_willingness = 'Bereitschaft' -olsrd_interface_hellointerval = 'Hello-Intervall' -olsrd_interface_hellovaliditytime = 'Hello-Gültigkeit' -olsrd_interface_hnainterval = 'HNA-Intervall' -olsrd_interface_hnavaliditytime = 'HNA-Gültigkeit' -olsrd_interface_ip4broadcast = 'IPv4 Broadcast' -olsrd_interface_midinterval = 'MID-Intervall' -olsrd_interface_midvaliditytime = 'MID-Gültigkeit' -olsrd_interface_tcinterval = 'TC-Intervall' -olsrd_interface_tcvaliditytime = 'TC-Gültigkeit' -olsrd_interface_ip6addrtype = 'IPv6 Adresstyp' -olsrd_ipcconnect = 'IPC-Einstellungen' -olsrd_ipcconnect_desc = 'IPC-Verbindungen ermöglichen die Fernsteuerung des lokalen OLSR-Prozesses durch externe Programme' -olsrd_ipcconnect_host = 'Erlaubte Hostadressen' -olsrd_ipcconnect_host_desc = 'Mehrere mit Leerzeichen trennen' -olsrd_ipcconnect_maxconnections = 'Maximale Anzahl von Verbindungen' -olsrd_ipcconnect_maxconnections_desc = '0 deaktiviert IPC' -olsrd_ipcconnect_net = 'Erlaubte Netzbereiche' -olsrd_ipcconnect_net_desc = 'Adresse Maske; mehrere mit Leerzeichen' -olsrd_hna4 = 'IPv4 HNA-Ankündigungen' -olsrd_hna4_desc = 'Hna4-Entries ermöglichen die Ankündigung von lokalen IPv4 Host- und Netz-Routen im Mesh-Netzwerk' -olsrd_hna4_netaddr = 'Netzwerk-Adresse' -olsrd_hna4_netaddr_desc = 'IPv4 Adresse' -olsrd_hna4_netmask = 'Netzmaske' -olsrd_hna4_netmask_desc = 'IPv4 Adresse' -olsrd_hna6 = 'IPv6 HNA-Ankündigungen' -olsrd_hna6_desc = 'Hna6-Entries ermöglichen die Ankündigung von lokalen IPv6 Host- und Netz-Routen im Mesh-Netzwerk' -olsrd_hna6_netaddr = 'Netzwerk-Adresse' -olsrd_hna6_netaddr_desc = 'IPv6 Adresse' -olsrd_hna6_prefix = 'Prefix' -olsrd_hna6_prefix_desc = 'IPv6 Prefix' -olsrd_loadplugin = 'Pluginkonfiguration' -olsrd_loadplugin_ignore = 'Plugin aktivieren' -olsrd_loadplugin_library = 'Bibliothek' -olsrd_loadplugin_accept = 'Verbindungsaufbau von Addressen zulassen' -olsrd_loadplugin_ping = 'Pingtest Adressen' -olsrd_loadplugin_interval = 'Intervall' -olsrd_loadplugin_hna = 'HNA Ankündigungen' -olsrd_loadplugin_hna_desc = 'Format: IP-Adresse Netzmaske / OLSR kündigt dieses Netzwerk an sobald das Gateway erreichbar ist' -olsrd_loadplugin_addhosts = 'Alternative \"hosts\" Datei' -olsrd_loadplugin_addhosts_desc = 'Der Inhalt dieser Datei wird mit in die autogenerierte \"hosts\" Datei übernommen' -olsrd_loadplugin_dnsserver = 'DNS-Server' -olsrd_loadplugin_hosts = 'Alternative Hostnamen' -olsrd_loadplugin_hosts_desc = 'Format: Interface-IP Hostname' -olsrd_loadplugin_hostsfile = 'Pfad zur \"hosts\" Datei' -olsrd_loadplugin_lat = 'Latitude' -olsrd_loadplugin_latlonfile = 'Ausgabedatei für Koordinaten' -olsrd_loadplugin_latlonfile_desc = 'OLSR schreibt alle empfangenen Koordinaten anderer Knoten in diese Datei' -olsrd_loadplugin_latloninfile = 'Eingabedatei für Koordinaten' -olsrd_loadplugin_latloninfile_desc = 'OLSR prüft diese Datei periodisch auf neue Koordinaten und propagiert diese' -olsrd_loadplugin_lon = 'Longitude' -olsrd_loadplugin_name = 'Hostnamen' -olsrd_loadplugin_namechangescript = 'Kommando bei Namensänderungen' -olsrd_loadplugin_namechangescript_desc = 'OLSR ruft dieses Kommando auf sobald sich Einträge in der \"hosts\" Datei ändern' -olsrd_loadplugin_resolvfile = 'Pfad zur \"resolv\" Datei' -olsrd_loadplugin_serviceschangescript = 'Kommando bei Serviceänderungen' -olsrd_loadplugin_serviceschangescript_desc = 'OLSR ruft dieses Kommando auf sobald neue Service-Ankündigungen empfangen werden' -olsrd_loadplugin_sighuppidfile = 'PID-Datei für SIGHUP Signale' -olsrd_loadplugin_sighuppidfile_desc = 'OLSR sendet ein HUP Signal an den in der PID Datei angegebenen Prozess sobald sich die \"hosts\" oder \"resolv\" Datei ändert' -olsrd_loadplugin_suffix = 'Domain-Suffix' -olsrd_loadplugin_timeout = 'Timeout' -olsrd_loadplugin_bmfinterface = 'Name für die BMF-Schnittstelle' -olsrd_loadplugin_bmfinterfaceid = 'IP-Adresse für die BMF-Schnittstelle' -olsrd_loadplugin_dolocalbroadcast = 'Lokale Broadcasts weiterleiten' -olsrd_loadplugin_capturepacketsonolsrinterfaces = 'Broadcasts von OLSR-Schnittstellen weiterleiten' -olsrd_loadplugin_bmfmechanism = 'Verteilungsmechanismus' -olsrd_loadplugin_broadcastretransmitcount = 'Anzahl der Neuversendungen pro Paket' -olsrd_loadplugin_fanoutlimit = 'Mindestanzahl der Nachbarn für Broadcastweiterleitung' -olsrd_loadplugin_nonolsrif = 'Nicht-OLSR-Interfaces' -olsrd_loadplugin_port = 'Verwendeter Port' -olsrd_loadplugin_host = 'Verbindungsaufbau von Hosts zulassen' -olsrd_loadplugin_net = 'Verbindungsaufbau von Subnetzen zulassen' -olsrd_loadplugin_net_desc = 'Format: IP-Adresse Netzmaske' -olsrd_loadplugin_redistribute = 'Verwendete Protokolle' -olsrd_loadplugin_exportroutes = 'Routen nur an Quagga oder auch an Kernel exportieren' -olsrd_loadplugin_localpref = 'Lokale Routen immer bevorzugen' -olsrd_loadplugin_distance = 'Distanz für exportierte Routen' -olsrd_loadplugin_keyfile = 'Schlüsseldatei' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.en.lua deleted file mode 100644 index dc1e442..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/olsr.en.lua +++ /dev/null @@ -1,127 +0,0 @@ -olsrd = 'OLSR Daemon' -olsrd_neighbour_ip = 'Neighbour IP' -olsrd_local_ip = 'Local interface IP' -olsrd_network = 'Announced network' -olsrd_gateway = 'OLSR gateway' -olsrd_node = 'OLSR node' -olsrd_error = 'Unable to connect to the OLSR daemon!' -olsrd_error_desc = 'Make sure that OLSRd is running, the "txtinfo" plugin is loaded, configured on port 2006 and accepts connections from "127.0.0.1".' -olsrd_hna = 'OLSR - HNA-Announcements' -olsrd_plugins = 'OLSR - Plugins' -olsrd_links = 'OLSR connections' -olsrd_links_desc = 'Overview of currently established OLSR connections' -olsrd_links_etx_desc = 'Expected retransmission count' -olsrd_links_lq_desc = 'Success rate of sent packages' -olsrd_links_nlq_desc = 'Success rate of received packages' -olsrd_routes = 'Known OLSR routes' -olsrd_routes_desc = 'Overview of currently known routes to other OLSR nodes' -olsrd_topology = 'Active OLSR nodes' -olsrd_topology_desc = 'Overview of currently known OLSR nodes' -olsrd_topology_lasthop = 'Last hop' -olsrd_hna2 = 'Active host net announcements' -olsrd_hna_desc = 'Overview of currently active OLSR host net announcements' -olsrd_mid = 'Active MID announcements' -olsrd_mid_desc = 'Overview of known multiple interface announcements' -olsrd_mid_aliases = 'Secondary OLSR interfaces' -olsrd_etx_ff = 'Freifunk' -olsrd_etx_float = 'floating point' -olsrd_etx_fpm = 'fixed point math' -olsrd_olsrd = 'General settings' -olsrd_olsrd_allownoint = 'Start without network' -olsrd_olsrd_clearscreen = 'Clear screen' -olsrd_olsrd_debuglevel = 'Debugmode' -olsrd_olsrd_fibmetric = 'FIB metric' -olsrd_olsrd_ipversion = 'Internet protocol' -olsrd_olsrd_linkqualityaging = 'LQ aging' -olsrd_olsrd_linkqualityalgorithm = 'LQ algorithm' -olsrd_olsrd_linkqualitydijkstralimit = 'LQ Dijkstra limit' -olsrd_olsrd_linkqualityfisheye = 'LQ fisheye' -olsrd_olsrd_linkqualitylevel = 'LQ level' -olsrd_olsrd_linkqualitylevel_1 = 'MPR selection' -olsrd_olsrd_linkqualitylevel_2 = 'MPR selection and routing' -olsrd_olsrd_linkqualitywinsize = 'LQ window size' -olsrd_olsrd_mprcoverage = 'MPR coverage' -olsrd_olsrd_pollrate = 'Pollrate' -olsrd_olsrd_tcredundancy = 'TC redundancy' -olsrd_olsrd_tcredundancy_0 = 'MPR selectors' -olsrd_olsrd_tcredundancy_1 = 'MPR selectors and MPR' -olsrd_olsrd_tcredundancy_2 = 'all neighbours' -olsrd_olsrd_usehysteresis = 'Use hysteresis' -olsrd_olsrd_willingness = 'Willingness' -olsrd_interface_hellointerval = 'Hello interval' -olsrd_interface_hellovaliditytime = 'Hello validity time' -olsrd_interface_hnainterval = 'HNA interval' -olsrd_interface_hnavaliditytime = 'HNA validity time' -olsrd_interface_ip4broadcast = 'IPv4 broadcast' -olsrd_interface_midinterval = 'MID interval' -olsrd_interface_midvaliditytime = 'MID validity time' -olsrd_interface_tcinterval = 'TC interval' -olsrd_interface_tcvaliditytime = 'TC validity time' -olsrd_interface_ip6addrtype = 'IPv6 address type' -olsrd_ipcconnect = 'IPC settings' -olsrd_ipcconnect_desc = 'IPC connections enable you to remote-control the local OLSRd instance using external programs' -olsrd_ipcconnect_host = 'Allowed host addresses' -olsrd_ipcconnect_host_desc = 'Multiple separated by spaces' -olsrd_ipcconnect_maxconnections = 'Maxmimum connection count' -olsrd_ipcconnect_maxconnections_desc = 'Set to 0 to disable IPC' -olsrd_ipcconnect_net = 'Allowed subnets' -olsrd_ipcconnect_net_desc = 'Address Mask; multiple separated by space' -olsrd_hna4 = 'IPv4 HNA announcements' -olsrd_hna4_desc = 'Hna4 entries allow you to propagate local IPv4 host- and network-routes into the mesh network' -olsrd_hna4_netaddr = 'Network address' -olsrd_hna4_netaddr_desc = 'IPv4 address' -olsrd_hna4_netmask = 'Netmask' -olsrd_hna4_netmask_desc = 'IPv4 address' -olsrd_hna6 = 'IPv6 HNA announcements' -olsrd_hna6_desc = 'Hna6 entries allow you to propagate local IPv6 host- and network-routes into the mesh network' -olsrd_hna6_netaddr = 'Network address' -olsrd_hna6_netaddr_desc = 'IPv6 address' -olsrd_hna6_prefix = 'Prefix' -olsrd_hna6_prefix_desc = 'IPv6 prefix' -olsrd_loadplugin = 'Plugin configuration' -olsrd_loadplugin_ignore = 'Enable plugin' -olsrd_loadplugin_library = 'Library' -olsrd_loadplugin_accept = 'Allow connections from this hosts' -olsrd_loadplugin_ping = 'Ping test addresses' -olsrd_loadplugin_interval = 'Interval' -olsrd_loadplugin_hna = 'HNA announcements' -olsrd_loadplugin_hna_desc = 'Format: IP-Address Netmask / OLSR will announce this network once it is reachable' -olsrd_loadplugin_addhosts = 'Alternative \"hosts\" file' -olsrd_loadplugin_addhosts_desc = 'The contents of this file will be appended to the autogenerated \"hosts\" file' -olsrd_loadplugin_dnsserver = 'DNS server' -olsrd_loadplugin_hosts = 'Alternative hostnames' -olsrd_loadplugin_hosts_desc = 'Format: Interface-IP Hostname' -olsrd_loadplugin_hostsfile = 'Path to the \"hosts\" file' -olsrd_loadplugin_lat = 'Latitude' -olsrd_loadplugin_latlonfile = 'Output file for coordinates' -olsrd_loadplugin_latlonfile_desc = 'OLSR will write received coordinates of other nodes to this file' -olsrd_loadplugin_latloninfile = 'Input file for coordinates' -olsrd_loadplugin_latloninfile_desc = 'OLSR periodically checks this file for new coordinates and propagates them' -olsrd_loadplugin_lon = 'Longitude' -olsrd_loadplugin_name = 'Hostnames' -olsrd_loadplugin_namechangescript = 'Command for name changes' -olsrd_loadplugin_namechangescript_desc = 'OLSR executes this command once entries in the \"hosts\" are changed' -olsrd_loadplugin_resolvfile = 'Path to the \"resolv\" file' -olsrd_loadplugin_serviceschangescript = 'Command for service changes' -olsrd_loadplugin_serviceschangescript_desc = 'OLSR excutes this command once new service announcements are received' -olsrd_loadplugin_sighuppidfile = 'PID file for SIGHUP signals' -olsrd_loadplugin_sighuppidfile_desc = 'OLSR sends a HUP signal to this PID once the \"hosts\" oder \"resolv\" file is changed' -olsrd_loadplugin_suffix = 'Domain suffix' -olsrd_loadplugin_timeout = 'Timeout' -olsrd_loadplugin_bmfinterface = 'Name of the BMF interface' -olsrd_loadplugin_bmfinterfaceid = 'IP address of the BMF interface' -olsrd_loadplugin_dolocalbroadcast = 'Redirect local broadcasts' -olsrd_loadplugin_capturepacketsonolsrinterfaces = 'Also redirect broadcasts from OLSR interfaces' -olsrd_loadplugin_bmfmechanism = 'Propagation mechanism' -olsrd_loadplugin_broadcastretransmitcount = 'Number of retransmissions per package' -olsrd_loadplugin_fanoutlimit = 'Minimum number of neighbours for broadcast redirection' -olsrd_loadplugin_nonolsrif = 'Non-OLSR interfaces' -olsrd_loadplugin_port = 'Used port' -olsrd_loadplugin_host = 'Allow connections from hosts' -olsrd_loadplugin_net = 'Allow connections from subnets' -olsrd_loadplugin_net_desc = 'Format: IP-AddresseNetmask' -olsrd_loadplugin_redistribute = 'Used protocols' -olsrd_loadplugin_exportroutes = 'Only export routes to Quagga or to kernel too' -olsrd_loadplugin_localpref = 'Always prefer local routes' -olsrd_loadplugin_distance = 'Distance of exported routes' -olsrd_loadplugin_keyfile = 'Key file' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.de.lua deleted file mode 100644 index b8cf6e6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.de.lua +++ /dev/null @@ -1,4 +0,0 @@ -p910nd = 'p910nd - Drucker server' -p910nd_desc = 'Bevor p910nd verwendet werden kann muessen Pakete fuer USB (kmod-usb-printer) und Parallelport (kmod-lp) Support installiert werden.' -bidirectional = 'Bidirektionaler Modus' -port_help = 'p910nd hoert auf Port 910+N. Z.B. 9100 fuer ersten Drucker' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.en.lua deleted file mode 100644 index c9b3c8f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.en.lua +++ /dev/null @@ -1,4 +0,0 @@ -p910nd = 'p910nd - Printer server' -p910nd_desc = 'First you have to install the packages to get support for USB (kmod-usb-printer) or parallel port (kmod-lp).' -bidirectional = 'Bidirectional mode' -port_help = 'p910nd listens on port 910+N. E.g. 9100 for the first printer.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.pt-br.lua deleted file mode 100644 index 71e4acb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/p910nd.pt-br.lua +++ /dev/null @@ -1,4 +0,0 @@ -p910nd = 'P910nd - Servidor de impressão' -p910nd_desc = 'Primeiro você deve instalar os pacotes para obter suporte USB (kmod-usb-printer) ou porta paralela (kmod-lp).' -bidirectional = 'Modo bidirecional' -port_help = 'p910nd escuta na porta 910+N. Ex. 9100 para a primeira impressora.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/polipo.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/polipo.en.lua deleted file mode 100644 index 23b1836..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/polipo.en.lua +++ /dev/null @@ -1,43 +0,0 @@ -polipo = 'Polipo' -polipo_cache = 'On-Disk Cache' -polipo_cache_cacheisshared = 'Shared cache' -polipo_cache_cacheisshared_desc = 'Enable if cache (proxy) is shared by multiple users.' -polipo_cache_desc = 'To enable polipo on-disk cache cleaning (highly recommended), you should add a cron job in Scheduled Tasks services that will execute /usr/sbin/polipo_purge script. For example to perform disk cache cleanup every day at 6:00 in the morning you should add the following line in Scheduled Tasks "0 6 * * * /usr/sbin/polipo_purge" (without quotes).' -polipo_cache_diskcacheroot = 'Disk cache location' -polipo_cache_diskcacheroot_desc = 'Location where polipo will cache files permanently. Use of external storage devices is recommended, because the cache can grow considerably. Leave it empty to disable on-disk cache.' -polipo_cache_diskcachetruncatesize = 'Truncate cache files size (in bytes)' -polipo_cache_diskcachetruncatesize_desc = 'Size to which cached files should be truncated. (default value: 1048576)' -polipo_cache_diskcachetruncatetime = 'Truncate cache files time' -polipo_cache_diskcachetruncatetime_desc = 'Time after which cached files will be truncated. (default value: 4d12h)' -polipo_cache_diskcacheunlinktime = 'Delete cache files time' -polipo_cache_diskcacheunlinktime_desc = 'Time after which cached files will be deleted. (default value: 32d)' -polipo_desc = 'Polipo is a small and fast caching web proxy.' -polipo_general = 'General' -polipo_general_allowedclients = 'Allowed clients' -polipo_general_allowedclients_desc = 'When listen address is set to 0.0.0.0 or :: (IPv6), you must list clients that are allowed to connect. The format is IP address or network address (192.168.1.123, 192.168.1.0/24, 2001:660:116::/48 (IPv6)).' -polipo_general_chunkhighmark = 'In RAM cache size (in bytes)' -polipo_general_chunkhighmark_desc = 'How much RAM should Polipo use for its cache.' -polipo_general_dnsnameserver = 'DNS server address' -polipo_general_dnsnameserver_desc = 'Set the DNS server address to use, if you want Polipo to use different DNS server than the host system.' -polipo_general_dnsqueryipv6 = 'Query DNS for IPv6' -polipo_general_dnsqueryipv6_desc = 'false = Do not query IPv6; reluctantly = Query both, prefer IPv4; happily = Query both, prefer IPv6; true = Query only IPv6' -polipo_general_dnsusegethostbyname = 'Query DNS by hostname' -polipo_general_dnsusegethostbyname_desc = 'false = Never use system DNS resolver; reluctantly = Query DNS directly, if DNS server is unavailable fail to system DNS resolver; happily = Query DNS directly, if host could not be found fallback to system DNS resolver; true = Always use system DNS resolver' -polipo_general_logfacility = 'Syslog facility' -polipo_general_logfile = 'Log file location' -polipo_general_logfile_desc = 'Use of external storage device is recommended, because the log file is written frequently and can grow considerably.' -polipo_general_logsyslog = 'Log to syslog' -polipo_general_parentauthcredentials = 'Parent proxy authentication' -polipo_general_parentauthcredentials_desc = 'Basic HTTP authentication supported. Provide username and password in username:password format.' -polipo_general_parentproxy = 'Parent proxy address' -polipo_general_parentproxy_desc = 'Parent proxy address (in host:port format), to which Polipo will forward the requests.' -polipo_general_proxyaddress = 'Listen address' -polipo_general_proxyaddress_desc = 'The interface on which Polipo will listen. To listen on all interfaces use 0.0.0.0 or :: (IPv6).' -polipo_general_proxyport = 'Listen port' -polipo_general_proxyport_desc = 'Port on which Polipo will listen. (default value: 8123)' -polipo_pmm = 'Poor Man's Multiplexing' -polipo_pmm_desc = 'Poor Man's Multiplexing (PMM) is a technique that simulates multiplexing by requesting an instance in multiple segments. It tries to lower the latency caused by the weakness of HTTP protocol. NOTE: some sites may not work with PMM enabled.' -polipo_pmm_pmmfirstsize = 'First PMM segment size (in bytes)' -polipo_pmm_pmmfirstsize_desc = 'Size of the first PMM segment. If not defined, it defaults to twice the PMM segment size.' -polipo_pmm_pmmsize = 'PMM segments size (in bytes)' -polipo_pmm_pmmsize_desc = 'To enable PMM, PMM segment size must be set to some positive value.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.de.lua deleted file mode 100644 index 1ef5499..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.de.lua +++ /dev/null @@ -1,17 +0,0 @@ -qos = 'Quality of Service' -qos_interface_classgroup = 'Klassifizierung' -qos_interface_overhead = 'Overheadberechnung' -qos_interface_download = 'Downlink' -qos_interface_upload = 'Uplink' -qos_classify = 'Priorisierung' -qos_classify_target = 'Priorität' -qos_classify_srchost = 'Quelladresse' -qos_classify_srchost_dest = 'Quellnetz / Quellhost' -qos_classify_dsthost = 'Zieladresse' -qos_classify_dsthost_dest = 'Zielnetz / Zielhost' -qos_classify_portrange = 'Portbereich' -qos_bulk = 'niedrig' -qos_normal = 'normal' -qos_express = 'express' -qos_priority = 'priorisiert' -qos_connbytes = 'Bytes gesendet' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.en.lua deleted file mode 100644 index 67494e7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.en.lua +++ /dev/null @@ -1,18 +0,0 @@ -qos = 'Quality of Service' -qos_desc = 'With QoS you can priorize network traffic selected by adresses, ports or services.' -qos_interface_classgroup = 'Classification' -qos_interface_overhead = 'Calculate Overhead' -qos_interface_download = 'Downlink' -qos_interface_upload = 'Uplink' -qos_classify = 'Prioritization' -qos_classify_target = 'Priority' -qos_classify_srchost = 'Source address' -qos_classify_srchost_dest = 'source network / source host' -qos_classify_dsthost = 'Target address' -qos_classify_dsthost_dest = 'target network / target host' -qos_classify_portrange = 'portrange' -qos_bulk = 'low' -qos_normal = 'normal' -qos_express = 'express' -qos_priority = 'priority' -qos_connbytes = 'Bytes sent' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.fr.lua deleted file mode 100644 index 73c54dc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.fr.lua +++ /dev/null @@ -1,17 +0,0 @@ -qos = 'Qualité de service' -qos_bulk = 'lent' -qos_classify = 'Priorité' -qos_classify_dsthost = 'Adresse de destination' -qos_classify_dsthost_dest = 'Réseau de destination / Hôte de destination' -qos_classify_portrange = 'ports' -qos_classify_srchost = 'Adresse source' -qos_classify_srchost_dest = 'Réseau source / Hôte source' -qos_classify_target = 'Priorité' -qos_desc = 'Avec la QOS, vous pouvez donner des priorités au trafic de votre réseau en fonction des adresses, des ports ou des services présents.' -qos_express = 'express' -qos_interface_classgroup = 'Classification' -qos_interface_download = 'Liaison descendante' -qos_interface_overhead = 'calcul de la surcharge' -qos_interface_upload = 'Liaison montante' -qos_normal = 'normal' -qos_priority = 'prioritaire' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.pt-br.lua deleted file mode 100644 index 582e7aa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/qos.pt-br.lua +++ /dev/null @@ -1,17 +0,0 @@ -qos = 'Qualidade de Serviço' -qos_desc = 'Com QoS você pode priozirar o tráfego da rede selecionada por endereços, portas ou serviços.' -qos_interface_classgroup = 'Classificação' -qos_interface_overhead = 'Calcular Overhead' -qos_interface_download = 'Link para download' -qos_interface_upload = 'Link para upload' -qos_classify = 'Priorização' -qos_classify_target = 'Prioridade' -qos_classify_srchost = 'Endereço de origem' -qos_classify_srchost_dest = 'rede de origem / host de origem' -qos_classify_dsthost = 'Endereço de destino' -qos_classify_dsthost_dest = 'rede de destino / host de destino' -qos_classify_portrange = 'faixa de portas' -qos_bulk = 'baixa' -qos_normal = 'normal' -qos_express = 'expressa' -qos_priority = 'alta' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.lua deleted file mode 100644 index afd97f0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.lua +++ /dev/null @@ -1,70 +0,0 @@ -stat_dg_title_wireless__signal_noise = [[%H: Drahtlos - Signal-Noise-Verhältnis]] -stat_dg_label_wireless__signal_noise = [[dBm]] -stat_ds_signal_noise = [[Noise-Level]] -stat_ds_signal_power = [[Signalstärke]] -stat_dg_title_wireless__signal_quality = [[%H: Drahtlos - Signalqualität]] -stat_dg_label_wireless__signal_quality = [[n]] -stat_ds_signal_quality = [[Signalqualität]] -stat_dg_title_ping = [[%H: ICMP Antwortzeiten]] -stat_dg_label_ping = [[ms]] -stat_ds_ping = [[%di]] -stat_dg_title_iptables__ipt_packets = [[%H: Firewall - Verarbeitete Pakete]] -stat_dg_label_iptables__ipt_packets = [[Pakete/s]] -stat_ds_ipt_packets = [[Kette "%di"]] -stat_dg_title_netlink__if_octets = [[%H: Netlink - Transfer auf %pi]] -stat_dg_label_netlink__if_octets = [[Bytes/s]] -stat_ds_if_octets = [[Bytes (%ds)]] -stat_dg_title_netlink__if_packets = [[%H: Netlink - Pakete auf %pi]] -stat_dg_label_netlink__if_packets = [[Pakete/s]] -stat_ds_if_packets = [[Verarbeitet (%ds)]] -stat_ds_if_dropped = [[Verworfen (%ds)]] -stat_ds_if_errors = [[Fehler (%ds)]] -stat_dg_title_netlink__if_multicast = [[%H: Netlink - Multicast auf %pi]] -stat_dg_label_netlink__if_multicast = [[Pakete/s]] -stat_ds_if_multicast = [[Pakete]] -stat_dg_title_netlink__if_collisions = [[%H: Netlink - Kollisionen auf %pi]] -stat_dg_label_netlink__if_collisions = [[Kollisionen/s]] -stat_ds_if_collisions = [[Kollisionen]] -stat_dg_title_netlink__if_tx_errors = [[%H: Netlink - Fehler auf %pi]] -stat_dg_label_netlink__if_tx_errors = [[Fehler/s]] -stat_ds_if_tx_errors = [[%di]] -stat_ds_if_rx_errors = [[%di]] -stat_dg_title_processes = [[%H: Prozesse]] -stat_dg_label_processes = [[Prozesse/s]] -stat_ds_ps_state = [[%di]] -stat_dg_title_processes__ps_cputime = [[%H: Prozess %pi - Verbrauchte CPU Zeit]] -stat_dg_label_processes__ps_cputime = [[Jiffies]] -stat_ds_ps_cputime__syst = [[System]] -stat_ds_ps_cputime__user = [[User]] -stat_dg_title_processes__ps_count = [[%H: Prozess %pi - Threads und Prozesse]] -stat_dg_label_processes__ps_count = [[Anzahl]] -stat_ds_ps_count__threads = [[Threads]] -stat_ds_ps_count__processes = [[Prozesse]] -stat_dg_title_processes__ps_pagefaults = [[%H: Prozess %pi - Speicherzugriffsfehler]] -stat_dg_label_processes__ps_pagefaults = [[Zugriffsfehler]] -stat_ds_ps_pagefaults = [[Zugriffsfehler]] -stat_dg_title_processes__ps_rss = [[%H: Process %pi - Virtueller Speicher]] -stat_dg_label_processes__ps_rss = [[Bytes]] -stat_ds_ps_rss = [[virtueller Speicher]] -stat_dg_title_cpu = [[%H: Auslastung auf Prozessor #%pi]] -stat_dg_label_cpu = [[%]] -stat_ds_cpu = [[%di]] -stat_dg_title_interface__if_octets = [[%H: Transfer auf %di]] -stat_dg_label_interface__if_octets = [[Bytes/s]] -stat_dg_title_interface__if_packets = [[%H: Pakete auf %di]] -stat_dg_label_interface__if_packets = [[Pakete/s]] -stat_dg_title_tcpconns = [[%H: TCP-Verbindungen auf Port %pi]] -stat_dg_label_tcpconns = [[Verbindungen/s]] -stat_ds_tcp_connections = [[%di]] -stat_dg_title_df = [[%H: Speicherverbrauch auf %di]] -stat_dg_label_df = [[Bytes]] -stat_ds_df__free = [[verfügbar]] -stat_ds_df__used = [[belegt ]] -stat_dg_title_irq = [[%H: Interrupts]] -stat_dg_label_irq = [[Aufrufe/s]] -stat_ds_irq = [[IRQ %di]] -stat_dg_title_load = [[%H: Systemlast]] -stat_dg_label_load = [[Last]] -stat_ds_load__shortterm = [[1 Minute]] -stat_ds_load__midterm = [[5 Minuten]] -stat_ds_load__longterm = [[15 Minuten]] diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.xml.hide b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.xml.hide deleted file mode 100644 index 1432321..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.de.xml.hide +++ /dev/null @@ -1,96 +0,0 @@ - - - - -%H: Drahtlos - Signal-Noise-Verhältnis -dBm -Noise-Level -Signalstärke - -%H: Drahtlos - Signalqualität -n -Signalqualität - -%H: ICMP Antwortzeiten -ms -%di - -%H: Firewall - Verarbeitete Pakete -Pakete/s -Kette "%di" - -%H: Netlink - Transfer auf %pi -Bytes/s -Bytes (%ds) - -%H: Netlink - Pakete auf %pi -Pakete/s -Verarbeitet (%ds) -Verworfen (%ds) -Fehler (%ds) - -%H: Netlink - Multicast auf %pi -Pakete/s -Pakete - -%H: Netlink - Kollisionen auf %pi -Kollisionen/s -Kollisionen - -%H: Netlink - Fehler auf %pi -Fehler/s -%di -%di - -%H: Prozesse -Prozesse/s -%di - -%H: Prozess %pi - Verbrauchte CPU Zeit -Jiffies -System -User - -%H: Prozess %pi - Threads und Prozesse -Anzahl -Threads -Prozesse - -%H: Prozess %pi - Speicherzugriffsfehler -Zugriffsfehler -Zugriffsfehler - -%H: Process %pi - Virtueller Speicher -Bytes -virtueller Speicher - -%H: Auslastung auf Prozessor #%pi -% -%di - -%H: Transfer auf %di -Bytes/s - -%H: Pakete auf %di -Pakete/s - -%H: TCP-Verbindungen auf Port %pi -Verbindungen/s -%di - -%H: Speicherverbrauch auf %di -Bytes -verfügbar -belegt - -%H: Interrupts -Aufrufe/s -IRQ %di - -%H: Systemlast -Last -1 Minute -5 Minuten -15 Minuten - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.lua deleted file mode 100644 index 2da4be8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.lua +++ /dev/null @@ -1,69 +0,0 @@ -stat_dg_title_wireless__signal_noise = [[%H: Wireless - Signal Noise Ratio]] -stat_dg_label_wireless__signal_noise = [[dBm]] -stat_ds_signal_noise = [[Noise Level]] -stat_ds_signal_power = [[Signal Strength]] -stat_dg_title_wireless__signal_quality = [[%H: Wireless - Signal Quality]] -stat_dg_label_wireless__signal_quality = [[n]] -stat_ds_signal_quality = [[Signal Quality]] -stat_dg_title_ping = [[%H: ICMP Roundtrip Times]] -stat_dg_label_ping = [[ms]] -stat_ds_ping = [[%di]] -stat_dg_title_iptables__ipt_packets = [[%H: Firewall - Processed Packets]] -stat_dg_label_iptables__ipt_packets = [[Packets/s]] -stat_ds_ipt_packets = [[Chain "%di"]] -stat_dg_title_netlink__if_octets = [[%H: Netlink - Transfer on %pi]] -stat_dg_label_netlink__if_octets = [[Bytes/s]] -stat_ds_if_octets = [[Bytes (%ds)]] -stat_dg_title_netlink__if_packets = [[%H: Netlink - Packets on %pi]] -stat_dg_label_netlink__if_packets = [[Packets/s]] -stat_ds_if_packets = [[Processed (%ds)]] -stat_ds_if_dropped = [[Dropped (%ds)]] -stat_ds_if_errors = [[Errors (%ds)]] -stat_dg_title_netlink__if_multicast = [[%H: Netlink - Multicast on %pi]] -stat_dg_label_netlink__if_multicast = [[Packets/s]] -stat_ds_if_multicast = [[Packets]] -stat_dg_title_netlink__if_collisions = [[%H: Netlink - Collisions on %pi]] -stat_dg_label_netlink__if_collisions = [[Collisions/s]] -stat_ds_if_collisions = [[Collisions]] -stat_dg_title_netlink__if_tx_errors = [[%H: Netlink - Errors on %pi]] -stat_dg_label_netlink__if_tx_errors = [[Errors/s]] -stat_ds_if_tx_errors = [[%di]] -stat_ds_if_rx_errors = [[%di]] -stat_dg_title_processes = [[%H: Processes]] -stat_dg_label_processes = [[Processes/s]] -stat_ds_ps_state = [[%di]] -stat_dg_title_processes__ps_cputime = [[%H: Process %pi - used cpu time]] -stat_dg_label_processes__ps_cputime = [[Jiffies]] -stat_ds_ps_cputime__syst = [[system]] -stat_ds_ps_cputime__user = [[user]] -stat_dg_title_processes__ps_count = [[%H: Process %pi - threads and processes]] -stat_dg_label_processes__ps_count = [[Count]] -stat_ds_ps_count = [[%ds]] -stat_dg_title_processes__ps_pagefaults = [[%H: Process %pi - page faults]] -stat_dg_label_processes__ps_pagefaults = [[Pagefaults]] -stat_ds_ps_pagefaults = [[page faults]] -stat_dg_title_processes__ps_rss = [[%H: Process %pi - virtual memory size]] -stat_dg_label_processes__ps_rss = [[Bytes]] -stat_ds_ps_rss = [[virtual memory]] -stat_dg_title_cpu = [[%H: Usage on Processor #%pi]] -stat_dg_label_cpu = [[%]] -stat_ds_cpu = [[%di]] -stat_dg_title_interface__if_octets = [[%H: Transfer on %di]] -stat_dg_label_interface__if_octets = [[Bytes/s]] -stat_dg_title_interface__if_packets = [[%H: Packets on %di]] -stat_dg_label_interface__if_packets = [[Packets/s]] -stat_dg_title_tcpconns = [[%H: TCP-Connections to Port %pi]] -stat_dg_label_tcpconns = [[Connections/s]] -stat_ds_tcp_connections = [[%di]] -stat_dg_title_df = [[%H: Disk Space Usage on %di]] -stat_dg_label_df = [[Bytes]] -stat_ds_df__free = [[%ds]] -stat_ds_df__used = [[%ds]] -stat_dg_title_irq = [[%H: Interrupts]] -stat_dg_label_irq = [[Issues/s]] -stat_ds_irq = [[IRQ %di]] -stat_dg_title_load = [[%H: System Load]] -stat_dg_label_load = [[Load]] -stat_ds_load__shortterm = [[1 min]] -stat_ds_load__midterm = [[5 min]] -stat_ds_load__longterm = [[15 min]] diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.xml.hide b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.xml.hide deleted file mode 100644 index 8e3de05..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.en.xml.hide +++ /dev/null @@ -1,95 +0,0 @@ - - - - -%H: Wireless - Signal Noise Ratio -dBm -Noise Level -Signal Strength - -%H: Wireless - Signal Quality -n -Signal Quality - -%H: ICMP Roundtrip Times -ms -%di - -%H: Firewall - Processed Packets -Packets/s -Chain "%di" - -%H: Netlink - Transfer on %pi -Bytes/s -Bytes (%ds) - -%H: Netlink - Packets on %pi -Packets/s -Processed (%ds) -Dropped (%ds) -Errors (%ds) - -%H: Netlink - Multicast on %pi -Packets/s -Packets - -%H: Netlink - Collisions on %pi -Collisions/s -Collisions - -%H: Netlink - Errors on %pi -Errors/s -%di -%di - -%H: Processes -Processes/s -%di - -%H: Process %pi - used cpu time -Jiffies -system -user - -%H: Process %pi - threads and processes -Count -%ds - -%H: Process %pi - page faults -Pagefaults -page faults - -%H: Process %pi - virtual memory size -Bytes -virtual memory - -%H: Usage on Processor #%pi -% -%di - -%H: Transfer on %di -Bytes/s - -%H: Packets on %di -Packets/s - -%H: TCP-Connections to Port %pi -Connections/s -%di - -%H: Disk Space Usage on %di -Bytes -%ds -%ds - -%H: Interrupts -Issues/s -IRQ %di - -%H: System Load -Load -1 min -5 min -15 min - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.lua deleted file mode 100644 index 708f34c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.lua +++ /dev/null @@ -1,69 +0,0 @@ -stat_dg_title_wireless__signal_noise = '%H: Wireless - Relação Sinal/Ruido' -stat_dg_label_wireless__signal_noise = 'dBm' -stat_ds_signal_noise = 'Nivel de Ruido' -stat_ds_signal_power = 'Forca do Sinal' -stat_dg_title_wireless__signal_quality = '%H: Wireless - Qualidade do Sinal' -stat_dg_label_wireless__signal_quality = 'n' -stat_ds_signal_quality = 'Qualidade do Sinal' -stat_dg_title_ping = '%H: Tempo de resposta ICMP' -stat_dg_label_ping = 'ms' -stat_ds_ping = '%di' -stat_dg_title_iptables__ipt_packets = '%H: Firewall - Pacotes Processados' -stat_dg_label_iptables__ipt_packets = 'Pacote/s' -stat_ds_ipt_packets = 'Cadeia "%di"' -stat_dg_title_netlink__if_octets = '%H: Netlink - Transferencia na %pi' -stat_dg_label_netlink__if_octets = 'Bytes/s' -stat_ds_if_octets = 'Bytes (%ds)' -stat_dg_title_netlink__if_packets = '%H: Netlink - Pacotes na %pi' -stat_dg_label_netlink__if_packets = 'Packets/s' -stat_ds_if_packets = 'Processado (%ds)' -stat_ds_if_dropped = 'Dropado (%ds)' -stat_ds_if_errors = 'Erros (%ds)' -stat_dg_title_netlink__if_multicast = '%H: Netlink - Multicast na %pi' -stat_dg_label_netlink__if_multicast = 'Pacote/s' -stat_ds_if_multicast = 'Pacotes' -stat_dg_title_netlink__if_collisions = '%H: Netlink - Colisoes na %pi' -stat_dg_label_netlink__if_collisions = 'Colisao(es)' -stat_ds_if_collisions = 'Colisoes' -stat_dg_title_netlink__if_tx_errors = '%H: Netlink - Erros na %pi' -stat_dg_label_netlink__if_tx_errors = 'Erro/s' -stat_ds_if_tx_errors = '%di' -stat_ds_if_rx_errors = '%di' -stat_dg_title_processes = '%H: Processos' -stat_dg_label_processes = 'Processo/s' -stat_ds_ps_state = '%di' -stat_dg_title_processes__ps_cputime = '%H: Processo %pi - tempo usado da cpu' -stat_dg_label_processes__ps_cputime = 'Jiffies' -stat_ds_ps_cputime__syst = 'sistema' -stat_ds_ps_cputime__user = 'usuario' -stat_dg_title_processes__ps_count = '%H: Processo %pi - threads e processos' -stat_dg_label_processes__ps_count = 'Contagem' -stat_ds_ps_count = '%ds' -stat_dg_title_processes__ps_pagefaults = '%H: Prcesso %pi - pagina de erros' -stat_dg_label_processes__ps_pagefaults = 'Pagina de erros' -stat_ds_ps_pagefaults = 'pagina de erros' -stat_dg_title_processes__ps_rss = '%H: Processo %pi - tamanho da memoria virtual' -stat_dg_label_processes__ps_rss = 'Bytes' -stat_ds_ps_rss = 'memoria virtual' -stat_dg_title_cpu = '%H: Usado no Processado #%pi' -stat_dg_label_cpu = '%' -stat_ds_cpu = '%di' -stat_dg_title_interface__if_octets = '%H: Transferencia na %di' -stat_dg_label_interface__if_octets = 'Bytes/s' -stat_dg_title_interface__if_packets = '%H: Pacotes na %di' -stat_dg_label_interface__if_packets = 'Pacote/s' -stat_dg_title_tcpconns = '%H: Conexoes TCP na Porta %pi' -stat_dg_label_tcpconns = 'Conexao(oes)' -stat_ds_tcp_connections = '%di' -stat_dg_title_df = '%H: Utilizacao de Espaco em Disco em %di' -stat_dg_label_df = 'Bytes' -stat_ds_df__free = '%ds' -stat_ds_df__used = '%ds' -stat_dg_title_irq = '%H: Interrupcoes' -stat_dg_label_irq = 'Erro/s' -stat_ds_irq = 'IRQ %di' -stat_dg_title_load = '%H: Carga do Sistema' -stat_dg_label_load = 'Carga' -stat_ds_load__shortterm = '1 min' -stat_ds_load__midterm = '5 min' -stat_ds_load__longterm = '15 min' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.xml.hide b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.xml.hide deleted file mode 100644 index 7f369c1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/rrdtool.pt-br.xml.hide +++ /dev/null @@ -1,95 +0,0 @@ - - - - -%H: Wireless - Relação Sinal/Ruido -dBm -Nivel de Ruido -Forca do Sinal - -%H: Wireless - Qualidade do Sinal -n -Qualidade do Sinal - -%H: Tempo de resposta ICMP -ms -%di - -%H: Firewall - Pacotes Processados -Pacote/s -Cadeia "%di" - -%H: Netlink - Transferencia na %pi -Bytes/s -Bytes (%ds) - -%H: Netlink - Pacotes na %pi -Packets/s -Processado (%ds) -Dropado (%ds) -Erros (%ds) - -%H: Netlink - Multicast na %pi -Pacote/s -Pacotes - -%H: Netlink - Colisoes na %pi -Colisao(es) -Colisoes - -%H: Netlink - Erros na %pi -Erro/s -%di -%di - -%H: Processos -Processo/s -%di - -%H: Processo %pi - tempo usado da cpu -Jiffies -sistema -usuario - -%H: Processo %pi - threads e processos -Contagem -%ds - -%H: Prcesso %pi - pagina de erros -Pagina de erros -pagina de erros - -%H: Processo %pi - tamanho da memoria virtual -Bytes -memoria virtual - -%H: Usado no Processador #%pi -% -%di - -%H: Transferencia na %di -Bytes/s - -%H: Pacotes na %di -Pacote/s - -%H: Conexoes TCP na Porta %pi -Conexao(oes) -%di - -%H: Utilizacao de Espaco em Disco em %di -Bytes -%ds -%ds - -%H: Interrupcoes -Erro/s -IRQ %di - -%H: Carga do Sistema -Carga -1 min -5 min -15 min - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.de.lua deleted file mode 100644 index 8273895..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.de.lua +++ /dev/null @@ -1,17 +0,0 @@ -samba = 'Netzwerkfreigaben' -samba_samba_name = 'Hostname' -samba_samba_description = 'Beschreibung' -samba_samba_workgroup = 'Arbeitsgruppe' -samba_samba_homes = 'Heimatverzeichnisse freigeben' -samba_samba_homes_desc = 'Systembenutzer können ihre Heimatverzeichnis über Netzwerkfreigaben erreichen.' -samba_sambashare = 'Dateifreigaben' -samba_sambashare_path = 'Freigabepfad' -samba_sambashare_path_desc = 'Physischer Pfad' -samba_sambashare_users = 'Erlaubte Benutzer' -samba_sambashare_users_desc = 'optional' -samba_sambashare_readonly = 'Nur Lesen' -samba_sambashare_guestok = 'Gäste erlauben' -samba_sambashare_createmask = 'Anlegemaske' -samba_sambashare_createmask_desc = 'Maske für neue Dateien' -samba_sambashare_dirmask = 'Verzeichnismaske' -samba_sambashare_dirmask_desc = 'Maske für neue Verzeichnisse' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.en.lua deleted file mode 100644 index 30e9339..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.en.lua +++ /dev/null @@ -1,17 +0,0 @@ -samba = 'Network Shares' -samba_samba_name = 'Hostname' -samba_samba_description = 'Description' -samba_samba_workgroup = 'Workgroup' -samba_samba_homes = 'Share home-directories' -samba_samba_homes_desc = 'System users can reach their home directories via network shares.' -samba_sambashare = 'Shared Directories' -samba_sambashare_path = 'Shared Directory' -samba_sambashare_path_desc = 'Physical Path' -samba_sambashare_users = 'Allowed Users' -samba_sambashare_users_desc = 'optional' -samba_sambashare_readonly = 'Read Only' -samba_sambashare_guestok = 'Allow Guests' -samba_sambashare_createmask = 'Create Mask' -samba_sambashare_createmask_desc = 'Mask for new files' -samba_sambashare_dirmask = 'Directory Mask' -samba_sambashare_dirmask_desc = 'Mask for new directories' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.pt-br.lua deleted file mode 100644 index 9129ef6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/samba.pt-br.lua +++ /dev/null @@ -1,17 +0,0 @@ -samba = 'Compartilhamentos de Rede' -samba_samba_name = 'Hostname' -samba_samba_description = 'Descrição' -samba_samba_workgroup = 'Grupo de Trabalho' -samba_samba_homes = 'Compartilhar diretórios home' -samba_samba_homes_desc = 'Usuários do sistema poderão acessar seu diretório home através dos compartilhamentos de rede.' -samba_sambashare = 'Diretórios Compartilhados' -samba_sambashare_path = 'Diretório Compartilhado' -samba_sambashare_path_desc = 'Caminho Físico' -samba_sambashare_users = 'Usuários Permitidos' -samba_sambashare_users_desc = 'opcional' -samba_sambashare_readonly = 'Somente Leitura' -samba_sambashare_guestok = 'Permitir Convidados' -samba_sambashare_createmask = 'Criar Máscara' -samba_sambashare_createmask_desc = 'Máscara para novos arquivos' -samba_sambashare_dirmask = 'Máscara do Diretório' -samba_sambashare_dirmask_desc = 'Máscara para novos diretórios' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.de.lua deleted file mode 100644 index 1e2e1f1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.de.lua +++ /dev/null @@ -1,212 +0,0 @@ -stat_statistics = 'Statistiken' -stat_desc = 'Das Statistik-Paket basiert auf Collectd und nutzt RRD Tool um die gesammelten Daten in Diagramme zu rendern.' -stat_systemplugins = 'Systemplugins' -stat_networkplugins = 'Netzwerkplugins' -stat_outputplugins = 'Ausgabeplugins' -stat_showtimespan = 'Zeitspanne zeigen »' -stat_graphs = 'Diagramme' -stat_collectd = 'Collectd' -stat_cpu = 'Prozessor' -stat_ping = 'Ping' -stat_iptables = 'Firewall' -stat_netlink = 'Netlink' -stat_processes = 'Prozesse' -stat_wireless = 'Drahtlos' -stat_tcpconns = 'TCP-Verbindungen' -stat_interface = 'Schnittstellen' -stat_df = 'Plattenspeicher' -stat_irq = 'Interrupts' -stat_disk = 'Plattenauslastung' -stat_exec = 'Exec' -stat_rrdtool = 'RRDTool' -stat_network = 'Netzwerk' -stat_csv = 'CSV Ausgabe' -stat_load = 'Systemlast' -stat_dns = 'DNS' -stat_email = 'Email' -stat_unixsock = 'UnixSock' -lucistatistics = 'Statistiken' -lucistatistics_collectd = 'Collectd Einstellungen' -lucistatistics_collectd_desc = 'Collectd ist ein schlankes Dienstprogramm zum Sammeln von Systemdaten aus verschiedenen Quellen mittels diverser Plugins. Auf dieser Seite können generelle Einstellungen für den Collectd-Daemon vorgenommen werden.' -lucistatistics_collectd_hostname = 'Hostname' -lucistatistics_collectd_basedir = 'Basisverzeichnis' -lucistatistics_collectd_include = 'Verzeichnis für Unterkonfigurationen' -lucistatistics_collectd_plugindir = 'Verzeichnis für Collectd-Plugins' -lucistatistics_collectd_pidfile = 'Pfad zu PID-Datei' -lucistatistics_collectd_typesdb = 'Dataset-Definitionen' -lucistatistics_collectd_interval = 'Daten-Sammelintervall' -lucistatistics_collectd_interval_desc = 'Sekunden' -lucistatistics_collectd_readthreads = 'Anzahl paralleler Sammelprozesse' -lucistatistics_collectd_fqdnlookup = 'automatisch vollen Hostnamen herausfinden' -lucistatistics_collectdcpu = 'CPU Plugin Konfiguration' -lucistatistics_collectdcpu_desc = 'Das CPU-Plugin sammelt grundlegende Statistiken über die Prozessorauslastung.' -lucistatistics_collectdcpu_enable = 'Plugin aktivieren' -lucistatistics_collectdcsv = 'CSV Plugin Konfiguration' -lucistatistics_collectdcsv_desc = 'Das CSV-Plugin speichert die gesammelten Daten im CSV-Format, geeignet für die Weiterverarbeitung durch externe Programme.' -lucistatistics_collectdcsv_enable = 'Plugin aktivieren' -lucistatistics_collectdcsv_datadir = 'Speicherverzeichnis für die CSV-Dateien' -lucistatistics_collectdcsv_storerates = 'Werte nicht absolut sondern als Raten speichern' -lucistatistics_collectddf = 'DF Plugin Konfiguration' -lucistatistics_collectddf_desc = 'Das DF-Plugin sammelt Statistiken über den Speicherverbrauch auf verschiedenen Geräten, Mount-Punkten oder Dateisystemtypen.' -lucistatistics_collectddf_enable = 'Plugin aktivieren' -lucistatistics_collectddf_devices = 'Geräte überwachen' -lucistatistics_collectddf_devices_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectddf_mountpoints = 'Mount-Punkte überwachen' -lucistatistics_collectddf_mountpoints_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectddf_fstypes = 'Datesystemtypen überwachen' -lucistatistics_collectddf_fstypes_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectddf_ignoreselected = 'Alle außer Ausgewählte überwachen' -lucistatistics_collectddisk = 'Disk Plugin Konfiguration' -lucistatistics_collectddisk_desc = 'Das Disk-Plugin sammelt detaillierte Statistiken über die Auslastung auf ausgewählten Festplatten und Partitionen.' -lucistatistics_collectddisk_enable = 'Plugin aktivieren' -lucistatistics_collectddisk_disks = 'Geräte und Partitionen überwachen' -lucistatistics_collectddisk_disks_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectddisk_ignoreselected = 'Alle außer Ausgewählte überwachen' -lucistatistics_collectddns = 'DNS Plugin Konfiguration' -lucistatistics_collectddns_desc = 'Das DNS-Plugin sammelt detaillierte Statistiken über DNS-bezogenen Verkehr auf ausgewählten Schnittstellen.' -lucistatistics_collectddns_enable = 'Plugin aktivieren' -lucistatistics_collectddns_interfaces = 'Schnittstellen überwachen' -lucistatistics_collectddns_interfaces_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectddns_ignoresources = 'Quelladressen ignorieren' -lucistatistics_collectddns_ignoresources_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectdemail = 'E-Mail Plugin Konfiguration' -lucistatistics_collectdemail_desc = 'Das E-Mail Plugin erstellt einen Unix-Socket welcher benutzt werden kann um E-Mail-Statistiken an den laufenden Collectd-Daemon zu übermitteln. Dieses Plugin ist primär für die Verwendung zusammen mit Mail::SpamAssasin::Plugin::Collectd gedacht, kann aber auch anderweitig verwendet werden.' -lucistatistics_collectdemail_enable = 'Plugin aktivieren' -lucistatistics_collectdemail_socketfile = 'Dateipfad des Unix-Sockets' -lucistatistics_collectdemail_socketgroup = 'Gruppenbesitzer festlegen' -lucistatistics_collectdemail_socketgroup_desc = 'Gruppenname' -lucistatistics_collectdemail_socketperms = 'Dateiberechtigungen des Unix-Sockets' -lucistatistics_collectdemail_socketperms_desc = 'oktal' -lucistatistics_collectdemail_maxconns = 'Maximale Anzahl erlaubter Verbindungen' -lucistatistics_collectdexec = 'Exec Plugin Konfiguration' -lucistatistics_collectdexec_desc = 'Das Exec-Plugin startet externe Kommandos um Werte einzulesen oder um Benachrichtigungen auszulösen falls bestimmte Grenzwerte erreicht werden.' -lucistatistics_collectdexec_enable = 'Plugin aktivieren' -lucistatistics_collectdexecinput = 'Kommando zum Werte einlesen hinzufügen' -lucistatistics_collectdexecinput_desc = 'Hier können externe Kommandos definiert werden, welche durch Collectd gestartet werden um Statistik-Werte einzulesen. Die Werte werden dabei vom STDOUT des aufgerufenen Programmes gelesen.' -lucistatistics_collectdexecinput_cmdline = 'Kommandozeile' -lucistatistics_collectdexecinput_cmduser = 'Als Benutzer ausführen' -lucistatistics_collectdexecinput_cmdgroup = 'Als Gruppe ausführen' -lucistatistics_collectdexecnotify = 'Benachrichtigungskommando hinzufügen' -lucistatistics_collectdexecnotify_desc = 'Hier können externe Kommandos definiert werden, welche durch Collectd gestartet werden sobald konfigurierte Grenzwerte erreicht werden. Die Werte welche die Benachrichtigung ausgelöst haben werden dabei an den STDIN des aufgerufenen Programmes übergeben.' -lucistatistics_collectdexecnotify_cmdline = 'Kommandozeile' -lucistatistics_collectdexecnotify_cmduser = 'Als Benutzer ausführen' -lucistatistics_collectdexecnotify_cmdgroup = 'Als Gruppe ausführen' -lucistatistics_collectdinterface = 'Interface Plugin Konfiguration' -lucistatistics_collectdinterface_desc = 'Das Interface-Plugin sammelt allgemeine Verkehrsstatistiken auf ausgewählten Schnittstellen.' -lucistatistics_collectdinterface_enable = 'Plugin aktivieren' -lucistatistics_collectdinterface_interfaces = 'Schnittstellen überwachen' -lucistatistics_collectdinterface_interfaces_desc = 'Strg gedrückt halten um mehrere Schnittstellen zu wählen' -lucistatistics_collectdinterface_ignoreselected = 'Alle außer Ausgewählte überwachen' -lucistatistics_collectdiptables = 'Iptables Plugin Konfiguration' -lucistatistics_collectdiptables_desc = 'Das Iptables-Plugin überwacht ausgewählte Firewall-Regeln und sammelt Werte über die Anzahl der verarbeiteten Pakete und Bytes.' -lucistatistics_collectdiptables_enable = 'Plugin aktivieren' -lucistatistics_collectdiptablesmatch = 'Auswahlregel hinzufügen' -lucistatistics_collectdiptablesmatch_desc = 'Hier werden die Kriterien festgelegt nach welchen die zu überwachenden Firewall-Regeln ausgewählt werden.' -lucistatistics_collectdiptablesmatch_name = 'Name der Regel' -lucistatistics_collectdiptablesmatch_name_desc = 'max. 16 Buchstaben' -lucistatistics_collectdiptablesmatch_table = 'Tabelle' -lucistatistics_collectdiptablesmatch_chain = 'Kette (Chain)' -lucistatistics_collectdiptablesmatch_target = 'Aktion (Target)' -lucistatistics_collectdiptablesmatch_protocol = 'Netzwerkprotokoll' -lucistatistics_collectdiptablesmatch_source = 'Quell-IP-Bereich' -lucistatistics_collectdiptablesmatch_source_desc = 'CIDR-Notation' -lucistatistics_collectdiptablesmatch_destination = 'Ziel-IP-Bereich' -lucistatistics_collectdiptablesmatch_destination_desc = 'CIDR-Notation' -lucistatistics_collectdiptablesmatch_inputif = 'eingehende Schnittstelle' -lucistatistics_collectdiptablesmatch_inputif_desc = 'z.B. br-lan' -lucistatistics_collectdiptablesmatch_outputif = 'ausgehende Schnittstelle' -lucistatistics_collectdiptablesmatch_outputif_desc = 'z.B. br-ff' -lucistatistics_collectdiptablesmatch_options = 'Optionen' -lucistatistics_collectdiptablesmatch_options_desc = 'z.B. reject-with tcp-reset' -lucistatistics_collectdirq = 'IRQ Plugin Konfiguration' -lucistatistics_collectdirq_desc = 'Das IRQ-Plugin überwacht die Anzahl der Aufrufe pro Sekunde für jeden ausgewählten Interrupt. Wird kein Interrupt ausgewählt überwacht das Plugin alle im System vorhandenen Interrupts.' -lucistatistics_collectdirq_enable = 'Plugin aktivieren' -lucistatistics_collectdirq_irqs = 'Interrups überwachen' -lucistatistics_collectdirq_irqs_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectdirq_ignoreselected = 'Alle außer Ausgewählte überwachen' -lucistatistics_collectdload = 'Load Plugin Konfiguration' -lucistatistics_collectdload_desc = 'Das Load-Plugin sammelt Informationen über die allgemeine Systemlast.' -lucistatistics_collectdload_enable = 'Plugin aktivieren' -lucistatistics_collectdnetlink = 'Netlink Plugin Konfiguration' -lucistatistics_collectdnetlink_desc = 'Das Netlink-Plugin sammelt erweiterte QoS-Informationen wie QDisc-, Class- und Filter-Statistiken auf ausgewählten Schnittstellen.' -lucistatistics_collectdnetlink_enable = 'Plugin aktivieren' -lucistatistics_collectdnetlink_interfaces = 'Schnittstellen einfach überwachen' -lucistatistics_collectdnetlink_interfaces_desc = 'Strg gedrückt halten um mehrere zu wählen' -lucistatistics_collectdnetlink_verboseinterfaces = 'Schnittstellen detailliert überwachen' -lucistatistics_collectdnetlink_verboseinterfaces_desc = 'Strg gedrückt halten um mehrere zu wählen' -lucistatistics_collectdnetlink_qdiscs = 'Queue Discipline überwachen' -lucistatistics_collectdnetlink_qdiscs_desc = 'Strg gedrückt halten um mehrere zu wählen' -lucistatistics_collectdnetlink_classes = 'Shapingklassen überwachen' -lucistatistics_collectdnetlink_classes_desc = 'Strg gedrückt halten um mehrere zu wählen' -lucistatistics_collectdnetlink_filters = 'Filterklassen überwachen' -lucistatistics_collectdnetlink_filters_desc = 'Strg gedrückt halten um mehrere zu wählen' -lucistatistics_collectdnetlink_ignoreselected = 'Alle außer Ausgewählte überwachen' -lucistatistics_collectdnetwork = 'Network Plugin Konfiguration' -lucistatistics_collectdnetwork_desc = 'Das Network-Plugin ermöglicht die netzwerkgestützte Kommunikation zwischen verschiedenen Collectd-Instanzen. Collectd kann gleichzeitig im Server- und Client-Modus betrieben werden. Im Client-Modus werden lokal gesammelte Daten an einen Collectd-Server übermittelt, im Server-Modus empfängt die lokale Instanz Daten von anderen Installationen.' -lucistatistics_collectdnetwork_enable = 'Plugin aktivieren' -lucistatistics_collectdnetworklisten = 'Listen-Schnittstelle' -lucistatistics_collectdnetworklisten_desc = 'Diese Sektion legt fest auf welchen Schnittstellen Collectd auf eingehende Verbindungen wartet.' -lucistatistics_collectdnetworklisten_host = 'Listen-Host' -lucistatistics_collectdnetworklisten_host_desc = 'Host-, IP- oder IPv6-Adresse' -lucistatistics_collectdnetworklisten_port = 'Listen-Port' -lucistatistics_collectdnetworklisten_port_desc = '0 - 65535' -lucistatistics_collectdnetworkserver = 'Server-Schnittstellen' -lucistatistics_collectdnetworkserver_desc = 'Diese Sektion legt fest zu welchen Collectd-Servern die lokal gesammelten Daten gesendet werden.' -lucistatistics_collectdnetworkserver_host = 'Server-Host' -lucistatistics_collectdnetworkserver_host_desc = 'Host-, IP- oder IPv6-Adresse' -lucistatistics_collectdnetworkserver_port = 'Server-Port' -lucistatistics_collectdnetworkserver_port_desc = '0 - 65535' -lucistatistics_collectdnetwork_timetolive = 'TTL für Netzwerkpakete' -lucistatistics_collectdnetwork_timetolive_desc = '0 - 255' -lucistatistics_collectdnetwork_forward = 'Weiterleitung zwischen Listen- und Server-Adressen' -lucistatistics_collectdnetwork_cacheflush = 'Cache-Leerungsintervall' -lucistatistics_collectdnetwork_cacheflush_desc = 'Sekunden' -lucistatistics_collectdping = 'Ping Plugin Konfiguration' -lucistatistics_collectdping_desc = 'Das Ping-Plugin sendet ICMP-Echo-Requests an ausgewählte Hosts und misst die Antwortzeiten für jede Adresse.' -lucistatistics_collectdping_enable = 'Plugin aktivieren' -lucistatistics_collectdping_hosts = 'Hosts überwachen' -lucistatistics_collectdping_hosts_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectdping_ttl = 'TTL für Ping Pakete' -lucistatistics_collectdping_ttl_desc = '0 - 255' -lucistatistics_collectdProzesse = 'Prozesse Plugin Konfiguration' -lucistatistics_collectdProzesse_desc = 'Das Prozess-Plugin sammelt Informationen wie CPU-Zeit, Speicherzugriffsfehler und Speicherverbrauch ausgewählter Prozesse.' -lucistatistics_collectdProzesse_enable = 'Plugin aktivieren' -lucistatistics_collectdProzesse_processes = 'Prozesse überwachen' -lucistatistics_collectdProzesse_processes_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectdrrdtool = 'RRDTool Plugin Konfiguration' -lucistatistics_collectdrrdtool_desc = 'Das RRDTool-Plugin speichert die gesammelten Daten in sogenannten RRD-Datenbanken, der Grundlage für die Diagramm-Bilder.

Warnung: Falsche Werte resultieren in einem sehr hohen Speicherverbrauch im temporären Verzeichnis. Das kann das Gerät unbrauchbar machen, da Systemspeicher für den regulären Betrieb fehlt!' -lucistatistics_collectdrrdtool_enable = 'Plugin aktivieren' -lucistatistics_collectdrrdtool_datadir = 'Speicherverzeichnis' -lucistatistics_collectdrrdtool_stepsize = 'RRD Schrittintervall' -lucistatistics_collectdrrdtool_stepsize_desc = 'Sekunden' -lucistatistics_collectdrrdtool_heartbeat = 'RRD Heartbeatintervall' -lucistatistics_collectdrrdtool_heartbeat_desc = 'Sekunden' -lucistatistics_collectdrrdtool_rrasingle = 'Nur 'average' RRAs erzeugen' -lucistatistics_collectdrrdtool_rrasingle_desc = 'reduziert die RRD Größe' -lucistatistics_collectdrrdtool_rratimespans = 'gespeicherte Zeitspannen' -lucistatistics_collectdrrdtool_rratimespans_desc = 'mehrere mit Leerzeichen trennen' -lucistatistics_collectdrrdtool_rrarows = 'Spalten pro RRA' -lucistatistics_collectdrrdtool_xff = 'RRD XFiles Faktor' -lucistatistics_collectdrrdtool_cachetimeout = 'Zwischenspeicherzeit für gesammelte Daten' -lucistatistics_collectdrrdtool_cachetimeout_desc = 'Sekunden' -lucistatistics_collectdrrdtool_cacheflush = 'Leerungsintervall für Zwischenspeicher' -lucistatistics_collectdrrdtool_cacheflush_desc = 'Sekunden' -lucistatistics_collectdtcpconns = 'TCPConns Plugin Konfiguration' -lucistatistics_collectdtcpconns_desc = 'Das TCPConns-Plugin sammelt Informationen über offene TCP-Verbindungen auf ausgewählten Ports.' -lucistatistics_collectdtcpconns_enable = 'Plugin aktivieren' -lucistatistics_collectdtcpconns_listeningports = 'Alle durch lokale Dienste genutzten Ports überwachen' -lucistatistics_collectdtcpconns_localports = 'lokale Ports überwachen' -lucistatistics_collectdtcpconns_localports_desc = '0 - 65535; mehrere mit Leerzeichen trennen' -lucistatistics_collectdtcpconns_remoteports = 'entfernte Ports überwachen' -lucistatistics_collectdtcpconns_remoteports_desc = '0 - 65535; mehrere mit Leerzeichen trennen' -lucistatistics_collectdunixsock = 'Unixsock Plugin Konfiguration' -lucistatistics_collectdunixsock_desc = 'Das Unixsock-Plugin erstellt einen Unix-Socket über welchen gesammelte Werte aus der laufenden Collectd-Instanz ausgelesen werden können.' -lucistatistics_collectdunixsock_enable = 'Plugin aktivieren' -lucistatistics_collectdunixsock_socketfile = 'Dateipfad des Unix-Sockets' -lucistatistics_collectdunixsock_socketgroup = 'Gruppenbesitzer festlegen' -lucistatistics_collectdunixsock_socketgroup_desc = 'Gruppenname' -lucistatistics_collectdunixsock_socketperms = 'Dateiberechtigungen des Unix-Sockets' -lucistatistics_collectdunixsock_socketperms_desc = 'oktal' -lucistatistics_collectdwireless = 'Wireless Plugin Konfiguration' -lucistatistics_collectdwireless_desc = 'Das Wireless-Plugin sammelt Statistiken über die drahtlose Signalstärke, den Störpegel und die Signalqualität.' -lucistatistics_collectdwireless_enable = 'Plugin aktivieren' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.en.lua deleted file mode 100644 index c12b420..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.en.lua +++ /dev/null @@ -1,212 +0,0 @@ -stat_statistics = 'Statistics' -stat_desc = 'The statistics package is based on Collectd and uses RRD Tool to render diagram images from collected data.' -stat_systemplugins = 'System plugins' -stat_networkplugins = 'Network plugins' -stat_outputplugins = 'Output plugins' -stat_showtimespan = 'Display timespan »' -stat_graphs = 'Graphs' -stat_collectd = 'Collectd' -stat_cpu = 'Processor' -stat_ping = 'Ping' -stat_iptables = 'Firewall' -stat_netlink = 'Netlink' -stat_processes = 'Processes' -stat_wireless = 'Wireless' -stat_tcpconns = 'TCP Connections' -stat_interface = 'Interfaces' -stat_df = 'Disk Space Usage' -stat_irq = 'Interrupts' -stat_disk = 'Disk Usage' -stat_exec = 'Exec' -stat_rrdtool = 'RRDTool' -stat_network = 'Network' -stat_csv = 'CSV Output' -stat_load = 'System Load' -stat_dns = 'DNS' -stat_email = 'Email' -stat_unixsock = 'UnixSock' -lucistatistics = 'Statistics' -lucistatistics_collectd = 'Collectd Settings' -lucistatistics_collectd_desc = 'Collectd is a small daeomon for collecting data from various sources through different plugins. On this page you can change general settings for the collectd daemon.' -lucistatistics_collectd_hostname = 'Hostname' -lucistatistics_collectd_basedir = 'Base Directory' -lucistatistics_collectd_include = 'Directory for sub-configurations' -lucistatistics_collectd_plugindir = 'Directory for collectd plugins' -lucistatistics_collectd_pidfile = 'Used PID file' -lucistatistics_collectd_typesdb = 'Datasets definition file' -lucistatistics_collectd_interval = 'Data collection interval' -lucistatistics_collectd_interval_desc = 'Seconds' -lucistatistics_collectd_readthreads = 'Number of threads for data collection' -lucistatistics_collectd_fqdnlookup = 'Try to lookup fully qualified hostname' -lucistatistics_collectdcpu = 'CPU Plugin Configuration' -lucistatistics_collectdcpu_desc = 'The cpu plugin collects basic statistics about the processor usage.' -lucistatistics_collectdcpu_enable = 'Enable this plugin' -lucistatistics_collectdcsv = 'CSV Plugin Configuration' -lucistatistics_collectdcsv_desc = 'The csv plugin stores collected data in csv file format for further processing by external programs.' -lucistatistics_collectdcsv_enable = 'Enable this plugin' -lucistatistics_collectdcsv_datadir = 'Storage directory for the csv files' -lucistatistics_collectdcsv_storerates = 'Store data values as rates instead of absolute values' -lucistatistics_collectddf = 'DF Plugin Configuration' -lucistatistics_collectddf_desc = 'The df plugin collects statistics about the disk space usage on different devices, mount points or filesystem types.' -lucistatistics_collectddf_enable = 'Enable this plugin' -lucistatistics_collectddf_devices = 'Monitor devices' -lucistatistics_collectddf_devices_desc = 'multiple separated by space' -lucistatistics_collectddf_mountpoints = 'Monitor mount points' -lucistatistics_collectddf_mountpoints_desc = 'multiple separated by space' -lucistatistics_collectddf_fstypes = 'Monitor filesystem types' -lucistatistics_collectddf_fstypes_desc = 'multiple separated by space' -lucistatistics_collectddf_ignoreselected = 'Monitor all except selected ones' -lucistatistics_collectddisk = 'Disk Plugin Configuration' -lucistatistics_collectddisk_desc = 'The disk plugin collects detailled usage statistics for selected partitions or whole disks.' -lucistatistics_collectddisk_enable = 'Enable this plugin' -lucistatistics_collectddisk_disks = 'Monitor disks and partitions' -lucistatistics_collectddisk_disks_desc = 'multiple separated by space' -lucistatistics_collectddisk_ignoreselected = 'Monitor all except selected ones' -lucistatistics_collectddns = 'DNS Plugin Configuration' -lucistatistics_collectddns_desc = 'The dns plugin collects detailled statistics about dns related traffic on selected interfaces.' -lucistatistics_collectddns_enable = 'Enable this plugin' -lucistatistics_collectddns_interfaces = 'Monitor interfaces' -lucistatistics_collectddns_interfaces_desc = 'multiple separated by space' -lucistatistics_collectddns_ignoresources = 'Ignore source addresses' -lucistatistics_collectddns_ignoresources_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdemail = 'E-Mail Plugin Configuration' -lucistatistics_collectdemail_desc = 'The email plugin creates a unix socket which can be used to transmit email-statistics to a running collectd daemon. This plugin is primarily intended to be used in conjunction with Mail::SpamAssasin::Plugin::Collectd but can be used in other ways as well.' -lucistatistics_collectdemail_enable = 'Enable this plugin' -lucistatistics_collectdemail_socketfile = 'Filepath of the unix socket' -lucistatistics_collectdemail_socketgroup = 'Group ownership of the unix socket' -lucistatistics_collectdemail_socketgroup_desc = 'group name' -lucistatistics_collectdemail_socketperms = 'File permissions of the unix socket' -lucistatistics_collectdemail_socketperms_desc = 'octal' -lucistatistics_collectdemail_maxconns = 'Maximum allowed connections' -lucistatistics_collectdexec = 'Exec Plugin Configuration' -lucistatistics_collectdexec_desc = 'The exec plugin starts external commands to read values from or to notify external processes when certain threshold values have been reached.' -lucistatistics_collectdexec_enable = 'Enable this plugin' -lucistatistics_collectdexecinput = 'Add command for reading values' -lucistatistics_collectdexecinput_desc = 'Here you can define external commands which will be started by collectd in order to read certain values. The values will be read from stdout.' -lucistatistics_collectdexecinput_cmdline = 'Commandline' -lucistatistics_collectdexecinput_cmduser = 'Run as user' -lucistatistics_collectdexecinput_cmdgroup = 'Run as group' -lucistatistics_collectdexecnotify = 'Add notification command' -lucistatistics_collectdexecnotify_desc = 'Here you can define external commands which will be started by collectd when certain threshold values have been reached. The values leading to invokation will be feeded to the the called programs stdin.' -lucistatistics_collectdexecnotify_cmdline = 'Commandline' -lucistatistics_collectdexecnotify_cmduser = 'Run as user' -lucistatistics_collectdexecnotify_cmdgroup = 'Run as group' -lucistatistics_collectdinterface = 'Interface Plugin Configuration' -lucistatistics_collectdinterface_desc = 'The interface plugin collects traffic statistics on selected interfaces.' -lucistatistics_collectdinterface_enable = 'Enable this plugin' -lucistatistics_collectdinterface_interfaces = 'Monitor interfaces' -lucistatistics_collectdinterface_interfaces_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdinterface_ignoreselected = 'Monitor all except selected ones' -lucistatistics_collectdiptables = 'Iptables Plugin Configuration' -lucistatistics_collectdiptables_desc = 'The iptables plugin will monitor selected firewall rules and collect informations about processed bytes and packets per rule.' -lucistatistics_collectdiptables_enable = 'Enable this plugin' -lucistatistics_collectdiptablesmatch = 'Add matching rule' -lucistatistics_collectdiptablesmatch_desc = 'Here you can define various criteria by which the monitored iptables rules are selected.' -lucistatistics_collectdiptablesmatch_name = 'Name of the rule' -lucistatistics_collectdiptablesmatch_name_desc = 'max. 16 chars' -lucistatistics_collectdiptablesmatch_table = 'Table' -lucistatistics_collectdiptablesmatch_chain = 'Chain' -lucistatistics_collectdiptablesmatch_target = 'Action (target)' -lucistatistics_collectdiptablesmatch_protocol = 'Network protocol' -lucistatistics_collectdiptablesmatch_source = 'Source ip range' -lucistatistics_collectdiptablesmatch_source_desc = 'CIDR notation' -lucistatistics_collectdiptablesmatch_destination = 'Destination ip range' -lucistatistics_collectdiptablesmatch_destination_desc = 'CIDR notation' -lucistatistics_collectdiptablesmatch_inputif = 'Incoming interface' -lucistatistics_collectdiptablesmatch_inputif_desc = 'e.g. br-lan' -lucistatistics_collectdiptablesmatch_outputif = 'Outgoing interface' -lucistatistics_collectdiptablesmatch_outputif_desc = 'e.g. br-ff' -lucistatistics_collectdiptablesmatch_options = 'Options' -lucistatistics_collectdiptablesmatch_options_desc = 'e.g. reject-with tcp-reset' -lucistatistics_collectdirq = 'IRQ Plugin Configuration' -lucistatistics_collectdirq_desc = 'The irq plugin will monitor the rate of issues per second for each selected interrupt. If no interrupt is selected then all interrupts are monitored.' -lucistatistics_collectdirq_enable = 'Enable this plugin' -lucistatistics_collectdirq_irqs = 'Monitor interrupts' -lucistatistics_collectdirq_irqs_desc = 'multiple separated by space' -lucistatistics_collectdirq_ignoreselected = 'Monitor all except selected ones' -lucistatistics_collectdload = 'Load Plugin Configuration' -lucistatistics_collectdload_desc = 'The load plugin collects statistics about the general system load.' -lucistatistics_collectdload_enable = 'Enable this plugin' -lucistatistics_collectdnetlink = 'Netlink Plugin Configuration' -lucistatistics_collectdnetlink_desc = 'The netlink plugin collects extended informations like qdisc-, class- and filter-statistics for selected interfaces.' -lucistatistics_collectdnetlink_enable = 'Enable this plugin' -lucistatistics_collectdnetlink_interfaces = 'Basic monitoring' -lucistatistics_collectdnetlink_interfaces_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdnetlink_verboseinterfaces = 'Verbose monitoring' -lucistatistics_collectdnetlink_verboseinterfaces_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdnetlink_qdiscs = 'Qdisc monitoring' -lucistatistics_collectdnetlink_qdiscs_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdnetlink_classes = 'Shaping class monitoring' -lucistatistics_collectdnetlink_classes_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdnetlink_filters = 'Filter class monitoring' -lucistatistics_collectdnetlink_filters_desc = 'hold Ctrl while clicking to select multiple interfaces' -lucistatistics_collectdnetlink_ignoreselected = 'Monitor all except selected ones' -lucistatistics_collectdnetwork = 'Network Plugin Configuration' -lucistatistics_collectdnetwork_desc = 'The network plugin provides network based communication between different collectd instances. Collectd can operate both in client and server mode. In client mode locally collected date is transferred to a collectd server instance, in server mode the local instance receives data from other hosts.' -lucistatistics_collectdnetwork_enable = 'Enable this plugin' -lucistatistics_collectdnetworklisten = 'Listener interfaces' -lucistatistics_collectdnetworklisten_desc = 'This section defines on which interfaces collectd will wait for incoming connections.' -lucistatistics_collectdnetworklisten_host = 'Listen host' -lucistatistics_collectdnetworklisten_host_desc = 'host-, ip- or ip6 address' -lucistatistics_collectdnetworklisten_port = 'Listen port' -lucistatistics_collectdnetworklisten_port_desc = '0 - 65535' -lucistatistics_collectdnetworkserver = 'server interfaces' -lucistatistics_collectdnetworkserver_desc = 'This section defines to which servers the locally collected data is sent to.' -lucistatistics_collectdnetworkserver_host = 'Server host' -lucistatistics_collectdnetworkserver_host_desc = 'host-, ip- or ip6 address' -lucistatistics_collectdnetworkserver_port = 'Server port' -lucistatistics_collectdnetworkserver_port_desc = '0 - 65535' -lucistatistics_collectdnetwork_timetolive = 'TTL for network packets' -lucistatistics_collectdnetwork_timetolive_desc = '0 - 255' -lucistatistics_collectdnetwork_forward = 'Forwarding between listen and server addresses' -lucistatistics_collectdnetwork_cacheflush = 'Cache flush interval' -lucistatistics_collectdnetwork_cacheflush_desc = 'seconds' -lucistatistics_collectdping = 'Ping Plugin Configuration' -lucistatistics_collectdping_desc = 'The ping plugin will send icmp echo replies to selected hosts and measure the roundtrip time for each host.' -lucistatistics_collectdping_enable = 'Enable this plugin' -lucistatistics_collectdping_hosts = 'Monitor hosts' -lucistatistics_collectdping_hosts_desc = 'multiple separated by space' -lucistatistics_collectdping_ttl = 'TTL for ping packets' -lucistatistics_collectdping_ttl_desc = '0 - 255' -lucistatistics_collectdprocesses = 'Processes Plugin Configuration' -lucistatistics_collectdprocesses_desc = 'The processes plugin collects informations like cpu time, page faults and memory usage of selected processes.' -lucistatistics_collectdprocesses_enable = 'Enable this plugin' -lucistatistics_collectdprocesses_processes = 'Monitor processes' -lucistatistics_collectdprocesses_processes_desc = 'multiple separated by space' -lucistatistics_collectdrrdtool = 'RRDTool Plugin Configuration' -lucistatistics_collectdrrdtool_desc = 'The rrdtool plugin stores the collected data in rrd database files, the foundation of the diagrams.

Warning: Setting the wrong values will result in a very high memory consumption in the temporary directory. This can render the device unusable!' -lucistatistics_collectdrrdtool_enable = 'Enable this plugin' -lucistatistics_collectdrrdtool_datadir = 'Storage directory' -lucistatistics_collectdrrdtool_stepsize = 'RRD step interval' -lucistatistics_collectdrrdtool_stepsize_desc = 'seconds' -lucistatistics_collectdrrdtool_heartbeat = 'RRD heart beat interval' -lucistatistics_collectdrrdtool_heartbeat_desc = 'seconds' -lucistatistics_collectdrrdtool_rrasingle = 'Only create average RRAs' -lucistatistics_collectdrrdtool_rrasingle_desc = 'reduces rrd size' -lucistatistics_collectdrrdtool_rratimespans = 'Stored timespans' -lucistatistics_collectdrrdtool_rratimespans_desc = 'seconds; multiple separated by space' -lucistatistics_collectdrrdtool_rrarows = 'Rows per RRA' -lucistatistics_collectdrrdtool_xff = 'RRD XFiles Factor' -lucistatistics_collectdrrdtool_cachetimeout = 'Cache collected data for' -lucistatistics_collectdrrdtool_cachetimeout_desc = 'seconds' -lucistatistics_collectdrrdtool_cacheflush = 'Flush cache after' -lucistatistics_collectdrrdtool_cacheflush_desc = 'seconds' -lucistatistics_collectdtcpconns = 'TCPConns Plugin Configuration' -lucistatistics_collectdtcpconns_desc = 'The tcpconns plugin collects informations about open tcp connections on selected ports.' -lucistatistics_collectdtcpconns_enable = 'Enable this plugin' -lucistatistics_collectdtcpconns_listeningports = 'Monitor all local listen ports' -lucistatistics_collectdtcpconns_localports = 'Monitor local ports' -lucistatistics_collectdtcpconns_localports_desc = '0 - 65535; multiple separated by space' -lucistatistics_collectdtcpconns_remoteports = 'Monitor remote ports' -lucistatistics_collectdtcpconns_remoteports_desc = '0 - 65535; multiple separated by space' -lucistatistics_collectdunixsock = 'Unixsock Plugin Configuration' -lucistatistics_collectdunixsock_desc = 'The unixsock plugin creates a unix socket which can be used to read collected data from a running collectd instance.' -lucistatistics_collectdunixsock_enable = 'Enable this plugin' -lucistatistics_collectdunixsock_socketfile = 'Filepath of the unix socket' -lucistatistics_collectdunixsock_socketgroup = 'Group ownership of the unix socket' -lucistatistics_collectdunixsock_socketgroup_desc = 'group name' -lucistatistics_collectdunixsock_socketperms = 'File permissions of the unix socket' -lucistatistics_collectdunixsock_socketperms_desc = 'octal' -lucistatistics_collectdwireless = 'Wireless Plugin Configuration' -lucistatistics_collectdwireless_desc = 'The wireless plugin collects statistics about wireless signal strength, noise and quality.' -lucistatistics_collectdwireless_enable = 'Enable this plugin' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.pt-br.lua deleted file mode 100644 index e2b5cac..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/statistics.pt-br.lua +++ /dev/null @@ -1,212 +0,0 @@ -stat_statistics = 'Estatísticas' -stat_desc = 'As estatísticas são baseadas no Collectd e é utilizado o RRD Tool para renderização das imagens à partir dos dados coletados.' -stat_systemplugins = 'Plugis de Sistema' -stat_networkplugins = 'Plugins de rede' -stat_outputplugins = 'Plugins de saída' -stat_showtimespan = 'Mostrar intervalo »' -stat_graphs = 'Gráficos' -stat_collectd = 'Collectd' -stat_cpu = 'Processador' -stat_ping = 'Ping' -stat_iptables = 'Firewall' -stat_netlink = 'Netlink' -stat_processes = 'Processos' -stat_wireless = 'Wireless' -stat_tcpconns = 'Conexões TCP' -stat_interface = 'Interfaces' -stat_df = 'Utilização de espaço em disco' -stat_irq = 'Interrupções' -stat_disk = 'Utilização do Disco' -stat_exec = 'Exec' -stat_rrdtool = 'RRDTool' -stat_network = 'Rede' -stat_csv = 'Formato CSV' -stat_load = 'Carga do Sistema' -stat_dns = 'DNS' -stat_email = 'Email' -stat_unixsock = 'UnixSock' -lucistatistics = 'Estatísticas' -lucistatistics_collectd = 'Configurações do Collectd' -lucistatistics_collectd_desc = 'Collectd é um pequeno daemon que coleta dados de várias fontes através de diferentes plugins. Nesta página você pode alterar as configurações gerais do daemon collectd.' -lucistatistics_collectd_hostname = 'Hostname' -lucistatistics_collectd_basedir = 'Diretório Base' -lucistatistics_collectd_include = 'Diretório para sub-configurações' -lucistatistics_collectd_plugindir = 'Diretório para os plugins do collectd' -lucistatistics_collectd_pidfile = 'Arquivo PID usado' -lucistatistics_collectd_typesdb = 'Arquivo com a definição de dados' -lucistatistics_collectd_interval = 'Intervalo da coleta de dados' -lucistatistics_collectd_interval_desc = 'Segundos' -lucistatistics_collectd_readthreads = 'Número de threads para o coletor de dados' -lucistatistics_collectd_fqdnlookup = 'Tentar encontrar o nome do host completo (FQDN)' -lucistatistics_collectdcpu = 'Configuração do plugin CPU' -lucistatistics_collectdcpu_desc = 'O plugin cpu coleta as estatísticas básicas sobre o uso do processador.' -lucistatistics_collectdcpu_enable = 'Habilitar este plugin' -lucistatistics_collectdcsv = 'Configuração do plugin CSV' -lucistatistics_collectdcsv_desc = 'O plugin csv armazena os dados coletados em um arquivo no formato csv para um futuro processamento por outros programas.' -lucistatistics_collectdcsv_enable = 'Habilitar este plugin' -lucistatistics_collectdcsv_datadir = 'Diretório para armazenamento dos arquivos csv' -lucistatistics_collectdcsv_storerates = 'Armazenar os valores dos dados como taxas em vez de valores absolutos' -lucistatistics_collectddf = 'Configuração do plugin DF' -lucistatistics_collectddf_desc = 'O plugin df coleta estatísticas sobre a utilização de espaço em disco em diferentes dispositivos, pontos de montagem ou tipos de sistemas de arquivos.' -lucistatistics_collectddf_enable = 'Habilitar este plugin' -lucistatistics_collectddf_devices = 'Monitorar dispositivos' -lucistatistics_collectddf_devices_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectddf_mountpoints = 'Monitorar pontos de montagem' -lucistatistics_collectddf_mountpoints_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectddf_fstypes = 'Monitorar tipos de sistemas de arquivos' -lucistatistics_collectddf_fstypes_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectddf_ignoreselected = 'Monitorar tudo exceto os selecionados' -lucistatistics_collectddisk = 'Configuração do plugin Disco' -lucistatistics_collectddisk_desc = 'O plugin disco coleta estatísticas de uso detalhadas das partições selecionadas ou discos inteiros.' -lucistatistics_collectddisk_enable = 'Habilitar este plugin' -lucistatistics_collectddisk_disks = 'Monitoras discos e partições' -lucistatistics_collectddisk_disks_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectddisk_ignoreselected = 'Monitorar tudo exceto os selecionados' -lucistatistics_collectddns = 'Configuração do plugin DNS' -lucistatistics_collectddns_desc = 'O plugin dns coleta estatísticas detalhadas sobre o tráfego do dns nas interfaces selecionadas.' -lucistatistics_collectddns_enable = 'Habilitar este plugin' -lucistatistics_collectddns_interfaces = 'Monitorar interfaces' -lucistatistics_collectddns_interfaces_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectddns_ignoresources = 'Ignorar endereços de origem' -lucistatistics_collectddns_ignoresources_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdemail = 'Configuração do plugin E-Mail' -lucistatistics_collectdemail_desc = 'O plugin de email cria um socket unix que pode ser usado para transmitir estatísticas de email o daemon collectd. Este plugin é essencialmente destinado a ser utilizado em conjunto com o plugin Mail::SpamAssasin::Plugin::Collectd mas pode ser utilizado de outras maneiras também.' -lucistatistics_collectdemail_enable = 'Habilitar este plugin' -lucistatistics_collectdemail_socketfile = 'Caminho do arquivo do socket unix' -lucistatistics_collectdemail_socketgroup = 'Grupo dono do socket unix' -lucistatistics_collectdemail_socketgroup_desc = 'nome do grupo' -lucistatistics_collectdemail_socketperms = 'Permissões de arquivo do socket unix' -lucistatistics_collectdemail_socketperms_desc = 'octal' -lucistatistics_collectdemail_maxconns = 'Máximo de conexões permitidas' -lucistatistics_collectdexec = 'Configuração do plugin Exec' -lucistatistics_collectdexec_desc = 'O plugin exec inicia comandos externos para leitura de valores ou notificar processos externos quando um determinado valor limite for atingido.' -lucistatistics_collectdexec_enable = 'Habilitar este plugin' -lucistatistics_collectdexecinput = 'Adicionar comando para leitura de valores' -lucistatistics_collectdexecinput_desc = 'Aqui você pode definir comandos externos que serão iniciados pelo collectd a fim de ler determinados valores. Os valores serão lidos a partir do stdout.' -lucistatistics_collectdexecinput_cmdline = 'Linha de comando' -lucistatistics_collectdexecinput_cmduser = 'Executar como usuário' -lucistatistics_collectdexecinput_cmdgroup = 'Executar como grupo' -lucistatistics_collectdexecnotify = 'Adicionar o comando de notificação' -lucistatistics_collectdexecnotify_desc = 'Aqui você pode definir os comandos externos que serão iniciados pelo collectd quando determinados valores limite forem atingidos. Os valores passados ao comando serão enviados para o stdin.' -lucistatistics_collectdexecnotify_cmdline = 'Linha de comando' -lucistatistics_collectdexecnotify_cmduser = 'Executar como usuário' -lucistatistics_collectdexecnotify_cmdgroup = 'Executar como grupo' -lucistatistics_collectdinterface = 'Configuração do plugin Interface' -lucistatistics_collectdinterface_desc = 'O plugin interface plugin coleta estatísticas sobre o tráfego das interfaces selecionadas.' -lucistatistics_collectdinterface_enable = 'Habilitar este plugin' -lucistatistics_collectdinterface_interfaces = 'Monitorar interfaces' -lucistatistics_collectdinterface_interfaces_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdinterface_ignoreselected = 'Monitorar todas exceto as selecionadas' -lucistatistics_collectdiptables = 'Configuração do plugin Iptables' -lucistatistics_collectdiptables_desc = 'O plugin iptables irá monitorar as regras de firewall selecionadas e coletar informações sobre pacotes e bytes processados pela regra.' -lucistatistics_collectdiptables_enable = 'Habilitar este plugin' -lucistatistics_collectdiptablesmatch = 'Adicionar regra' -lucistatistics_collectdiptablesmatch_desc = 'Aqui você pode definir diversos critérios para as regras iptables selecionadas serem monitoradas.' -lucistatistics_collectdiptablesmatch_name = 'Nome da regra' -lucistatistics_collectdiptablesmatch_name_desc = 'max. 16 caract.' -lucistatistics_collectdiptablesmatch_table = 'Tabela' -lucistatistics_collectdiptablesmatch_chain = 'Cadeia' -lucistatistics_collectdiptablesmatch_target = 'Ação (destino)' -lucistatistics_collectdiptablesmatch_protocol = 'Protocolo de rede' -lucistatistics_collectdiptablesmatch_source = 'IP de origem' -lucistatistics_collectdiptablesmatch_source_desc = 'Notação CIDR' -lucistatistics_collectdiptablesmatch_destination = 'IP de destino' -lucistatistics_collectdiptablesmatch_destination_desc = 'Notação CIDR' -lucistatistics_collectdiptablesmatch_inputif = 'Interface de entrada' -lucistatistics_collectdiptablesmatch_inputif_desc = 'ex. br-lan' -lucistatistics_collectdiptablesmatch_outputif = 'Interface de saída' -lucistatistics_collectdiptablesmatch_outputif_desc = 'ex. br-ff' -lucistatistics_collectdiptablesmatch_options = 'Opções' -lucistatistics_collectdiptablesmatch_options_desc = 'ex. rejeitar-com tcp-reset' -lucistatistics_collectdirq = 'Configuração do plugin IRQ' -lucistatistics_collectdirq_desc = 'O plugin irq irá monitorar a taxa de erros por segundo de cada interrupção selecionada. Se nenhuma interrupção for selecionada então todas as interrupções serão monitoradas.' -lucistatistics_collectdirq_enable = 'Habilitar este plugin' -lucistatistics_collectdirq_irqs = 'Monitorar interrupções' -lucistatistics_collectdirq_irqs_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectdirq_ignoreselected = 'Monitorar todas exceto as selecionadas' -lucistatistics_collectdload = 'Configuração do plugin carga' -lucistatistics_collectdload_desc = 'O plugin carga coleta estatísticas gerais sobre a carga do sistema.' -lucistatistics_collectdload_enable = 'Habilitar este plugin' -lucistatistics_collectdnetlink = 'Configuração do plugin Netlink' -lucistatistics_collectdnetlink_desc = 'O plugin Netlink coleta informações detalhadas como qdisc-, classe- e filtro de estatísticas das interfaces selecionadas.' -lucistatistics_collectdnetlink_enable = 'Habilitar este plugin' -lucistatistics_collectdnetlink_interfaces = 'Monitoramento básico' -lucistatistics_collectdnetlink_interfaces_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdnetlink_verboseinterfaces = 'Monitoramento no modo verbose' -lucistatistics_collectdnetlink_verboseinterfaces_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdnetlink_qdiscs = 'Monitoramento do Qdisc' -lucistatistics_collectdnetlink_qdiscs_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdnetlink_classes = 'Monitoramento das Classes de Shaping' -lucistatistics_collectdnetlink_classes_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdnetlink_filters = 'Monitoramento das Classes de Filtros' -lucistatistics_collectdnetlink_filters_desc = 'pressione Ctrl enquanto clica para selecionar várias interfaces' -lucistatistics_collectdnetlink_ignoreselected = 'Monitorar todas exceto as selecionadas' -lucistatistics_collectdnetwork = 'Configuração do plugin Rede' -lucistatistics_collectdnetwork_desc = 'O plugin rede fornece informações de rede baseadas na comunicação entre as diferentes instâncias do collectd. O Collectd pode operar tanto no modo cliente quanto no modo servidor. No modo cliente os dados coletados localmente são transferidos para um servidor collectd, no modo de servidor a instância local recebe dados de outros hosts.' -lucistatistics_collectdnetwork_enable = 'Habilitar este plugin' -lucistatistics_collectdnetworklisten = 'Escutar na(s) interface(s)' -lucistatistics_collectdnetworklisten_desc = 'Esta seção define em quais interfaces o collectd irá aguardar para receber conexões.' -lucistatistics_collectdnetworklisten_host = 'Endereço de escuta do Host' -lucistatistics_collectdnetworklisten_host_desc = 'hostname, ip ou ip6' -lucistatistics_collectdnetworklisten_port = 'Porta de escuta' -lucistatistics_collectdnetworklisten_port_desc = '0 - 65535' -lucistatistics_collectdnetworkserver = 'Interfaces do servidor' -lucistatistics_collectdnetworkserver_desc = 'Esta seção define para qual servidor os dados coletados localmente serão enviados.' -lucistatistics_collectdnetworkserver_host = 'IP/Hostname do servidor' -lucistatistics_collectdnetworkserver_host_desc = 'hostname, ip ou ip6' -lucistatistics_collectdnetworkserver_port = 'Porta do servidor' -lucistatistics_collectdnetworkserver_port_desc = '0 - 65535' -lucistatistics_collectdnetwork_timetolive = 'TTL para os pacotes de rede' -lucistatistics_collectdnetwork_timetolive_desc = '0 - 255' -lucistatistics_collectdnetwork_forward = 'Transmissão entre o endereço de escuta e dos servidores' -lucistatistics_collectdnetwork_cacheflush = 'Intervalo de limpeza do cache' -lucistatistics_collectdnetwork_cacheflush_desc = 'segundos' -lucistatistics_collectdping = 'Configuração do plugin Ping' -lucistatistics_collectdping_desc = 'O plugin ping irá enviar pacotes ICMP to tipo echo aos hosts selecionados e medir o tempo de resposta para cada host.' -lucistatistics_collectdping_enable = 'Habilitar este plugin' -lucistatistics_collectdping_hosts = 'Monitorar os hosts' -lucistatistics_collectdping_hosts_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectdping_ttl = 'TTL para os pacotes do ping' -lucistatistics_collectdping_ttl_desc = '0 - 255' -lucistatistics_collectdprocesses = 'Configuração do plugin Processos' -lucistatistics_collectdprocesses_desc = 'O plugin processo coleta informações como o tempo da cpu, página falhas e uso de memória dos processos selecionados.' -lucistatistics_collectdprocesses_enable = 'Habilitar este plugin' -lucistatistics_collectdprocesses_processes = 'Monitorar processos' -lucistatistics_collectdprocesses_processes_desc = 'múltiplos valores, separados por espaço' -lucistatistics_collectdrrdtool = 'Configuração do plugin RRDTool' -lucistatistics_collectdrrdtool_desc = 'O plugin rrdtool armazena os dados coletados no arquivo de banco de dados rrd.

Aviso: A má configuração desses valores, resultará em um valor muito elevado no consumo de memória no diretório temporário. Isso pode tornar o equipamento inutilizável!' -lucistatistics_collectdrrdtool_enable = 'Habilitar este plugin' -lucistatistics_collectdrrdtool_datadir = 'Diretório de armazenamento' -lucistatistics_collectdrrdtool_stepsize = 'Intervalo de atualização' -lucistatistics_collectdrrdtool_stepsize_desc = 'segundos' -lucistatistics_collectdrrdtool_heartbeat = 'Intervalo entre duas atualizações' -lucistatistics_collectdrrdtool_heartbeat_desc = 'segundos' -lucistatistics_collectdrrdtool_rrasingle = 'Somente criar RRAs de média' -lucistatistics_collectdrrdtool_rrasingle_desc = 'reduzir o tamanho do rrd' -lucistatistics_collectdrrdtool_rratimespans = 'Intervalos armazenados' -lucistatistics_collectdrrdtool_rratimespans_desc = 'segundos; vários valores, separar com espaço' -lucistatistics_collectdrrdtool_rrarows = 'Linhas por RRA' -lucistatistics_collectdrrdtool_xff = 'Arquivos RRD XFiles Factor' -lucistatistics_collectdrrdtool_cachetimeout = 'Cache dos dados coletados' -lucistatistics_collectdrrdtool_cachetimeout_desc = 'segundos' -lucistatistics_collectdrrdtool_cacheflush = 'Limpar cache após' -lucistatistics_collectdrrdtool_cacheflush_desc = 'segundos' -lucistatistics_collectdtcpconns = 'Configuração do plugin TCPConns' -lucistatistics_collectdtcpconns_desc = 'O plugin tcpconns coleta informações sobre as conexões TCP abertas das portas selecionadas.' -lucistatistics_collectdtcpconns_enable = 'Habilitar este plugin' -lucistatistics_collectdtcpconns_listeningports = 'Monitorar todas as portas locais' -lucistatistics_collectdtcpconns_localports = 'Monitorar as portas locais' -lucistatistics_collectdtcpconns_localports_desc = '0 - 65535; vários valores, separar com espaço' -lucistatistics_collectdtcpconns_remoteports = 'Monitorar portas remotas' -lucistatistics_collectdtcpconns_remoteports_desc = '0 - 65535; vários valores, separar com espaço' -lucistatistics_collectdunixsock = 'Configuração do plugin Unixsock' -lucistatistics_collectdunixsock_desc = 'O plugin unixsock cria um socket unix, que pode ser usado para ler os dados coletados a partir de uma instância do collectd.' -lucistatistics_collectdunixsock_enable = 'Habilitar este plugin' -lucistatistics_collectdunixsock_socketfile = 'Caminho do arquivo socket unix' -lucistatistics_collectdunixsock_socketgroup = 'Grupo dono do socket unix' -lucistatistics_collectdunixsock_socketgroup_desc = 'nome do grupo' -lucistatistics_collectdunixsock_socketperms = 'Permissões de arquivo do socket unix' -lucistatistics_collectdunixsock_socketperms_desc = 'octal' -lucistatistics_collectdwireless = 'Configuração do plugin Wireless' -lucistatistics_collectdwireless_desc = 'O plugin wireless coleta estatísticas sobre o nível de sinal wireless, o ruído e qualidade.' -lucistatistics_collectdwireless_enable = 'Habilitar este plugin' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.de.lua deleted file mode 100644 index 164064b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.de.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'Autorisation benötigt' -sysauth_prompt = 'Bitte Benutzernamen und Passwort eingeben.' -sysauth_failed = 'Ungültiger Benutzername und/oder ungültiges Passwort! Bitte nocheinmal versuchen.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.en.lua deleted file mode 100644 index 2a8759f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.en.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'Authorization Required' -sysauth_prompt = 'Please enter your username and password.' -sysauth_failed = 'Invalid username and/or password! Please try again.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.fr.lua deleted file mode 100644 index 341fcfc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.fr.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'Authorisation requise' -sysauth_prompt = 'Saisissez votre nom d'utilisateur et mot de passe.' -sysauth_failed = 'Nom d'utilisateur et/ou mot de passe erroné ! Réessayez s'il vous plaît.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.it.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.it.lua deleted file mode 100644 index 41200a7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.it.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'Autorizzazione richiesta' -sysauth_prompt = 'Per favore inserisci i tuoi username e password.' -sysauth_failed = 'Username o password non validi! Per favore riprova.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.pt-br.lua deleted file mode 100644 index 9df9c6a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.pt-br.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'Autorização Requerida' -sysauth_prompt = 'Digite seu nome de usuário e senha.' -sysauth_failed = 'Nome de usuário inválido e/ou a senha! Por favor, tente novamente.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.ru.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.ru.lua deleted file mode 100644 index a0d3e1f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/sysauth.ru.lua +++ /dev/null @@ -1,3 +0,0 @@ -sysauth_head = 'ТребуетÑÑ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ' -sysauth_prompt = 'ПожалуйÑта, введите логин и пароль.' -sysauth_failed = 'Ðеверный логин и/или пароль! ПожалуйÑта попробуйте Ñнова.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.de.lua deleted file mode 100644 index 5aaafe4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.de.lua +++ /dev/null @@ -1,32 +0,0 @@ -tinyproxy = 'Tinyproxy' -tinyproxy_desc = 'Tinyproxy ist ein schlanker HTTP(S)-Proxy ohne Zwischenspeicher' -tinyproxy_tinyproxy_allow = 'Proxyzugang erlauben von' -tinyproxy_tinyproxy_anonymous = 'Erlaube Header für anonymen Proxy' -tinyproxy_tinyproxy_bind = 'Ausgehendenden Verkehr an Adresse binden' -tinyproxy_tinyproxy_connectport = 'Ports für CONNECT-Methode' -tinyproxy_tinyproxy_connectport_desc = '0 = deaktiviert, leer = alle' -tinyproxy_tinyproxy_defaulterrorfile = 'Fehlerseite' -tinyproxy_tinyproxy_filter = 'Filterliste' -tinyproxy_tinyproxy_filtercasesensitive = 'Filter unterscheiden Groß-/Kleinschreibung' -tinyproxy_tinyproxy_filterdefaultdeny = 'Filterliste ist eine Whitelist' -tinyproxy_tinyproxy_filterextended = 'Erweiterte reguläre Ausdrücke für Filter' -tinyproxy_tinyproxy_filterurls = 'Filtere URLs statt Domains' -tinyproxy_tinyproxy_listen = 'An Adresse binden' -tinyproxy_tinyproxy_logfile = 'Protokolldatei' -tinyproxy_tinyproxy_loglevel = 'Protokolllevel' -tinyproxy_tinyproxy_maxclients = 'Maximale Anzahl an Clients' -tinyproxy_tinyproxy_maxrequestsperchild = 'Maximale Anfragen pro Prozess' -tinyproxy_tinyproxy_maxspareservers = 'Max. Prozesszahl' -tinyproxy_tinyproxy_minspareservers = 'Min. Prozesszahl' -tinyproxy_tinyproxy_startservers = 'Anfängliche Prozesszahl' -tinyproxy_tinyproxy_statfile = 'Statistikseite' -tinyproxy_tinyproxy_syslog = 'In Systemprotokoll schreiben' -tinyproxy_tinyproxy_timeout = 'Verbindungstimeout' -tinyproxy_tinyproxy_viaproxyname = 'Wert des Via-Headers' -tinyproxy_tinyproxy_xtinyproxy = 'Client-IP übertragen' -tinyproxy_type_proxy = 'Ãœber Proxy' -tinyproxy_type_reject = 'Verbiete Zugriff' -tinyproxy_upstream = 'Zugangskontrolle' -tinyproxy_upstream_target = 'Zielhost' -tinyproxy_upstream_type = 'Methode' -tinyproxy_upstream_via = 'Zugangsproxy' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.en.lua deleted file mode 100644 index 2520e38..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.en.lua +++ /dev/null @@ -1,32 +0,0 @@ -tinyproxy = 'Tinyproxy' -tinyproxy_desc = 'Tinyproxy is a small and fast non-caching HTTP(S)-Proxy' -tinyproxy_tinyproxy_allow = 'Allow access from' -tinyproxy_tinyproxy_anonymous = 'Allowed headers for anonymous proxy' -tinyproxy_tinyproxy_bind = 'Bind outgoing traffic to address' -tinyproxy_tinyproxy_connectport = 'Ports allowed for CONNECT method' -tinyproxy_tinyproxy_connectport_desc = '0 = disabled, empty = all' -tinyproxy_tinyproxy_defaulterrorfile = 'Error document' -tinyproxy_tinyproxy_filter = 'Filter list' -tinyproxy_tinyproxy_filtercasesensitive = 'Case sensitive filters' -tinyproxy_tinyproxy_filterdefaultdeny = 'Filter list is a whitelist' -tinyproxy_tinyproxy_filterextended = 'Extended regular expression filters' -tinyproxy_tinyproxy_filterurls = 'Filter URLs instead of domains' -tinyproxy_tinyproxy_listen = 'Listen on address' -tinyproxy_tinyproxy_logfile = 'Logfile' -tinyproxy_tinyproxy_loglevel = 'Log level' -tinyproxy_tinyproxy_maxclients = 'Maximum number of clients' -tinyproxy_tinyproxy_maxrequestsperchild = 'Maximum requests per thread' -tinyproxy_tinyproxy_maxspareservers = 'Max. spare servers' -tinyproxy_tinyproxy_minspareservers = 'Min. spare servers' -tinyproxy_tinyproxy_startservers = 'Spare servers to start with' -tinyproxy_tinyproxy_statfile = 'Statistic document' -tinyproxy_tinyproxy_syslog = 'Write to syslog' -tinyproxy_tinyproxy_timeout = 'Connection Timeout' -tinyproxy_tinyproxy_viaproxyname = 'Value of Via-Header' -tinyproxy_tinyproxy_xtinyproxy = 'Include client IP' -tinyproxy_type_proxy = 'Via proxy' -tinyproxy_type_reject = 'Reject access' -tinyproxy_upstream = 'Upstream Control' -tinyproxy_upstream_target = 'Target host' -tinyproxy_upstream_type = 'Type' -tinyproxy_upstream_via = 'Upstream Proxy' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.fr.lua deleted file mode 100644 index af7a134..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.fr.lua +++ /dev/null @@ -1,34 +0,0 @@ -tinyproxy = 'Tinyproxy' -tinyproxy_desc = 'Tinyproxy is a small and fast non-caching HTTP(S)-Proxy' -tinyproxy_tinyproxy_allow = 'Allow access from' -tinyproxy_tinyproxy_anonymous = 'Allowed headers for anonymous proxy' -tinyproxy_tinyproxy_bind = 'Lier le trafic sortant à l'adresse ip' -tinyproxy_tinyproxy_connectport = 'Ports allowed for CONNECT method' -tinyproxy_tinyproxy_connectport_desc = '0 = disabled, empty = all' -tinyproxy_tinyproxy_defaulterrorfile = 'Fichier d'erreur' -tinyproxy_tinyproxy_filter = 'Liste de filtres' -tinyproxy_tinyproxy_filtercasesensitive = 'Case sensitive filters' -tinyproxy_tinyproxy_filterdefaultdeny = 'Filter list is a whitelist' -tinyproxy_tinyproxy_filterextended = 'Extended regular expression filters' -tinyproxy_tinyproxy_filterurls = 'Filter URLs instead of domains' -tinyproxy_tinyproxy_group = 'Groupe' -tinyproxy_tinyproxy_listen = 'Listen on address' -tinyproxy_tinyproxy_logfile = 'Chemin du fichier de log' -tinyproxy_tinyproxy_loglevel = 'Niveau de log' -tinyproxy_tinyproxy_maxclients = 'Nombre maximum de clients' -tinyproxy_tinyproxy_maxrequestsperchild = 'Maximum de connexion par processus' -tinyproxy_tinyproxy_maxspareservers = 'Nombre Maximum de processus serveur' -tinyproxy_tinyproxy_minspareservers = 'Nombre Minimum de processus serveur' -tinyproxy_tinyproxy_startservers = 'Nombre de processus serveur lancés au demarrage' -tinyproxy_tinyproxy_statfile = 'Fichier de statistiques' -tinyproxy_tinyproxy_syslog = 'Écrire dans le journal système (Syslog)' -tinyproxy_tinyproxy_timeout = 'Délai de connexion' -tinyproxy_tinyproxy_user = 'Utilisateur' -tinyproxy_tinyproxy_viaproxyname = 'Valeur de l'entête "VIA" utilisée comme nom d'hôte' -tinyproxy_tinyproxy_xtinyproxy = 'Inclure l'ip du client' -tinyproxy_type_proxy = 'Via proxy' -tinyproxy_type_reject = 'Refuser l'accès' -tinyproxy_upstream = 'Upstream Control' -tinyproxy_upstream_target = 'Hôte de destination' -tinyproxy_upstream_type = 'Type' -tinyproxy_upstream_via = 'Proxy' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.pt-br.lua deleted file mode 100644 index 33b664a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/tinyproxy.pt-br.lua +++ /dev/null @@ -1,34 +0,0 @@ -tinyproxy = 'Tinyproxy' -tinyproxy_desc = 'Tinyproxy é um pequeno e rápido Proxy-HTTP(S) sem suporte à cache' -tinyproxy_tinyproxy_allow = 'Permitir acesso de' -tinyproxy_tinyproxy_anonymous = 'Cabeçalhos permitidos para proxy anônimo' -tinyproxy_tinyproxy_bind = 'Associar o tráfego de saída ao endereço' -tinyproxy_tinyproxy_connectport = 'Portas permitidas para o método CONNECT ' -tinyproxy_tinyproxy_connectport_desc = '0 = desativado, vazio = todas' -tinyproxy_tinyproxy_defaulterrorfile = 'Documento de erro' -tinyproxy_tinyproxy_filter = 'Lista de filtros' -tinyproxy_tinyproxy_filtercasesensitive = 'Filtros "case sensitive"' -tinyproxy_tinyproxy_filterdefaultdeny = 'A lista de filtros é uma lista branca' -tinyproxy_tinyproxy_filterextended = 'Filtros com suporte à expressões regulares' -tinyproxy_tinyproxy_filterurls = 'Filtrar URLs em vez de domínios' -tinyproxy_tinyproxy_listen = 'Escutar no endereço' -tinyproxy_tinyproxy_logfile = 'Arquivo de log' -tinyproxy_tinyproxy_loglevel = 'Nível do log' -tinyproxy_tinyproxy_maxclients = 'Número máximo de clientes' -tinyproxy_tinyproxy_maxrequestsperchild = 'Máximo de solicitações por thread' -tinyproxy_tinyproxy_maxspareservers = 'Max. servidores sobressalentes' -tinyproxy_tinyproxy_minspareservers = 'Min. servidores sobressalentes' -tinyproxy_tinyproxy_startservers = 'Servidores sobressalentes iniciar com' -tinyproxy_tinyproxy_statfile = 'Documento de estatísticas' -tinyproxy_tinyproxy_syslog = 'Escrever para syslog' -tinyproxy_tinyproxy_timeout = 'Timeout de conexão' -tinyproxy_tinyproxy_group = 'Grupo' -tinyproxy_tinyproxy_user = 'Usuário' -tinyproxy_tinyproxy_viaproxyname = 'Valor do cabeçalho "Via-Header"' -tinyproxy_tinyproxy_xtinyproxy = 'Incluir o IP do cliente' -tinyproxy_type_proxy = 'Via proxy' -tinyproxy_type_reject = 'Rejeitar o acesso' -tinyproxy_upstream = 'Controle de Upstream' -tinyproxy_upstream_target = 'Host de destino' -tinyproxy_upstream_type = 'Tipo' -tinyproxy_upstream_via = 'Proxy para Upstream' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.de.lua deleted file mode 100644 index 777ae87..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.de.lua +++ /dev/null @@ -1,7 +0,0 @@ -upnpd = 'Universal Plug & Play' -upnpd_desc = 'UPNP ermöglicht die automatische Konfiguration des Routers durch Clients im lokalen Netzwerk.' -upnpd_config_desc = 'UPNP sollte nur wenn unbedingt nötig aktiviert werden, da es ein Sicherheitsrisiko für das Netzwerk darstellen kann.' -upnpd_config_securemode = 'Sicheren Modus aktivieren' -upnpd_config_logoutput = 'Ausgabe protokollieren' -upnpd_config_download = 'Downlink' -upnpd_config_upload = 'Uplink' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.en.lua deleted file mode 100644 index 8e6c825..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.en.lua +++ /dev/null @@ -1,7 +0,0 @@ -upnpd = 'Universal Plug & Play' -upnpd_desc = 'UPNP allows clients in the local network to automatically configure the router.' -upnpd_config_desc = 'UPNP should only be enabled if absolutely necessary as it can result in high security risks for your network.' -upnpd_config_securemode = 'Enable secure mode' -upnpd_config_logoutput = 'Log output' -upnpd_config_download = 'Downlink' -upnpd_config_upload = 'Uplink' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.pt-br.lua deleted file mode 100644 index cf2c3db..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/upnp.pt-br.lua +++ /dev/null @@ -1,7 +0,0 @@ -upnpd = 'Plug & Play Universal' -upnpd_desc = 'UPNP permite os clientes da rede local automaticamente configurar o roteador.' -upnpd_config_desc = 'O UPNP deve ser ativado apenas se for absolutamente necessário, pois ele pode resultar em elevados riscos de segurança para sua rede.' -upnpd_config_securemode = 'Enable secure mode' -upnpd_config_logoutput = 'Log de saída' -upnpd_config_download = 'Link para download' -upnpd_config_upload = 'Link para Upload' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.de.lua deleted file mode 100644 index a5f239a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.de.lua +++ /dev/null @@ -1,8 +0,0 @@ -content_directories = 'Freigabeverzeichnisse' -disable_telnet = 'Telnet-Konsole deaktivieren' -disable_webif = 'Webinterface deaktivieren' -options = 'Optionen' -servername = 'Servername' -settings = 'Einstellungen' -ushare = 'uShare' -ushare_desc = 'uShare' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.en.lua deleted file mode 100644 index 834fa91..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.en.lua +++ /dev/null @@ -1,8 +0,0 @@ -content_directories = 'Content directories' -disable_telnet = 'Disable telnet console' -disable_webif = 'Disable webinterface' -options = 'Options' -servername = 'Servername' -settings = 'Settings' -ushare = 'uShare' -ushare_desc = 'uShare' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.pt-br.lua deleted file mode 100644 index 492c4ce..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/ushare.pt-br.lua +++ /dev/null @@ -1,8 +0,0 @@ -content_directories = 'Diretórios de conteúdo' -disable_telnet = 'Desativar console telnet' -disable_webif = 'Desativar interface web' -options = 'Opções' -servername = 'Nome do servidor' -settings = 'Configurações' -ushare = 'uShare' -ushare_desc = 'uShare' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.de.lua deleted file mode 100644 index b340fd4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.de.lua +++ /dev/null @@ -1,5 +0,0 @@ -framespersecond = 'Bilder pro Sekunde' -resolution = 'Auflösung' -settings = 'Konfiguration' -uvc_streamer = 'Webcam Stream' -uvc_streamer_desc = 'Linux-UVC Webcam Konfiguration. Im Browser z.B. http://%s:%i/ laden.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.en.lua deleted file mode 100644 index e56eacc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.en.lua +++ /dev/null @@ -1,5 +0,0 @@ -framespersecond = 'Frames per second' -resolution = 'Resolution' -settings = 'Settings' -uvc_streamer = 'Webcam streaming' -uvc_streamer_desc = 'Configure your Linux-UVC compatible webcam. Point your browser to e.g. http://%s:%i/' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.fr.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.fr.lua deleted file mode 100644 index 97523af..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.fr.lua +++ /dev/null @@ -1,5 +0,0 @@ -framespersecond = 'Images par seconde' -resolution = 'Résolution' -settings = 'Paramètres' -uvc_streamer = 'Webcam streaming' -uvc_streamer_desc = 'Configurez le pilote linux UVC-webcam pour votre webcam. Pointez votre navigateur par exemple surhttp://%s:%i/' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.pt-br.lua deleted file mode 100644 index 624a885..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvc_streamer.pt-br.lua +++ /dev/null @@ -1,5 +0,0 @@ -framespersecond = 'Frames por segundo' -resolution = 'Resolução' -settings = 'Configurações' -uvc_streamer = 'Webcam streaming' -uvc_streamer_desc = 'Configure a sua webcam compatível com o Linux-UVC. Coloque no seu browser por ex. http://%s:%i/' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.de.lua deleted file mode 100644 index 7962161..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.de.lua +++ /dev/null @@ -1,39 +0,0 @@ -uvl_err_uciload = 'Fehler beim Laden der Konfiguration \"%p\": %1' -uvl_err_scheme = 'Fehler in Schema \"%p\":\n%c' -uvl_err_config = 'Fehler in Konfiguration \"%p\":\n%c' -uvl_err_section = 'Fehler in Sektion \"%i\" (%I):\n%c' -uvl_err_option = 'Fehler in Option \"%i\" (%I):\n%c' -uvl_err_reference = 'Option \"%i\" hat eine ungültige Referenz-Spezifikation %1:\n%c' -uvl_err_dependency = 'Nicht erfüllte Abhängigkeiten in %t \"%i\":\n%c' -uvl_err_sme_find = 'Schema \"%p\" nicht in Verzeichnis \"%1\" gefunden' -uvl_err_sme_read = 'Fehlende Dateizugriffsrechte auf \"%1\"' -uvl_err_sme_reqfld = 'Notwendiges Feld \"%1\" fehlt in Schema \"%i\"' -uvl_err_sme_invref = 'Ungültige Referenz \"%1\" verweist auf eine anonyme Sektion' -uvl_err_sme_badref = 'Syntaxfehler in Referenzspezifikation \"%1\"' -uvl_err_sme_baddep = 'Syntaxfehler in Abhängigkeitsbeschreibung \"%1\" von \"%i\"' -uvl_err_sme_badval = 'Syntaxfehler in Validatorspezifikation \"%1\" von \"%i\"' -uvl_err_sme_errval = 'Fehler in externem Validator \"%1\": %2' -uvl_err_sme_vbadpack = 'Option \"%o\" in Schema \"%p\" referenziert unbekanntes Paket \"%1\"' -uvl_err_sme_vbadsect = 'Option \"%o\" in Schema \"%p\" referenziert unbekannte Sektion \"%1\"' -uvl_err_sme_ebadpack = 'Aufzählung \"%v\" in Schema \"%p\" referenziert unbekanntes Paket \"%1\"' -uvl_err_sme_ebadsect = 'Aufzählung \"%v\" in Schema \"%p\" referenziert unbekannte Sektion \"%1\"' -uvl_err_sme_ebadopt = 'Aufzählung \"%v\" in Schema \"%p\" referenziert unbekannte Option \"%1\"' -uvl_err_sme_ebadtype = 'Aufzählung \"%v\" in Schema \"%p\" referenziert Nicht-Aufzählungs-Option \"%p.%s.%o\"' -uvl_err_sme_ebaddef = 'Aufzählung \"%v\" in Schema \"%p\" überschreibt den Standardwert von \"%p.%s.%o\"' -uvl_err_sect_unknown = 'Sektion \"%i\" (%I) nicht in Schema gefunden' -uvl_err_sect_required = 'Benötigte Sektion vom Typ \"%I\" nicht in Konfiguration gefunden' -uvl_err_sect_unique = 'Einzigartige Sektion \"%i\" (%I) kommt mehrfach in der Konfiguration vor' -uvl_err_sect_named = 'Die Sektion vom Typ \"%I\" ist anonym in der Konfiguration gespeichert, muss aber einen Namen haben' -uvl_err_sect_notfound = 'Sektion vom Typ \"%I\" nicht in der Konfiguration gefunden' -uvl_err_opt_unknown = 'Option \"%i\" (%I) nicht im Schema gefunden' -uvl_err_opt_required = 'Die benötigte Option \"%i\" hat keinen Wert gesetzt' -uvl_err_opt_badvalue = 'Der Wert \"%1\" von Option \"%i\" ist nicht in der Aufzählung %2 definiert' -uvl_err_opt_invvalue = 'Der Wert \"%1\" von Option \"%i\" ist kein gültiger \"%2\" Datentyp' -uvl_err_opt_notlist = 'Option \"%i\" ist als Liste definiert aber als einfache Option gespeichert' -uvl_err_opt_datatype = 'Option \"%i\" hat unbekannten Datentyp \"%1\"' -uvl_err_opt_notfound = 'Option \"%i\" nicht in der Konfiguration gefunden' -uvl_err_dep_notequal = 'Abhängigkeit (%1) nicht erfüllt:\nOption \"%i\" ist nicht \"%2\"' -uvl_err_dep_novalue = 'Abhängigkeit (%1) nicht erfüllt:\nOption \"%i\" hat keinen Wert gesetzt' -uvl_err_dep_notvalid = 'Abhängigkeit (%1) nicht erfüllt:\n%c' -uvl_err_dep_recursive = 'Rekursive Abhängkeit in Option \"%i\" gefunden' -uvl_err_dep_badenum = 'Nicht erfüllte Abhängigkeiten in Aufzählung \"%i\":\n%c' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.en.lua deleted file mode 100644 index b0944a2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.en.lua +++ /dev/null @@ -1,39 +0,0 @@ -uvl_err_uciload = 'Unable to load config \"%p\": %1' -uvl_err_scheme = 'Error in scheme \"%p\":\n%c' -uvl_err_config = 'Error in config \"%p\":\n%c' -uvl_err_section = 'Error in section \"%i\" (%I):\n%c' -uvl_err_option = 'Error in option \"%i\" (%I):\n%c' -uvl_err_reference = 'Option \"%i\" has invalid reference specification %1:\n%c' -uvl_err_dependency = 'In dependency check for %t \"%i\":\n%c' -uvl_err_sme_find = 'Can not find scheme \"%p\" in \"%1\"' -uvl_err_sme_read = 'Can not access file \"%1\"' -uvl_err_sme_reqfld = 'Missing required scheme field \"%1\" in \"%i\"' -uvl_err_sme_invref = 'Illegal reference \"%1\" to an anonymous section' -uvl_err_sme_badref = 'Malformed reference in \"%1\"' -uvl_err_sme_baddep = 'Malformed dependency specification \"%1\" in \"%i\"' -uvl_err_sme_badval = 'Malformed validator specification \"%1\" in \"%i\"' -uvl_err_sme_errval = 'External validator \"%1\" failed: %2' -uvl_err_sme_vbadpack = 'Variable \"%o\" in scheme \"%p\" references unknown package \"%1\"' -uvl_err_sme_vbadsect = 'Variable \"%o\" in scheme \"%p\" references unknown section \"%1\"' -uvl_err_sme_ebadpack = 'Enum \"%v\" in scheme \"%p\" references unknown package \"%1\"' -uvl_err_sme_ebadsect = 'Enum \"%v\" in scheme \"%p\" references unknown section \"%1\"' -uvl_err_sme_ebadopt = 'Enum \"%v\" in scheme \"%p\" references unknown option \"%1\"' -uvl_err_sme_ebadtype = 'Enum \"%v\" in scheme \"%p\" references non-enum option \"%p.%s.%o\"' -uvl_err_sme_ebaddef = 'Enum \"%v\" in scheme \"%p\" redeclares the default value of \"%p.%s.%o\"' -uvl_err_sect_unknown = 'Section \"%i\" (%I) not found in scheme' -uvl_err_sect_required = 'Required section \"%p.%s\" not found in config' -uvl_err_sect_unique = 'Unique section \"%p.%s\" occurs multiple times in config' -uvl_err_sect_named = 'The section of type \"%p.%s\" is stored anonymously in config but must be named' -uvl_err_sect_notfound = 'Section \"%p.%s\" not found in config' -uvl_err_opt_unknown = 'Option \"%i\" (%I) not found in scheme' -uvl_err_opt_required = 'Required option \"%i\" has no value' -uvl_err_opt_badvalue = 'Value \"%1\" of option \"%i\" is not defined in enum %2' -uvl_err_opt_invvalue = 'Value \"%1\" of option \"%i\" does not validate as datatype \"%2\"' -uvl_err_opt_notlist = 'Option \"%i\" is defined as list but stored as plain value' -uvl_err_opt_datatype = 'Option \"%i\" has unknown datatype \"%1\"' -uvl_err_opt_notfound = 'Option \"%p.%s.%o\" not found in config' -uvl_err_dep_notequal = 'Dependency (%1) failed:\noption \"%i\" is not eqal \"%2\"' -uvl_err_dep_novalue = 'Dependency (%1) failed:\noption \"%i\" has no value' -uvl_err_dep_notvalid = 'Dependency (%1) failed:\n%c' -uvl_err_dep_recursive = 'Recursive dependency for option \"%i\" detected' -uvl_err_dep_badenum = 'In dependency check for enum value \"%i\":\n%c' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.pt-br.lua deleted file mode 100644 index baf789a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/uvl.pt-br.lua +++ /dev/null @@ -1,39 +0,0 @@ -uvl_err_uciload = 'Não foi possível carregar a configuração \"%p\": %1' -uvl_err_scheme = 'Erro no esquema \"%p\":\n%c' -uvl_err_config = 'Erro na configuração \"%p\":\n%c' -uvl_err_section = 'Erro na seção \"%i\" (%I):\n%c' -uvl_err_option = 'Erro na opção \"%i\" (%I):\n%c' -uvl_err_reference = 'Opção \"%i\" tem especificação de referência inválida %1:\n%c' -uvl_err_dependency = 'Na dependência de verificação %t \"%i\":\n%c' -uvl_err_sme_find = 'Não é possível encontrar o esquema \"%p\" in \"%1\"' -uvl_err_sme_read = 'Não é possível acessar o arquivo \"%1\"' -uvl_err_sme_reqfld = 'Faltando campo requerido no esquema: \"%1\" em \"%i\"' -uvl_err_sme_invref = 'Referência \"1%\" ilegal para uma seção anônima' -uvl_err_sme_badref = 'Referência mal elaborada em \"%1\"' -uvl_err_sme_baddep = 'Especificação de dependência mal elaborada: \"%1\" em \"%i\"' -uvl_err_sme_badval = 'Especificação de validador mal elaborada: \"%1\" em \"%i\"' -uvl_err_sme_errval = 'Validador externo \"%1\" falhou: %2' -uvl_err_sme_vbadpack = 'Variável \"%o\" no esquema \"%p\" faz referência para um pacote desconecido \"%1\"' -uvl_err_sme_vbadsect = 'Variável \"%o\" no esquema \"%p\" faz referência para uma seção desconecida \"%1\"' -uvl_err_sme_ebadpack = 'Enum \"%v\" no esquema \"%p\" faz referência para um pacote desconecido \"%1\"' -uvl_err_sme_ebadsect = 'Enum \"%v\" no esquema \"%p\" faz referência para uma seção desconecida \"%1\"' -uvl_err_sme_ebadopt = 'Enum \"%v\" no esquema \"%p\" faz referência para uma opção desconecida \"%1\"' -uvl_err_sme_ebadtype = 'Enum \"%v\" no esquema \"%p\" faz referência para uma opção não-enum \"%p.%s.%o\"' -uvl_err_sme_ebaddef = 'Enum \"%v\" no esquema \"%p\" redeclara o valor padrão de \"%p.%s.%o\"' -uvl_err_sect_unknown = 'Seção \"%i\" (%I) não encontrada no esquema' -uvl_err_sect_required = 'Seção requerida \"%p.%s\" não encontrada na configuração' -uvl_err_sect_unique = 'Seção única \"%p.%s\" ocorre várias vezes na configuração' -uvl_err_sect_named = 'A seção do tipo \"%p.%s\" está armazenada na configuração como anônima, mas deve ser nomeada' -uvl_err_sect_notfound = 'Seção \"%p.%s\" não encontrada na configuração' -uvl_err_opt_unknown = 'Opção \"%i\" (%I) não encontrada no esquema' -uvl_err_opt_required = 'Opção requerida \"%i\" não tem nenhum valor' -uvl_err_opt_badvalue = 'Valor \"%1\" da opção \"%i\" não está definido no enum %2' -uvl_err_opt_invvalue = 'Valor \"%1\" da opção \"%i\" não foi validado como tipo de dados \"%2\"' -uvl_err_opt_notlist = 'Opção \"%i\" está definida como lista, mas armazenada como um valor simples' -uvl_err_opt_datatype = 'Opção \"%i\" tem o tipo de dados desconhecido \"%1\"' -uvl_err_opt_notfound = 'Opção \"%p.%s.%o\" não encontrada na configuração' -uvl_err_dep_notequal = 'Dependência (%1) falhou:\nopção \"%i\" is not eqal à \"%2\"' -uvl_err_dep_novalue = 'Dependência (%1) falhou:\nopção \"%i\" não tem nenhum valor' -uvl_err_dep_notvalid = 'Dependência (%1) falhou:\n%c' -uvl_err_dep_recursive = 'Dependência recursiva para a opção \"%i\" detectada' -uvl_err_dep_badenum = 'Na dependência, verificar pelo valor enum \"%i\":\n%c' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.de.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.de.lua deleted file mode 100644 index 3e48b35..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.de.lua +++ /dev/null @@ -1,37 +0,0 @@ -wifi_auto = 'auto' -wifi_fh = 'Frequenzsprung' -wifi_diversity = 'Diversität' -wifi_txantenna = 'Sendeantenne' -wifi_rxantenna = 'Empfangsantenne' -wifi_distance = 'Distanzoptimierung' -wifi_distance_desc = 'Distanz zum am weitesten entfernten Funkpartner in Meter.' -wifi_macpolicy = 'MAC-Adressfilter' -wifi_whitelist = 'Nur gelistete erlauben' -wifi_blacklist = 'Alle außer gelistete erlauben' -wifi_maclist = 'MAC-Adressliste' -wifi_bursting = 'Frame Bursting' -wifi_country = 'Ländercode' -wifi_maxassoc = 'Verbindungsbegrenzung' -wifi_essid = 'ESSID' -wifi_bssid = 'BSSID' -wifi_frag = 'Fragmentierungsschwelle' -wifi_rts = 'RTS/CTS-Schwelle' -wifi_wds = 'WDS' -wifi_wdssep = 'Separates WDS' -wifi_hidden = 'ESSID verstecken' -wifi_isloate = 'Clients isolieren' -wifi_isloate_desc = 'Verhindert Client zu Client Kommunikation' -wifi_bgscan = 'Hintergrundscan' -wifi_rate = 'Ãœbertragungsrate' -wifi_mcast_rate = 'Multicastrate' -wifi_minrate = 'Mindestübertragungsrate' -wifi_maxrate = 'Höchstübertragungsrate' -wifi_compression = 'Kompression' -wifi_turbo = 'Turbo Modus' -wifi_ff = 'Schnelle Frames' -wifi_wmm = 'WMM Modus' -wifi_xr = 'XR-Unterstützung' -wifi_ar = 'AR-Unterstützung' -wifi_nosbeacon = 'Deaktiviere Hardware-Beacon Zeitgeber' -wifi_noprobereq = 'Scan-Anforderungen nicht beantworten' -wifi_wpareq = 'Für WPA-Verschlüsselung muss wpa_supplicant (für Clientmodus) oder hostapd (für AP und Ad-hoc-Modus) installiert sein.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.en.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.en.lua deleted file mode 100644 index 4fb286c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.en.lua +++ /dev/null @@ -1,38 +0,0 @@ -wifi_auto = 'auto' -wifi_fh = 'Frequency Hopping' -wifi_diversity = 'Diversity' -wifi_txantenna = 'Transmitter Antenna' -wifi_rxantenna = 'Receiver Antenna' -wifi_distance = 'Distance Optimization' -wifi_distance_desc = 'Distance to farthest network member in meters.' -wifi_macpolicy = 'MAC-Address Filter' -wifi_whitelist = 'Allow listed only' -wifi_blacklist = 'Allow all except listed' -wifi_maclist = 'MAC-List' -wifi_bursting = 'Frame Bursting' -wifi_country = 'Country Code' -wifi_maxassoc = 'Connection Limit' -wifi_essid = 'ESSID' -wifi_bssid = 'BSSID' -wifi_frag = 'Fragmentation Threshold' -wifi_rts = 'RTS/CTS Threshold' -wifi_wds = 'WDS' -wifi_wdssep = 'Separate WDS' -wifi_hidden = 'Hide ESSID' -wifi_isloate = 'Isolate Clients' -wifi_isloate_desc = 'Prevent Client to Client Communication' -wifi_bgscan = 'Background Scan' -wifi_rate = 'Transmission Rate' -wifi_mcast_rate = 'Multicast Rate' -wifi_minrate = 'Minimum Rate' -wifi_maxrate = 'Maximum Rate' -wifi_compression = 'Compression' -wifi_turbo = 'Turbo Mode' -wifi_ff = 'Fast Frames' -wifi_wmm = 'WMM Mode' -wifi_xr = 'XR Support' -wifi_ar = 'AR Support' -wifi_nosbeacon = 'Disable HW-Beacon timer' -wifi_noprobereq = 'Do not send probe responses' -wifi_wpareq = 'WPA-Encryption requires wpa_supplicant (for client mode) or hostapd (for AP and ad-hoc mode) to be installed.' -wifi_keyreq = '40bit/104bit WEP is autodetected based on key length. Use either 5/13 ASCII or 10/26 HEX characters as WEP key. A valid ASCII-based key will be translated into a HEX-based one. WPA(2)-PSK keys should be 64 HEX characters.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.it.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.it.lua deleted file mode 100644 index 223ef27..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.it.lua +++ /dev/null @@ -1,37 +0,0 @@ -wifi_auto = 'auto' -wifi_fh = 'Frequency Hopping' -wifi_diversity = 'Diversity' -wifi_txantenna = 'Antenna trasmettente' -wifi_rxantenna = 'Antenna ricevente' -wifi_distance = 'Ottimizzazione distanza' -wifi_distance_desc = 'Distanza del membro più lontano della rete in metri.' -wifi_macpolicy = 'Filtro dei MAC-Addres' -wifi_whitelist = 'Consenti solo quelli in lista' -wifi_blacklist = 'Consenti tutti tranne quelli in lista' -wifi_maclist = 'Lista MAC' -wifi_bursting = 'Frame Bursting' -wifi_country = 'Codice nazione' -wifi_maxassoc = 'Limite connessioni' -wifi_essid = 'ESSID' -wifi_bssid = 'BSSID' -wifi_frag = 'Soglia di frammentazione' -wifi_rts = 'Soglia RTS/CTS' -wifi_wds = 'WDS' -wifi_wdssep = 'WDS separati' -wifi_hidden = 'Nascondi ESSID' -wifi_isloate = 'Isola utenti' -wifi_isloate_desc = 'Impedisci comunicazione fra utenti' -wifi_bgscan = 'Scansione in background' -wifi_rate = 'Velocità di transmissione' -wifi_mcast_rate = 'Velocità multicast' -wifi_minrate = 'Velocità minima' -wifi_maxrate = 'Velocità massima' -wifi_compression = 'Compressione' -wifi_turbo = 'Modalità turbo' -wifi_ff = 'Frame veloci' -wifi_wmm = 'Modalità WMM' -wifi_xr = 'Supporto XR' -wifi_ar = 'Supporto AR' -wifi_nosbeacon = 'Disabilita Timer Beacon HW' -wifi_noprobereq = 'Disabilita Probe-Responses' -wifi_wpareq = 'La crittografia WPA richiede l'installazione di wpa_supplicant (per la modalità client) o hostapd (per la modalità AP o ad-hoc).' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.pt-br.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.pt-br.lua deleted file mode 100644 index 52a37b7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/i18n/wifi.pt-br.lua +++ /dev/null @@ -1,37 +0,0 @@ -wifi_auto = 'automático' -wifi_fh = 'Salto de Frequência' -wifi_diversity = 'Diversidade' -wifi_txantenna = 'Antena de Transmissão' -wifi_rxantenna = 'Antena de Recepção' -wifi_distance = 'Otimização de Distância' -wifi_distance_desc = 'Distância para o último host da rede (em metros).' -wifi_macpolicy = 'Filtro de Endereço-MAC' -wifi_whitelist = 'Permitir somente os listados' -wifi_blacklist = 'Permitir todos, exceto os listados' -wifi_maclist = 'Lista de MAC' -wifi_bursting = 'Frame Bursting' -wifi_country = 'Código do País' -wifi_maxassoc = 'Limite de Conexão' -wifi_essid = 'ESSID' -wifi_bssid = 'BSSID' -wifi_frag = 'Fragmentation Threshold' -wifi_rts = 'RTS/CTS Threshold' -wifi_wds = 'WDS' -wifi_wdssep = 'Separar WDS' -wifi_hidden = 'Ocultar ESSID' -wifi_isloate = 'Isolar Clientes' -wifi_isloate_desc = 'Previnir Comunicação de Cliente para Cliente' -wifi_bgscan = 'Scanear em Segundo Plano' -wifi_rate = 'Taxa de Transmissão' -wifi_mcast_rate = 'Taxa de Multicast' -wifi_minrate = 'Taxa Mínima' -wifi_maxrate = 'Taxa Máxima' -wifi_compression = 'Compressão' -wifi_turbo = 'Modo Turbo' -wifi_ff = 'Fast Frames' -wifi_wmm = 'Modo WMM' -wifi_xr = 'Suporte XR' -wifi_ar = 'Suporte AR' -wifi_nosbeacon = 'Disable HW-Beacon timer' -wifi_noprobereq = 'Don not send probe responses' -wifi_wpareq = 'Criptografia-WPA requer wpa_supplicant (para o modo cliente) ou hostapd (para o modo AP e ad-hoc) instalados.' diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/init.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/init.lua deleted file mode 100644 index e500b71..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/init.lua +++ /dev/null @@ -1,34 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Description: -Main class - -FileId: -$Id: init.lua 4079 2009-01-17 17:59:11Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local require = require - -module "luci" - -local v = require "luci.version" - -__version__ = v.luciversion or "0.9" -__appname__ = v.luciname or "LuCI" diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ip.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ip.lua deleted file mode 100644 index 4e858b6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ip.lua +++ /dev/null @@ -1,632 +0,0 @@ ---[[ - -LuCI ip calculation libarary -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: ip.lua 3835 2008-11-29 21:37:29Z jow $ - -]]-- - ---- LuCI IP calculation library. -module( "luci.ip", package.seeall ) - -require("bit") -require("luci.util") - ---- Boolean; true if system is little endian -LITTLE_ENDIAN = not luci.util.bigendian() - ---- Boolean; true if system is big endian -BIG_ENDIAN = not LITTLE_ENDIAN - ---- Specifier for IPv4 address family -FAMILY_INET4 = 0x04 - ---- Specifier for IPv6 address family -FAMILY_INET6 = 0x06 - - -local function __bless(x) - return setmetatable( x, { - __index = luci.ip.cidr, - __add = luci.ip.cidr.add, - __sub = luci.ip.cidr.sub, - __lt = luci.ip.cidr.lower, - __eq = luci.ip.cidr.equal, - __le = - function(...) - return luci.ip.cidr.equal(...) or luci.ip.cidr.lower(...) - end - } ) -end - -local function __array16( x, family ) - local list - - if type(x) == "number" then - list = { bit.rshift(x, 16), bit.band(x, 0xFFFF) } - - elseif type(x) == "string" then - if x:find(":") then x = IPv6(x) else x = IPv4(x) end - if x then - assert( x[1] == family, "Can't mix IPv4 and IPv6 addresses" ) - list = { unpack(x[2]) } - end - - elseif type(x) == "table" and type(x[2]) == "table" then - assert( x[1] == family, "Can't mix IPv4 and IPv6 addresses" ) - list = { unpack(x[2]) } - - elseif type(x) == "table" then - list = x - end - - assert( list, "Invalid operand" ) - - return list -end - -local function __mask16(bits) - return bit.lshift( bit.rshift( 0xFFFF, 16 - bits % 16 ), 16 - bits % 16 ) -end - -local function __not16(bits) - return bit.band( bit.bnot( __mask16(bits) ), 0xFFFF ) -end - -local function __maxlen(family) - return ( family == FAMILY_INET4 ) and 32 or 128 -end - -local function __sublen(family) - return ( family == FAMILY_INET4 ) and 30 or 127 -end - - ---- Convert given short value to network byte order on little endian hosts --- @param x Unsigned integer value between 0x0000 and 0xFFFF --- @return Byte-swapped value --- @see htonl --- @see ntohs -function htons(x) - if LITTLE_ENDIAN then - return bit.bor( - bit.rshift( x, 8 ), - bit.band( bit.lshift( x, 8 ), 0xFF00 ) - ) - else - return x - end -end - ---- Convert given long value to network byte order on little endian hosts --- @param x Unsigned integer value between 0x00000000 and 0xFFFFFFFF --- @return Byte-swapped value --- @see htons --- @see ntohl -function htonl(x) - if LITTLE_ENDIAN then - return bit.bor( - bit.lshift( htons( bit.band( x, 0xFFFF ) ), 16 ), - htons( bit.rshift( x, 16 ) ) - ) - else - return x - end -end - ---- Convert given short value to host byte order on little endian hosts --- @class function --- @name ntohs --- @param x Unsigned integer value between 0x0000 and 0xFFFF --- @return Byte-swapped value --- @see htonl --- @see ntohs -ntohs = htons - ---- Convert given short value to host byte order on little endian hosts --- @class function --- @name ntohl --- @param x Unsigned integer value between 0x00000000 and 0xFFFFFFFF --- @return Byte-swapped value --- @see htons --- @see ntohl -ntohl = htonl - - ---- Parse given IPv4 address in dotted quad or CIDR notation. If an optional --- netmask is given as second argument and the IP address is encoded in CIDR --- notation then the netmask parameter takes precedence. If neither a CIDR --- encoded prefix nor a netmask parameter is given, then a prefix length of --- 32 bit is assumed. --- @param address IPv4 address in dotted quad or CIDR notation --- @param netmask IPv4 netmask in dotted quad notation (optional) --- @return luci.ip.cidr instance or nil if given address was invalid --- @see IPv6 --- @see Hex -function IPv4(address, netmask) - address = address or "0.0.0.0/0" - - local obj = __bless({ FAMILY_INET4 }) - - local data = {} - local prefix = address:match("/(.+)") - address = address:gsub("/.+","") - - if netmask then - prefix = obj:prefix(netmask) - elseif prefix then - prefix = tonumber(prefix) - if not prefix or prefix < 0 or prefix > 32 then return nil end - else - prefix = 32 - end - - local b1, b2, b3, b4 = address:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$") - - b1 = tonumber(b1) - b2 = tonumber(b2) - b3 = tonumber(b3) - b4 = tonumber(b4) - - if b1 and b1 <= 255 and - b2 and b2 <= 255 and - b3 and b3 <= 255 and - b4 and b4 <= 255 and - prefix - then - table.insert(obj, { b1 * 256 + b2, b3 * 256 + b4 }) - table.insert(obj, prefix) - return obj - end -end - ---- Parse given IPv6 address in full, compressed, mixed or CIDR notation. --- If an optional netmask is given as second argument and the IP address is --- encoded in CIDR notation then the netmask parameter takes precedence. --- If neither a CIDR encoded prefix nor a netmask parameter is given, then a --- prefix length of 128 bit is assumed. --- @param address IPv6 address in full/compressed/mixed or CIDR notation --- @param netmask IPv6 netmask in full/compressed/mixed notation (optional) --- @return luci.ip.cidr instance or nil if given address was invalid --- @see IPv4 --- @see Hex -function IPv6(address, netmask) - address = address or "::/0" - - local obj = __bless({ FAMILY_INET6 }) - - local data = {} - local prefix = address:match("/(.+)") - address = address:gsub("/.+","") - - if netmask then - prefix = obj:prefix(netmask) - elseif prefix then - prefix = tonumber(prefix) - if not prefix or prefix < 0 or prefix > 128 then return nil end - else - prefix = 128 - end - - local borderl = address:sub(1, 1) == ":" and 2 or 1 - local borderh, zeroh, chunk, block - - if #address > 45 then return nil end - - repeat - borderh = address:find(":", borderl, true) - if not borderh then break end - - block = tonumber(address:sub(borderl, borderh - 1), 16) - if block and block <= 0xFFFF then - data[#data+1] = block - else - if zeroh or borderh - borderl > 1 then return nil end - zeroh = #data + 1 - end - - borderl = borderh + 1 - until #data == 7 - - chunk = address:sub(borderl) - if #chunk > 0 and #chunk <= 4 then - block = tonumber(chunk, 16) - if not block or block > 0xFFFF then return nil end - - data[#data+1] = block - elseif #chunk > 4 then - if #data == 7 or #chunk > 15 then return nil end - borderl = 1 - for i=1, 4 do - borderh = chunk:find(".", borderl, true) - if not borderh and i < 4 then return nil end - borderh = borderh and borderh - 1 - - block = tonumber(chunk:sub(borderl, borderh)) - if not block or block > 255 then return nil end - - if i == 1 or i == 3 then - data[#data+1] = block * 256 - else - data[#data] = data[#data] + block - end - - borderl = borderh and borderh + 2 - end - end - - if zeroh then - if #data == 8 then return nil end - while #data < 8 do - table.insert(data, zeroh, 0) - end - end - - if #data == 8 and prefix then - table.insert(obj, data) - table.insert(obj, prefix) - return obj - end -end - ---- Transform given hex-encoded value to luci.ip.cidr instance of specified --- address family. --- @param hex String containing hex encoded value --- @param prefix Prefix length of CIDR instance (optional, default is 32/128) --- @param family Address family, either luci.ip.FAMILY_INET4 or FAMILY_INET6 --- @param swap Bool indicating whether to swap byteorder on low endian host --- @return luci.ip.cidr instance or nil if given value was invalid --- @see IPv4 --- @see IPv6 -function Hex( hex, prefix, family, swap ) - family = ( family ~= nil ) and family or FAMILY_INET4 - swap = ( swap == nil ) and true or swap - prefix = prefix or __maxlen(family) - - local len = __maxlen(family) - local tmp = "" - local data = { } - - for i = 1, (len/4) - #hex do tmp = tmp .. '0' end - - if swap and LITTLE_ENDIAN then - for i = #hex, 1, -2 do tmp = tmp .. hex:sub( i - 1, i ) end - else - tmp = tmp .. hex - end - - hex = tmp - - for i = 1, ( len / 4 ), 4 do - local n = tonumber( hex:sub( i, i+3 ), 16 ) - if n then - data[#data+1] = n - else - return nil - end - end - - return __bless({ family, data, prefix }) -end - - ---- LuCI IP Library / CIDR instances --- @class module --- @cstyle instance --- @name luci.ip.cidr -cidr = luci.util.class() - ---- Test whether the instance is a IPv4 address. --- @return Boolean indicating a IPv4 address type --- @see cidr.is6 -function cidr.is4( self ) - return self[1] == FAMILY_INET4 -end - ---- Test whether the instance is a IPv6 address. --- @return Boolean indicating a IPv6 address type --- @see cidr.is4 -function cidr.is6( self ) - return self[1] == FAMILY_INET6 -end - ---- Return a corresponding string representation of the instance. --- If the prefix length is lower then the maximum possible prefix length for the --- corresponding address type then the address is returned in CIDR notation, --- otherwise the prefix will be left out. -function cidr.string( self ) - local str - if self:is4() then - str = string.format( - "%d.%d.%d.%d", - bit.rshift(self[2][1], 8), bit.band(self[2][1], 0xFF), - bit.rshift(self[2][2], 8), bit.band(self[2][2], 0xFF) - ) - if self[3] < 32 then - str = str .. "/" .. self[3] - end - elseif self:is6() then - str = string.format( "%X:%X:%X:%X:%X:%X:%X:%X", unpack(self[2]) ) - if self[3] < 128 then - str = str .. "/" .. self[3] - end - end - return str -end - ---- Test whether the value of the instance is lower then the given address. --- This function will throw an exception if the given address has a different --- family than this instance. --- @param addr A luci.ip.cidr instance to compare against --- @return Boolean indicating whether this instance is lower --- @see cidr.higher --- @see cidr.equal -function cidr.lower( self, addr ) - assert( self[1] == addr[1], "Can't compare IPv4 and IPv6 addresses" ) - for i = 1, #self[2] do - if self[2][i] ~= addr[2][i] then - return self[2][i] < addr[2][i] - end - end - return false -end - ---- Test whether the value of the instance is higher then the given address. --- This function will throw an exception if the given address has a different --- family than this instance. --- @param addr A luci.ip.cidr instance to compare against --- @return Boolean indicating whether this instance is higher --- @see cidr.lower --- @see cidr.equal -function cidr.higher( self, addr ) - assert( self[1] == addr[1], "Can't compare IPv4 and IPv6 addresses" ) - for i = 1, #self[2] do - if self[2][i] ~= addr[2][i] then - return self[2][i] > addr[2][i] - end - end - return false -end - ---- Test whether the value of the instance is equal to the given address. --- This function will throw an exception if the given address is a different --- family than this instance. --- @param addr A luci.ip.cidr instance to compare against --- @return Boolean indicating whether this instance is equal --- @see cidr.lower --- @see cidr.higher -function cidr.equal( self, addr ) - assert( self[1] == addr[1], "Can't compare IPv4 and IPv6 addresses" ) - for i = 1, #self[2] do - if self[2][i] ~= addr[2][i] then - return false - end - end - return true -end - ---- Return the prefix length of this CIDR instance. --- @param mask Override instance prefix with given netmask (optional) --- @return Prefix length in bit -function cidr.prefix( self, mask ) - local prefix = self[3] - - if mask then - prefix = 0 - - local stop = false - local obj = type(mask) ~= "table" - and ( self:is4() and IPv4(mask) or IPv6(mask) ) or mask - - if not obj then return nil end - - for _, word in ipairs(obj[2]) do - if word == 0xFFFF then - prefix = prefix + 16 - else - local bitmask = bit.lshift(1, 15) - while bit.band(word, bitmask) == bitmask do - prefix = prefix + 1 - bitmask = bit.lshift(1, 15 - (prefix % 16)) - end - - break - end - end - end - - return prefix -end - ---- Return a corresponding CIDR representing the network address of this --- instance. --- @param bits Override prefix length of this instance (optional) --- @return CIDR instance containing the network address --- @see cidr.host --- @see cidr.broadcast --- @see cidr.mask -function cidr.network( self, bits ) - local data = { } - bits = bits or self[3] - - for i = 1, math.floor( bits / 16 ) do - data[#data+1] = self[2][i] - end - - if #data < #self[2] then - data[#data+1] = bit.band( self[2][1+#data], __mask16(bits) ) - - for i = #data + 1, #self[2] do - data[#data+1] = 0 - end - end - - return __bless({ self[1], data, __maxlen(self[1]) }) -end - ---- Return a corresponding CIDR representing the host address of this --- instance. This is intended to extract the host address from larger subnet. --- @return CIDR instance containing the network address --- @see cidr.network --- @see cidr.broadcast --- @see cidr.mask -function cidr.host( self ) - return __bless({ self[1], self[2], __maxlen(self[1]) }) -end - ---- Return a corresponding CIDR representing the netmask of this instance. --- @param bits Override prefix length of this instance (optional) --- @return CIDR instance containing the netmask --- @see cidr.network --- @see cidr.host --- @see cidr.broadcast -function cidr.mask( self, bits ) - local data = { } - bits = bits or self[3] - - for i = 1, math.floor( bits / 16 ) do - data[#data+1] = 0xFFFF - end - - if #data < #self[2] then - data[#data+1] = __mask16(bits) - - for i = #data + 1, #self[2] do - data[#data+1] = 0 - end - end - - return __bless({ self[1], data, __maxlen(self[1]) }) -end - ---- Return CIDR containing the broadcast address of this instance. --- @return CIDR instance containing the netmask, always nil for IPv6 --- @see cidr.network --- @see cidr.host --- @see cidr.mask -function cidr.broadcast( self ) - -- IPv6 has no broadcast addresses (XXX: assert() instead?) - if self[1] == FAMILY_INET4 then - local data = { unpack(self[2]) } - local offset = math.floor( self[3] / 16 ) + 1 - - if offset <= #data then - data[offset] = bit.bor( data[offset], __not16(self[3]) ) - for i = offset + 1, #data do data[i] = 0xFFFF end - - return __bless({ self[1], data, __maxlen(self[1]) }) - end - end -end - ---- Test whether this instance fully contains the given CIDR instance. --- @param addr CIDR instance to test against --- @return Boolean indicating whether this instance contains the given CIDR -function cidr.contains( self, addr ) - assert( self[1] == addr[1], "Can't compare IPv4 and IPv6 addresses" ) - - if self:prefix() <= addr:prefix() then - return self:network() == addr:network(self:prefix()) - end - - return false -end - ---- Add specified amount of hosts to this instance. --- @param amount Number of hosts to add to this instance --- @param inplace Boolen indicating whether to alter values inplace (optional) --- @return CIDR representing the new address or nil on overflow error --- @see cidr.sub -function cidr.add( self, amount, inplace ) - local data = { unpack(self[2]) } - local shorts = __array16( amount, self[1] ) - - for pos = #data, 1, -1 do - local add = ( #shorts > 0 ) and table.remove( shorts, #shorts ) or 0 - if ( data[pos] + add ) > 0xFFFF then - data[pos] = ( data[pos] + add ) % 0xFFFF - if pos > 1 then - data[pos-1] = data[pos-1] + ( add - data[pos] ) - else - return nil - end - else - data[pos] = data[pos] + add - end - end - - if inplace then - self[2] = data - return self - else - return __bless({ self[1], data, self[3] }) - end -end - ---- Substract specified amount of hosts from this instance. --- @param amount Number of hosts to substract from this instance --- @param inplace Boolen indicating whether to alter values inplace (optional) --- @return CIDR representing the new address or nil on underflow error --- @see cidr.add -function cidr.sub( self, amount, inplace ) - local data = { unpack(self[2]) } - local shorts = __array16( amount, self[1] ) - - for pos = #data, 1, -1 do - local sub = ( #shorts > 0 ) and table.remove( shorts, #shorts ) or 0 - if ( data[pos] - sub ) < 0 then - data[pos] = ( sub - data[pos] ) % 0xFFFF - if pos > 1 then - data[pos-1] = data[pos-1] - ( sub + data[pos] ) - else - return nil - end - else - data[pos] = data[pos] - sub - end - end - - if inplace then - self[2] = data - return self - else - return __bless({ self[1], data, self[3] }) - end -end - ---- Return CIDR containing the lowest available host address within this subnet. --- @return CIDR containing the host address, nil if subnet is too small --- @see cidr.maxhost -function cidr.minhost( self ) - if self[3] <= __sublen(self[1]) then - -- 1st is Network Address in IPv4 and Subnet-Router Anycast Adresse in IPv6 - return self:network():add(1, true) - end -end - ---- Return CIDR containing the highest available host address within the subnet. --- @return CIDR containing the host address, nil if subnet is too small --- @see cidr.minhost -function cidr.maxhost( self ) - if self[3] <= __sublen(self[1]) then - local data = { unpack(self[2]) } - local offset = math.floor( self[3] / 16 ) + 1 - - data[offset] = bit.bor( data[offset], __not16(self[3]) ) - for i = offset + 1, #data do data[i] = 0xFFFF end - data = __bless({ self[1], data, __maxlen(self[1]) }) - - -- Last address in reserved for Broadcast Address in IPv4 - if data[1] == FAMILY_INET4 then data:sub(1, true) end - - return data - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/json.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/json.lua deleted file mode 100644 index 7a5bff1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/json.lua +++ /dev/null @@ -1,538 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: json.lua 3997 2009-01-04 20:09:13Z Cyrus $ - -Decoder: - Info: - null will be decoded to luci.json.null if first parameter of Decoder() is true - - Example: - decoder = luci.json.Decoder() - luci.ltn12.pump.all(luci.ltn12.source.string("decodableJSON"), decoder:sink()) - luci.util.dumptable(decoder:get()) - - Known issues: - does not support unicode conversion \uXXYY with XX != 00 will be ignored - - -Encoder: - Info: - Accepts numbers, strings, nil, booleans as they are - Accepts luci.json.null as replacement for nil - Accepts full associative and full numerically indexed tables - Mixed tables will loose their associative values during conversion - Iterator functions will be encoded as an array of their return values - Non-iterator functions will probably corrupt the encoder - - Example: - encoder = luci.json.Encoder(encodableData) - luci.ltn12.pump.all(encoder:source(), luci.ltn12.sink.file(io.open("someFile", w))) -]]-- - -local util = require "luci.util" -local table = require "table" -local string = require "string" -local coroutine = require "coroutine" - -local assert = assert -local tonumber = tonumber -local tostring = tostring -local error = error -local type = type -local pairs = pairs -local ipairs = ipairs -local next = next - -local getmetatable = getmetatable - ---- LuCI JSON-Library --- @cstyle instance -module "luci.json" - ---- Null replacement function --- @return null -function null() - return null -end - ---- Create a new JSON-Encoder. --- @class function --- @name Encoder --- @param data Lua-Object to be encoded. --- @param buffersize Blocksize of returned data source. --- @param fastescape Use non-standard escaping (don't escape control chars) --- @return JSON-Encoder -Encoder = util.class() - -function Encoder.__init__(self, data, buffersize, fastescape) - self.data = data - self.buffersize = buffersize or 512 - self.buffer = "" - self.fastescape = fastescape - - getmetatable(self).__call = Encoder.source -end - ---- Create an LTN12 source providing the encoded JSON-Data. --- @return LTN12 source -function Encoder.source(self) - local source = coroutine.create(self.dispatch) - return function() - local res, data = coroutine.resume(source, self, self.data, true) - if res then - return data - else - return nil, data - end - end -end - -function Encoder.dispatch(self, data, start) - local parser = self.parsers[type(data)] - - parser(self, data) - - if start then - if #self.buffer > 0 then - coroutine.yield(self.buffer) - end - - coroutine.yield() - end -end - -function Encoder.put(self, chunk) - if self.buffersize < 2 then - corountine.yield(chunk) - else - if #self.buffer + #chunk > self.buffersize then - local written = 0 - local fbuffer = self.buffersize - #self.buffer - - coroutine.yield(self.buffer .. chunk:sub(written + 1, fbuffer)) - written = fbuffer - - while #chunk - written > self.buffersize do - fbuffer = written + self.buffersize - coroutine.yield(chunk:sub(written + 1, fbuffer)) - written = fbuffer - end - - self.buffer = chunk:sub(written + 1) - else - self.buffer = self.buffer .. chunk - end - end -end - -function Encoder.parse_nil(self) - self:put("null") -end - -function Encoder.parse_bool(self, obj) - self:put(obj and "true" or "false") -end - -function Encoder.parse_number(self, obj) - self:put(tostring(obj)) -end - -function Encoder.parse_string(self, obj) - if self.fastescape then - self:put('"' .. obj:gsub('\\', '\\\\'):gsub('"', '\\"') .. '"') - else - self:put('"' .. - obj:gsub('[%c\\"]', - function(char) - return '\\u00%02x' % char:byte() - end - ) - .. '"') - end -end - -function Encoder.parse_iter(self, obj) - if obj == null then - return self:put("null") - end - - if type(obj) == "table" and (#obj == 0 and next(obj)) then - self:put("{") - local first = true - - for key, entry in pairs(obj) do - first = first or self:put(",") - first = first and false - self:parse_string(tostring(key)) - self:put(":") - self:dispatch(entry) - end - - self:put("}") - else - self:put("[") - local first = true - - if type(obj) == "table" then - for i=1, #obj do - first = first or self:put(",") - first = first and nil - self:dispatch(obj[i]) - end - else - for entry in obj do - first = first or self:put(",") - first = first and nil - self:dispatch(entry) - end - end - - self:put("]") - end -end - -Encoder.parsers = { - ['nil'] = Encoder.parse_nil, - ['table'] = Encoder.parse_iter, - ['number'] = Encoder.parse_number, - ['string'] = Encoder.parse_string, - ['boolean'] = Encoder.parse_bool, - ['function'] = Encoder.parse_iter -} - - ---- Create a new JSON-Decoder. --- @class function --- @name Decoder --- @param customnull Use luci.json.null instead of nil for decoding null --- @return JSON-Decoder -Decoder = util.class() - -function Decoder.__init__(self, customnull) - self.cnull = customnull - getmetatable(self).__call = Decoder.sink -end - ---- Create an LTN12 sink from the decoder object which accepts the JSON-Data. --- @return LTN12 sink -function Decoder.sink(self) - local sink = coroutine.create(self.dispatch) - return function(...) - return coroutine.resume(sink, self, ...) - end -end - - ---- Get the decoded data packets after the rawdata has been sent to the sink. --- @return Decoded data -function Decoder.get(self) - return self.data -end - -function Decoder.dispatch(self, chunk, src_err, strict) - local robject, object - local oset = false - - while chunk do - while chunk and #chunk < 1 do - chunk = self:fetch() - end - - assert(not strict or chunk, "Unexpected EOS") - if not chunk then break end - - local char = chunk:sub(1, 1) - local parser = self.parsers[char] - or (char:match("%s") and self.parse_space) - or (char:match("[0-9-]") and self.parse_number) - or error("Unexpected char '%s'" % char) - - chunk, robject = parser(self, chunk) - - if parser ~= self.parse_space then - assert(not oset, "Scope violation: Too many objects") - object = robject - oset = true - - if strict then - return chunk, object - end - end - end - - assert(not src_err, src_err) - assert(oset, "Unexpected EOS") - - self.data = object -end - - -function Decoder.fetch(self) - local tself, chunk, src_err = coroutine.yield() - assert(chunk or not src_err, src_err) - return chunk -end - - -function Decoder.fetch_atleast(self, chunk, bytes) - while #chunk < bytes do - local nchunk = self:fetch() - assert(nchunk, "Unexpected EOS") - chunk = chunk .. nchunk - end - - return chunk -end - - -function Decoder.fetch_until(self, chunk, pattern) - local start = chunk:find(pattern) - - while not start do - local nchunk = self:fetch() - assert(nchunk, "Unexpected EOS") - chunk = chunk .. nchunk - start = chunk:find(pattern) - end - - return chunk, start -end - - -function Decoder.parse_space(self, chunk) - local start = chunk:find("[^%s]") - - while not start do - chunk = self:fetch() - if not chunk then - return nil - end - start = chunk:find("[^%s]") - end - - return chunk:sub(start) -end - - -function Decoder.parse_literal(self, chunk, literal, value) - chunk = self:fetch_atleast(chunk, #literal) - assert(chunk:sub(1, #literal) == literal, "Invalid character sequence") - return chunk:sub(#literal + 1), value -end - - -function Decoder.parse_null(self, chunk) - return self:parse_literal(chunk, "null", self.cnull and null) -end - - -function Decoder.parse_true(self, chunk) - return self:parse_literal(chunk, "true", true) -end - - -function Decoder.parse_false(self, chunk) - return self:parse_literal(chunk, "false", false) -end - - -function Decoder.parse_number(self, chunk) - local chunk, start = self:fetch_until(chunk, "[^0-9eE.+-]") - local number = tonumber(chunk:sub(1, start - 1)) - assert(number, "Invalid number specification") - return chunk:sub(start), number -end - - -function Decoder.parse_string(self, chunk) - local str = "" - local object = nil - assert(chunk:sub(1, 1) == '"', 'Expected "') - chunk = chunk:sub(2) - - while true do - local spos = chunk:find('[\\"]') - if spos then - str = str .. chunk:sub(1, spos - 1) - - local char = chunk:sub(spos, spos) - if char == '"' then -- String end - chunk = chunk:sub(spos + 1) - break - elseif char == "\\" then -- Escape sequence - chunk, object = self:parse_escape(chunk:sub(spos)) - str = str .. object - end - else - str = str .. chunk - chunk = self:fetch() - assert(chunk, "Unexpected EOS while parsing a string") - end - end - - return chunk, str -end - - -function Decoder.parse_escape(self, chunk) - local str = "" - chunk = self:fetch_atleast(chunk:sub(2), 1) - local char = chunk:sub(1, 1) - chunk = chunk:sub(2) - - if char == '"' then - return chunk, '"' - elseif char == "\\" then - return chunk, "\\" - elseif char == "u" then - chunk = self:fetch_atleast(chunk, 4) - local s1, s2 = chunk:sub(1, 2), chunk:sub(3, 4) - s1, s2 = tonumber(s1, 16), tonumber(s2, 16) - assert(s1 and s2, "Invalid Unicode character") - - -- ToDo: Unicode support - return chunk:sub(5), s1 == 0 and string.char(s2) or "" - elseif char == "/" then - return chunk, "/" - elseif char == "b" then - return chunk, "\b" - elseif char == "f" then - return chunk, "\f" - elseif char == "n" then - return chunk, "\n" - elseif char == "r" then - return chunk, "\r" - elseif char == "t" then - return chunk, "\t" - else - error("Unexpected escaping sequence '\\%s'" % char) - end -end - - -function Decoder.parse_array(self, chunk) - chunk = chunk:sub(2) - local array = {} - local nextp = 1 - - local chunk, object = self:parse_delimiter(chunk, "%]") - - if object then - return chunk, array - end - - repeat - chunk, object = self:dispatch(chunk, nil, true) - table.insert(array, nextp, object) - nextp = nextp + 1 - - chunk, object = self:parse_delimiter(chunk, ",%]") - assert(object, "Delimiter expected") - until object == "]" - - return chunk, array -end - - -function Decoder.parse_object(self, chunk) - chunk = chunk:sub(2) - local array = {} - local name - - local chunk, object = self:parse_delimiter(chunk, "}") - - if object then - return chunk, array - end - - repeat - chunk = self:parse_space(chunk) - assert(chunk, "Unexpected EOS") - - chunk, name = self:parse_string(chunk) - - chunk, object = self:parse_delimiter(chunk, ":") - assert(object, "Separator expected") - - chunk, object = self:dispatch(chunk, nil, true) - array[name] = object - - chunk, object = self:parse_delimiter(chunk, ",}") - assert(object, "Delimiter expected") - until object == "}" - - return chunk, array -end - - -function Decoder.parse_delimiter(self, chunk, delimiter) - while true do - chunk = self:fetch_atleast(chunk, 1) - local char = chunk:sub(1, 1) - if char:match("%s") then - chunk = self:parse_space(chunk) - assert(chunk, "Unexpected EOS") - elseif char:match("[%s]" % delimiter) then - return chunk:sub(2), char - else - return chunk, nil - end - end -end - - -Decoder.parsers = { - ['"'] = Decoder.parse_string, - ['t'] = Decoder.parse_true, - ['f'] = Decoder.parse_false, - ['n'] = Decoder.parse_null, - ['['] = Decoder.parse_array, - ['{'] = Decoder.parse_object -} - - ---- Create a new Active JSON-Decoder. --- @class function --- @name ActiveDecoder --- @param customnull Use luci.json.null instead of nil for decoding null --- @return Active JSON-Decoder -ActiveDecoder = util.class(Decoder) - -function ActiveDecoder.__init__(self, source, customnull) - Decoder.__init__(self, customnull) - self.source = source - self.chunk = nil - getmetatable(self).__call = self.get -end - - ---- Fetches one JSON-object from given source --- @return Decoded object -function ActiveDecoder.get(self) - local chunk, src_err, object - if not self.chunk then - chunk, src_err = self.source() - else - chunk = self.chunk - end - - self.chunk, object = self:dispatch(chunk, src_err, true) - return object -end - - -function ActiveDecoder.fetch(self) - local chunk, src_err = self.source() - assert(chunk or not src_err, src_err) - return chunk -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpc.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpc.lua deleted file mode 100644 index 177383d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpc.lua +++ /dev/null @@ -1,94 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: jsonrpc.lua 3000 2008-08-29 12:27:54Z Cyrus $ -]]-- - -module("luci.jsonrpc", package.seeall) -require "luci.json" - -function resolve(mod, method) - local path = luci.util.split(method, ".") - - for j=1, #path-1 do - if not type(mod) == "table" then - break - end - mod = rawget(mod, path[j]) - if not mod then - break - end - end - mod = type(mod) == "table" and rawget(mod, path[#path]) or nil - if type(mod) == "function" then - return mod - end -end - -function handle(tbl, rawsource, ...) - local decoder = luci.json.Decoder() - local stat = luci.ltn12.pump.all(rawsource, decoder:sink()) - local json = decoder:get() - local response - local success = false - - if stat then - if type(json.method) == "string" - and (not json.params or type(json.params) == "table") then - local method = resolve(tbl, json.method) - if method then - response = reply(json.jsonrpc, json.id, - proxy(method, unpack(json.params or {}))) - else - response = reply(json.jsonrpc, json.id, - nil, {code=-32601, message="Method not found."}) - end - else - response = reply(json.jsonrpc, json.id, - nil, {code=-32600, message="Invalid request."}) - end - else - response = reply("2.0", nil, - nil, {code=-32700, message="Parse error."}) - end - - return luci.json.Encoder(response, ...):source() -end - -function reply(jsonrpc, id, res, err) - require "luci.json" - id = id or luci.json.null - - -- 1.0 compatibility - if jsonrpc ~= "2.0" then - jsonrpc = nil - res = res or luci.json.null - err = err or luci.json.null - end - - return {id=id, result=res, error=err, jsonrpc=jsonrpc} -end - -function proxy(method, ...) - local res = {luci.util.copcall(method, ...)} - local stat = table.remove(res, 1) - - if not stat then - return nil, {code=-32602, message="Invalid params.", data=table.remove(res, 1)} - else - if #res <= 1 then - return res[1] or luci.json.null - else - return res - end - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uci.lua deleted file mode 100644 index 7cd7f8e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uci.lua +++ /dev/null @@ -1,94 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: uci.lua 3132 2008-09-05 19:27:19Z Cyrus $ -]]-- - -local uci = require "luci.model.uci".cursor() -local ucis = require "luci.model.uci".cursor_state() -local table = require "table" - - -module "luci.jsonrpcbind.uci" -_M, _PACKAGE, _NAME = nil, nil, nil - -function add(config, ...) - uci:load(config) - local stat = uci:add(config, ...) - return uci:save(config) and stat -end - -function apply(config) - return uci:apply(config) -end - -function changes(...) - return uci:changes(...) -end - -function commit(config) - return uci:load(config) and uci:commit(config) -end - -function delete(config, ...) - uci:load(config) - return uci:delete(config, ...) and uci:save(config) -end - -function delete_all(config, ...) - uci:load(config) - return uci:delete_all(config, ...) and uci:save(config) -end - -function foreach(config, stype) - uci:load(config) - local sections = {} - - return uci:foreach(config, stype, function(section) - table.insert(sections, section) - end) and sections -end - -function get(config, ...) - uci:load(config) - return uci:get(config, ...) -end - -function get_all(config, ...) - uci:load(config) - return uci:get_all(config, ...) -end - -function get_state(config, ...) - ucis:load(config) - return ucis:get(config, ...) -end - -function revert(config) - return uci:load(config) and uci:revert(config) -end - -function section(config, ...) - uci:load(config) - return uci:section(config, ...) and uci:save(config) -end - -function set(config, ...) - uci:load(config) - return uci:set(config, ...) and uci:save(config) -end - -function tset(config, ...) - uci:load(config) - return uci:tset(config, ...) and uci:save(config) -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uvl.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uvl.lua deleted file mode 100644 index b06c3e2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/jsonrpcbind/uvl.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: uvl.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -local uvl = require "luci.uvl".UVL() -local table = require "table" - -module "luci.jsonrpcbind.uvl" -_M, _PACKAGE, _NAME = nil, nil, nil - - -function get_scheme(...) - return uvl:get_scheme(...) -end - -function validate(...) - return {uvl:validate(...)} -end - -function validate_config(...) - return {uvl:validate_config(...)} -end - -function validate_section(...) - return {uvl:validate_section(...)} -end - -function validate_option(...) - return {uvl:validate_option(...)} -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk.lua deleted file mode 100644 index 7117c75..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk.lua +++ /dev/null @@ -1,41 +0,0 @@ -module("luci.lpk", package.seeall) -require("luci.lpk.util") -require("luci.lpk.core") - -__appname__ = "LuCI »lpk« Package Manager" -__version__ = "0.1" -__authors__ = "Steven Barth, Jo-Philipp Wich" -__cpyrght__ = string.format("Copyright (c) 2008 %s", __authors__) - - -options, arguments = luci.lpk.util.getopt(arg) -config = luci.util.dtable() -machine = luci.lpk.core.Machine() - -local cfgdump = loadfile("/etc/lpk.conf") -if cfgdump then - setfenv(cfgdump, config) - pcall(cfgdump) -end - -if #arguments < 1 then - luci.lpk.util.splash() -else - local task, error = machine:task(table.remove(arguments, 1), - unpack(arguments)) - - if task then - local stat, error = task:perform() - if not stat then - luci.util.perror(error or task.register.errstr or "Unknown Error") - os.exit(task.register.error or 1) - end - else - luci.util.perror((error or "Unknown Error") .. "\n") - luci.lpk.util.splash() - os.exit(1) - end -end - - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core.lua deleted file mode 100644 index 97de4fa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core.lua +++ /dev/null @@ -1,107 +0,0 @@ -module("luci.lpk.core", package.seeall) -require("luci.util") - -Task = luci.util.class() - -function Task.__init__(self, machine, register, start) - self.machine = machine - - -- The queue that has to be processed - self.work = {start} - - -- The queue that has to be processed in case of rollback - self.done = {} - - -- The Task register - self.register = register -end - -function Task.rollback(self) - if #self.done < 1 then - return false - end - - local state = table.remove(self.done) - if not state.rollback then - return true - end - - local ret, err = pcall(state.rollback, state, self.register) - - if ret then - return true - else - return false, err - end -end - -function Task.step(self) - local state = table.remove(self.work) - local ret, next = pcall(state.process, self.register) - - if ret then - if next then - local nstate = self.machine:state(next) - if nstate then - table.insert(self.work, state) - table.insert(self.work, nstate) - else - self.register.error = 2 - self.register.errstr = "Unknown state: " .. next - return false - end - else - table.insert(self.done, state) - end - - return #self.work > 0 - else - self.register.error = next - return false - end -end - -function Task.perform(self) - while self:step() do - end - - if not self.register.error then - return true - else - local stat, err - repeat - stat, err = self:rollback() - until not stat - - if err then - self.register.errstr = err - self.register.error = 2 - end - - return false - end -end - - -Machine = luci.util.class() - -function Machine.__init__(self, namespace) - self.namespace = namespace or _NAME -end - -function Machine.state(self, name) - local ret, state = pcall(require, self.namespace .. "." .. name) - return ret and state -end - -function Machine.task(self, name, ...) - local start = self:state(name) - - if type(start) ~= "table" or not start.entry then - return false, "No such command: " .. name - end - - local register = {} - - return start.entry(register, ...) and Task(self, register, start) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/download.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/download.lua deleted file mode 100644 index 7b30647..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/download.lua +++ /dev/null @@ -1 +0,0 @@ -module("luci.lpk.core.download", package.seeall) diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/install.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/install.lua deleted file mode 100644 index 434f618..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/install.lua +++ /dev/null @@ -1,16 +0,0 @@ -module("luci.lpk.core.install", package.seeall) - -function entry(register, ...) - print("Requested install of " .. table.concat(arg, ", ")) - return true -end - -function process(register) - register.sometext = "Test" - if not register.retrieved then - print("Step down to retrieve") - return "retrieve" - else - print("Coming up again") - end -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/resolve.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/resolve.lua deleted file mode 100644 index e69de29..0000000 diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/retrieve.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/retrieve.lua deleted file mode 100644 index 6176a94..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/retrieve.lua +++ /dev/null @@ -1,7 +0,0 @@ -module("luci.lpk.core.retrieve", package.seeall) - -function process(register) - print "Now in retrieve" - print (register.sometext) - register.retrieved = true -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/unpack.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/core/unpack.lua deleted file mode 100644 index e69de29..0000000 diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/util.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/util.lua deleted file mode 100644 index 95bdb96..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/lpk/util.lua +++ /dev/null @@ -1,59 +0,0 @@ -module("luci.lpk.util", package.seeall) - -function getopt( arg, options ) - options = options or "" - local tab = {} - local args = {} - for k, v in ipairs(arg) do - if v:sub(1, 2) == "--" then - local x = v:find( "=", 1, true ) - if x then - tab[ v:sub( 3, x-1 ) ] = v:sub( x+1 ) - else - tab[ v:sub( 3 ) ] = true - end - elseif v:sub( 1, 1 ) == "-" then - local y = 2 - local l = #v - local jopt - while ( y <= l ) do - jopt = v:sub( y, y ) - if options:find( jopt, 1, true ) then - if y < l then - tab[ jopt ] = v:sub( y+1 ) - y = l - else - tab[ jopt ] = arg[ k + 1 ] - arg[ k + 1 ] = "" - end - else - tab[ jopt ] = true - end - y = y + 1 - end - elseif #v > 0 then - table.insert(args, v) - end - end - return tab, args -end - -function splash() - require("luci.lpk") - luci.util.perror(string.format("%s v%s\n%s", - luci.lpk.__appname__, luci.lpk.__version__, luci.lpk.__cpyrght__)) - luci.util.perror([[ - -Usage: - lpk [options] [arguments] - lpk [options] install|remove pkg1 [pkg2] [...] [pkgn] - -Commands: - install - Install packages - remove - Remove packages - purge - Remove packages and their configuration files - -Options: - --force-depends - Ignore unresolvable dependencies -]]) -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ltn12.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ltn12.lua deleted file mode 100644 index f258cef..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ltn12.lua +++ /dev/null @@ -1,391 +0,0 @@ ---[[ -LuaSocket 2.0.2 license -Copyright � 2004-2007 Diego Nehab - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. -]]-- ---[[ - Changes made by LuCI project: - * Renamed to luci.ltn12 to avoid collisions with luasocket - * Added inline documentation -]]-- ------------------------------------------------------------------------------ --- LTN12 - Filters, sources, sinks and pumps. --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: ltn12.lua 3246 2008-09-12 07:48:36Z Cyrus $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module ------------------------------------------------------------------------------ -local string = require("string") -local table = require("table") -local base = _G - ---- Diego Nehab's LTN12 - Filters, sources, sinks and pumps. --- See http://lua-users.org/wiki/FiltersSourcesAndSinks for design concepts -module("luci.ltn12") - -filter = {} -source = {} -sink = {} -pump = {} - --- 2048 seems to be better in windows... -BLOCKSIZE = 2048 -_VERSION = "LTN12 1.0.1" - ------------------------------------------------------------------------------ --- Filter stuff ------------------------------------------------------------------------------ - ---- LTN12 Filter constructors --- @class module --- @name luci.ltn12.filter - ---- Return a high level filter that cycles a low-level filter --- by passing it each chunk and updating a context between calls. --- @param low Low-level filter --- @param ctx Context --- @param extra Extra argument passed to the low-level filter --- @return LTN12 filter -function filter.cycle(low, ctx, extra) - base.assert(low) - return function(chunk) - local ret - ret, ctx = low(ctx, chunk, extra) - return ret - end -end - ---- Chain a bunch of filters together. --- (thanks to Wim Couwenberg) --- @param ... filters to be chained --- @return LTN12 filter -function filter.chain(...) - local n = table.getn(arg) - local top, index = 1, 1 - local retry = "" - return function(chunk) - retry = chunk and retry - while true do - if index == top then - chunk = arg[index](chunk) - if chunk == "" or top == n then return chunk - elseif chunk then index = index + 1 - else - top = top+1 - index = top - end - else - chunk = arg[index](chunk or "") - if chunk == "" then - index = index - 1 - chunk = retry - elseif chunk then - if index == n then return chunk - else index = index + 1 end - else base.error("filter returned inappropriate nil") end - end - end - end -end - ------------------------------------------------------------------------------ --- Source stuff ------------------------------------------------------------------------------ - ---- LTN12 Source constructors --- @class module --- @name luci.ltn12.source - --- create an empty source -local function empty() - return nil -end - ---- Create an empty source. --- @return LTN12 source -function source.empty() - return empty -end - ---- Return a source that just outputs an error. --- @param err Error object --- @return LTN12 source -function source.error(err) - return function() - return nil, err - end -end - ---- Create a file source. --- @param handle File handle ready for reading --- @param io_err IO error object --- @return LTN12 source -function source.file(handle, io_err) - if handle then - return function() - local chunk = handle:read(BLOCKSIZE) - if not chunk then handle:close() end - return chunk - end - else return source.error(io_err or "unable to open file") end -end - ---- Turn a fancy source into a simple source. --- @param src fancy source --- @return LTN12 source -function source.simplify(src) - base.assert(src) - return function() - local chunk, err_or_new = src() - src = err_or_new or src - if not chunk then return nil, err_or_new - else return chunk end - end -end - ---- Create a string source. --- @param s Data --- @return LTN12 source -function source.string(s) - if s then - local i = 1 - return function() - local chunk = string.sub(s, i, i+BLOCKSIZE-1) - i = i + BLOCKSIZE - if chunk ~= "" then return chunk - else return nil end - end - else return source.empty() end -end - ---- Creates rewindable source. --- @param src LTN12 source to be made rewindable --- @return LTN12 source -function source.rewind(src) - base.assert(src) - local t = {} - return function(chunk) - if not chunk then - chunk = table.remove(t) - if not chunk then return src() - else return chunk end - else - t[#t+1] = chunk - end - end -end - ---- Chain a source and a filter together. --- @param src LTN12 source --- @param f LTN12 filter --- @return LTN12 source -function source.chain(src, f) - base.assert(src and f) - local last_in, last_out = "", "" - local state = "feeding" - local err - return function() - if not last_out then - base.error('source is empty!', 2) - end - while true do - if state == "feeding" then - last_in, err = src() - if err then return nil, err end - last_out = f(last_in) - if not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - elseif last_out ~= "" then - state = "eating" - if last_in then last_in = "" end - return last_out - end - else - last_out = f(last_in) - if last_out == "" then - if last_in == "" then - state = "feeding" - else - base.error('filter returned ""') - end - elseif not last_out then - if last_in then - base.error('filter returned inappropriate nil') - else - return nil - end - else - return last_out - end - end - end - end -end - ---- Create a source that produces contents of several sources. --- Sources will be used one after the other, as if they were concatenated --- (thanks to Wim Couwenberg) --- @param ... LTN12 sources --- @return LTN12 source -function source.cat(...) - local src = table.remove(arg, 1) - return function() - while src do - local chunk, err = src() - if chunk then return chunk end - if err then return nil, err end - src = table.remove(arg, 1) - end - end -end - ------------------------------------------------------------------------------ --- Sink stuff ------------------------------------------------------------------------------ - ---- LTN12 sink constructors --- @class module --- @name luci.ltn12.sink - ---- Create a sink that stores into a table. --- @param t output table to store into --- @return LTN12 sink -function sink.table(t) - t = t or {} - local f = function(chunk, err) - if chunk then t[#t+1] = chunk end - return 1 - end - return f, t -end - ---- Turn a fancy sink into a simple sink. --- @param snk fancy sink --- @return LTN12 sink -function sink.simplify(snk) - base.assert(snk) - return function(chunk, err) - local ret, err_or_new = snk(chunk, err) - if not ret then return nil, err_or_new end - snk = err_or_new or snk - return 1 - end -end - ---- Create a file sink. --- @param handle file handle to write to --- @param io_err IO error --- @return LTN12 sink -function sink.file(handle, io_err) - if handle then - return function(chunk, err) - if not chunk then - handle:close() - return 1 - else return handle:write(chunk) end - end - else return sink.error(io_err or "unable to open file") end -end - --- creates a sink that discards data -local function null() - return 1 -end - ---- Create a sink that discards data. --- @return LTN12 sink -function sink.null() - return null -end - ---- Create a sink that just returns an error. --- @param err Error object --- @return LTN12 sink -function sink.error(err) - return function() - return nil, err - end -end - ---- Chain a sink with a filter. --- @param f LTN12 filter --- @param snk LTN12 sink --- @return LTN12 sink -function sink.chain(f, snk) - base.assert(f and snk) - return function(chunk, err) - if chunk ~= "" then - local filtered = f(chunk) - local done = chunk and "" - while true do - local ret, snkerr = snk(filtered, err) - if not ret then return nil, snkerr end - if filtered == done then return 1 end - filtered = f(done) - end - else return 1 end - end -end - ------------------------------------------------------------------------------ --- Pump stuff ------------------------------------------------------------------------------ - ---- LTN12 pump functions --- @class module --- @name luci.ltn12.pump - ---- Pump one chunk from the source to the sink. --- @param src LTN12 source --- @param snk LTN12 sink --- @return Chunk of data or nil if an error occured --- @return Error object -function pump.step(src, snk) - local chunk, src_err = src() - local ret, snk_err = snk(chunk, src_err) - if chunk and ret then return 1 - else return nil, src_err or snk_err end -end - ---- Pump all data from a source to a sink, using a step function. --- @param src LTN12 source --- @param snk LTN12 sink --- @param step step function (optional) --- @return 1 if the operation succeeded otherwise nil --- @return Error object -function pump.all(src, snk, step) - base.assert(src and snk) - step = step or pump.step - while true do - local ret, err = step(src, snk) - if not ret then - if err then return nil, err - else return 1 end - end - end -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_index/luci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_index/luci.lua deleted file mode 100644 index bba0cf3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_index/luci.lua +++ /dev/null @@ -1,52 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: luci.lua 4038 2009-01-14 23:48:51Z Cyrus $ -]]-- -require("luci.config") -m = Map("luci", translate("webui"), translate("a_i_luci1", - "Hier können Eigenschaften und die Funktionalität der Oberfläche angepasst werden.")) - --- force reload of global luci config namespace to reflect the changes -function m.commit_handler(self) - package.loaded["luci.config"] = nil - require("luci.config") -end - - -c = m:section(NamedSection, "main", "core", translate("general")) - -l = c:option(ListValue, "lang", translate("language")) -l:value("auto") - -local i18ndir = luci.i18n.i18ndir .. "default." -for k, v in pairs(luci.config.languages) do - if k:sub(1, 1) ~= "." and luci.fs.access(i18ndir .. k:gsub("_", "-") .. ".lua") then - l:value(k, v) - end -end - -t = c:option(ListValue, "mediaurlbase", translate("design")) -for k, v in pairs(luci.config.themes) do - if k:sub(1, 1) ~= "." then - t:value(v, k) - end -end - -u = m:section(NamedSection, "uci_oncommit", "event", translate("a_i_ucicommit"), - translate("a_i_ucicommit1")) -u.dynamic = true - -f = m:section(NamedSection, "flash_keep", "extern", translate("a_i_keepflash"), - translate("a_i_keepflash1")) -f.dynamic = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/conntrack.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/conntrack.lua deleted file mode 100644 index 4daab8a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/conntrack.lua +++ /dev/null @@ -1,49 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: conntrack.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -f = SimpleForm("conntrack", translate("a_n_conntrack"), translate("a_n_conntrack_desc")) -f.reset = false -f.submit = false - -t = f:section(Table, luci.sys.net.arptable(), "ARP") -t:option(DummyValue, "IP address", translate("ipaddress")) -t:option(DummyValue, "HW address", translate("macaddress")) -t:option(DummyValue, "Device", translate("interface")) - -t = f:section(Table, luci.sys.net.conntrack() or {}, translate("a_n_conntrack")) -l3 = t:option(DummyValue, "layer3", translate("network")) -function l3.cfgvalue(self, ...) - return DummyValue.cfgvalue(self, ...):upper() -end - - -l4 = t:option(DummyValue, "layer4", translate("protocol")) -function l4.cfgvalue(self, ...) - return DummyValue.cfgvalue(self, ...):upper() -end - -s = t:option(DummyValue, "src", translate("source")) -function s.cfgvalue(self, section) - return "%s:%s" % { self.map:get(section, "src"), - self.map:get(section, "sport") or "*" } -end - -d = t:option(DummyValue, "dst", translate("destination")) -function d.cfgvalue(self, section) - return "%s:%s" % { self.map:get(section, "dst"), - self.map:get(section, "dport") or "*" } -end - -return f \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcp.lua deleted file mode 100644 index c366f02..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcp.lua +++ /dev/null @@ -1,72 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: dhcp.lua 3796 2008-11-18 12:29:25Z Cyrus $ -]]-- -require("luci.tools.webadmin") -require("luci.model.uci") -require("luci.util") - -m = Map("dhcp", "DHCP") - -s = m:section(TypedSection, "dhcp", "") -s.addremove = true -s.anonymous = true - -iface = s:option(ListValue, "interface", translate("interface")) -luci.tools.webadmin.cbi_add_networks(iface) - -local uci = luci.model.uci.cursor() -uci:foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - iface.default = iface.default or section[".name"] - s:depends("interface", section[".name"]) - end - end) - -uci:foreach("network", "alias", - function (section) - iface:value(section[".name"]) - s:depends("interface", section[".name"]) - end) - -s:option(Value, "start", translate("start")).rmempty = true - -s:option(Value, "limit", translate("limit")).rmempty = true - -s:option(Value, "leasetime").rmempty = true - -local dd = s:option(Flag, "dynamicdhcp") -dd.rmempty = false -function dd.cfgvalue(self, section) - return Flag.cfgvalue(self, section) or "1" -end - -s:option(Value, "name", translate("name")).optional = true - -ignore = s:option(Flag, "ignore") -ignore.optional = true - -s:option(Value, "netmask", translate("netmask")).optional = true - -s:option(Flag, "force").optional = true - -s:option(DynamicList, "dhcp_option").optional = true - - -for i, n in ipairs(s.children) do - if n ~= iface and n ~= ignore then - n:depends("ignore", "") - end -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcpleases.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcpleases.lua deleted file mode 100644 index 7a39b85..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/dhcpleases.lua +++ /dev/null @@ -1,61 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: dhcpleases.lua 2960 2008-08-26 23:00:44Z Cyrus $ -]]-- -require("luci.sys") -require("luci.tools.webadmin") -m2 = Map("luci_ethers", translate("dhcp_leases")) - -local leasefn, leasefp, leases -luci.model.uci.cursor():foreach("dhcp", "dnsmasq", - function(section) - leasefn = section.leasefile - end -) -local leasefp = leasefn and luci.fs.access(leasefn) and io.lines(leasefn) -if leasefp then - leases = {} - for lease in leasefp do - table.insert(leases, luci.util.split(lease, " ")) - end -end - -if leases then - v = m2:section(Table, leases, translate("dhcp_leases_active")) - ip = v:option(DummyValue, 3, translate("ipaddress")) - - mac = v:option(DummyValue, 2, translate("macaddress")) - - ltime = v:option(DummyValue, 1, translate("dhcp_timeremain")) - function ltime.cfgvalue(self, ...) - local value = DummyValue.cfgvalue(self, ...) - return luci.tools.webadmin.date_format( - os.difftime(tonumber(value), os.time()) - ) - end -end - -s = m2:section(TypedSection, "static_lease", translate("luci_ethers")) -s.addremove = true -s.anonymous = true -s.template = "cbi/tblsection" - -mac = s:option(Value, "macaddr", translate("macaddress")) -ip = s:option(Value, "ipaddr", translate("ipaddress")) -for i, dataset in ipairs(luci.sys.net.arptable()) do - ip:value(dataset["IP address"]) - mac:value(dataset["HW address"], - dataset["HW address"] .. " (" .. dataset["IP address"] .. ")") -end - - -return m2 diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/hosts.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/hosts.lua deleted file mode 100644 index 024625c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/hosts.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: hosts.lua 3172 2008-09-06 23:29:58Z jow $ -]]-- - -require("luci.sys") -require("luci.util") -m = Map("luci_hosts", translate("hostnames")) - -s = m:section(TypedSection, "host", translate("hostnames_entries")) -s.addremove = true -s.anonymous = true -s.template = "cbi/tblsection" - -hn = s:option(Value, "hostname", translate("hostnames_hostname")) -ip = s:option(Value, "ipaddr", translate("hostnames_address")) -for i, dataset in ipairs(luci.sys.net.arptable()) do - ip:value( - dataset["IP address"], - "%s (%s)" %{ dataset["IP address"], dataset["HW address"] } - ) -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/ifaces.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/ifaces.lua deleted file mode 100644 index ca98216..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/ifaces.lua +++ /dev/null @@ -1,343 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ifaces.lua 4114 2009-01-25 12:16:33Z Cyrus $ -]]-- - -require("luci.tools.webadmin") -arg[1] = arg[1] or "" - -local has_3g = luci.fs.mtime("/usr/bin/gcom") -local has_pptp = luci.fs.mtime("/usr/sbin/pptp") -local has_pppd = luci.fs.mtime("/usr/sbin/pppd") -local has_pppoe = luci.fs.glob("/usr/lib/pppd/*/rp-pppoe.so") -local has_pppoa = luci.fs.glob("/usr/lib/pppd/*/pppoatm.so") - -m = Map("network", translate("interfaces"), translate("a_n_ifaces1")) - -s = m:section(NamedSection, arg[1], "interface") -s.addremove = true - -back = s:option(DummyValue, "_overview", translate("overview")) -back.value = "" -back.titleref = luci.dispatcher.build_url("admin", "network", "network") - -p = s:option(ListValue, "proto", translate("protocol")) -p.override_scheme = true -p.default = "static" -p:value("static", translate("static")) -p:value("dhcp", "DHCP") -if has_pppd then p:value("ppp", "PPP") end -if has_pppoe then p:value("pppoe", "PPPoE") end -if has_pppoa then p:value("pppoa", "PPPoA") end -if has_3g then p:value("3g", "UMTS/3G") end -if has_pptp then p:value("pptp", "PPTP") end -p:value("none", translate("none")) - -if not ( has_pppd and has_pppoe and has_pppoa and has_3g and has_pptp ) then - p.description = translate("network_interface_prereq") -end - -br = s:option(Flag, "type", translate("a_n_i_bridge"), translate("a_n_i_bridge1")) -br.enabled = "bridge" -br.rmempty = true - -ifname = s:option(Value, "ifname", translate("interface")) -ifname.rmempty = true -for i,d in ipairs(luci.sys.net.devices()) do - if d ~= "lo" then - ifname:value(d) - end -end - -local zones = luci.tools.webadmin.network_get_zones(arg[1]) -if zones then - if #zones == 0 then - m:chain("firewall") - - fwzone = s:option(Value, "_fwzone", - translate("network_interface_fwzone"), - translate("network_interface_fwzone_desc")) - fwzone.rmempty = true - fwzone:value("", "- " .. translate("none") .. " -") - fwzone:value(arg[1]) - m.uci:load("firewall") - m.uci:foreach("firewall", "zone", - function (section) - fwzone:value(section.name) - end - ) - - function fwzone.write(self, section, value) - local zone = luci.tools.webadmin.firewall_find_zone(value) - local stat - - if not zone then - stat = m.uci:section("firewall", "zone", nil, { - name = value, - network = section - }) - else - local net = m.uci:get("firewall", zone, "network") - net = (net or value) .. " " .. section - stat = m.uci:set("firewall", zone, "network", net) - end - - if stat then - self.render = function() end - end - end - else - fwzone = s:option(DummyValue, "_fwzone", translate("zone")) - fwzone.value = table.concat(zones, ", ") - end - fwzone.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "zones") - m.uci:unload("firewall") -end - -ipaddr = s:option(Value, "ipaddr", translate("ipaddress")) -ipaddr.rmempty = true -ipaddr:depends("proto", "static") - -nm = s:option(Value, "netmask", translate("netmask")) -nm.rmempty = true -nm:depends("proto", "static") -nm:value("255.255.255.0") -nm:value("255.255.0.0") -nm:value("255.0.0.0") - -gw = s:option(Value, "gateway", translate("gateway")) -gw:depends("proto", "static") -gw.rmempty = true - -bcast = s:option(Value, "bcast", translate("broadcast")) -bcast:depends("proto", "static") -bcast.optional = true - -ip6addr = s:option(Value, "ip6addr", translate("ip6address"), translate("cidr6")) -ip6addr.optional = true -ip6addr:depends("proto", "static") - -ip6gw = s:option(Value, "ip6gw", translate("gateway6")) -ip6gw:depends("proto", "static") -ip6gw.optional = true - -dns = s:option(Value, "dns", translate("dnsserver")) -dns.optional = true - -mtu = s:option(Value, "mtu", "MTU") -mtu.optional = true -mtu.isinteger = true - -mac = s:option(Value, "macaddr", translate("macaddress")) -mac.optional = true - - -srv = s:option(Value, "server", translate("network_interface_server")) -srv:depends("proto", "pptp") -srv.rmempty = true - -if has_3g then - service = s:option(ListValue, "service", translate("network_interface_service")) - service:value("", translate("cbi_select")) - service:value("umts", "UMTS/GPRS") - service:value("cdma", "CDMA") - service:value("evdo", "EV-DO") - service:depends("proto", "3g") - service.rmempty = true - - apn = s:option(Value, "apn", translate("network_interface_apn")) - apn:depends("proto", "3g") - - pincode = s:option(Value, "pincode", - translate("network_interface_pincode"), - translate("network_interface_pincode_desc") - ) - pincode:depends("proto", "3g") -end - -if has_pppd or has_pppoe or has_pppoa or has_3g or has_pptp then - user = s:option(Value, "username", translate("username")) - user.rmempty = true - user:depends("proto", "pptp") - user:depends("proto", "pppoe") - user:depends("proto", "pppoa") - user:depends("proto", "ppp") - user:depends("proto", "3g") - - pass = s:option(Value, "password", translate("password")) - pass.rmempty = true - pass.password = true - pass:depends("proto", "pptp") - pass:depends("proto", "pppoe") - pass:depends("proto", "pppoa") - pass:depends("proto", "ppp") - pass:depends("proto", "3g") - - ka = s:option(Value, "keepalive", - translate("network_interface_keepalive"), - translate("network_interface_keepalive_desc") - ) - ka.optional = true - ka:depends("proto", "pptp") - ka:depends("proto", "pppoe") - ka:depends("proto", "pppoa") - ka:depends("proto", "ppp") - ka:depends("proto", "3g") - - demand = s:option(Value, "demand", - translate("network_interface_demand"), - translate("network_interface_demand_desc") - ) - demand.optional = true - demand:depends("proto", "pptp") - demand:depends("proto", "pppoe") - demand:depends("proto", "pppoa") - demand:depends("proto", "ppp") - demand:depends("proto", "3g") -end - -if has_pppoa then - encaps = s:option(ListValue, "encaps", translate("network_interface_encaps")) - encaps.optional = false - encaps:depends("proto", "pppoa") - encaps:value("", translate("cbi_select")) - encaps:value("vc", "VC") - encaps:value("llc", "LLC") - - vpi = s:option(Value, "vpi", "VPI") - vpi.optional = false - vpi:depends("proto", "pppoa") - - vci = s:option(Value, "vci", "VCI") - vci.optional = false - vci:depends("proto", "pppoa") -end - -if has_pptp or has_pppd or has_pppoe or has_pppoa or has_3g then - device = s:option(Value, "device", - translate("network_interface_device"), - translate("network_interface_device_desc") - ) - device:depends("proto", "ppp") - device:depends("proto", "3g") - - defaultroute = s:option(Flag, "defaultroute", - translate("network_interface_defaultroute"), - translate("network_interface_defaultroute_desc") - ) - defaultroute:depends("proto", "ppp") - defaultroute:depends("proto", "pppoa") - defaultroute:depends("proto", "pppoe") - defaultroute:depends("proto", "pptp") - defaultroute:depends("proto", "3g") - defaultroute.rmempty = false - function defaultroute.cfgvalue(...) - return ( AbstractValue.cfgvalue(...) or '1' ) - end - - peerdns = s:option(Flag, "peerdns", - translate("network_interface_peerdns"), - translate("network_interface_peerdns_desc") - ) - peerdns:depends("proto", "ppp") - peerdns:depends("proto", "pppoa") - peerdns:depends("proto", "pppoe") - peerdns:depends("proto", "pptp") - peerdns:depends("proto", "3g") - peerdns.rmempty = false - function peerdns.cfgvalue(...) - return ( AbstractValue.cfgvalue(...) or '1' ) - end - - ipv6 = s:option(Flag, "ipv6", translate("network_interface_ipv6") ) - ipv6:depends("proto", "ppp") - ipv6:depends("proto", "pppoa") - ipv6:depends("proto", "pppoe") - ipv6:depends("proto", "pptp") - ipv6:depends("proto", "3g") - - connect = s:option(Value, "connect", - translate("network_interface_connect"), - translate("network_interface_connect_desc") - ) - connect.optional = true - connect:depends("proto", "ppp") - connect:depends("proto", "pppoe") - connect:depends("proto", "pppoa") - connect:depends("proto", "pptp") - connect:depends("proto", "3g") - - disconnect = s:option(Value, "disconnect", - translate("network_interface_disconnect"), - translate("network_interface_disconnect_desc") - ) - disconnect.optional = true - disconnect:depends("proto", "ppp") - disconnect:depends("proto", "pppoe") - disconnect:depends("proto", "pppoa") - disconnect:depends("proto", "pptp") - disconnect:depends("proto", "3g") - - pppd_options = s:option(Value, "pppd_options", - translate("network_interface_pppd_options"), - translate("network_interface_pppd_options_desc") - ) - pppd_options.optional = true - pppd_options:depends("proto", "ppp") - pppd_options:depends("proto", "pppoa") - pppd_options:depends("proto", "pppoe") - pppd_options:depends("proto", "pptp") - pppd_options:depends("proto", "3g") - - maxwait = s:option(Value, "maxwait", - translate("network_interface_maxwait"), - translate("network_interface_maxwait_desc") - ) - maxwait.optional = true - maxwait:depends("proto", "3g") -end - -s2 = m:section(TypedSection, "alias", translate("aliases")) -s2.addremove = true - -s2:depends("interface", arg[1]) -s2.defaults.interface = arg[1] - - -s2.defaults.proto = "static" - -ipaddr = s2:option(Value, "ipaddr", translate("ipaddress")) -ipaddr.rmempty = true - -nm = s2:option(Value, "netmask", translate("netmask")) -nm.rmempty = true -nm:value("255.255.255.0") -nm:value("255.255.0.0") -nm:value("255.0.0.0") - -gw = s2:option(Value, "gateway", translate("gateway")) -gw.rmempty = true - -bcast = s2:option(Value, "bcast", translate("broadcast")) -bcast.optional = true - -ip6addr = s2:option(Value, "ip6addr", translate("ip6address"), translate("cidr6")) -ip6addr.optional = true - -ip6gw = s2:option(Value, "ip6gw", translate("gateway6")) -ip6gw.optional = true - -dns = s2:option(Value, "dns", translate("dnsserver")) -dns.optional = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/network.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/network.lua deleted file mode 100644 index 89e13a5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/network.lua +++ /dev/null @@ -1,128 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: network.lua 3650 2008-10-29 19:40:40Z jow $ -]]-- -require("luci.sys") -require("luci.tools.webadmin") - -local netstate = luci.model.uci.cursor_state():get_all("network") -m = Map("network", translate("interfaces")) - -local created -local netstat = luci.sys.net.deviceinfo() - -s = m:section(TypedSection, "interface", "") -s.addremove = true -s.extedit = luci.dispatcher.build_url("admin", "network", "network") .. "/%s" -s.template = "cbi/tblsection" -s.override_scheme = true - -function s.filter(self, section) - return section ~= "loopback" and section -end - -function s.create(self, section) - if TypedSection.create(self, section) then - created = section - else - self.invalid_cts = true - end -end - -function s.parse(self, ...) - TypedSection.parse(self, ...) - if created then - m.uci:save("network") - luci.http.redirect(luci.dispatcher.build_url("admin", "network", "network") - .. "/" .. created) - end -end - -up = s:option(Flag, "up") -function up.cfgvalue(self, section) - return netstate[section] and netstate[section].up or "0" -end - -function up.write(self, section, value) - local call - if value == "1" then - call = "ifup" - elseif value == "0" then - call = "ifdown" - end - os.execute(call .. " " .. section .. " >/dev/null 2>&1") -end - -ifname = s:option(DummyValue, "ifname", translate("device")) -function ifname.cfgvalue(self, section) - return netstate[section] and netstate[section].ifname -end - -ifname.titleref = luci.dispatcher.build_url("admin", "network", "vlan") - - -if luci.model.uci.cursor():load("firewall") then - zone = s:option(DummyValue, "_zone", translate("zone")) - zone.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "zones") - - function zone.cfgvalue(self, section) - local zones = luci.tools.webadmin.network_get_zones(section) - return zones and table.concat(zones, ", ") or "-" - end -end - -hwaddr = s:option(DummyValue, "_hwaddr") -function hwaddr.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") or "" - return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") - or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") - or "n/a" - -end - - -ipaddr = s:option(DummyValue, "ipaddr", translate("addresses")) -function ipaddr.cfgvalue(self, section) - local addr = luci.tools.webadmin.network_get_addresses(section) - return table.concat(addr, ", ") -end - -txrx = s:option(DummyValue, "_txrx") - -function txrx.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][1] - rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" - - local tx = netstat and netstat[ix] and netstat[ix][9] - tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" - - return string.format("%s / %s", tx, rx) -end - -errors = s:option(DummyValue, "_err") - -function errors.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][3] - local tx = netstat and netstat[ix] and netstat[ix][11] - - rx = rx and tostring(rx) or "-" - tx = tx and tostring(tx) or "-" - - return string.format("%s / %s", tx, rx) -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/routes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/routes.lua deleted file mode 100644 index 73732f8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/routes.lua +++ /dev/null @@ -1,120 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: routes.lua 3888 2008-12-10 21:46:22Z Cyrus $ -]]-- -require("luci.tools.webadmin") -m = Map("network", translate("a_n_routes"), translate("a_n_routes1")) - -local routes6 = luci.sys.net.routes6() -local bit = require "bit" - -if not arg or not arg[1] then - local routes = luci.sys.net.routes() - - v = m:section(Table, routes, translate("a_n_routes_kernel4")) - - net = v:option(DummyValue, "iface", translate("network")) - function net.cfgvalue(self, section) - return luci.tools.webadmin.iface_get_network(routes[section].device) - or routes[section].device - end - - target = v:option(DummyValue, "target", translate("target")) - function target.cfgvalue(self, section) - return routes[section].dest:network():string() - end - - netmask = v:option(DummyValue, "netmask", translate("netmask")) - function netmask.cfgvalue(self, section) - return routes[section].dest:mask():string() - end - - gateway = v:option(DummyValue, "gateway", translate("gateway")) - function gateway.cfgvalue(self, section) - return routes[section].gateway:string() - end - - metric = v:option(DummyValue, "metric", translate("metric")) - function metric.cfgvalue(self, section) - return routes[section].metric - end - - if routes6 then - v = m:section(Table, routes6, translate("a_n_routes_kernel6")) - - net = v:option(DummyValue, "iface", translate("network")) - function net.cfgvalue(self, section) - return luci.tools.webadmin.iface_get_network(routes6[section].device) - or routes6[section].device - end - - target = v:option(DummyValue, "target", translate("target")) - function target.cfgvalue(self, section) - return routes6[section].dest:string() - end - - gateway = v:option(DummyValue, "gateway", translate("gateway6")) - function gateway.cfgvalue(self, section) - return routes6[section].source:string() - end - - metric = v:option(DummyValue, "metric", translate("metric")) - function metric.cfgvalue(self, section) - local metr = routes6[section].metric - local lower = bit.band(metr, 0xffff) - local higher = bit.rshift(bit.band(metr, 0xffff0000), 16) - return "%04X%04X" % {higher, lower} - end - end -end - - -s = m:section(TypedSection, "route", translate("a_n_routes_static4")) -s.addremove = true -s.anonymous = true - -s.template = "cbi/tblsection" - -iface = s:option(ListValue, "interface", translate("interface")) -luci.tools.webadmin.cbi_add_networks(iface) - -if not arg or not arg[1] then - net.titleref = iface.titleref -end - -s:option(Value, "target", translate("target"), translate("a_n_r_target1")) - -s:option(Value, "netmask", translate("netmask"), translate("a_n_r_netmask1")).rmemepty = true - -s:option(Value, "gateway", translate("gateway")) - -if routes6 then - s = m:section(TypedSection, "route6", translate("a_n_routes_static6")) - s.addremove = true - s.anonymous = true - - s.template = "cbi/tblsection" - - iface = s:option(ListValue, "interface", translate("interface")) - luci.tools.webadmin.cbi_add_networks(iface) - - if not arg or not arg[1] then - net.titleref = iface.titleref - end - - s:option(Value, "target", translate("target"), translate("a_n_r_target6")) - - s:option(Value, "gateway", translate("gateway6")).rmempty = true -end - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/vlan.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/vlan.lua deleted file mode 100644 index eb14148..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/vlan.lua +++ /dev/null @@ -1,22 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: vlan.lua 2808 2008-08-14 11:49:36Z Cyrus $ -]]-- -m = Map("network", translate("a_n_switch"), translate("a_n_switch1")) - -s = m:section(TypedSection, "switch", "") - -for i = 0, 15 do - s:option(Value, "vlan"..i, "ethX."..i).optional = true -end - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wifi.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wifi.lua deleted file mode 100644 index 66fd3b8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wifi.lua +++ /dev/null @@ -1,373 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: wifi.lua 4224 2009-02-04 19:20:23Z Cyrus $ -]]-- -require("luci.tools.webadmin") -arg[1] = arg[1] or "" - -m = Map("wireless", translate("networks"), translate("a_w_networks1")) - -s = m:section(NamedSection, arg[1], "wifi-device", translate("device") .. " " .. arg[1]) -s.addremove = false - -back = s:option(DummyValue, "_overview", translate("overview")) -back.value = "" -back.titleref = luci.dispatcher.build_url("admin", "network", "wireless") - - -en = s:option(Flag, "disabled", translate("enable")) -en.enabled = "0" -en.disabled = "1" -en.rmempty = false - -function en.cfgvalue(self, section) - return Flag.cfgvalue(self, section) or "0" -end - -s:option(DummyValue, "type", translate("type")) -local hwtype = m:get(arg[1], "type") --- NanoFoo -local nsantenna = m:get(arg[1], "antenna") - -ch = s:option(Value, "channel", translate("a_w_channel")) -for i=1, 14 do - ch:value(i, i .. " (2.4 GHz)") -end -for i=36, 64, 4 do - ch:value(i, i .. " (5 GHz)") -end -for i=100, 140, 4 do - ch:value(i, i .. " (5 GHz)") -end -ch:value(147, 147 .. " (5 GHz)") -ch:value(151, 151 .. " (5 GHz)") -ch:value(155, 155 .. " (5 GHz)") -ch:value(167, 167 .. " (5 GHz)") - -s:option(Value, "txpower", translate("a_w_txpwr"), "dBm").rmempty = true - - -------------------- MAC80211 Device ------------------ - -if hwtype == "mac80211" then - -end - - -------------------- Madwifi Device ------------------ - -if hwtype == "atheros" then - mode = s:option(ListValue, "hwmode", translate("mode")) - mode:value("", translate("wifi_auto")) - mode:value("11b", "802.11b") - mode:value("11g", "802.11g") - mode:value("11a", "802.11a") - mode:value("11bg", "802.11b+g") - mode:value("11gdt", "802.11adt") - mode:value("11adt", "802.11adt") - mode:value("fh", translate("wifi_fh")) - - s:option(Flag, "diversity", translate("wifi_diversity")).rmempty = false - - if not nsantenna then - s:option(Value, "txantenna", translate("wifi_txantenna")).optional = true - s:option(Value, "rxantenna", translate("wifi_rxantenna")).optional = true - else -- NanoFoo - local ant = s:option(ListValue, "antenna", translate("wifi_txantenna")) - ant:value("auto") - ant:value("vertical") - ant:value("horizontal") - ant:value("external") - end - s:option(Value, "distance", translate("wifi_distance"), - translate("wifi_distance_desc")).optional = true - - --s:option(Flag, "nosbeacon", translate("wifi_nosbeacon")).optional = true -end - - - -------------------- Broadcom Device ------------------ - -if hwtype == "broadcom" then - mp = s:option(ListValue, "macfilter", translate("wifi_macpolicy")) - mp.optional = true - mp:value("") - mp:value("allow", translate("wifi_whitelist")) - mp:value("deny", translate("wifi_blacklist")) - ml = s:option(DynamicList, "maclist", translate("wifi_maclist")) - ml:depends({macfilter="allow"}) - ml:depends({macfilter="deny"}) - - s:option(Value, "txantenna", translate("wifi_txantenna")).optional = true - s:option(Value, "rxantenna", translate("wifi_rxantenna")).optional = true - - s:option(Flag, "frameburst", translate("wifi_bursting")).optional = true - - s:option(Value, "distance", translate("wifi_distance")).optional = true - --s:option(Value, "slottime", translate("wifi_slottime")).optional = true - - s:option(Value, "country", translate("wifi_country")).optional = true - s:option(Value, "maxassoc", translate("wifi_maxassoc")).optional = true -end - - ------------------------ Interface ----------------------- - -s = m:section(TypedSection, "wifi-iface", translate("interfaces")) -s.addremove = true -s.anonymous = true -s:depends("device", arg[1]) -s.defaults.device = arg[1] - -s:option(Value, "ssid", translate("wifi_essid")) - -network = s:option(Value, "network", translate("network"), translate("a_w_network1")) -network.rmempty = true -network:value("") -network.combobox_manual = translate("a_w_netmanual") -luci.tools.webadmin.cbi_add_networks(network) - -function network.write(self, section, value) - if not m.uci:get("network", value) then - -- avoid "value not defined in enum" because network is not known yet - s.override_scheme = true - - m:chain("network") - m.uci:set("network", value, "interface") - Value.write(self, section, value) - else - if m.uci:get("network", value) == "interface" then - Value.write(self, section, value) - end - end -end - - -mode = s:option(ListValue, "mode", translate("mode")) -mode.override_values = true -mode:value("ap", translate("a_w_ap")) -mode:value("adhoc", translate("a_w_adhoc")) -mode:value("sta", translate("a_w_client")) - -bssid = s:option(Value, "bssid", translate("wifi_bssid")) - - --------------------- MAC80211 Interface ---------------------- - -if hwtype == "mac80211" then - mode:value("ahdemo", translate("a_w_ahdemo")) - mode:value("monitor", translate("a_w_monitor")) - bssid:depends({mode="adhoc"}) - - s:option(Value, "frag", translate("wifi_frag")).optional = true - s:option(Value, "rts", translate("wifi_rts")).optional = true -end - - - --------------------- Madwifi Interface ---------------------- - -if hwtype == "atheros" then - mode:value("ahdemo", translate("a_w_ahdemo")) - mode:value("monitor", translate("a_w_monitor")) - - bssid:depends({mode="adhoc"}) - bssid:depends({mode="ahdemo"}) - - wds = s:option(Flag, "wds", translate("a_w_wds")) - wds:depends({mode="ap"}) - wds:depends({mode="sta"}) - wds.rmempty = true - wdssep = s:option(Flag, "wdssep", translate("wifi_wdssep")) - wdssep:depends({mode="ap", wds="1"}) - wdssep.optional = true - - s:option(Flag, "doth", "802.11h").optional = true - hidden = s:option(Flag, "hidden", translate("wifi_hidden")) - hidden:depends({mode="ap"}) - hidden:depends({mode="adhoc"}) - hidden:depends({mode="wds"}) - hidden.optional = true - isolate = s:option(Flag, "isolate", translate("wifi_isolate"), - translate("wifi_isolate_desc")) - isolate:depends({mode="ap"}) - isolate.optional = true - s:option(Flag, "bgscan", translate("wifi_bgscan")).optional = true - - mp = s:option(ListValue, "macpolicy", translate("wifi_macpolicy")) - mp.optional = true - mp:value("") - mp:value("deny", translate("wifi_whitelist")) - mp:value("allow", translate("wifi_blacklist")) - ml = s:option(DynamicList, "maclist", translate("wifi_maclist")) - ml:depends({macpolicy="allow"}) - ml:depends({macpolicy="deny"}) - - s:option(Value, "rate", translate("wifi_rate")).optional = true - s:option(Value, "mcast_rate", translate("wifi_mcast_rate")).optional = true - s:option(Value, "frag", translate("wifi_frag")).optional = true - s:option(Value, "rts", translate("wifi_rts")).optional = true - s:option(Value, "minrate", translate("wifi_minrate")).optional = true - s:option(Value, "maxrate", translate("wifi_maxrate")).optional = true - s:option(Flag, "compression", translate("wifi_compression")).optional = true - - s:option(Flag, "bursting", translate("wifi_bursting")).optional = true - s:option(Flag, "turbo", translate("wifi_turbo")).optional = true - s:option(Value, "ff", translate("wifi_ff")).optional = true - - s:option(Flag, "wmm", translate("wifi_wmm")).optional = true - s:option(Flag, "xr", translate("wifi_xr")).optional = true - s:option(Flag, "ar", translate("wifi_ar")).optional = true - - local swm = s:option(Flag, "sw_merge", translate("wifi_nosbeacon")) - swm:depends({mode="adhoc"}) - swm.optional = true - - local nos = s:option(Flag, "nosbeacon", translate("wifi_nosbeacon")) - nos:depends({mode="sta"}) - nos.optional = true - - local probereq = s:option(Flag, "probereq", translate("wifi_noprobereq")) - probereq.optional = true - probereq.enabled = "0" - probereq.disabled = "1" -end - - --------------------- Broadcom Interface ---------------------- - -if hwtype == "broadcom" then - mode:value("wds", translate("a_w_wds")) - mode:value("monitor", translate("a_w_monitor")) - - hidden = s:option(Flag, "hidden", translate("wifi_hidden")) - hidden:depends({mode="ap"}) - hidden:depends({mode="adhoc"}) - hidden:depends({mode="wds"}) - hidden.optional = true - - isolate = s:option(Flag, "isolate", translate("wifi_isolate"), - translate("wifi_isolate_desc")) - isolate:depends({mode="ap"}) - isolate.optional = true - - bssid:depends({mode="wds"}) - bssid:depends({mode="adhoc"}) -end - - - -------------------- WiFI-Encryption ------------------- - -encr = s:option(ListValue, "encryption", translate("encryption")) -encr.override_values = true -encr:depends({mode="ap"}) -encr:depends({mode="sta"}) -encr:depends({mode="adhoc"}) -encr:depends({mode="ahdemo"}) -encr:depends({mode="wds"}) - -encr:value("none", "No Encryption") -encr:value("wep", "WEP") - -if hwtype == "atheros" or hwtype == "mac80211" then - local supplicant = luci.fs.mtime("/usr/sbin/wpa_supplicant") - local hostapd = luci.fs.mtime("/usr/sbin/hostapd") - - if hostapd and supplicant then - encr:value("psk", "WPA-PSK") - encr:value("psk2", "WPA2-PSK") - encr:value("wpa", "WPA-EAP", {mode="ap"}, {mode="sta"}) - encr:value("wpa2i", "WPA2-EAP", {mode="ap"}, {mode="sta"}) - elseif hostapd and not supplicant then - encr:value("psk", "WPA-PSK", {mode="ap"}, {mode="adhoc"}, {mode="ahdemo"}) - encr:value("psk2", "WPA2-PSK", {mode="ap"}, {mode="adhoc"}, {mode="ahdemo"}) - encr:value("wpa", "WPA-EAP", {mode="ap"}) - encr:value("wpa2i", "WPA2-EAP", {mode="ap"}) - encr.description = translate("wifi_wpareq") - elseif not hostapd and supplicant then - encr:value("psk", "WPA-PSK", {mode="sta"}) - encr:value("psk2", "WPA2-PSK", {mode="sta"}) - encr:value("wpa", "WPA-EAP", {mode="sta"}) - encr:value("wpa2i", "WPA2-EAP", {mode="sta"}) - encr.description = translate("wifi_wpareq") - else - encr.description = translate("wifi_wpareq") - end -elseif hwtype == "broadcom" then - encr:value("psk", "WPA-PSK") - encr:value("psk2", "WPA2-PSK") -end - -encr:depends("mode", "ap") -encr:depends("mode", "sta") -encr:depends("mode", "wds") - -server = s:option(Value, "server", translate("a_w_radiussrv")) -server:depends({mode="ap", encryption="wpa"}) -server:depends({mode="ap", encryption="wpa2i"}) -server.rmempty = true - -port = s:option(Value, "port", translate("a_w_radiusport")) -port:depends({mode="ap", encryption="wpa"}) -port:depends({mode="ap", encryption="wpa2i"}) -port.rmempty = true - -key = s:option(Value, "key", translate("key")) -key:depends("encryption", "wep") -key:depends("encryption", "psk") -key:depends({mode="ap", encryption="wpa"}) -key:depends("encryption", "psk2") -key:depends({mode="ap", encryption="wpa2i"}) -key.rmempty = true - -if hwtype == "atheros" or hwtype == "mac80211" then - nasid = s:option(Value, "nasid", translate("a_w_nasid")) - nasid:depends({mode="ap", encryption="wpa"}) - nasid:depends({mode="ap", encryption="wpa2i"}) - nasid.rmempty = true - - eaptype = s:option(ListValue, "eap_type", translate("a_w_eaptype")) - eaptype:value("TLS") - eaptype:value("PEAP") - eaptype:depends({mode="sta", encryption="wpa"}) - eaptype:depends({mode="sta", encryption="wpa2i"}) - - cacert = s:option(FileUpload, "ca_cert", translate("a_w_cacert")) - cacert:depends({mode="sta", encryption="wpa"}) - cacert:depends({mode="sta", encryption="wpa2i"}) - - privkey = s:option(FileUpload, "priv_key", translate("a_w_tlsprivkey")) - privkey:depends({mode="sta", eap_type="TLS", encryption="wpa2i"}) - privkey:depends({mode="sta", eap_type="TLS", encryption="wpa"}) - - privkeypwd = s:option(Value, "priv_key_pwd", translate("a_w_tlsprivkeypwd")) - privkeypwd:depends({mode="sta", eap_type="TLS", encryption="wpa2i"}) - privkeypwd:depends({mode="sta", eap_type="TLS", encryption="wpa"}) - - - auth = s:option(Value, "auth", translate("a_w_peapauth")) - auth:depends({mode="sta", eap_type="PEAP", encryption="wpa2i"}) - auth:depends({mode="sta", eap_type="PEAP", encryption="wpa"}) - - identity = s:option(Value, "identity", translate("a_w_peapidentity")) - identity:depends({mode="sta", eap_type="PEAP", encryption="wpa2i"}) - identity:depends({mode="sta", eap_type="PEAP", encryption="wpa"}) - - password = s:option(Value, "password", translate("a_w_peappassword")) - password:depends({mode="sta", eap_type="PEAP", encryption="wpa2i"}) - password:depends({mode="sta", eap_type="PEAP", encryption="wpa"}) -end - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wireless.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wireless.lua deleted file mode 100644 index 198d410..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_network/wireless.lua +++ /dev/null @@ -1,134 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: wireless.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- -require("luci.sys") -require("luci.tools.webadmin") - -local wireless = luci.model.uci.cursor_state():get_all("wireless") -local wifidata = luci.sys.wifi.getiwconfig() -local ifaces = {} - -for k, v in pairs(wireless) do - if v[".type"] == "wifi-iface" then - table.insert(ifaces, v) - end -end - - -m = SimpleForm("wireless", translate("wifi")) - -s = m:section(Table, ifaces, translate("networks")) - -function s.extedit(self, section) - local device = self.map:get(section, "device") or "" - return luci.dispatcher.build_url(unpack(luci.dispatcher.context.requested.path)) .. "/" .. device -end - -link = s:option(DummyValue, "_link", translate("link")) -function link.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" -end - -essid = s:option(DummyValue, "ssid", "ESSID") - -bssid = s:option(DummyValue, "_bsiid", "BSSID") -function bssid.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return (wifidata[ifname] and (wifidata[ifname].Cell - or wifidata[ifname]["Access Point"])) or "-" -end - -channel = s:option(DummyValue, "channel", translate("channel")) -function channel.cfgvalue(self, section) - return wireless[self.map:get(section, "device")].channel -end - -protocol = s:option(DummyValue, "_mode", translate("protocol")) -function protocol.cfgvalue(self, section) - local mode = wireless[self.map:get(section, "device")].mode - return mode and "802." .. mode -end - -mode = s:option(DummyValue, "mode", translate("mode")) -encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) - -power = s:option(DummyValue, "_power", translate("power")) -function power.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" -end - -scan = s:option(Button, "_scan", translate("scan")) -scan.inputstyle = "find" - -function scan.cfgvalue(self, section) - return self.map:get(section, "ifname") or false -end - -t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) - -function scan.write(self, section) - t2.render = t2._render - local ifname = self.map:get(section, "ifname") - luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) -end - -t2._render = t2.render -t2.render = function() end - -t2:option(DummyValue, "Quality", translate("iwscan_link")) -essid = t2:option(DummyValue, "ESSID", "ESSID") -function essid.cfgvalue(self, section) - return luci.util.pcdata(self.map:get(section, "ESSID")) -end - -t2:option(DummyValue, "Address", "BSSID") -t2:option(DummyValue, "Mode", translate("mode")) -chan = t2:option(DummyValue, "channel", translate("channel")) -function chan.cfgvalue(self, section) - return self.map:get(section, "Channel") - or self.map:get(section, "Frequency") - or "-" -end - -t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) - -t2:option(DummyValue, "Signal level", translate("iwscan_signal")) - -t2:option(DummyValue, "Noise level", translate("iwscan_noise")) - - -s2 = m:section(SimpleSection, translate("a_w_create")) -create = s2:option(ListValue, "create", translate("device")) -create:value("", translate("cbi_select")) -for k, v in pairs(wireless) do - if v[".type"] == "wifi-device" then - create:value(k) - end -end - -function create.write(self, section, value) - local uci = luci.model.uci.cursor() - uci:load("wireless") - uci:section("wireless", "wifi-iface", nil, {device=value}) - uci:save("wireless") - luci.http.redirect(luci.dispatcher.build_url(unpack(luci.dispatcher.context.requested.path)) .. "/" .. value) -end - -function create.cbid(self, section) - return "priv.cbid.create" -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/crontab.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/crontab.lua deleted file mode 100644 index 5be5fd1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/crontab.lua +++ /dev/null @@ -1,35 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: crontab.lua 4106 2009-01-20 11:33:33Z Cyrus $ -]]-- -local cronfile = "/etc/crontabs/root" - -f = SimpleForm("crontab", translate("a_s_crontab"), translate("a_s_crontab1")) - -t = f:field(TextValue, "crons") -t.rmempty = true -t.rows = 10 -function t.cfgvalue() - return luci.fs.readfile(cronfile) or "" -end - -function f.handle(self, state, data) - if state == FORM_VALID then - if data.crons then - luci.fs.writefile(cronfile, data.crons:gsub("\r\n", "\n")) - end - end - return true -end - -return f diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dnsmasq.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dnsmasq.lua deleted file mode 100644 index afdf075..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dnsmasq.lua +++ /dev/null @@ -1,45 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: dnsmasq.lua 3595 2008-10-17 16:20:01Z Cyrus $ -]]-- -m = Map("dhcp", "Dnsmasq") - -s = m:section(TypedSection, "dnsmasq", translate("settings")) -s.anonymous = true - -s:option(Flag, "domainneeded") -s:option(Flag, "authoritative") -s:option(Flag, "boguspriv") -s:option(Flag, "filterwin2k") -s:option(Flag, "localise_queries") -s:option(Value, "local") -s:option(Value, "domain") -s:option(Flag, "expandhosts") -s:option(Flag, "nonegcache") -s:option(Flag, "readethers") -s:option(Value, "leasefile") -s:option(Value, "resolvfile") -s:option(Flag, "nohosts").optional = true -s:option(Flag, "strictorder").optional = true -s:option(Flag, "logqueries").optional = true -s:option(Flag, "noresolv").optional = true -s:option(Value, "dnsforwardmax").optional = true -s:option(Value, "port").optional = true -s:option(Value, "ednspacket_max").optional = true -s:option(Value, "dhcpleasemax").optional = true -s:option(Value, "addnhosts").optional = true -s:option(Value, "queryport").optional = true -s:option(Flag, "enable_tftp").optional = true -s:option(Value, "tftp_root").optional = true -s:option(Value, "dhcp_boot").optional = true - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dropbear.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dropbear.lua deleted file mode 100644 index 30f7325..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/dropbear.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: dropbear.lua 4150 2009-01-26 02:10:02Z jow $ -]]-- -m = Map("dropbear", "Dropbear SSHd", translate("a_srv_dropbear1")) - -s = m:section(TypedSection, "dropbear", "") -s.anonymous = true - -port = s:option(Value, "Port", translate("port")) -port.isinteger = true - -pwauth = s:option(Flag, "PasswordAuth", translate("a_srv_d_pwauth"), translate("a_srv_d_pwauth1")) -pwauth.enabled = 'on' -pwauth.disabled = 'off' -pwauth.rmempty = false - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/httpd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/httpd.lua deleted file mode 100644 index 5541959..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/httpd.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: httpd.lua 3402 2008-09-23 17:29:05Z jow $ -]]-- -m = Map("httpd", "Busybox HTTPd", translate("a_srv_http1")) - -s = m:section(TypedSection, "httpd", "") -s.anonymous = true -s.addremove = true - -port = s:option(Value, "port", translate("port")) -port.isinteger = true - -s:option(Value, "home", translate("a_srv_http_root")) - -config = s:option(Value, "c_file", translate("configfile"), translate("a_srv_http_config1")) -config.rmempty = true - -realm = s:option(Value, "realm", translate("a_srv_http_authrealm"), translate("a_srv_http_authrealm1")) -realm.rmempty = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/lucittpd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/lucittpd.lua deleted file mode 100644 index 3599f59..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_services/lucittpd.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: lucittpd.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- -m = Map("lucittpd", "LuCIttpd", translate("a_srv_lucittpd")) - -s = m:section(NamedSection, "lucittpd", "lucittpd", "") - -s:option(Value, "port", translate("port")) -s:option(Value, "root", translate("a_srv_http_root")) -s:option(Value, "path", translate("a_srv_http_path")) -s:option(Flag, "keepalive", translate("a_srv_http_keepalive")) -s:option(Value, "timeout", translate("a_srv_http_timeout")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/buttons.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/buttons.lua deleted file mode 100644 index d32f8fa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/buttons.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: buttons.lua 2880 2008-08-17 23:47:38Z jow $ -]]-- -m = Map("system", translate("buttons"), translate("buttons_desc")) - -s = m:section(TypedSection, "button", "") -s.anonymous = true -s.addremove = true - -s:option(Value, "button") - -act = s:option(ListValue, "action") -act:value("released") - -s:option(Value, "handler") - -min = s:option(Value, "min") -min.rmempty = true - -max = s:option(Value, "max") -max.rmempty = true diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/fstab.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/fstab.lua deleted file mode 100644 index 30409a4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/fstab.lua +++ /dev/null @@ -1,86 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: fstab.lua 3329 2008-09-16 02:01:05Z jow $ -]]-- -require("luci.tools.webadmin") - -local fs = require "luci.fs" -local devices = {} -luci.util.update(devices, fs.glob("/dev/sd*") or {}) -luci.util.update(devices, fs.glob("/dev/hd*") or {}) -luci.util.update(devices, fs.glob("/dev/scd*") or {}) -luci.util.update(devices, fs.glob("/dev/mmc*") or {}) - -local size = {} -for i, dev in ipairs(devices) do - local s = tonumber((luci.fs.readfile("/sys/class/block/%s/size" % dev:sub(6)))) - size[dev] = s and math.floor(s / 2048) -end - - -m = Map("fstab", translate("a_s_fstab")) - -local mounts = luci.sys.mounts() - -v = m:section(Table, mounts, translate("a_s_fstab_active")) - -fs = v:option(DummyValue, "fs", translate("filesystem")) - -mp = v:option(DummyValue, "mountpoint", translate("a_s_fstab_mountpoint")) - -avail = v:option(DummyValue, "avail", translate("a_s_fstab_avail")) -function avail.cfgvalue(self, section) - return luci.tools.webadmin.byte_format( - ( tonumber(mounts[section].available) or 0 ) * 1024 - ) .. " / " .. luci.tools.webadmin.byte_format( - ( tonumber(mounts[section].blocks) or 0 ) * 1024 - ) -end - -used = v:option(DummyValue, "used", translate("a_s_fstab_used")) -function used.cfgvalue(self, section) - return ( mounts[section].percent or "0%" ) .. " (" .. - luci.tools.webadmin.byte_format( - ( tonumber(mounts[section].used) or 0 ) * 1024 - ) .. ")" -end - - - -mount = m:section(TypedSection, "mount", translate("a_s_fstab_mountpoints"), translate("a_s_fstab_mountpoints1")) -mount.anonymous = true -mount.addremove = true -mount.template = "cbi/tblsection" - -mount:option(Flag, "enabled", translate("enable")) -dev = mount:option(Value, "device", translate("device"), translate("a_s_fstab_device1")) -for i, d in ipairs(devices) do - dev:value(d, size[d] and "%s (%s MB)" % {d, size[d]}) -end - -mount:option(Value, "target", translate("a_s_fstab_mountpoint")) -mount:option(Value, "fstype", translate("filesystem"), translate("a_s_fstab_fs1")) -mount:option(Value, "options", translate("options"), translatef("manpage", "siehe '%s' manpage", "mount")) - - -swap = m:section(TypedSection, "swap", "SWAP", translate("a_s_fstab_swap1")) -swap.anonymous = true -swap.addremove = true -swap.template = "cbi/tblsection" - -swap:option(Flag, "enabled", translate("enable")) -dev = swap:option(Value, "device", translate("device"), translate("a_s_fstab_device1")) -for i, d in ipairs(devices) do - dev:value(d, size[d] and "%s (%s MB)" % {d, size[d]}) -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/ipkg.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/ipkg.lua deleted file mode 100644 index f941efc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/ipkg.lua +++ /dev/null @@ -1,35 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ipkg.lua 4106 2009-01-20 11:33:33Z Cyrus $ -]]-- -local ipkgfile = "/etc/opkg.conf" - -f = SimpleForm("ipkgconf", translate("a_s_p_ipkg")) - -t = f:field(TextValue, "lines") -t.rows = 10 -function t.cfgvalue() - return luci.fs.readfile(ipkgfile) or "" -end - -function t.write(self, section, data) - return luci.fs.writefile(ipkgfile, data:gsub("\r\n", "\n")) -end - -f:append(Template("admin_system/ipkg")) - -function f.handle(self, state, data) - return true -end - -return f diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/leds.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/leds.lua deleted file mode 100644 index b6a911f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/leds.lua +++ /dev/null @@ -1,86 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: leds.lua 2880 2008-08-17 23:47:38Z jow $ -]]-- -m = Map("system", translate("leds"), translate("leds_desc")) - -local sysfs_path = "/sys/class/leds/" -local leds = {} - -if luci.fs.access(sysfs_path) then - for k, v in pairs(luci.fs.dir(sysfs_path)) do - if v ~= "." and v ~= ".." then - table.insert(leds, v) - end - end -end - -if #leds == 0 then - return m -end - - -s = m:section(TypedSection, "led", "") -s.anonymous = true -s.addremove = true - -function s.parse(self, ...) - TypedSection.parse(self, ...) - os.execute("/etc/init.d/led enable") -end - - -s:option(Value, "name") - - -sysfs = s:option(ListValue, "sysfs") -for k, v in ipairs(leds) do - sysfs:value(v) -end - -s:option(Flag, "default").rmempty = true - - -trigger = s:option(ListValue, "trigger") - -local triggers = luci.fs.readfile(sysfs_path .. leds[1] .. "/trigger") -for t in triggers:gmatch("[%w-]+") do - trigger:value(t, translate("system_led_trigger_" .. t:gsub("-", ""))) -end - - -delayon = s:option(Value, "delayon") -delayon:depends("trigger", "timer") - -delayoff = s:option(Value, "delayoff") -delayoff:depends("trigger", "timer") - - -dev = s:option(ListValue, "dev") -dev.rmempty = true -dev:value("") -dev:depends("trigger", "netdev") -for k, v in pairs(luci.sys.net.devices()) do - if v ~= "lo" then - dev:value(v) - end -end - - -mode = s:option(MultiValue, "mode") -mode.rmempty = true -mode:depends("trigger", "netdev") -mode:value("link", translate("system_led_mode_link")) -mode:value("tx", translate("system_led_mode_tx")) -mode:value("rx", translate("system_led_mode_rx")) - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/passwd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/passwd.lua deleted file mode 100644 index f078dd5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/passwd.lua +++ /dev/null @@ -1,45 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: passwd.lua 3864 2008-12-07 13:44:25Z Cyrus $ -]]-- -f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")) - -pw1 = f:field(Value, "pw1", translate("password")) -pw1.password = true -pw1.rmempty = false - -pw2 = f:field(Value, "pw2", translate("confirmation")) -pw2.password = true -pw2.rmempty = false - -function pw2.validate(self, value, section) - return pw1:formvalue(section) == value and value -end - -function f.handle(self, state, data) - if state == FORM_VALID then - local stat = luci.sys.user.setpasswd("root", data.pw1) == 0 - - if stat then - f.message = translate("a_s_changepw_changed") - else - f.errmessage = translate("unknownerror") - end - - data.pw1 = nil - data.pw2 = nil - end - return true -end - -return f \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/processes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/processes.lua deleted file mode 100644 index 8aa2be8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/processes.lua +++ /dev/null @@ -1,44 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: processes.lua 2880 2008-08-17 23:47:38Z jow $ -]]-- -f = SimpleForm("processes", translate("process_head"), translate("process_descr")) -f.reset = false -f.submit = false - -t = f:section(Table, luci.sys.process.list()) -t:option(DummyValue, "PID", translate("process_pid")) -t:option(DummyValue, "USER", translate("process_owner")) -t:option(DummyValue, "COMMAND", translate("process_command")) -t:option(DummyValue, "%CPU", translate("process_cpu")) -t:option(DummyValue, "%MEM", translate("process_mem")) - -hup = t:option(Button, "_hup", translate("process_hup")) -hup.inputstyle = "reload" -function hup.write(self, section) - null, self.tag_error[section] = luci.sys.process.signal(section, 1) -end - -term = t:option(Button, "_term", translate("process_term")) -term.inputstyle = "remove" -function term.write(self, section) - null, self.tag_error[section] = luci.sys.process.signal(section, 15) -end - -kill = t:option(Button, "_kill", translate("process_kill")) -kill.inputstyle = "reset" -function kill.write(self, section) - null, self.tag_error[section] = luci.sys.process.signal(section, 9) -end - -return f \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/sshkeys.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/sshkeys.lua deleted file mode 100644 index bae8116..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/sshkeys.lua +++ /dev/null @@ -1,35 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: sshkeys.lua 4106 2009-01-20 11:33:33Z Cyrus $ -]]-- -local keyfile = "/etc/dropbear/authorized_keys" - -f = SimpleForm("sshkeys", translate("a_s_sshkeys"), translate("a_s_sshkeys1")) - -t = f:field(TextValue, "keys") -t.rmempty = true -t.rows = 10 -function t.cfgvalue() - return luci.fs.readfile(keyfile) or "" -end - -function f.handle(self, state, data) - if state == FORM_VALID then - if data.keys then - luci.fs.writefile(keyfile, data.keys:gsub("\r\n", "\n")) - end - end - return true -end - -return f diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/system.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/system.lua deleted file mode 100644 index b3a01f3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/admin_system/system.lua +++ /dev/null @@ -1,73 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: system.lua 3736 2008-11-06 23:10:43Z jow $ -]]-- - -require("luci.sys") -require("luci.sys.zoneinfo") -require("luci.tools.webadmin") - -m = Map("system", translate("system"), translate("a_s_desc")) - -s = m:section(TypedSection, "system", "") -s.anonymous = true - -local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo() -local uptime = luci.sys.uptime() - -s:option(DummyValue, "_system", translate("system")).value = system -s:option(DummyValue, "_cpu", translate("m_i_processor")).value = model - -local load1, load5, load15 = luci.sys.loadavg() -s:option(DummyValue, "_la", translate("load")).value = - string.format("%.2f, %.2f, %.2f", load1, load5, load15) - -s:option(DummyValue, "_memtotal", translate("m_i_memory")).value = - string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)", - tonumber(memtotal) / 1024, - 100 * memcached / memtotal, - translate("mem_cached") or "", - 100 * membuffers / memtotal, - translate("mem_buffered") or "", - 100 * memfree / memtotal, - translate("mem_free") or "") - -s:option(DummyValue, "_systime", translate("m_i_systemtime")).value = - os.date("%c") - -s:option(DummyValue, "_uptime", translate("m_i_uptime")).value = - luci.tools.webadmin.date_format(tonumber(uptime)) - -s:option(Value, "hostname", translate("hostname")) - -tz = s:option(ListValue, "zonename", translate("timezone")) -tz:value("UTC") - -for i, zone in ipairs(luci.sys.zoneinfo.TZ) do - tz:value(zone[1]) -end - -function tz.write(self, section, value) - local function lookup_zone(title) - for _, zone in ipairs(luci.sys.zoneinfo.TZ) do - if zone[1] == title then return zone[2] end - end - end - - AbstractValue.write(self, section, value) - self.map.uci:set("system", section, "timezone", lookup_zone(value) or "GMT0") -end - -s:option(Value, "log_size", nil, "kiB").optional = true -s:option(Value, "log_ip").optional = true -s:option(Value, "conloglevel").optional = true -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddns.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddns.lua deleted file mode 100644 index b1877d8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddns.lua +++ /dev/null @@ -1,74 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ddns.lua 3643 2008-10-29 05:34:34Z jow $ -]]-- -require("luci.tools.webadmin") -m = Map("ddns", translate("ddns"), translate("ddns_desc")) - -s = m:section(TypedSection, "service", "") -s.addremove = true - -s:option(Flag, "enabled", translate("enable")) - -svc = s:option(ListValue, "service_name", translate("service")) -svc.rmempty = true -svc:value("") -svc:value("dyndns.org") -svc:value("changeip.com") -svc:value("zoneedit.com") -svc:value("no-ip.com") -svc:value("freedns.afraid.org") - -s:option(Value, "domain", translate("hostname")).rmempty = true -s:option(Value, "username", translate("username")).rmempty = true -pw = s:option(Value, "password", translate("password")) -pw.rmempty = true -pw.password = true - -src = s:option(ListValue, "ip_source") -src:value("network", translate("network")) -src:value("interface", translate("interface")) -src:value("web", "URL") - -iface = s:option(ListValue, "ip_network", translate("network")) -iface:depends("ip_source", "network") -iface.rmempty = true -luci.tools.webadmin.cbi_add_networks(iface) - -iface = s:option(ListValue, "ip_interface", translate("interface")) -iface:depends("ip_source", "interface") -iface.rmempty = true -for k, v in pairs(luci.sys.net.devices()) do - iface:value(v) -end - -web = s:option(Value, "ip_url", "URL") -web:depends("ip_source", "web") -web.rmempty = true - -s:option(Value, "update_url").optional = true - -s:option(Value, "check_interval").default = 10 -unit = s:option(ListValue, "check_unit") -unit.default = "minutes" -unit:value("minutes", "min") -unit:value("hours", "h") - -s:option(Value, "force_interval").default = 72 -unit = s:option(ListValue, "force_unit") -unit.default = "hours" -unit:value("minutes", "min") -unit:value("hours", "h") - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddnsmini.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddnsmini.lua deleted file mode 100644 index 8a898a9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ddns/ddnsmini.lua +++ /dev/null @@ -1,52 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ddnsmini.lua 3643 2008-10-29 05:34:34Z jow $ -]]-- -m = Map("ddns", translate("ddns"), translate("ddns_desc")) - -s = m:section(TypedSection, "service", "") -s.addremove = true - -s:option(Flag, "enabled", translate("enable")) - -svc = s:option(ListValue, "service_name", translate("service")) -svc.rmempty = true -svc:value("dyndns.org") -svc:value("changeip.com") -svc:value("zoneedit.com") -svc:value("no-ip.com") -svc:value("freedns.afraid.org") - -s:option(Value, "domain", translate("hostname")).rmempty = true -s:option(Value, "username", translate("username")).rmempty = true -pw = s:option(Value, "password", translate("password")) -pw.rmempty = true -pw.password = true - -s.defaults.ip_source = "network" -s.defaults.ip_network = "wan" - -s:option(Value, "check_interval").default = 10 -unit = s:option(ListValue, "check_unit") -unit.default = "minutes" -unit:value("minutes", "min") -unit:value("hours", "h") - -s:option(Value, "force_interval").default = 72 -unit = s:option(ListValue, "force_unit") -unit.default = "hours" -unit:value("minutes", "min") -unit:value("hours", "h") - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ffwizard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ffwizard.lua deleted file mode 100644 index f93f0c1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ffwizard.lua +++ /dev/null @@ -1,391 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ffwizard.lua 4187 2009-01-30 15:07:36Z jow $ - -]]-- - - -local uci = require "luci.model.uci".cursor() -local tools = require "luci.tools.ffwizard" -local util = require "luci.util" -local sys = require "luci.sys" - - --------------------- View -------------------- -f = SimpleForm("ffwizward", "Freifunkassistent", - "Dieser Assistent unterstüzt bei der Einrichtung des Routers für das Freifunknetz.") - - -dev = f:field(ListValue, "device", "WLAN-Gerät") -uci:foreach("wireless", "wifi-device", - function(section) - dev:value(section[".name"]) - end) - - -main = f:field(Flag, "wifi", "Freifunkzugang einrichten") - -net = f:field(Value, "net", "Freifunknetz", "1. Teil der IP-Adresse") -net.rmempty = true -net:depends("wifi", "1") -uci:foreach("freifunk", "community", function(s) - net:value(s[".name"], "%s (%s)" % {s.name, s.prefix}) -end) - -function net.cfgvalue(self, section) - return uci:get("freifunk", "wizard", "net") -end -function net.write(self, section, value) - uci:set("freifunk", "wizard", "net", value) - uci:save("freifunk") -end - - -subnet = f:field(Value, "subnet", "Subnetz (Projekt)", "2. Teil der IP-Adresse") -subnet.rmempty = true -subnet:depends("wifi", "1") -function subnet.cfgvalue(self, section) - return uci:get("freifunk", "wizard", "subnet") -end -function subnet.write(self, section, value) - uci:set("freifunk", "wizard", "subnet", value) - uci:save("freifunk") -end - -node = f:field(Value, "node", "Knoten", "3. Teil der IP-Adresse") -node.rmempty = true -node:depends("wifi", "1") -for i=1, 51 do - node:value(i) -end -function node.cfgvalue(self, section) - return uci:get("freifunk", "wizard", "node") -end -function node.write(self, section, value) - uci:set("freifunk", "wizard", "node", value) - uci:save("freifunk") -end - -client = f:field(Flag, "client", "WLAN-DHCP anbieten") -client:depends("wifi", "1") -client.rmempty = true - - -olsr = f:field(Flag, "olsr", "OLSR einrichten") -olsr.rmempty = true - -share = f:field(Flag, "sharenet", "Eigenen Internetzugang freigeben") -share.rmempty = true - - - --------------------- Control -------------------- -function f.handle(self, state, data) - if state == FORM_VALID then - luci.http.redirect(luci.dispatcher.build_url("admin", "uci", "changes")) - return false - elseif state == FORM_INVALID then - self.errmessage = "Ungültige Eingabe: Bitte die Formularfelder auf Fehler prüfen." - end - return true -end - -local function _strip_internals(tbl) - tbl = tbl or {} - for k, v in pairs(tbl) do - if k:sub(1, 1) == "." then - tbl[k] = nil - end - end - return tbl -end - --- Configure Freifunk checked -function main.write(self, section, value) - if value == "0" then - return - end - - local device = dev:formvalue(section) - local community, external - - -- Collect IP-Address - local inet = net:formvalue(section) - local isubnet = subnet:formvalue(section) - local inode = node:formvalue(section) - - -- Invalidate fields - if not inet then - net.tag_missing[section] = true - else - community = inet - external = uci:get("freifunk", community, "external") or "" - inet = uci:get("freifunk", community, "prefix") or inet - end - if not isubnet then - subnet.tag_missing[section] = true - end - if not inode then - node.tag_missing[section] = true - end - - if not inet or not isubnet or not inode then - return - end - - local ip = "%s.%s.%s" % {inet, isubnet, inode} - - - -- Cleanup - tools.wifi_delete_ifaces(device) - tools.network_remove_interface(device) - tools.firewall_zone_remove_interface("freifunk", device) - - -- Tune community settings - if community and uci:get("freifunk", community) then - uci:tset("freifunk", "community", uci:get_all("freifunk", community)) - end - - -- Tune wifi device - local devconfig = uci:get_all("freifunk", "wifi_device") - util.update(devconfig, uci:get_all(external, "wifi_device") or {}) - uci:tset("wireless", device, devconfig) - - -- Create wifi iface - local ifconfig = uci:get_all("freifunk", "wifi_iface") - util.update(ifconfig, uci:get_all(external, "wifi_iface") or {}) - ifconfig.device = device - ifconfig.network = device - ifconfig.ssid = uci:get("freifunk", community, "ssid") - uci:section("wireless", "wifi-iface", nil, ifconfig) - - -- Save wifi - uci:save("wireless") - - -- Create firewall zone and add default rules (first time) - local newzone = tools.firewall_create_zone("freifunk", "REJECT", "ACCEPT", "REJECT", true) - if newzone then - uci:foreach("freifunk", "fw_forwarding", function(section) - uci:section("firewall", "forwarding", nil, section) - end) - uci:foreach(external, "fw_forwarding", function(section) - uci:section("firewall", "forwarding", nil, section) - end) - - uci:foreach("freifunk", "fw_rule", function(section) - uci:section("firewall", "rule", nil, section) - end) - uci:foreach(external, "fw_rule", function(section) - uci:section("firewall", "rule", nil, section) - end) - end - - -- Enforce firewall include - local has_include = false - uci:foreach("firewall", "include", - function(section) - if section.path == "/etc/firewall.freifunk" then - has_include = true - end - end) - - if not has_include then - uci:section("firewall", "include", nil, - { path = "/etc/firewall.freifunk" }) - end - - -- Allow state: invalid packets - uci:foreach("firewall", "defaults", - function(section) - uci:set("firewall", section[".name"], "drop_invalid", "0") - end) - - -- Prepare advanced config - local has_advanced = false - uci:foreach("firewall", "advanced", - function(section) has_advanced = true end) - - if not has_advanced then - uci:section("firewall", "advanced", nil, - { tcp_ecn = "0" }) - end - - uci:save("firewall") - - - -- Create network interface - local netconfig = uci:get_all("freifunk", "interface") - util.update(netconfig, uci:get_all(external, "interface") or {}) - netconfig.proto = "static" - netconfig.ipaddr = ip - uci:section("network", "interface", device, netconfig) - - uci:save("network") - - tools.firewall_zone_add_interface("freifunk", device) - - - -- Set hostname - local new_hostname = ip:gsub("%.", "-") - local old_hostname = sys.hostname() - - if old_hostname == "OpenWrt" or old_hostname:match("^%d+-%d+-%d+-%d+$") then - uci:foreach("system", "system", - function(s) - uci:set("system", s['.name'], "hostname", new_hostname) - end) - - luci.fs.writefile( "/proc/sys/kernel/hostname", new_hostname.."\n" ) - uci:save("system") - end -end - - -function olsr.write(self, section, value) - if value == "0" then - return - end - - - local device = dev:formvalue(section) - - local community = net:formvalue(section) - local external = community and uci:get("freifunk", community, "external") or "" - - -- Configure nameservice - local hostname - uci:foreach("system", "system", function(s) hostname = s.hostname end) - - if hostname then - uci:foreach("olsrd", "LoadPlugin", - function(s) - if s.library == "olsrd_nameservice.so.0.3" then - uci:set("olsrd", s['.name'], "name", hostname) - end - end) - end - - -- Delete old interface - uci:delete_all("olsrd", "Interface", {interface=device}) - - -- Write new interface - local olsrbase = uci:get_all("freifunk", "olsr_interface") - util.update(olsrbase, uci:get_all(external, "olsr_interface") or {}) - olsrbase.interface = device - olsrbase.ignore = "0" - uci:section("olsrd", "Interface", nil, olsrbase) - uci:save("olsrd") - - -- Import hosts - uci:foreach("dhcp", "dnsmasq", function(s) - uci:set("dhcp", s[".name"], "addnhosts", "/var/etc/hosts.olsr") - end) - uci:save("dhcp") -end - - -function share.write(self, section, value) - uci:delete_all("firewall", "forwarding", {src="freifunk", dest="wan"}) - uci:delete_all("olsrd", "LoadPlugin", {library="olsrd_dyn_gw_plain.so.0.4"}) - - if value == "1" then - uci:section("firewall", "forwarding", nil, {src="freifunk", dest="wan"}) - uci:section("olsrd", "LoadPlugin", nil, {library="olsrd_dyn_gw_plain.so.0.4"}) - end - uci:save("firewall") - uci:save("olsrd") -end - - -function client.write(self, section, value) - if value == "0" then - return - end - - local device = dev:formvalue(section) - - -- Collect IP-Address - local inet = net:formvalue(section) - local isubnet = subnet:formvalue(section) - local inode = node:formvalue(section) - - if not inet or not isubnet or not inode then - return - end - local community = inet - local external = community and uci:get("freifunk", community, "external") or "" - inet = uci:get("freifunk", community, "prefix") or inet - - local dhcpbeg = 48 + tonumber(inode) * 4 - local dclient = "%s.%s.%s" % {inet:gsub("^[0-9]+", "10"), isubnet, dhcpbeg} - local limit = dhcpbeg < 252 and 3 or 2 - - -- Delete old alias - uci:delete("network", device .. "dhcp") - - -- Create alias - local aliasbase = uci:get_all("freifunk", "alias") - util.update(aliasbase, uci:get_all(external, "alias") or {}) - aliasbase.interface = device - aliasbase.ipaddr = dclient - aliasbase.proto = "static" - uci:section("network", "alias", device .. "dhcp", aliasbase) - uci:save("network") - - - -- Create dhcp - local dhcpbase = uci:get_all("freifunk", "dhcp") - util.update(dhcpbase, uci:get_all(external, "dhcp") or {}) - dhcpbase.interface = device .. "dhcp" - dhcpbase.start = dhcpbeg - dhcpbase.limit = limit - - uci:section("dhcp", "dhcp", device .. "dhcp", dhcpbase) - uci:save("dhcp") - - uci:delete_all("firewall", "rule", { - src="freifunk", - proto="udp", - src_port="68", - dest_port="67" - }) - uci:section("firewall", "rule", nil, { - src="freifunk", - proto="udp", - src_port="68", - dest_port="67", - target="ACCEPT" - }) - uci:delete_all("firewall", "rule", { - src="freifunk", - proto="tcp", - dest_port="8082", - }) - uci:section("firewall", "rule", nil, { - src="freifunk", - proto="tcp", - dest_port="8082", - target="ACCEPT" - }) - - - - -- Delete old splash - uci:delete_all("luci_splash", "iface", {net=device, zone="freifunk"}) - - -- Register splash - uci:section("luci_splash", "iface", nil, {net=device, zone="freifunk"}) - uci:save("luci_splash") -end - -return f diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/contact.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/contact.lua deleted file mode 100644 index 5dd8835..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/contact.lua +++ /dev/null @@ -1,34 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: contact.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- - -luci.i18n.loadc("freifunk") - -m = Map("freifunk", translate("contact"), translate("contact1")) - -c = m:section(NamedSection, "contact", "public", "") - -c:option(Value, "nickname", translate("ff_nickname")) -c:option(Value, "name", translate("ff_name")) -c:option(Value, "mail", translate("ff_mail"), translate("ff_mail1")) -c:option(Value, "phone", translate("ff_phone")) -c:option(Value, "location", translate("ff_location")) -c:option(Value, "note", translate("ff_note")) - -m2 = Map("system", translate("geo")) - -s = m2:section(TypedSection, "system", "") -s:option(Value, "latitude", translate("latitude", "Breite")).rmempty = true -s:option(Value, "longitude", translate("longitude", "Länge")).rmempty = true - -return m, m2 diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/freifunk.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/freifunk.lua deleted file mode 100644 index fa789d9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/freifunk.lua +++ /dev/null @@ -1,24 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: freifunk.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- -m = Map("freifunk", "Freifunk") - -c = m:section(NamedSection, "community", "public", "Gemeinschaft", [[Dies sind die Grundeinstellungen -für die lokale Freifunkgemeinschaft. Diese Werte wirken sich NICHT auf die Konfiguration -des Routers aus, sondern definieren nur die Vorgaben für den Freifunkassistenten.]]) -c:option(Value, "name", "Gemeinschaft") -c:option(Value, "homepage", "Webseite") -c:option(Value, "ssid", "ESSID") -c:option(Value, "prefix", "Netzprefix") - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/public_status.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/public_status.lua deleted file mode 100644 index 8180bfe..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/freifunk/public_status.lua +++ /dev/null @@ -1,216 +0,0 @@ -require "luci.sys" -require "luci.tools.webadmin" - -local bit = require "bit" -local uci = luci.model.uci.cursor_state() - -local ffzone = luci.tools.webadmin.firewall_find_zone("freifunk") -local ffznet = ffzone and uci:get("firewall", ffzone, "network") -local ffwifs = ffznet and luci.util.split(ffznet, " ") or {} - --- System -- - -f = SimpleForm("system", "System") -f.submit = false -f.reset = false -local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo() -local uptime = luci.sys.uptime() - -f:field(DummyValue, "_system", translate("system")).value = system -f:field(DummyValue, "_cpu", translate("m_i_processor")).value = model - -local load1, load5, load15 = luci.sys.loadavg() -f:field(DummyValue, "_la", translate("load")).value = -string.format("%.2f, %.2f, %.2f", load1, load5, load15) - -f:field(DummyValue, "_memtotal", translate("m_i_memory")).value = -string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)", - tonumber(memtotal) / 1024, - 100 * memcached / memtotal, - translate("mem_cached") or "", - 100 * membuffers / memtotal, - translate("mem_buffered") or "", - 100 * memfree / memtotal, - translate("mem_free") or "") - -f:field(DummyValue, "_systime", translate("m_i_systemtime")).value = -os.date("%c") - -f:field(DummyValue, "_uptime", translate("m_i_uptime")).value = -luci.tools.webadmin.date_format(tonumber(uptime)) - - --- Wireless -- - -local wireless = uci:get_all("wireless") -local wifidata = luci.sys.wifi.getiwconfig() -local ifaces = {} - -for k, v in pairs(wireless) do - if v[".type"] == "wifi-iface" and ( - luci.util.contains(ffwifs, v.device) or - ( #ffwifs == 0 and (not v.encryption or v.encryption == "none") ) ) - then - table.insert(ifaces, v) - end -end - - -m = SimpleForm("wireless", "Freifunk WLAN") -m.submit = false -m.reset = false - -s = m:section(Table, ifaces, translate("networks")) - -link = s:option(DummyValue, "_link", translate("link")) -function link.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" -end - -essid = s:option(DummyValue, "ssid", "ESSID") - -bssid = s:option(DummyValue, "_bsiid", "BSSID") -function bssid.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return (wifidata[ifname] and (wifidata[ifname].Cell - or wifidata[ifname]["Access Point"])) or "-" -end - -channel = s:option(DummyValue, "channel", translate("channel")) - function channel.cfgvalue(self, section) - return wireless[self.map:get(section, "device")].channel -end - -protocol = s:option(DummyValue, "_mode", translate("protocol")) -function protocol.cfgvalue(self, section) - local mode = wireless[self.map:get(section, "device")].mode - return mode and "802." .. mode -end - -mode = s:option(DummyValue, "mode", translate("mode")) -encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) - -power = s:option(DummyValue, "_power", translate("power")) -function power.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" -end - -scan = s:option(Button, "_scan", translate("scan")) -scan.inputstyle = "find" - -function scan.cfgvalue(self, section) - return self.map:get(section, "ifname") or false -end - -t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) - -function scan.write(self, section) - t2.render = t2._render - local ifname = self.map:get(section, "ifname") - luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) -end - -t2._render = t2.render -t2.render = function() end - -t2:option(DummyValue, "Quality", translate("iwscan_link")) -essid = t2:option(DummyValue, "ESSID", "ESSID") -function essid.cfgvalue(self, section) - return luci.util.pcdata(self.map:get(section, "ESSID")) -end - -t2:option(DummyValue, "Address", "BSSID") -t2:option(DummyValue, "Mode", translate("mode")) -chan = t2:option(DummyValue, "channel", translate("channel")) -function chan.cfgvalue(self, section) - return self.map:get(section, "Channel") - or self.map:get(section, "Frequency") - or "-" -end - -t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) - -t2:option(DummyValue, "Signal level", translate("iwscan_signal")) - -t2:option(DummyValue, "Noise level", translate("iwscan_noise")) - - --- Routes -- -r = SimpleForm("routes", "Standardrouten") -r.submit = false -r.reset = false - -local routes = {} -for i, route in ipairs(luci.sys.net.routes()) do - if route.dest:prefix() == 0 then - routes[#routes+1] = route - end -end - -v = r:section(Table, routes) - -net = v:option(DummyValue, "iface", translate("network")) -function net.cfgvalue(self, section) - return luci.tools.webadmin.iface_get_network(routes[section].device) - or routes[section].device -end - -target = v:option(DummyValue, "target", translate("target")) -function target.cfgvalue(self, section) - return routes[section].dest:network():string() -end - -netmask = v:option(DummyValue, "netmask", translate("netmask")) -function netmask.cfgvalue(self, section) - return routes[section].dest:mask():string() -end - -gateway = v:option(DummyValue, "gateway", translate("gateway")) -function gateway.cfgvalue(self, section) - return routes[section].gateway:string() -end - -metric = v:option(DummyValue, "metric", translate("metric")) -function metric.cfgvalue(self, section) - return routes[section].metric -end - - -local routes6 = {} -for i, route in ipairs(luci.sys.net.routes6() or {}) do - if route.dest:prefix() == 0 then - routes6[#routes6+1] = route - end -end - -if #routes6 > 0 then - v6 = r:section(Table, routes6) - - net = v6:option(DummyValue, "iface", translate("network")) - function net.cfgvalue(self, section) - return luci.tools.webadmin.iface_get_network(routes[section].device) - or routes6[section].device - end - - target = v6:option(DummyValue, "target", translate("target")) - function target.cfgvalue(self, section) - return routes6[section].dest:string() - end - - gateway = v6:option(DummyValue, "gateway6", translate("gateway6")) - function gateway.cfgvalue(self, section) - return routes6[section].source:string() - end - - metric = v6:option(DummyValue, "metric", translate("metric")) - function metric.cfgvalue(self, section) - local metr = routes6[section].metric - local lower = bit.band(metr, 0xffff) - local higher = bit.rshift(bit.band(metr, 0xffff0000), 16) - return "%04X%04X" % {higher, lower} - end -end - -return f, m, r diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/hd_idle.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/hd_idle.lua deleted file mode 100644 index 32ca85b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/hd_idle.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - -LuCI hd-idle -(c) 2008 Yanira - -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 - -$Id: hd_idle.lua 3503 2008-10-03 16:49:00Z jow $ - -]]-- - -require("luci.fs") - -m = Map("hd-idle", translate("hd_idle"), translate("hd_idle_desc")) - -s = m:section(TypedSection, "hd-idle", translate("settings")) -s.anonymous = true - -s:option(Flag, "enabled", translate("enable", "Enable")) - -disk = s:option(Value, "disk", translate("disk")) -disk.rmempty = true -for _, dev in ipairs(luci.fs.glob("/dev/[sh]d[a-z]")) do - disk:value(luci.fs.basename(dev)) -end - -s:option(Value, "idle_time_interval", translate("idle_time_interval")).default = 10 -s.rmempty = true -unit = s:option(ListValue, "idle_time_unit", translate("idle_time_unit")) -unit.default = "minutes" -unit:value("minutes", "min") -unit:value("hours", "h") -unit.rmempty = true - -s:option(Flag, "enable_debug", translate("enable_debug")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/init/init.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/init/init.lua deleted file mode 100644 index 0523fe9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/init/init.lua +++ /dev/null @@ -1,58 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: init.lua 3528 2008-10-06 20:09:06Z jow $ -]]-- - -require("luci.sys") -require("luci.util") - -local inits = { } - -for _, name in ipairs(luci.sys.init.names()) do - local index = luci.sys.init.index(name) - local enabled = luci.sys.init.enabled(name) - - inits["%02i.%s" % { index, name }] = { - name = name, - index = tostring(index), - enabled = enabled - } -end - - -m = SimpleForm("initmgr", translate("initmgr"), translate("initmgr_desc")) -m.reset = false - -s = m:section(Table, inits) - -i = s:option(DummyValue, "index", translate("initmgr_index")) -n = s:option(DummyValue, "name", translate("initmgr_name")) - -e = s:option(Flag, "enabled", translate("initmgr_enabled")) - -e.cfgvalue = function(self, section) - return inits[section].enabled and "1" or "0" -end - -e.write = function(self, section, value) - if value == "1" and not inits[section].enabled then - inits[section].enabled = true - return luci.sys.init.enable(inits[section].name) - elseif value == "0" and inits[section].enabled then - inits[section].enabled = false - return luci.sys.init.disable(inits[section].name) - end - return true -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/miniportfw.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/miniportfw.lua deleted file mode 100644 index 8d27375..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/miniportfw.lua +++ /dev/null @@ -1,45 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: miniportfw.lua 3070 2008-09-02 11:27:00Z Cyrus $ -]]-- -require("luci.sys") -m = Map("firewall", translate("fw_portfw"), translate("fw_portfw1")) - - -s = m:section(TypedSection, "redirect", "") -s:depends("src", "wan") -s.defaults.src = "wan" - -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true - -name = s:option(Value, "_name", translate("name"), translate("cbi_optional")) -name.size = 10 - -proto = s:option(ListValue, "proto", translate("protocol")) -proto:value("tcp", "TCP") -proto:value("udp", "UDP") -proto:value("tcpudp", "TCP+UDP") - -dport = s:option(Value, "src_dport") -dport.size = 5 - -to = s:option(Value, "dest_ip") -for i, dataset in ipairs(luci.sys.net.arptable()) do - to:value(dataset["IP address"]) -end - -toport = s:option(Value, "dest_port") -toport.size = 5 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/redirect.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/redirect.lua deleted file mode 100644 index 12a738e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/redirect.lua +++ /dev/null @@ -1,50 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: redirect.lua 3500 2008-10-03 16:23:43Z Cyrus $ -]]-- -require("luci.sys") -m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc")) - - -s = m:section(TypedSection, "redirect", "") -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true -s.extedit = luci.dispatcher.build_url("admin", "network", "firewall", "redirect", "%s") - -name = s:option(Value, "_name", translate("name"), translate("cbi_optional")) -name.size = 10 - -iface = s:option(ListValue, "src", translate("fw_zone")) -iface.default = "wan" -luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - iface:value(section.name) - end) - -proto = s:option(ListValue, "proto", translate("protocol")) -proto:value("tcp", "TCP") -proto:value("udp", "UDP") -proto:value("tcpudp", "TCP+UDP") - -dport = s:option(Value, "src_dport") -dport.size = 5 - -to = s:option(Value, "dest_ip") -for i, dataset in ipairs(luci.sys.net.arptable()) do - to:value(dataset["IP address"]) -end - -toport = s:option(Value, "dest_port") -toport.size = 5 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/rrule.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/rrule.lua deleted file mode 100644 index d9222ec..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/rrule.lua +++ /dev/null @@ -1,69 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: rrule.lua 4200 2009-01-30 18:57:14Z Cyrus $ -]]-- -require("luci.sys") -arg[1] = arg[1] or "" - -m = Map("firewall", translate("fw_redirect"), translate("fw_redirect_desc")) - - -s = m:section(NamedSection, arg[1], "redirect", "") -s.anonymous = true -s.addremove = false - -back = s:option(DummyValue, "_overview", translate("overview")) -back.value = "" -back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "redirect") - -name = s:option(Value, "_name", translate("name")) -name.rmempty = true -name.size = 10 - -iface = s:option(ListValue, "src", translate("fw_zone")) -iface.default = "wan" -luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - iface:value(section.name) - end) - -s:option(Value, "src_ip", translate("firewall_redirect_srcip")).optional = true -s:option(Value, "src_mac", translate("firewall_redirect_srcmac")).optional = true - -sport = s:option(Value, "src_port", translate("firewall_rule_srcport")) -sport:depends("proto", "tcp") -sport:depends("proto", "udp") -sport:depends("proto", "tcpudp") - -proto = s:option(ListValue, "proto", translate("protocol")) -proto.optional = true -proto:value("") -proto:value("tcp", "TCP") -proto:value("udp", "UDP") -proto:value("tcpudp", "TCP+UDP") - -dport = s:option(Value, "src_dport", translate("firewall_redirect_srcdport")) -dport.size = 5 -dport:depends("proto", "tcp") -dport:depends("proto", "udp") -dport:depends("proto", "tcpudp") - -to = s:option(Value, "dest_ip", translate("firewall_redirect_destip")) -for i, dataset in ipairs(luci.sys.net.arptable()) do - to:value(dataset["IP address"]) -end - -toport = s:option(Value, "dest_port", translate("firewall_redirect_destport")) -toport.optional = true -toport.size = 5 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/traffic.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/traffic.lua deleted file mode 100644 index 994e3de..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/traffic.lua +++ /dev/null @@ -1,82 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: traffic.lua 4181 2009-01-29 15:04:16Z Cyrus $ -]]-- - -m = Map("firewall", translate("fw_traffic")) -s = m:section(TypedSection, "forwarding", translate("fw_forwarding"), translate("fw_forwarding1")) -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true - -iface = s:option(ListValue, "src", translate("fw_src")) -oface = s:option(ListValue, "dest", translate("fw_dest")) -s:option(Flag, "mtu_fix", translate("fw_mtufix")) - -luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - iface:value(section.name) - oface:value(section.name) - end) - - - -s = m:section(TypedSection, "rule") -s.addremove = true -s.anonymous = true -s.template = "cbi/tblsection" -s.extedit = luci.dispatcher.build_url("admin", "network", "firewall", "rule", "%s") -s.defaults.target = "ACCEPT" - -local created = nil - -function s.create(self, section) - created = TypedSection.create(self, section) -end - -function s.parse(self, ...) - TypedSection.parse(self, ...) - if created then - m.uci:save("firewall") - luci.http.redirect(luci.dispatcher.build_url( - "admin", "network", "firewall", "rule", created - )) - end -end - -s:option(DummyValue, "_name", translate("name")) -s:option(DummyValue, "proto", translate("protocol")) - -src = s:option(DummyValue, "src", translate("fw_src")) -function src.cfgvalue(self, s) - return "%s:%s:%s" % { - self.map:get(s, "src") or "*", - self.map:get(s, "src_ip") or "0.0.0.0/0", - self.map:get(s, "src_port") or "*" - } -end - -dest = s:option(DummyValue, "dest", translate("fw_dest")) -function dest.cfgvalue(self, s) - return "%s:%s:%s" % { - self.map:get(s, "dest") or translate("device", "device"), - self.map:get(s, "dest_ip") or "0.0.0.0/0", - self.map:get(s, "dest_port") or "*" - } -end - - -s:option(DummyValue, "target") - - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/trule.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/trule.lua deleted file mode 100644 index cda4e52..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/trule.lua +++ /dev/null @@ -1,72 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: trule.lua 4012 2009-01-09 10:05:59Z Cyrus $ -]]-- -arg[1] = arg[1] or "" -m = Map("firewall", translate("firewall_rule"), translate("firewall_rule_desc")) - -s = m:section(NamedSection, arg[1], "rule", "") -s.anonymous = true -s.addremove = false - -back = s:option(DummyValue, "_overview", translate("overview")) -back.value = "" -back.titleref = luci.dispatcher.build_url("admin", "network", "firewall", "rule") - - -name = s:option(Value, "_name", translate("name")..translate("cbi_optional")) -name.rmempty = true - -iface = s:option(ListValue, "src", translate("fw_src")) -iface.rmempty = true - -oface = s:option(ListValue, "dest", translate("fw_dest")) -oface:value("", translate("device", "device")) -oface.rmempty = true - -luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - iface:value(section.name) - oface:value(section.name) - end) - -proto = s:option(Value, "proto", translate("protocol")) -proto.optional = true -proto:value("") -proto:value("tcpudp", "TCP+UDP") -proto:value("tcp", "TCP") -proto:value("udp", "UDP") -proto:value("icmp", "ICMP") - -s:option(Value, "src_ip", translate("firewall_rule_srcip")).optional = true -s:option(Value, "dest_ip", translate("firewall_rule_destip")).optional = true -s:option(Value, "src_mac", translate("firewall_rule_srcmac")).optional = true - -sport = s:option(Value, "src_port", translate("firewall_rule_srcport")) -sport:depends("proto", "tcp") -sport:depends("proto", "udp") -sport:depends("proto", "tcpudp") - -dport = s:option(Value, "dest_port", translate("firewall_rule_destport")) -dport:depends("proto", "tcp") -dport:depends("proto", "udp") -dport:depends("proto", "tcpudp") - -jump = s:option(ListValue, "target", translate("firewall_rule_target")) -jump.rmempty = true -jump.default = "ACCEPT" -jump:value("DROP", translate("fw_drop")) -jump:value("ACCEPT", translate("fw_accept")) -jump:value("REJECT", translate("fw_reject")) - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/zones.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/zones.lua deleted file mode 100644 index a07149f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_fw/zones.lua +++ /dev/null @@ -1,71 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: zones.lua 4051 2009-01-16 20:29:47Z Cyrus $ -]]-- -require("luci.tools.webadmin") -m = Map("firewall", translate("fw_fw"), translate("fw_fw1")) - -s = m:section(TypedSection, "defaults") -s.anonymous = true - -s:option(Flag, "syn_flood") - -local di = s:option(Flag, "drop_invalid", translate("fw_dropinvalid")) -di.rmempty = false -function di.cfgvalue(...) - return AbstractValue.cfgvalue(...) or "1" -end - -p = {} -p[1] = s:option(ListValue, "input") -p[2] = s:option(ListValue, "output") -p[3] = s:option(ListValue, "forward") - -for i, v in ipairs(p) do - v:value("REJECT", translate("fw_reject")) - v:value("DROP", translate("fw_drop")) - v:value("ACCEPT", translate("fw_accept")) -end - - -s = m:section(TypedSection, "zone", translate("fw_zones")) -s.template = "cbi/tblsection" -s.anonymous = true -s.addremove = true - -name = s:option(Value, "name", translate("name")) -name.size = 8 - -p = {} -p[1] = s:option(ListValue, "input") -p[2] = s:option(ListValue, "output") -p[3] = s:option(ListValue, "forward") - -for i, v in ipairs(p) do - v:value("REJECT", translate("fw_reject")) - v:value("DROP", translate("fw_drop")) - v:value("ACCEPT", translate("fw_accept")) -end - -s:option(Flag, "masq") - -net = s:option(MultiValue, "network") -net.widget = "select" -net.rmempty = true -luci.tools.webadmin.cbi_add_networks(net) - -function net.cfgvalue(self, section) - local value = MultiValue.cfgvalue(self, section) - return value or name:cfgvalue(section) -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/collectd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/collectd.lua deleted file mode 100644 index 2b03eaa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/collectd.lua +++ /dev/null @@ -1,74 +0,0 @@ ---[[ - -Luci configuration model for statistics - general collectd configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: collectd.lua 2317 2008-06-08 14:19:26Z jow $ - -]]-- - -require("luci.sys") - - ---[[ -m = Map("luci_statistics", "Collector Daemon", -Collectd ist ein kleiner und flexibler Dienst zum Sammeln und Abfragen von Daten -aus verschieden Quellen. Zur weiteren Verarbeitung werden die Daten in RRD Datenbanken -gespeichert oder per Multicast Relaying über das Netzwerk versendet.) -]]-- -m = Map("luci_statistics") - --- general config section -s = m:section( NamedSection, "collectd", "luci_statistics" ) - --- general.hostname (Hostname) -hostname = s:option( Value, "Hostname" ) -hostname.default = luci.sys.hostname() -hostname.optional = true - --- general.basedir (BaseDir) -basedir = s:option( Value, "BaseDir" ) -basedir.default = "/var/run/collectd" - --- general.include (Include) -include = s:option( Value, "Include" ) -include.default = "/etc/collectd/conf.d/*.conf" - --- general.plugindir (PluginDir) -plugindir = s:option( Value, "PluginDir" ) -plugindir.default = "/usr/lib/collectd/" - --- general.pidfile (PIDFile) -pidfile = s:option( Value, "PIDFile" ) -pidfile.default = "/var/run/collectd.pid" - --- general.typesdb (TypesDB) -typesdb = s:option( Value, "TypesDB" ) -typesdb.default = "/etc/collectd/types.db" - --- general.interval (Interval) -interval = s:option( Value, "Interval" ) -interval.default = 60 -interval.isnumber = true - --- general.readthreads (ReadThreads) -readthreads = s:option( Value, "ReadThreads" ) -readthreads.default = 5 -readthreads.isnumber = true - --- general.fqdnlookup (FQDNLookup) -fqdnlookup = s:option( Flag, "FQDNLookup" ) -fqdnlookup.enabled = "true" -fqdnlookup.disabled = "false" -fqdnlookup.default = "false" -fqdnlookup.optional = true -fqdnlookup:depends( "Hostname", "" ) - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/cpu.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/cpu.lua deleted file mode 100644 index 5744411..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/cpu.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd cpu plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: cpu.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_cpu config section -s = m:section( NamedSection, "collectd_cpu", "luci_statistics" ) - --- collectd_cpu.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/csv.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/csv.lua deleted file mode 100644 index d3d00b2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/csv.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd csv plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: csv.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_csv config section -s = m:section( NamedSection, "collectd_csv", "luci_statistics" ) - --- collectd_csv.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_csv.datadir (DataDir) -datadir = s:option( Value, "DataDir" ) -datadir.default = "127.0.0.1" -datadir:depends( "enable", 1 ) - --- collectd_csv.storerates (StoreRates) -storerates = s:option( Flag, "StoreRates" ) -storerates.default = 0 -storerates:depends( "enable", 1 ) - -return m - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/df.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/df.lua deleted file mode 100644 index 7cc4860..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/df.lua +++ /dev/null @@ -1,48 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd df plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: df.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_df config section -s = m:section( NamedSection, "collectd_df", "luci_statistics" ) - --- collectd_df.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_df.devices (Device) -devices = s:option( Value, "Devices" ) -devices.default = "/dev/mtdblock/4" -devices.optional = true -devices:depends( "enable", 1 ) - --- collectd_df.mountpoints (MountPoint) -mountpoints = s:option( Value, "MountPoints" ) -mountpoints.default = "/jffs" -mountpoints.optional = true -mountpoints:depends( "enable", 1 ) - --- collectd_df.fstypes (FSType) -fstypes = s:option( Value, "FSTypes" ) -fstypes.default = "tmpfs" -fstypes.optional = true -fstypes:depends( "enable", 1 ) - --- collectd_df.ignoreselected (IgnoreSelected) -ignoreselected = s:option( Flag, "IgnoreSelected" ) -ignoreselected.default = 0 -ignoreselected:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/disk.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/disk.lua deleted file mode 100644 index 8ca6de2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/disk.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd disk plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: disk.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_disk config section -s = m:section( NamedSection, "collectd_disk", "luci_statistics" ) - --- collectd_disk.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_disk.disks (Disk) -devices = s:option( Value, "Disks" ) -devices.default = "hda1 hdb" -devices.rmempty = true -devices:depends( "enable", 1 ) - --- collectd_disk.ignoreselected (IgnoreSelected) -ignoreselected = s:option( Flag, "IgnoreSelected" ) -ignoreselected.default = 0 -ignoreselected:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/dns.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/dns.lua deleted file mode 100644 index bd65e0b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/dns.lua +++ /dev/null @@ -1,43 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd dns plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: dns.lua 3648 2008-10-29 19:11:54Z jow $ - -]]-- - -require("luci.sys") - - -m = Map("luci_statistics") - --- collectd_dns config section -s = m:section( NamedSection, "collectd_dns", "luci_statistics" ) - --- collectd_dns.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_dns.interfaces (Interface) -interfaces = s:option( MultiValue, "Interfaces" ) -interfaces.widget = "select" -interfaces.size = 5 -interfaces:depends( "enable", 1 ) -interfaces:value("any") -for k, v in pairs(luci.sys.net.devices()) do - interfaces:value(v) -end - --- collectd_dns.ignoresources (IgnoreSource) -ignoresources = s:option( Value, "IgnoreSources" ) -ignoresources.default = "127.0.0.1" -ignoresources:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/email.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/email.lua deleted file mode 100644 index 46c7863..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/email.lua +++ /dev/null @@ -1,52 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd email plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: email.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_email config section -s = m:section( NamedSection, "collectd_email", "luci_statistics" ) - --- collectd_email.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_email.socketfile (SocketFile) -socketfile = s:option( Value, "SocketFile" ) -socketfile.default = "/var/run/collect-email.sock" -socketfile:depends( "enable", 1 ) - --- collectd_email.socketgroup (SocketGroup) -socketgroup = s:option( Value, "SocketGroup" ) -socketgroup.default = "nobody" -socketgroup.rmempty = true -socketgroup.optional = true -socketgroup:depends( "enable", 1 ) - --- collectd_email.socketperms (SocketPerms) -socketperms = s:option( Value, "SocketPerms" ) -socketperms.default = "0770" -socketperms.rmempty = true -socketperms.optional = true -socketperms:depends( "enable", 1 ) - --- collectd_email.maxconns (MaxConns) -maxconns = s:option( Value, "MaxConns" ) -maxconns.default = 5 -maxconns.isinteger = true -maxconns.rmempty = true -maxconns.optional = true -maxconns:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/exec.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/exec.lua deleted file mode 100644 index 4e47712..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/exec.lua +++ /dev/null @@ -1,70 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd exec plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: exec.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_exec config section -s = m:section( NamedSection, "collectd_exec", "luci_statistics" ) - --- collectd_exec.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - - --- collectd_exec_input config section (Exec directives) -exec = m:section( TypedSection, "collectd_exec_input" ) -exec.addremove = true -exec.anonymous = true - --- collectd_exec_input.cmdline -exec_cmdline = exec:option( Value, "cmdline" ) -exec_cmdline.default = "/usr/bin/stat-dhcpusers" - --- collectd_exec_input.cmdline -exec_cmduser = exec:option( Value, "cmduser" ) -exec_cmduser.default = "nobody" -exec_cmduser.rmempty = true -exec_cmduser.optional = true - --- collectd_exec_input.cmdline -exec_cmdgroup = exec:option( Value, "cmdgroup" ) -exec_cmdgroup.default = "nogroup" -exec_cmdgroup.rmempty = true -exec_cmdgroup.optional = true - - --- collectd_exec_notify config section (NotifyExec directives) -notify = m:section( TypedSection, "collectd_exec_notify" ) -notify.addremove = true -notify.anonymous = true - --- collectd_notify_input.cmdline -notify_cmdline = notify:option( Value, "cmdline" ) -notify_cmdline.default = "/usr/bin/stat-dhcpusers" - --- collectd_notify_input.cmdline -notify_cmduser = notify:option( Value, "cmduser" ) -notify_cmduser.default = "nobody" -notify_cmduser.rmempty = true -notify_cmduser.optional = true - --- collectd_notify_input.cmdline -notify_cmdgroup = notify:option( Value, "cmdgroup" ) -notify_cmdgroup.default = "nogroup" -notify_cmdgroup.rmempty = true -notify_cmdgroup.optional = true - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/interface.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/interface.lua deleted file mode 100644 index 40b843d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/interface.lua +++ /dev/null @@ -1,42 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd interface plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: interface.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -require("luci.sys") - - -m = Map("luci_statistics") - --- collectd_interface config section -s = m:section( NamedSection, "collectd_interface", "luci_statistics" ) - --- collectd_interface.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_interface.interfaces (Interface) -interfaces = s:option( MultiValue, "Interfaces" ) -interfaces.widget = "select" -interfaces.size = 5 -interfaces:depends( "enable", 1 ) -for k, v in pairs(luci.sys.net.devices()) do - interfaces:value(v) -end - --- collectd_interface.ignoreselected (IgnoreSelected) -ignoreselected = s:option( Flag, "IgnoreSelected" ) -ignoreselected.default = 0 -ignoreselected:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/iptables.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/iptables.lua deleted file mode 100644 index 865b32d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/iptables.lua +++ /dev/null @@ -1,116 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd iptables plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: iptables.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -require("luci.sys.iptparser") - -ip = luci.sys.iptparser.IptParser() -chains = { } -targets = { } - -for i, rule in ipairs( ip:find() ) do - chains[rule.chain] = true - targets[rule.target] = true -end - - -m = Map("luci_statistics") - --- collectd_iptables config section -s = m:section( NamedSection, "collectd_iptables", "luci_statistics" ) - --- collectd_iptables.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - - --- collectd_iptables_match config section (Chain directives) -rule = m:section( TypedSection, "collectd_iptables_match" ) -rule.addremove = true -rule.anonymous = true - - --- collectd_iptables_match.name -rule_table = rule:option( Value, "name" ) - --- collectd_iptables_match.table -rule_table = rule:option( ListValue, "table" ) -rule_table.default = "filter" -rule_table.rmempty = true -rule_table.optional = true -rule_table:value("") -rule_table:value("filter") -rule_table:value("nat") -rule_table:value("mangle") - - --- collectd_iptables_match.chain -rule_chain = rule:option( ListValue, "chain" ) -rule_chain.rmempty = true -rule_chain.optional = true -rule_chain:value("") - -for chain, void in pairs( chains ) do - rule_chain:value( chain ) -end - - --- collectd_iptables_match.target -rule_target = rule:option( ListValue, "target" ) -rule_target.rmempty = true -rule_target.optional = true -rule_target:value("") - -for target, void in pairs( targets ) do - rule_target:value( target ) -end - - --- collectd_iptables_match.protocol -rule_protocol = rule:option( ListValue, "protocol" ) -rule_protocol.rmempty = true -rule_protocol.optional = true -rule_protocol:value("") -rule_protocol:value("tcp") -rule_protocol:value("udp") -rule_protocol:value("icmp") - --- collectd_iptables_match.source -rule_source = rule:option( Value, "source" ) -rule_source.default = "0.0.0.0/0" -rule_source.rmempty = true -rule_source.optional = true - --- collectd_iptables_match.destination -rule_destination = rule:option( Value, "destination" ) -rule_destination.default = "0.0.0.0/0" -rule_destination.rmempty = true -rule_destination.optional = true - --- collectd_iptables_match.inputif -rule_inputif = rule:option( Value, "inputif" ) -rule_inputif.rmempty = true -rule_inputif.optional = true - --- collectd_iptables_match.outputif -rule_outputif = rule:option( Value, "outputif" ) -rule_outputif.rmempty = true -rule_outputif.optional = true - --- collectd_iptables_match.options -rule_options = rule:option( Value, "options" ) -rule_options.rmempty = true -rule_options.optional = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/irq.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/irq.lua deleted file mode 100644 index 41f09a7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/irq.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd irq plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: irq.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_irq config section -s = m:section( NamedSection, "collectd_irq", "luci_statistics" ) - --- collectd_irq.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_irq.irqs (Irq) -irqs = s:option( Value, "Irqs" ) -irqs.optional = true -irqs:depends( "enable", 1 ) - --- collectd_irq.ignoreselected (IgnoreSelected) -ignoreselected = s:option( Flag, "IgnoreSelected" ) -ignoreselected.default = 0 -ignoreselected.optional = "true" -ignoreselected:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/load.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/load.lua deleted file mode 100644 index ae97d7f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/load.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd load plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: load.lua 2329 2008-06-08 21:51:55Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_wireless config section -s = m:section( NamedSection, "collectd_load", "luci_statistics" ) - --- collectd_wireless.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/netlink.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/netlink.lua deleted file mode 100644 index b7e8d34..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/netlink.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd netlink plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: netlink.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -require("luci.sys") - -local devices = luci.sys.net.devices() - - -m = Map("luci_statistics") - --- collectd_netlink config section -s = m:section( NamedSection, "collectd_netlink", "luci_statistics" ) - --- collectd_netlink.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_netlink.interfaces (Interface) -interfaces = s:option( MultiValue, "Interfaces" ) -interfaces.widget = "select" -interfaces.optional = true -interfaces.size = #devices + 1 -interfaces:depends( "enable", 1 ) -interfaces:value("") -for i, v in ipairs(devices) do - interfaces:value(v) -end - --- collectd_netlink.verboseinterfaces (VerboseInterface) -verboseinterfaces = s:option( MultiValue, "VerboseInterfaces" ) -verboseinterfaces.widget = "select" -verboseinterfaces.optional = true -verboseinterfaces.size = #devices + 1 -verboseinterfaces:depends( "enable", 1 ) -verboseinterfaces:value("") -for i, v in ipairs(devices) do - verboseinterfaces:value(v) -end - --- collectd_netlink.qdiscs (QDisc) -qdiscs = s:option( MultiValue, "QDiscs" ) -qdiscs.widget = "select" -qdiscs.optional = true -qdiscs.size = #devices + 1 -qdiscs:depends( "enable", 1 ) -qdiscs:value("") -for i, v in ipairs(devices) do - qdiscs:value(v) -end - --- collectd_netlink.classes (Class) -classes = s:option( MultiValue, "Classes" ) -classes.widget = "select" -classes.optional = true -classes.size = #devices + 1 -classes:depends( "enable", 1 ) -classes:value("") -for i, v in ipairs(devices) do - classes:value(v) -end - --- collectd_netlink.filters (Filter) -filters = s:option( MultiValue, "Filters" ) -filters.widget = "select" -filters.optional = true -filters.size = #devices + 1 -filters:depends( "enable", 1 ) -filters:value("") -for i, v in ipairs(devices) do - filters:value(v) -end - --- collectd_netlink.ignoreselected (IgnoreSelected) -ignoreselected = s:option( Flag, "IgnoreSelected" ) -ignoreselected.default = 0 -ignoreselected:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/network.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/network.lua deleted file mode 100644 index 7364e89..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/network.lua +++ /dev/null @@ -1,79 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd network plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: network.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - - -m = Map("luci_statistics") - --- collectd_network config section -s = m:section( NamedSection, "collectd_network", "luci_statistics" ) - --- collectd_network.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - - --- collectd_network_listen config section (Listen) -listen = m:section( TypedSection, "collectd_network_listen" ) -listen.addremove = true -listen.anonymous = true - --- collectd_network_listen.host -listen_host = listen:option( Value, "host" ) -listen_host.default = "0.0.0.0" - --- collectd_network_listen.port -listen_port = listen:option( Value, "port" ) -listen_port.default = 25826 -listen_port.isinteger = true -listen_port.optional = true - - --- collectd_network_server config section (Server) -server = m:section( TypedSection, "collectd_network_server" ) -server.addremove = true -server.anonymous = true - --- collectd_network_server.host -server_host = server:option( Value, "host" ) -server_host.default = "0.0.0.0" - --- collectd_network_server.port -server_port = server:option( Value, "port" ) -server_port.default = 25826 -server_port.isinteger = true -server_port.optional = true - --- collectd_network.timetolive (TimeToLive) -ttl = s:option( Value, "TimeToLive" ) -ttl.default = 128 -ttl.isinteger = true -ttl.optional = true -ttl:depends( "enable", 1 ) - --- collectd_network.forward (Forward) -forward = s:option( Flag, "Forward" ) -forward.default = 0 -forward.optional = true -forward:depends( "enable", 1 ) - --- collectd_network.cacheflush (CacheFlush) -cacheflush = s:option( Value, "CacheFlush" ) -cacheflush.default = 86400 -cacheflush.isinteger = true -cacheflush.optional = true -cacheflush:depends( "enable", 1 ) - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/ping.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/ping.lua deleted file mode 100644 index 0bcb264..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/ping.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd ping plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: ping.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_ping config section -s = m:section( NamedSection, "collectd_ping", "luci_statistics" ) - --- collectd_ping.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_ping.hosts (Host) -hosts = s:option( Value, "Hosts" ) -hosts.default = "127.0.0.1" -hosts:depends( "enable", 1 ) - --- collectd_ping.ttl (TTL) -ttl = s:option( Value, "TTL" ) -ttl.isinteger = true -ttl.default = 128 -ttl:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/processes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/processes.lua deleted file mode 100644 index 08386c5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/processes.lua +++ /dev/null @@ -1,30 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd processes plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: processes.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_processes config section -s = m:section( NamedSection, "collectd_processes", "luci_statistics" ) - --- collectd_processes.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_processes.processes (Process) -processes = s:option( Value, "Processes" ) -processes.default = "olsrd bmxd httpd dnsmasq dropbear tinc" -processes:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/rrdtool.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/rrdtool.lua deleted file mode 100644 index 9f51794..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/rrdtool.lua +++ /dev/null @@ -1,94 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd rrdtool plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: rrdtool.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_rrdtool config section -s = m:section( NamedSection, "collectd_rrdtool", "luci_statistics" ) - --- collectd_rrdtool.enable -enable = s:option( Flag, "enable" ) -enable.default = 1 - --- collectd_rrdtool.datadir (DataDir) -datadir = s:option( Value, "DataDir" ) -datadir.default = "/tmp" -datadir.rmempty = true -datadir.optional = true -datadir:depends( "enable", 1 ) - --- collectd_rrdtool.stepsize (StepSize) -stepsize = s:option( Value, "StepSize" ) -stepsize.default = 30 -stepsize.isinteger = true -stepsize.rmempty = true -stepsize.optional = true -stepsize:depends( "enable", 1 ) - --- collectd_rrdtool.heartbeat (HeartBeat) -heartbeat = s:option( Value, "HeartBeat" ) -heartbeat.default = 60 -heartbeat.isinteger = true -heartbeat.rmempty = true -heartbeat.optional = true -heartbeat:depends( "enable", 1 ) - --- collectd_rrdtool.rrasingle (RRASingle) -rrasingle = s:option( Flag, "RRASingle" ) -rrasingle.default = true -rrasingle.rmempty = true -rrasingle.optional = true -rrasingle:depends( "enable", 1 ) - --- collectd_rrdtool.rratimespans (RRATimespan) -rratimespans = s:option( Value, "RRATimespans" ) -rratimespans.default = "600 86400 604800 2678400 31622400" -rratimespans.rmempty = true -rratimespans.optional = true -rratimespans:depends( "enable", 1 ) - --- collectd_rrdtool.rrarows (RRARows) -rrarows = s:option( Value, "RRARows" ) -rrarows.isinteger = true -rrarows.default = 100 -rrarows.rmempty = true -rrarows.optional = true -rrarows:depends( "enable", 1 ) - --- collectd_rrdtool.xff (XFF) -xff = s:option( Value, "XFF" ) -xff.default = 0.1 -xff.isnumber = true -xff.rmempty = true -xff.optional = true -xff:depends( "enable", 1 ) - --- collectd_rrdtool.cachetimeout (CacheTimeout) -cachetimeout = s:option( Value, "CacheTimeout" ) -cachetimeout.isinteger = true -cachetimeout.default = 100 -cachetimeout.rmempty = true -cachetimeout.optional = true -cachetimeout:depends( "enable", 1 ) - --- collectd_rrdtool.cacheflush (CacheFlush) -cacheflush = s:option( Value, "CacheFlush" ) -cacheflush.isinteger = true -cacheflush.default = 100 -cacheflush.rmempty = true -cacheflush.optional = true -cacheflush:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/tcpconns.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/tcpconns.lua deleted file mode 100644 index 281e581..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/tcpconns.lua +++ /dev/null @@ -1,40 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd tcpconns plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: tcpconns.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_tcpconns config section -s = m:section( NamedSection, "collectd_tcpconns", "luci_statistics" ) - --- collectd_tcpconns.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_tcpconns.listeningports (ListeningPorts) -listeningports = s:option( Flag, "ListeningPorts" ) -listeningports.default = 1 -listeningports:depends( "enable", 1 ) - --- collectd_tcpconns.localports (LocalPort) -localports = s:option( Value, "LocalPorts" ) -localports.optional = true -localports:depends( "enable", 1 ) - --- collectd_tcpconns.remoteports (RemotePort) -remoteports = s:option( Value, "RemotePorts" ) -remoteports.optional = true -remoteports:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/unixsock.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/unixsock.lua deleted file mode 100644 index f812200..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/unixsock.lua +++ /dev/null @@ -1,44 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd unixsock plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: unixsock.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_unixsock config section -s = m:section( NamedSection, "collectd_unixsock", "luci_statistics" ) - --- collectd_unixsock.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - --- collectd_unixsock.socketfile (SocketFile) -socketfile = s:option( Value, "SocketFile" ) -socketfile.default = "/var/run/collect-query.socket" -socketfile:depends( "enable", 1 ) - --- collectd_unixsock.socketgroup (SocketGroup) -socketgroup = s:option( Value, "SocketGroup" ) -socketgroup.default = "nobody" -socketgroup.rmempty = true -socketgroup.optional = true -socketgroup:depends( "enable", 1 ) - --- collectd_unixsock.socketperms (SocketPerms) -socketperms = s:option( Value, "SocketPerms" ) -socketperms.default = "0770" -socketperms.rmempty = true -socketperms.optional = true -socketperms:depends( "enable", 1 ) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/wireless.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/wireless.lua deleted file mode 100644 index 7590dcd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/luci_statistics/wireless.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ - -Luci configuration model for statistics - collectd wireless plugin configuration -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: wireless.lua 2226 2008-06-01 23:52:07Z jow $ - -]]-- - -m = Map("luci_statistics") - --- collectd_wireless config section -s = m:section( NamedSection, "collectd_wireless", "luci_statistics" ) - --- collectd_wireless.enable -enable = s:option( Flag, "enable" ) -enable.default = 0 - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/dhcp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/dhcp.lua deleted file mode 100644 index 56b4ede..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/dhcp.lua +++ /dev/null @@ -1,105 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: dhcp.lua 3675 2008-10-31 09:36:00Z Cyrus $ -]]-- -require("luci.model.uci") -require("luci.sys") -require("luci.tools.webadmin") - -m = Map("dhcp", "DHCP") - -s = m:section(TypedSection, "dhcp", "DHCP-Server") -s.anonymous = true -s.addremove = false -s.dynamic = false - -s:depends("interface", "lan") - -enable = s:option(ListValue, "ignore", translate("enable"), "") -enable:value(0, translate("enable")) -enable:value(1, translate("disable")) - -start = s:option(Value, "start", translate("m_n_d_firstaddress")) -start.rmempty = true -start:depends("ignore", "0") - - -limit = s:option(Value, "limit", translate("m_n_d_numleases"), "") -limit:depends("ignore", "0") - -function limit.cfgvalue(self, section) - local value = Value.cfgvalue(self, section) - - if value then - return tonumber(value) + 1 - end -end - -function limit.write(self, section, value) - value = tonumber(value) - 1 - return Value.write(self, section, value) -end - -limit.rmempty = true - -time = s:option(Value, "leasetime") -time:depends("ignore", "0") -time.rmempty = true - - - -m2 = Map("luci_ethers", translate("dhcp_leases")) - -local leasefn, leasefp, leases -luci.model.uci.cursor():foreach("dhcp", "dnsmasq", - function(section) - leasefn = section.leasefile - end -) -local leasefp = leasefn and luci.fs.access(leasefn) and io.lines(leasefn) -if leasefp then - leases = {} - for lease in leasefp do - table.insert(leases, luci.util.split(lease, " ")) - end -end - -if leases then - v = m2:section(Table, leases, translate("dhcp_leases_active")) - ip = v:option(DummyValue, 3, translate("ipaddress")) - - mac = v:option(DummyValue, 2, translate("macaddress")) - - ltime = v:option(DummyValue, 1, translate("dhcp_timeremain")) - function ltime.cfgvalue(self, ...) - local value = DummyValue.cfgvalue(self, ...) - return luci.tools.webadmin.date_format( - os.difftime(tonumber(value), os.time()) - ) - end -end - -s = m2:section(TypedSection, "static_lease", translate("luci_ethers")) -s.addremove = true -s.anonymous = true -s.template = "cbi/tblsection" - -mac = s:option(Value, "macaddr", translate("macaddress")) -ip = s:option(Value, "ipaddr", translate("ipaddress")) -for i, dataset in ipairs(luci.sys.net.arptable()) do - ip:value(dataset["IP address"]) - mac:value(dataset["HW address"], - dataset["HW address"] .. " (" .. dataset["IP address"] .. ")") -end - -return m, m2 \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/index.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/index.lua deleted file mode 100644 index 34e3555..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/index.lua +++ /dev/null @@ -1,14 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: index.lua 2891 2008-08-18 08:43:48Z Cyrus $ -]]-- -return Template("mini/index") diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/luci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/luci.lua deleted file mode 100644 index 627f6de..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/luci.lua +++ /dev/null @@ -1,37 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: luci.lua 4038 2009-01-14 23:48:51Z Cyrus $ -]]-- -require("luci.config") -m = Map("luci", translate("webui"), translate("a_i_luci1")) - --- force reload of global luci config namespace to reflect the changes -function m.commit_handler(self) - package.loaded["luci.config"] = nil - require("luci.config") -end - - -c = m:section(NamedSection, "main", "core", translate("general")) - -l = c:option(ListValue, "lang", translate("language")) -l:value("auto") - -local i18ndir = luci.i18n.i18ndir .. "default." -for k, v in pairs(luci.config.languages) do - if k:sub(1, 1) ~= "." and luci.fs.access(i18ndir .. k:gsub("_", "-") .. ".lua") then - l:value(k, v) - end -end - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua deleted file mode 100644 index 884d3d2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/network.lua +++ /dev/null @@ -1,145 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: network.lua 4171 2009-01-27 20:50:28Z Cyrus $ -]]-- - -require("luci.tools.webadmin") -require("luci.sys") -require("luci.fs") - -local has_pptp = luci.fs.mtime("/usr/sbin/pptp") -local has_pppoe = luci.fs.glob("/usr/lib/pppd/*/rp-pppoe.so") - -local network = luci.model.uci.cursor_state():get_all("network") - -local netstat = luci.sys.net.deviceinfo() -local ifaces = {} - -for k, v in pairs(network) do - if v[".type"] == "interface" and k ~= "loopback" then - table.insert(ifaces, v) - end -end - -m = Map("network", translate("network")) - -s = m:section(NamedSection, "lan", "interface", translate("m_n_local")) -s.addremove = false -s:option(Value, "ipaddr", translate("ipaddress")) - -nm = s:option(Value, "netmask", translate("netmask")) -nm:value("255.255.255.0") -nm:value("255.255.0.0") -nm:value("255.0.0.0") - -gw = s:option(Value, "gateway", translate("gateway") .. translate("cbi_optional")) -gw.rmempty = true -dns = s:option(Value, "dns", translate("dnsserver") .. translate("cbi_optional")) -dns.rmempty = true - - -s = m:section(NamedSection, "wan", "interface", translate("m_n_inet")) -s.addremove = false -p = s:option(ListValue, "proto", translate("protocol")) -p.override_values = true -p:value("none", "disabled") -p:value("static", translate("manual", "manual")) -p:value("dhcp", translate("automatic", "DHCP")) -if has_pppoe then p:value("pppoe", "PPPoE") end -if has_pptp then p:value("pptp", "PPTP") end - -function p.write(self, section, value) - -- Always set defaultroute to PPP and use remote dns - -- Overwrite a bad variable behaviour in OpenWrt - if value == "pptp" or value == "pppoe" then - self.map:set(section, "peerdns", "1") - self.map:set(section, "defaultroute", "1") - end - return ListValue.write(self, section, value) -end - -if not ( has_pppoe and has_pptp ) then - p.description = translate("network_interface_prereq_mini") -end - - -ip = s:option(Value, "ipaddr", translate("ipaddress")) -ip:depends("proto", "static") - -nm = s:option(Value, "netmask", translate("netmask")) -nm:depends("proto", "static") - -gw = s:option(Value, "gateway", translate("gateway")) -gw:depends("proto", "static") -gw.rmempty = true - -dns = s:option(Value, "dns", translate("dnsserver")) -dns:depends("proto", "static") -dns.rmempty = true - -usr = s:option(Value, "username", translate("username")) -usr:depends("proto", "pppoe") -usr:depends("proto", "pptp") - -pwd = s:option(Value, "password", translate("password")) -pwd.password = true -pwd:depends("proto", "pppoe") -pwd:depends("proto", "pptp") - - --- Allow user to set MSS correction here if the UCI firewall is installed --- This cures some cancer for providers with pre-war routers -if luci.fs.access("/etc/config/firewall") then - mssfix = s:option(Flag, "_mssfix", - translate("m_n_mssfix"), translate("m_n_mssfix_desc")) - mssfix.rmempty = false - - function mssfix.cfgvalue(self) - local value - m.uci:foreach("firewall", "forwarding", function(s) - if s.src == "lan" and s.dest == "wan" then - value = s.mtu_fix - end - end) - return value - end - - function mssfix.write(self, section, value) - m.uci:foreach("firewall", "forwarding", function(s) - if s.src == "lan" and s.dest == "wan" then - m.uci:set("firewall", s[".name"], "mtu_fix", value) - m:chain("firewall") - end - end) - end -end - -kea = s:option(Flag, "keepalive", translate("m_n_keepalive")) -kea:depends("proto", "pppoe") -kea:depends("proto", "pptp") -kea.rmempty = true -kea.enabled = "10" - - -cod = s:option(Value, "demand", translate("m_n_dialondemand"), "s") -cod:depends("proto", "pppoe") -cod:depends("proto", "pptp") -cod.rmempty = true - -srv = s:option(Value, "server", translate("m_n_pptp_server")) -srv:depends("proto", "pptp") -srv.rmempty = true - - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/passwd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/passwd.lua deleted file mode 100644 index f078dd5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/passwd.lua +++ /dev/null @@ -1,45 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: passwd.lua 3864 2008-12-07 13:44:25Z Cyrus $ -]]-- -f = SimpleForm("password", translate("a_s_changepw"), translate("a_s_changepw1")) - -pw1 = f:field(Value, "pw1", translate("password")) -pw1.password = true -pw1.rmempty = false - -pw2 = f:field(Value, "pw2", translate("confirmation")) -pw2.password = true -pw2.rmempty = false - -function pw2.validate(self, value, section) - return pw1:formvalue(section) == value and value -end - -function f.handle(self, state, data) - if state == FORM_VALID then - local stat = luci.sys.user.setpasswd("root", data.pw1) == 0 - - if stat then - f.message = translate("a_s_changepw_changed") - else - f.errmessage = translate("unknownerror") - end - - data.pw1 = nil - data.pw2 = nil - end - return true -end - -return f \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua deleted file mode 100644 index acac6d8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/system.lua +++ /dev/null @@ -1,217 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: system.lua 3736 2008-11-06 23:10:43Z jow $ -]]-- - -require("luci.sys") -require("luci.sys.zoneinfo") -require("luci.tools.webadmin") - - -m = Map("system", translate("system"), "") - -s = m:section(TypedSection, "system", translate("general")) -s.anonymous = true - - - -local system, model, memtotal, memcached, membuffers, memfree = luci.sys.sysinfo() -local uptime = luci.sys.uptime() - -s:option(DummyValue, "_chipset", translate("m_i_chipset")).value = system -s:option(DummyValue, "_cpu", translate("m_i_processor")).value = model - -local load1, load5, load15 = luci.sys.loadavg() -s:option(DummyValue, "_la", translate("load")).value = - string.format("%.2f, %.2f, %.2f", load1, load5, load15) - -s:option(DummyValue, "_memtotal", translate("m_i_memory")).value = - string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)", - tonumber(memtotal) / 1024, - 100 * memcached / memtotal, - translate("mem_cached") or "", - 100 * membuffers / memtotal, - translate("mem_buffered") or "", - 100 * memfree / memtotal, - translate("mem_free") or "") - -s:option(DummyValue, "_systime", translate("m_i_systemtime")).value = - os.date("%c") - -s:option(DummyValue, "_uptime", translate("m_i_uptime")).value = - luci.tools.webadmin.date_format(tonumber(uptime)) - --- Wifi Data init -- -local uci = luci.model.uci.cursor() -if not uci:get("network", "wan") then - uci:section("network", "interface", "wan", {proto="none", ifname=" "}) - uci:save("network") - uci:commit("network") -end - -local wlcursor = luci.model.uci.cursor_state() -local wireless = wlcursor:get_all("wireless") -local wifidata = luci.sys.wifi.getiwconfig() -local wifidevs = {} -local ifaces = {} - -for k, v in pairs(wireless) do - if v[".type"] == "wifi-iface" then - table.insert(ifaces, v) - end -end - -wlcursor:foreach("wireless", "wifi-device", - function(section) - table.insert(wifidevs, section[".name"]) - end) - - --- Wifi Status Table -- -s = m:section(Table, ifaces, translate("wifi")) - -link = s:option(DummyValue, "_link", translate("link")) -function link.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Link Quality"] or "-" -end - -essid = s:option(DummyValue, "ssid", "ESSID") - -bssid = s:option(DummyValue, "_bsiid", "BSSID") -function bssid.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return (wifidata[ifname] and (wifidata[ifname].Cell - or wifidata[ifname]["Access Point"])) or "-" -end - -protocol = s:option(DummyValue, "_mode", translate("protocol")) -function protocol.cfgvalue(self, section) - local mode = wireless[self.map:get(section, "device")].mode - return mode and "802." .. mode -end - -mode = s:option(DummyValue, "mode", translate("mode")) -encryption = s:option(DummyValue, "encryption", translate("iwscan_encr")) - -power = s:option(DummyValue, "_power", translate("power")) -function power.cfgvalue(self, section) - local ifname = self.map:get(section, "ifname") - return wifidata[ifname] and wifidata[ifname]["Tx-Power"] or "-" -end - -scan = s:option(Button, "_scan", translate("scan")) -scan.inputstyle = "find" - -function scan.cfgvalue(self, section) - return self.map:get(section, "ifname") or false -end - --- Wifi-Scan-Table -- -t2 = m:section(Table, {}, translate("iwscan"), translate("iwscan1")) - -function scan.write(self, section) - m.autoapply = false - t2.render = t2._render - local ifname = self.map:get(section, "ifname") - luci.util.update(t2.data, luci.sys.wifi.iwscan(ifname)) -end - -t2._render = t2.render -t2.render = function() end - -t2:option(DummyValue, "Quality", translate("iwscan_link")) -essid = t2:option(DummyValue, "ESSID", "ESSID") -function essid.cfgvalue(self, section) - return self.map:get(section, "ESSID") -end - -t2:option(DummyValue, "Address", "BSSID") -t2:option(DummyValue, "Mode", translate("mode")) -chan = t2:option(DummyValue, "channel", translate("channel")) -function chan.cfgvalue(self, section) - return self.map:get(section, "Channel") - or self.map:get(section, "Frequency") - or "-" -end - -t2:option(DummyValue, "Encryption key", translate("iwscan_encr")) - -t2:option(DummyValue, "Signal level", translate("iwscan_signal")) - -t2:option(DummyValue, "Noise level", translate("iwscan_noise")) - --- Interface Data Init-- -local network = luci.model.uci.cursor_state():get_all("network") - -local netstat = luci.sys.net.deviceinfo() -local ifaces = {} - -for k, v in pairs(network) do - if v[".type"] == "interface" and k ~= "loopback" then - table.insert(ifaces, v) - end -end - --- Interfaces Status Table-- -s = m:section(Table, ifaces, translate("interfaces")) -s.parse = function() end - -s:option(DummyValue, ".name", translate("interface")) - -hwaddr = s:option(DummyValue, "_hwaddr", - translate("network_interface_hwaddr"), translate("network_interface_hwaddr_desc")) -function hwaddr.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") or "" - return luci.fs.readfile("/sys/class/net/" .. ix .. "/address") - or luci.util.exec("ifconfig " .. ix):match(" ([A-F0-9:]+)%s*\n") - or "n/a" -end - - -s:option(DummyValue, "ipaddr", translate("ipaddress")) - -s:option(DummyValue, "netmask", translate("netmask")) - - -txrx = s:option(DummyValue, "_txrx", - translate("network_interface_txrx"), translate("network_interface_txrx_desc")) - -function txrx.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][1] - rx = rx and luci.tools.webadmin.byte_format(tonumber(rx)) or "-" - - local tx = netstat and netstat[ix] and netstat[ix][9] - tx = tx and luci.tools.webadmin.byte_format(tonumber(tx)) or "-" - - return string.format("%s / %s", tx, rx) -end - -errors = s:option(DummyValue, "_err", - translate("network_interface_err"), translate("network_interface_err_desc")) - -function errors.cfgvalue(self, section) - local ix = self.map:get(section, "ifname") - - local rx = netstat and netstat[ix] and netstat[ix][3] - local tx = netstat and netstat[ix] and netstat[ix][11] - - rx = rx and tostring(rx) or "-" - tx = tx and tostring(tx) or "-" - - return string.format("%s / %s", tx, rx) -end - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua deleted file mode 100644 index a696f8f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mini/wifi.lua +++ /dev/null @@ -1,197 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: wifi.lua 4223 2009-02-04 19:20:17Z Cyrus $ -]]-- - --- Data init -- - -local uci = luci.model.uci.cursor() -if not uci:get("network", "wan") then - uci:section("network", "interface", "wan", {proto="none", ifname=" "}) - uci:save("network") - uci:commit("network") -end - -local wlcursor = luci.model.uci.cursor_state() -local wireless = wlcursor:get_all("wireless") -local wifidata = luci.sys.wifi.getiwconfig() -local wifidevs = {} -local ifaces = {} - -for k, v in pairs(wireless) do - if v[".type"] == "wifi-iface" then - table.insert(ifaces, v) - end -end - -wlcursor:foreach("wireless", "wifi-device", - function(section) - table.insert(wifidevs, section[".name"]) - end) - - --- Main Map -- - -m = Map("wireless", translate("wifi"), translate("a_w_devices1")) -m:chain("network") - -if #wifidevs < 1 then - return m -end - --- Config Section -- - -local hwtype = m:get(wifidevs[1], "type") - ---[[ -s = m:section(NamedSection, wifidevs[1], "wifi-device", translate("devices")) -s.addremove = false - -local hwtype = m:get(wifidevs[1], "type") - -if hwtype == "atheros" then - mode = s:option(ListValue, "hwmode", translate("mode")) - mode.override_values = true - mode:value("", "auto") - mode:value("11b", "802.11b") - mode:value("11g", "802.11g") - mode:value("11a", "802.11a") - mode:value("11bg", "802.11b+g") - mode.rmempty = true -end - - -ch = s:option(Value, "channel", translate("a_w_channel")) -for i=1, 14 do - ch:value(i, i .. " (2.4 GHz)") -end -]]-- - -s = m:section(TypedSection, "wifi-iface", translate("m_n_local")) -s.anonymous = true -s.addremove = false - -s:option(Value, "ssid", translate("a_w_netid")) - -bssid = s:option(Value, "bssid", translate("wifi_bssid")) - -local devs = {} -luci.model.uci.cursor():foreach("wireless", "wifi-device", - function (section) - table.insert(devs, section[".name"]) - end) - -if #devs > 1 then - device = s:option(DummyValue, "device", translate("device")) -else - s.defaults.device = devs[1] -end - -encr = s:option(ListValue, "encryption", translate("encryption")) -encr.override_values = true -encr:value("none", "No Encryption") -encr:value("wep", "WEP") - -if hwtype == "atheros" or hwtype == "mac80211" then - local supplicant = luci.fs.mtime("/usr/sbin/wpa_supplicant") - local hostapd = luci.fs.mtime("/usr/sbin/hostapd") - - if hostapd and supplicant then - encr:value("psk", "WPA-PSK") - encr:value("psk2", "WPA2-PSK") - encr:value("wpa", "WPA-Radius", {mode="ap"}) - encr:value("wpa2i", "WPA2-Radius", {mode="ap"}) - elseif hostapd and not supplicant then - encr:value("psk", "WPA-PSK", {mode="ap"}, {mode="adhoc"}) - encr:value("psk2", "WPA2-PSK", {mode="ap"}, {mode="adhoc"}) - encr:value("wpa", "WPA-Radius", {mode="ap"}) - encr:value("wpa2i", "WPA2-Radius", {mode="ap"}) - encr.description = translate("wifi_wpareq") - elseif not hostapd and supplicant then - encr:value("psk", "WPA-PSK", {mode="sta"}) - encr:value("psk2", "WPA2-PSK", {mode="sta"}) - encr.description = translate("wifi_wpareq") - else - encr.description = translate("wifi_wpareq") - end -elseif hwtype == "broadcom" then - encr:value("psk", "WPA-PSK") - encr:value("psk2", "WPA2-PSK") -end - -key = s:option(Value, "key", translate("key")) -key:depends("encryption", "wep") -key:depends("encryption", "psk") -key:depends("encryption", "wpa") -key:depends("encryption", "psk2") -key:depends("encryption", "wpa2i") -key.rmempty = true -key.description = translate('wifi_keyreq') - -function key:validate(value, section) - function string.tohex(x) - local hex = '' - for c in x:gmatch('(.)') do hex = hex .. string.format("%02x", c:byte()) end - return hex - end - - function string.hexcheck(x) - return #(x:match('%x*')) == #x and x - end - - if encr:formvalue(section) == 'wep' then - if #value == 5 or #value == 13 then - return value:tohex() - elseif #value == 10 or #value == 26 then - return value:hexcheck() - else - return nil - end - elseif encr:formvalue(section) == 'psk' or encr:formvalue(section) == 'psk2' then - return #value > 7 and #value < 64 and value - else - return value - end -end - -server = s:option(Value, "server", translate("a_w_radiussrv")) -server:depends("encryption", "wpa") -server:depends("encryption", "wpa2i") -server.rmempty = true - -port = s:option(Value, "port", translate("a_w_radiusport")) -port:depends("encryption", "wpa") -port:depends("encryption", "wpa2i") -port.rmempty = true - - -if hwtype == "atheros" or hwtype == "broadcom" then - iso = s:option(Flag, "isolate", translate("a_w_apisolation"), translate("a_w_apisolation1")) - iso.rmempty = true - iso:depends("mode", "ap") - - hide = s:option(Flag, "hidden", translate("a_w_hideessid")) - hide.rmempty = true - hide:depends("mode", "ap") -end - -if hwtype == "mac80211" or hwtype == "atheros" then - bssid:depends({mode="adhoc"}) -end - -if hwtype == "broadcom" then - bssid:depends({mode="wds"}) -end - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mmc_over_gpio.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mmc_over_gpio.lua deleted file mode 100644 index 591e7da..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/mmc_over_gpio.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - -LuCI mmc_over_gpio -(c) 2008 Yanira - -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 - -$Id: mmc_over_gpio.lua 3635 2008-10-27 23:07:46Z jow $ - -]]-- - -m = Map("mmc_over_gpio", translate("mmc_over_gpio"), - translate("mmc_over_gpio_desc")) - -s = m:section(TypedSection, "mmc_over_gpio", translate("settings")) -s.addremove = true -s.anonymous = true - -s:option(Flag, "enabled", translate("enabled", "Enable")) - -s:option(Value, "name", translate("name")) - -pin = s:option(Value, "DI_pin", translate("DI_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "DO_pin", translate("DO_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "CLK_pin", translate("CLK_pin")) -for i = 0,7 do pin:value(i) end - -pin = s:option(Value, "CS_pin", translate("CS_pin")) -for i = 0,7 do pin:value(i) end - -s:option(Value, "mode", translate("mode")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpc.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpc.lua deleted file mode 100644 index 50a62fc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpc.lua +++ /dev/null @@ -1,39 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ntpc.lua 3240 2008-09-11 17:25:44Z Cyrus $ -]]-- -m = Map("ntpclient", translate("ntpc"), translate("ntpc_desc")) - -s = m:section(TypedSection, "ntpclient", translate("general")) -s.anonymous = true - -s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c") - -s:option(Value, "interval", translate("ntpc_interval")).rmempty = true -s:option(Value, "count", translate("ntpc_count"), translate("ntpc_count_desc")).rmempty = true - - -s2 = m:section(TypedSection, "ntpdrift", translate("ntpc_drift")) -s2.anonymous = true -s2:option(Value, "freq", translate("ntpc_drift_freq")).rmempty = true - - -s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver")) -s3.anonymous = true -s3.addremove = true -s3.template = "cbi/tblsection" - -s3:option(Value, "hostname", translate("hostname")) -s3:option(Value, "port", translate("port")).rmempty = true - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpcmini.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpcmini.lua deleted file mode 100644 index 21241f1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ntpc/ntpcmini.lua +++ /dev/null @@ -1,34 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ntpcmini.lua 3240 2008-09-11 17:25:44Z Cyrus $ -]]-- -require("luci.tools.webadmin") -m = Map("ntpclient", translate("ntpc"), translate("ntpc_desc")) - -s = m:section(TypedSection, "ntpclient", translate("general")) -s.anonymous = true - -s:option(DummyValue, "_time", translate("ntpc_current")).value = os.date("%c") - -s:option(Value, "interval", translate("ntpc_interval")).rmempty = true - - -s3 = m:section(TypedSection, "ntpserver", translate("ntpc_timeserver")) -s3.anonymous = true -s3.addremove = true -s3.template = "cbi/tblsection" - -s3:option(Value, "hostname", translate("hostname")) -s3:option(Value, "port", translate("port")).rmempty = true - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrd.lua deleted file mode 100644 index bf4c7b6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrd.lua +++ /dev/null @@ -1,145 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: olsrd.lua 4204 2009-01-31 03:02:57Z jow $ -]]-- - -require("luci.tools.webadmin") - -m = Map("olsrd", translate("olsrd", "OLSR Daemon")) - -s = m:section(TypedSection, "olsrd", translate("olsrd_general")) -s.dynamic = true -s.anonymous = true - -debug = s:option(ListValue, "DebugLevel") -for i=0, 9 do - debug:value(i) -end -debug.optional = true - -ipv = s:option(ListValue, "IpVersion") -ipv:value("4", "IPv4") -ipv:value("6", "IPv6") - -noint = s:option(Flag, "AllowNoInt") -noint.enabled = "yes" -noint.disabled = "no" -noint.optional = true - -s:option(Value, "Pollrate").optional = true - -tcr = s:option(ListValue, "TcRedundancy") -tcr:value("0", translate("olsrd_olsrd_tcredundancy_0")) -tcr:value("1", translate("olsrd_olsrd_tcredundancy_1")) -tcr:value("2", translate("olsrd_olsrd_tcredundancy_2")) -tcr.optional = true - -s:option(Value, "MprCoverage").optional = true - -lql = s:option(ListValue, "LinkQualityLevel") -lql:value("0", translate("disable")) -lql:value("1", translate("olsrd_olsrd_linkqualitylevel_1")) -lql:value("2", translate("olsrd_olsrd_linkqualitylevel_2")) -lql.optional = true - -s:option(Value, "LinkQualityAging").optional = true - -lqa = s:option(ListValue, "LinkQualityAlgorithm") -lqa.optional = true -lqa:value("etx_fpm", translate("olsrd_etx_fpm")) -lqa:value("etx_float", translate("olsrd_etx_float")) -lqa:value("etx_ff", translate("olsrd_etx_ff")) -lqa.optional = true - -lqfish = s:option(Flag, "LinkQualityFishEye") -lqfish.optional = true - -s:option(Value, "LinkQualityWinSize").optional = true - -s:option(Value, "LinkQualityDijkstraLimit").optional = true - -hyst = s:option(Flag, "UseHysteresis") -hyst.enabled = "yes" -hyst.disabled = "no" -hyst.optional = true - -fib = s:option(ListValue, "FIBMetric") -fib.optional = true -fib:value("flat") -fib:value("correct") -fib:value("approx") -fib.optional = true - -clrscr = s:option(Flag, "ClearScreen") -clrscr.enabled = "yes" -clrscr.disabled = "no" -clrscr.optional = true - -willingness = s:option(ListValue, "Willingness") -for i=0,7 do - willingness:value(i) -end -willingness.optional = true - - - -i = m:section(TypedSection, "Interface", translate("interfaces")) -i.anonymous = true -i.addremove = true -i.dynamic = true - -ign = i:option(Flag, "ignore", "Enable") -ign.enabled = "0" -ign.disabled = "1" - -network = i:option(ListValue, "interface", translate("network")) -luci.tools.webadmin.cbi_add_networks(network) - -i:option(Value, "Ip4Broadcast").optional = true - -ip6t = i:option(ListValue, "Ip6AddrType") -ip6t:value("", translate("cbi_select")) -ip6t:value("auto") -ip6t:value("site-local") -ip6t:value("unique-local") -ip6t:value("global") -ip6t.optional = true - -i:option(Value, "HelloInterval").optional = true -i:option(Value, "HelloValidityTime").optional = true -i:option(Value, "TcInterval").optional = true -i:option(Value, "TcValidityTime").optional = true -i:option(Value, "MidInterval").optional = true -i:option(Value, "MidValidityTime").optional = true -i:option(Value, "HnaInterval").optional = true -i:option(Value, "HnaValidityTime").optional = true - -adc = i:option(Flag, "AutoDetectChanges") -adc.enabled = "yes" -adc.disabled = "no" -adc.optional = true - ---[[ -ipc = m:section(TypedSection, "IpcConnect") -ipc.anonymous = true - -conns = ipc:option(Value, "MaxConnections") -conns.isInteger = true - -nets = ipc:option(Value, "Net") -nets.optional = true - -hosts = ipc:option(Value, "Host") -hosts.optional = true -]] - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdhna.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdhna.lua deleted file mode 100644 index cbf02a4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdhna.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: olsrdhna.lua 3823 2008-11-27 14:26:37Z jow $ -]]-- - -mh = Map("olsrd", translate("olsrd_hna", "OLSR - HNA-Ankündigungen")) - - -hna4 = mh:section(TypedSection, "Hna4") -hna4.addremove = true -hna4.anonymous = true -hna4.template = "cbi/tblsection" - -net4 = hna4:option(Value, "netaddr") -msk4 = hna4:option(Value, "netmask") - - -hna6 = mh:section(TypedSection, "Hna6") -hna6.addremove = true -hna6.anonymous = true -hna6.template = "cbi/tblsection" - -net6 = hna6:option(Value, "netaddr") -msk6 = hna6:option(Value, "prefix") - - -return mh diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdplugins.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdplugins.lua deleted file mode 100644 index 5be4662..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/olsr/olsrdplugins.lua +++ /dev/null @@ -1,244 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: olsrdplugins.lua 3976 2009-01-01 14:33:36Z jow $ -]]-- - -require("luci.fs") -require("luci.ip") - - -if arg[1] then - mp = Map("olsrd", translate("olsrd_plugins", "OLSR - Plugins")) - - p = mp:section(TypedSection, "LoadPlugin") - p:depends("library", arg[1]) - p.anonymous = true - - ign = p:option(Flag, "ignore", "Enable") - ign.enabled = "0" - ign.disabled = "1" - ign.rmempty = false - function ign.cfgvalue(self, section) - return Flag.cfgvalue(self, section) or "0" - end - - lib = p:option(DummyValue, "library", translate("library")) - lib.default = arg[1] - - local function Range(x,y) - local t = {} - for i = x, y do t[#t+1] = i end - return t - end - - local function Cidr2IpMask(val) - if val then - for i = 1, #val do - local cidr = luci.ip.IPv4(val[i]) or luci.ip.IPv6(val[i]) - if cidr then - val[i] = cidr:network():string() .. " " .. cidr:mask():string() - end - end - return val - end - end - - local function IpMask2Cidr(val) - if val then - for i = 1, #val do - local ip, mask = val[i]:gmatch("([^%s+])%s+([^%s+])")() - local cidr - if ip and mask and ip:match(":") then - cidr = luci.ip.IPv6(ip, mask) - elseif ip and mask then - cidr = luci.ip.IPv4(ip, mask) - end - - if cidr then - val[i] = cidr:string() - end - end - return val - end - end - - - local knownPlParams = { - ["olsrd_bmf.so.1.5.3"] = { - { Value, "BmfInterface", "bmf0" }, - { Value, "BmfInterfaceIp", "10.10.10.234/24" }, - { Flag, "DoLocalBroadcast", "no" }, - { Flag, "CapturePacketsOnOlsrInterfaces", "yes" }, - { ListValue, "BmfMechanism", { "UnicastPromiscuous", "Broadcast" } }, - { Value, "BroadcastRetransmitCount", "2" }, - { Value, "FanOutLimit", "4" }, - { DynamicList, "NonOlsrIf", "eth1" } - }, - - ["olsrd_dyn_gw.so.0.4"] = { - { Value, "Interval", "40" }, - { DynamicList, "Ping", "141.1.1.1" }, - { DynamicList, "HNA", "192.168.80.0/24", IpMask2Cidr, Cidr2IpMask } - }, - - ["olsrd_httpinfo.so.0.1"] = { - { Value, "port", "80" }, - { DynamicList, "Host", "163.24.87.3" }, - { DynamicList, "Net", "0.0.0.0/0", IpMask2Cidr, Cidr2IpMask } - }, - - ["olsrd_nameservice.so.0.3"] = { - { DynamicList, "name", "my-name.mesh" }, - { DynamicList, "hosts", "1.2.3.4 name-for-other-interface.mesh" }, - { Value, "suffix", ".olsr" }, - { Value, "hosts_file", "/path/to/hosts_file" }, - { Value, "add_hosts", "/path/to/file" }, - { Value, "dns_server", "141.1.1.1" }, - { Value, "resolv_file", "/path/to/resolv.conf" }, - { Value, "interval", "120" }, - { Value, "timeout", "240" }, - { Value, "lat", "12.123" }, - { Value, "lon", "12.123" }, - { Value, "latlon_file", "/var/run/latlon.js" }, - { Value, "latlon_infile", "/var/run/gps.txt" }, - { Value, "sighup_pid_file", "/var/run/dnsmasq.pid" }, - { Value, "name_change_script", "/usr/local/bin/announce_new_hosts.sh" }, - { Value, "services_change_script", "/usr/local/bin/announce_new_services.sh" } - }, - - ["olsrd_quagga.so.0.2.2"] = { - { StaticList, "redistribute", { - "system", "kernel", "connect", "static", "rip", "ripng", "ospf", - "ospf6", "isis", "bgp", "hsls" - } }, - { ListValue, "ExportRoutes", { "only", "both" } }, - { Flag, "LocalPref", "true" }, - { Value, "Distance", Range(0,255) } - }, - - ["olsrd_secure.so.0.5"] = { - { Value, "Keyfile", "/etc/private-olsr.key" } - }, - - ["olsrd_txtinfo.so.0.1"] = { - { Value, "accept", "10.247.200.4" } - }, - - ["olsrd_arprefresh.so.0.1"] = {}, - ["olsrd_dot_draw.so.0.3"] = {}, - ["olsrd_dyn_gw_plain.so.0.4"] = {}, - ["olsrd_pgraph.so.1.1"] = {}, - ["olsrd_tas.so.0.1"] = {} - } - - - -- build plugin options with dependencies - if knownPlParams[arg[1]] then - for _, option in ipairs(knownPlParams[arg[1]]) do - local otype, name, default, uci2cbi, cbi2uci = unpack(option) - local values - - if type(default) == "table" then - values = default - default = default[1] - end - - if otype == Flag then - local bool = p:option( Flag, name ) - if default == "yes" or default == "no" then - bool.enabled = "yes" - bool.disabled = "no" - elseif default == "on" or default == "off" then - bool.enabled = "on" - bool.disabled = "off" - elseif default == "1" or default == "0" then - bool.enabled = "1" - bool.disabled = "0" - else - bool.enabled = "true" - bool.disabled = "false" - end - bool.optional = true - bool.default = default - bool:depends({ library = plugin }) - else - local field = p:option( otype, name ) - if values then - for _, value in ipairs(values) do - field:value( value ) - end - end - if type(uci2cbi) == "function" then - function field.cfgvalue(self, section) - return uci2cbi(otype.cfgvalue(self, section)) - end - end - if type(cbi2uci) == "function" then - function field.formvalue(self, section) - return cbi2uci(otype.formvalue(self, section)) - end - end - field.optional = true - field.default = default - --field:depends({ library = arg[1] }) - end - end - end - - return mp - -else - - mpi = Map("olsrd", "OLSR - Plugins") - - local plugins = {} - mpi.uci:foreach("olsrd", "LoadPlugin", - function(section) - if section.library and not plugins[section.library] then - plugins[section.library] = true - end - end - ) - - -- create a loadplugin section for each found plugin - for k, v in pairs(luci.fs.dir("/usr/lib")) do - if v:sub(1, 6) == "olsrd_" then - if not plugins[v] then - mpi.uci:section( - "olsrd", "LoadPlugin", nil, - { library = v, ignore = 1 } - ) - end - end - end - - t = mpi:section( TypedSection, "LoadPlugin", "Plugins" ) - t.anonymous = true - t.template = "cbi/tblsection" - t.override_scheme = true - function t.extedit(self, section) - local lib = self.map:get(section, "library") or "" - return luci.dispatcher.build_url("admin", "services", "olsrd", "plugins") .. "/" .. lib - end - - ign = t:option( Flag, "ignore", "Enabled" ) - ign.enabled = "0" - ign.disabled = "1" - ign.rmempty = false - function ign.cfgvalue(self, section) - return Flag.cfgvalue(self, section) or "0" - end - - t:option( DummyValue, "library", "Library" ) - - return mpi -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/p910nd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/p910nd.lua deleted file mode 100644 index af55e05..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/p910nd.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ - -LuCI p910nd -(c) 2008 Yanira - -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 - -$Id: p910nd.lua 3467 2008-09-29 19:21:47Z jow $ - -]]-- - -local uci = luci.model.uci.cursor_state() - -m = Map("p910nd", translate("p910nd", "p910nd"), - translatef("p910nd_desc")) - -s = m:section(TypedSection, "p910nd", translate("settings", "settings")) -s.addremove = true -s.anonymous = true - -s:option(Flag, "enabled", translate("enable")) - -s:option(Value, "device", translate("device", "Device")).rmempty = true - -s:option(Value, "port", translate("port"), translate("port_help")).rmempty = true - -s:option(Flag, "bidirectional", translate("bidirectional")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/polipo.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/polipo.lua deleted file mode 100644 index 4ccaf79..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/polipo.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Aleksandar Krsteski - -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 - -$Id: polipo.lua 3720 2008-11-05 23:05:09Z jow $ -]]-- -m = Map("polipo") - --- General section -s = m:section(NamedSection, "general", "polipo") - --- General settings -s:option(Flag, "enabled", translate("enable")) -s:option(Value, "proxyAddress") -s:option(Value, "proxyPort").optional = true -s:option(DynamicList, "allowedClients") -s:option(Flag, "logSyslog") -s:option(Value, "logFacility"):depends("logSyslog", "1") -v = s:option(Value, "logFile") -v:depends("logSyslog", "") -v.rmempty = true -s:option(Value, "chunkHighMark") - --- DNS and proxy settings -s:option(Value, "dnsNameServer").optional = true -s:option(Value, "parentProxy").optional = true -s:option(Value, "parentAuthCredentials").optional = true -l = s:option(ListValue, "dnsQueryIPv6") -l.optional = true -l.default = "happily" -l:value("") -l:value("true") -l:value("reluctantly") -l:value("happily") -l:value("false") -l = s:option(ListValue, "dnsUseGethostbyname") -l.optional = true -l.default = "reluctantly" -l:value("") -l:value("true") -l:value("reluctantly") -l:value("happily") -l:value("false") - --- Dsik cache section -s = m:section(NamedSection, "cache", "polipo") - --- Dsik cache settings -s:option(Value, "diskCacheRoot").rmempty = true -s:option(Flag, "cacheIsShared") -s:option(Value, "diskCacheTruncateSize").optional = true -s:option(Value, "diskCacheTruncateTime").optional = true -s:option(Value, "diskCacheUnlinkTime").optional = true - --- Poor man's multiplexing section -s = m:section(NamedSection, "pmm", "polipo") -s:option(Value, "pmmSize").rmempty = true -s:option(Value, "pmmFirstSize").optional = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qos.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qos.lua deleted file mode 100644 index 07ad127..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qos.lua +++ /dev/null @@ -1,89 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id: qos.lua 4075 2009-01-17 16:20:20Z Cyrus $ -]]-- -require("luci.tools.webadmin") -m = Map("qos") - -s = m:section(TypedSection, "interface", translate("interfaces")) -s.addremove = true - -s:option(Flag, "enabled", translate("enable")) - -c = s:option(ListValue, "classgroup") -c:value("Default", "standard") -c.default = "Default" - -s:option(Flag, "overhead") - -s:option(Value, "download", nil, "kb/s") - -s:option(Value, "upload", nil, "kb/s") - -s = m:section(TypedSection, "classify") -s.template = "cbi/tblsection" -s.anonymous = true -s.addremove = true - -t = s:option(ListValue, "target") -t:value("Priority", translate("qos_priority")) -t:value("Express", translate("qos_express")) -t:value("Normal", translate("qos_normal")) -t:value("Bulk", translate("qos_bulk")) -t.default = "Normal" - -srch = s:option(Value, "srchost") -srch.rmempty = true -srch:value("", translate("all")) -luci.tools.webadmin.cbi_add_knownips(srch) - -dsth = s:option(Value, "dsthost") -dsth.rmempty = true -dsth:value("", translate("all")) -luci.tools.webadmin.cbi_add_knownips(dsth) - -l7 = s:option(ListValue, "layer7", translate("service")) -l7.rmempty = true -l7:value("", translate("all")) -local pats = luci.fs.dir("/etc/l7-protocols") -if pats then - for i,f in ipairs(pats) do - if f:sub(-4) == ".pat" then - l7:value(f:sub(1, #f-4)) - end - end -end - -p2p = s:option(ListValue, "ipp2p", "P2P") -p2p:value("", "-") -p2p:value("all", translate("all")) -p2p:value("bit", "BIT") -p2p:value("dc", "DC") -p2p:value("edk", "EDK") -p2p:value("gnu", "GNU") -p2p:value("kazaa", "KAZ") -p2p.rmempty = true - -p = s:option(Value, "proto", translate("protocol")) -p:value("", translate("all")) -p:value("tcp", "TCP") -p:value("udp", "UDP") -p:value("icmp", "ICMP") -p.rmempty = true - -ports = s:option(Value, "ports", translate("ports")) -ports.rmempty = true -ports:value("", translate("allf", translate("all"))) - -bytes = s:option(Value, "connbytes", translate("qos_connbytes")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qosmini.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qosmini.lua deleted file mode 100644 index c8dcfe8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/qos/qosmini.lua +++ /dev/null @@ -1,82 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: qosmini.lua 4075 2009-01-17 16:20:20Z Cyrus $ -]]-- -require("luci.tools.webadmin") -m = Map("qos") - -s = m:section(NamedSection, "wan", "interface", translate("m_n_inet")) - -s:option(Flag, "enabled", translate("qos")) -s:option(Value, "download", translate("qos_interface_download"), "kb/s") -s:option(Value, "upload", translate("qos_interface_upload"), "kb/s") - -s = m:section(TypedSection, "classify") -s.template = "cbi/tblsection" - -s.anonymous = true -s.addremove = true - -t = s:option(ListValue, "target") -t:value("Priority", translate("qos_priority")) -t:value("Express", translate("qos_express")) -t:value("Normal", translate("qos_normal")) -t:value("Bulk", translate("qos_bulk")) -t.default = "Normal" - -srch = s:option(Value, "srchost") -srch.rmempty = true -srch:value("", translate("all")) -luci.tools.webadmin.cbi_add_knownips(srch) - -dsth = s:option(Value, "dsthost") -dsth.rmempty = true -dsth:value("", translate("all")) -luci.tools.webadmin.cbi_add_knownips(dsth) - -l7 = s:option(ListValue, "layer7", translate("service")) -l7.rmempty = true -l7:value("", translate("all")) -local pats = luci.fs.dir("/etc/l7-protocols") -if pats then - for i,f in ipairs(pats) do - if f:sub(-4) == ".pat" then - l7:value(f:sub(1, #f-4)) - end - end -end - -p2p = s:option(ListValue, "ipp2p", "P2P") -p2p:value("", "-") -p2p:value("all", translate("all")) -p2p:value("bit", "BIT") -p2p:value("dc", "DC") -p2p:value("edk", "EDK") -p2p:value("gnu", "GNU") -p2p:value("kazaa", "KAZ") -p2p.rmempty = true - -p = s:option(ListValue, "proto", translate("protocol")) -p:value("", translate("all")) -p:value("tcp", "TCP") -p:value("udp", "UDP") -p:value("icmp", "ICMP") -p.rmempty = true - -ports = s:option(Value, "ports", translate("ports")) -ports.rmempty = true -ports:value("", translate("allf", translate("all"))) - -bytes = s:option(Value, "connbytes", translate("qos_connbytes")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/samba.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/samba.lua deleted file mode 100644 index a33c069..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/samba.lua +++ /dev/null @@ -1,56 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: samba.lua 3973 2009-01-01 13:33:45Z Cyrus $ -]]-- - -m = Map("samba") - -s = m:section(TypedSection, "samba", "Samba") -s.anonymous = true - -s:option(Value, "name") -s:option(Value, "description") -s:option(Value, "workgroup") -s:option(Flag, "homes") - - -s = m:section(TypedSection, "sambashare") -s.anonymous = true -s.addremove = true -s.template = "cbi/tblsection" - -s:option(Value, "name", translate("name")) -s:option(Value, "path").titleref = luci.dispatcher.build_url("admin", "system", "fstab") - -s:option(Value, "users").rmempty = true - -ro = s:option(Flag, "read_only") -ro.rmempty = false -ro.enabled = "yes" -ro.disabled = "no" - -go = s:option(Flag, "guest_ok") -go.rmempty = false -go.enabled = "yes" -go.disabled = "no" - -cm = s:option(Value, "create_mask") -cm.rmempty = true -cm.size = 4 - -dm = s:option(Value, "dir_mask") -dm.rmempty = true -dm.size = 4 - - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/siitwizard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/siitwizard.lua deleted file mode 100644 index 048c0f4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/siitwizard.lua +++ /dev/null @@ -1,338 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: siitwizard.lua 3940 2008-12-23 16:49:48Z jow $ - -]]-- - -local uci = require "luci.model.uci".cursor() - --------------------- View -------------------- -f = SimpleForm("siitwizward", "4over6-Assistent", - "Dieser Assistent unterstüzt bei der Einrichtung von IPv4-over-IPv6 Translation.") - -mode = f:field(ListValue, "mode", "Betriebsmodus") -mode:value("client", "Client") -mode:value("gateway", "Gateway") - -dev = f:field(ListValue, "device", "WLAN-Gerät") -uci:foreach("wireless", "wifi-device", - function(section) - dev:value(section[".name"]) - end) - -lanip = f:field(Value, "ipaddr", "LAN IP Adresse") -lanip.value = "172.23.1.1" - -lanmsk = f:field(Value, "lanmask", "Lokale LAN Netzmaske") -lanmsk.value = "255.255.255.0" - -gv4msk = f:field(Value, "gv4mask", "Globale LAN Netzmaske") -gv4msk.value = "255.255.0.0" - - --------------------- Control -------------------- -LL_PREFIX = luci.ip.IPv6("fe80::/64") - --- --- find link-local address --- -function find_ll() - for _, r in ipairs(luci.sys.net.routes6()) do - if LL_PREFIX:contains(r.dest) and r.dest:higher(LL_PREFIX) then - return r.dest:sub(LL_PREFIX) - end - end - return luci.ip.IPv6("::") -end - - - -function f.handle(self, state, data) - if state == FORM_VALID then - luci.http.redirect(luci.dispatcher.build_url("admin", "uci", "changes")) - return false - elseif state == FORM_INVALID then - self.errmessage = "Ungültige Eingabe: Bitte die Formularfelder auf Fehler prüfen." - end - return true -end - -function mode.write(self, section, value) - - -- lan interface - local lan_net = luci.ip.IPv4( - lanip:formvalue(section) or "192.168.1.1", - lanmsk:formvalue(section) or "255.255.255.0" - ) - - local gv4_net = luci.ip.IPv4( - lanip:formvalue(section) or "192.168.1.1", - gv4msk:formvalue(section) or "255.255.0.0" - ) - - -- - -- Configure wifi device - -- - local wifi_device = dev:formvalue(section) - local wifi_essid = uci:get("siit", "wifi", "essid") or "6mesh.freifunk.net" - local wifi_bssid = uci:get("siit", "wifi", "bssid") or "02:ca:ff:ee:ba:be" - local wifi_channel = uci:get("siit", "wifi", "channel") or "1" - - -- nuke old device definition - uci:delete_all("wireless", "wifi-iface", - function(s) return s.device == wifi_device end ) - - uci:delete_all("network", "interface", - function(s) return s['.name'] == wifi_device end ) - - -- create wifi device definition - uci:tset("wireless", wifi_device, { - disabled = 0, - channel = wifi_channel, --- txantenna = 1, --- rxantenna = 1, --- diversity = 0 - }) - - uci:section("wireless", "wifi-iface", nil, { - encryption = "none", - mode = "adhoc", - network = wifi_device, - device = wifi_device, - ssid = wifi_essid, - bssid = wifi_bssid, - }) - - - -- - -- Determine defaults - -- - local ula_prefix = uci:get("siit", "ipv6", "ula_prefix") or "fd00::" - local ula_global = uci:get("siit", "ipv6", "ula_global") or "00ca:ffee:babe::" -- = Freifunk - local ula_subnet = uci:get("siit", "ipv6", "ula_subnet") or "0000:0000:0000:4223::" -- = Berlin - local siit_prefix = uci:get("siit", "ipv6", "siit_prefix") or "::ffff:0000:0000" - - -- Find wifi interface - local device = dev:formvalue(section) - - -- - -- Generate ULA - -- - local ula = luci.ip.IPv6("::/64") - - for _, prefix in ipairs({ ula_prefix, ula_global, ula_subnet }) do - ula = ula:add(luci.ip.IPv6(prefix)) - end - - ula = ula:add(find_ll()) - - - -- - -- Gateway mode - -- - -- * wan port is dhcp, lan port is 172.23.1.1/24 - -- * siit0 gets a dummy address: 169.254.42.42 - -- * wl0 gets an ipv6 address, in this case the fdca:ffee:babe::1:1/64 - -- * we do a ::ffff:ffff:0/96 route into siit0, so everything from 6mesh goes into translation. - -- * an HNA6 of ::ffff:ffff:0:0/96 announces the mapped 0.0.0.0/0 ipv4 space. - -- * MTU on WAN, LAN down to 1400, ipv6 headers are slighly larger. - - if value == "gateway" then - - - -- wan mtu - uci:set("network", "wan", "mtu", 1400) - - -- lan settings - uci:tset("network", "lan", { - mtu = 1400, - ipaddr = lan_net:host():string(), - netmask = lan_net:mask():string() - }) - - -- use full siit subnet - siit_route = luci.ip.IPv6(siit_prefix .. "/96") - - -- v4 <-> siit route - uci:delete_all("network", "route", - function(s) return s.interface == "siit0" end) - - uci:section("network", "route", nil, { - interface = "siit0", - target = gv4_net:network():string(), - netmask = gv4_net:mask():string() - }) - - -- - -- Client mode - -- - -- * 172.23.2.1/24 on its lan, fdca:ffee:babe::1:2 on wl0 and the usual dummy address on siit0. - -- * we do a ::ffff:ffff:172.13.2.0/120 to siit0, because in this case, only traffic directed to clients needs to go into translation. - -- * same route as HNA6 announcement to catch the traffic out of the mesh. - -- * Also, MTU on LAN reduced to 1400. - - else - - -- lan settings - uci:tset("network", "lan", { - mtu = 1400, - ipaddr = lan_net:host():string(), - netmask = lan_net:mask():string() - }) - - -- derive siit subnet from lan config - siit_route = luci.ip.IPv6( - siit_prefix .. "/" .. (96 + lan_net:prefix()) - ):add(lan_net[2]) - - -- ipv4 <-> siit route - uci:delete_all("network", "route", - function(s) return s.interface == "siit0" end) - - -- XXX: kind of a catch all, gv4_net would be better - -- but does not cover non-local v4 space - uci:section("network", "route", nil, { - interface = "siit0", - target = "0.0.0.0", - netmask = "0.0.0.0" - }) - end - - -- setup the firewall - uci:delete_all("firewall", "zone", - function(s) return ( - s['.name'] == "siit0" or s.name == "siit0" or - s.network == "siit0" or s['.name'] == wifi_device or - s.name == wifi_device or s.network == wifi_device - ) end) - - uci:delete_all("firewall", "forwarding", - function(s) return ( - s.src == wifi_device and s.dest == "siit0" or - s.dest == wifi_device and s.src == "siit0" or - s.src == "lan" and s.dest == "siit0" or - s.dest == "lan" and s.src == "siit0" - ) end) - - uci:section("firewall", "zone", "siit0", { - name = "siit0", - network = "siit0", - input = "ACCEPT", - output = "ACCEPT", - forward = "ACCEPT" - }) - - uci:section("firewall", "zone", wifi_device, { - name = wifi_device, - network = wifi_device, - input = "ACCEPT", - output = "ACCEPT", - forward = "ACCEPT" - }) - - uci:section("firewall", "forwarding", nil, { - src = wifi_device, - dest = "siit0" - }) - - uci:section("firewall", "forwarding", nil, { - src = "siit0", - dest = wifi_device - }) - - uci:section("firewall", "forwarding", nil, { - src = "lan", - dest = "siit0" - }) - - uci:section("firewall", "forwarding", nil, { - src = "siit0", - dest = "lan" - }) - - -- firewall include - uci:delete_all("firewall", "include", - function(s) return s.path == "/etc/firewall.user" end) - - uci:section("firewall", "include", nil, { - path = "/etc/firewall.user" - }) - - - -- siit0 interface - uci:delete_all("network", "interface", - function(s) return ( s.ifname == "siit0" ) end) - - uci:section("network", "interface", "siit0", { - ifname = "siit0", - proto = "none" - }) - - -- siit0 route - uci:delete_all("network", "route6", - function(s) return siit_route:contains(luci.ip.IPv6(s.target)) end) - - uci:section("network", "route6", nil, { - interface = "siit0", - target = siit_route:string() - }) - - -- create wifi network interface - uci:section("network", "interface", wifi_device, { - proto = "static", - mtu = 1400, - ip6addr = ula:string() - }) - - -- nuke old olsrd interfaces - uci:delete_all("olsrd", "Interface", - function(s) return s.interface == wifi_device end) - - -- configure olsrd interface - uci:foreach("olsrd", "olsrd", - function(s) uci:set("olsrd", s['.name'], "IpVersion", 6) end) - - uci:section("olsrd", "Interface", nil, { - ignore = 0, - interface = wifi_device, - Ip6AddrType = "global" - }) - - -- hna6 - uci:delete_all("olsrd", "Hna6", - function(s) - if s.netaddr and s.prefix then - return siit_route:contains(luci.ip.IPv6(s.netaddr.."/"..s.prefix)) - end - end) - - uci:section("olsrd", "Hna6", nil, { - netaddr = siit_route:host():string(), - prefix = siit_route:prefix() - }) - - -- txtinfo v6 - uci:foreach("olsrd", "LoadPlugin", - function(s) - if s.library == "olsrd_txtinfo.so.0.1" then - uci:set("olsrd", s['.name'], "accept", "::1") - end - end) - - uci:save("wireless") - uci:save("firewall") - uci:save("network") - uci:save("olsrd") -end - -return f diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/splash/splash.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/splash/splash.lua deleted file mode 100644 index 29bc6d9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/splash/splash.lua +++ /dev/null @@ -1,47 +0,0 @@ --- ToDo: Translate, Add descriptions and help texts -require("luci.model.uci") - -m = Map("luci_splash", "Client-Splash", [[Client-Splash ist das Freifunk Hotspot-Authentifizierungs-System.]]) - -s = m:section(NamedSection, "general", "core", "Allgemein") -s:option(Value, "leasetime", "Freigabezeit", "h") - -s = m:section(TypedSection, "iface", "Schnittstellen") -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true - -local uci = luci.model.uci.cursor() - -zone = s:option(ListValue, "zone", "Firewallzone") -uci:foreach("firewall", "zone", - function (section) - zone:value(section.name) - end) - -iface = s:option(ListValue, "network", "Netzwerk") -uci:foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - iface:value(section[".name"]) - end - end) - -uci:foreach("network", "alias", - function (section) - iface:value(section[".name"]) - end) - -s = m:section(TypedSection, "whitelist", "Automatische Freigabe") -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true -s:option(Value, "mac", "MAC-Adresse") - -s = m:section(TypedSection, "blacklist", "Automatische Sperrung") -s.template = "cbi/tblsection" -s.addremove = true -s.anonymous = true -s:option(Value, "mac", "MAC-Adresse") - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/tinyproxy.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/tinyproxy.lua deleted file mode 100644 index 9a216d7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/tinyproxy.lua +++ /dev/null @@ -1,80 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: tinyproxy.lua 3941 2008-12-23 21:39:38Z jow $ -]]-- -m = Map("tinyproxy", translate("tinyproxy"), translate("tinyproxy_desc")) - -s = m:section(TypedSection, "tinyproxy", translate("general")) -s.anonymous = true - -s:option(Flag, "enable", translate("enable")) - -s:option(Value, "Port", translate("port")) -s:option(Value, "Listen").optional = true -s:option(Value, "Bind").optional = true -s:option(Value, "Timeout").optional = true - -s:option(Value, "DefaultErrorFile").optional = true -s:option(Value, "StatFile").optional = true - -s:option(Flag, "Syslog").optional = true -f = s:option(Value, "Logfile") -f.optional = true - -l = s:option(ListValue, "LogLevel") -l.optional = true -l:value("Critical") -l:value("Error") -l:value("Warning") -l:value("Notice") -l:value("Connect") -l:value("Info") - -s:option(DynamicList, "XTinyproxy").optional = true - -s:option(DynamicList, "Allow") -s:option(Value, "ViaProxyName") - -s:option(FileUpload, "Filter") -s:option(Flag, "FilterURLs") -s:option(Flag, "FilterExtended") -s:option(Flag, "FilterCaseSensitive") -s:option(Flag, "FilterDefaultDeny") - -s:option(DynamicList, "Anonymous") -s:option(DynamicList, "ConnectPort") - -s:option(Value, "User").optional = true -s:option(Value, "Group").optional = true -s:option(Value, "MaxClients").optional = true -s:option(Value, "MinSpareServers").optional = true -s:option(Value, "MaxSpareServers").optional = true -s:option(Value, "StartServers").optional = true -s:option(Value, "MaxRequestsPerChild").optional = true - - -s = m:section(TypedSection, "upstream") -s.anonymous = true -s.addremove = true - -t = s:option(ListValue, "type") -t:value("proxy", translate("tinyproxy_type_proxy")) -t:value("reject", translate("tinyproxy_type_reject")) - -ta = s:option(Value, "target") -ta.rmempty = true - -v = s:option(Value, "via") -v:depends({type="proxy"}) - -return m \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnp.lua deleted file mode 100644 index 1bc6e84..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnp.lua +++ /dev/null @@ -1,38 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upnp.lua 4179 2009-01-28 18:32:47Z jow $ -]]-- -m = Map("upnpd", translate("upnpd"), translate("upnpd_desc")) - -s = m:section(NamedSection, "config", "upnpd", "") -e = s:option(Flag, "enabled", translate("enable")) -e.rmempty = false - -function e.write(self, section, value) - local cmd = (value == "1") and "enable" or "disable" - if value ~= "1" then - os.execute("/etc/init.d/miniupnpd stop") - end - os.execute("/etc/init.d/miniupnpd " .. cmd) -end - -function e.cfgvalue(self, section) - return (os.execute("/etc/init.d/miniupnpd enabled") == 0) and "1" or "0" -end - -s:option(Flag, "secure_mode").rmempty = true -s:option(Flag, "log_output").rmempty = true -s:option(Value, "download", nil, "kByte/s").rmempty = true -s:option(Value, "upload", nil, "kByte/s").rmempty = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnpmini.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnpmini.lua deleted file mode 100644 index 2b2a78a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/upnp/upnpmini.lua +++ /dev/null @@ -1,36 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upnpmini.lua 4179 2009-01-28 18:32:47Z jow $ -]]-- -m = Map("upnpd", translate("upnpd"), translate("upnpd_desc")) - -s = m:section(NamedSection, "config", "upnpd", "") -e = s:option(Flag, "enabled", translate("enable")) -e.rmempty = false - -function e.write(self, section, value) - local cmd = (value == "1") and "enable" or "disable" - if value ~= "1" then - os.execute("/etc/init.d/miniupnpd stop") - end - os.execute("/etc/init.d/miniupnpd " .. cmd) -end - -function e.cfgvalue(self, section) - return (os.execute("/etc/init.d/miniupnpd enabled") == 0) and "1" or "0" -end - -s:option(Value, "download", nil, "kByte/s").rmempty = true -s:option(Value, "upload", nil, "kByte/s").rmempty = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ushare.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ushare.lua deleted file mode 100644 index 8063aea..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/ushare.lua +++ /dev/null @@ -1,42 +0,0 @@ ---[[ - -LuCI uShare -(c) 2008 Yanira - -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 - -$Id: ushare.lua 3423 2008-09-24 21:13:42Z jow $ - -]]-- - -m = Map("ushare", translate("ushare"), - translate("ushare_desc")) - -s = m:section(TypedSection, "ushare", translate("settings")) -s.addremove = false -s.anonymous = true - -s:option(Flag, "enabled", translate("enabled", "Enable")) - -s:option(Value, "username", translate("username")) - -s:option(Value, "servername", translate("servername")) - -dif = s:option( Value, "interface", translate("interface")) -for _, nif in ipairs(luci.sys.net.devices()) do - if nif ~= "lo" then dif:value(nif) end -end - -s:option(Value, "content_directories", translate("content_directories")) - -s:option(Flag, "disable_webif", translate("disable_webif")) - -s:option(Flag, "disable_telnet", translate("disable_telnet")) - -s:option(Value, "options", translate("options")) - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/uvc_streamer.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/uvc_streamer.lua deleted file mode 100644 index ead6534..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/cbi/uvc_streamer.lua +++ /dev/null @@ -1,47 +0,0 @@ ---[[ - -LuCI UVC Streamer -(c) 2008 Yanira - -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 - -$Id: uvc_streamer.lua 3242 2008-09-11 18:54:51Z Cyrus $ - -]]-- - --- find current lan address and port of first uvc_streamer config section -local uci = luci.model.uci.cursor_state() -local addr = uci:get("network", "lan", "ipaddr") -local port - -uci:foreach( "uvc-streamer", "uvc-streamer", - function(section) port = port or tonumber(section.port) end ) - -addr = addr or "192.168.1.1" -port = port or 8080 - -m = Map("uvc-streamer", translate("uvc_streamer"), - translatef("uvc_streamer_desc", nil, addr, port, addr, port)) - -s = m:section(TypedSection, "uvc-streamer", translate("settings")) -s.addremove = false -s.anonymous = true - -s:option(Flag, "enabled", translate("enabled", "Enable")) - -s:option(Value, "device", translate("device")).rmempty = true - -nm = s:option(Value, "resolution", translate("resolution")) -nm:value("640x480") -nm:value("320x240") -nm:value("160x120") - -s:option(Value, "framespersecond", translate("framespersecond")).rmempty = true - -s:option(Value, "port", translate("port", "Port")).rmempty = true - -return m diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/ipkg.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/ipkg.lua deleted file mode 100644 index c831583..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/ipkg.lua +++ /dev/null @@ -1,150 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: ipkg.lua 3837 2008-11-29 21:58:58Z Cyrus $ -]]-- - -local os = require "os" -local io = require "io" -local util = require "luci.util" - -local type = type -local pairs = pairs -local error = error - -local ipkg = "opkg" - ---- LuCI IPKG/OPKG call abstraction library -module "luci.model.ipkg" - - --- Internal action function -local function _action(cmd, ...) - local pkg = "" - arg.n = nil - for k, v in pairs(arg) do - pkg = pkg .. " '" .. v:gsub("'", "") .. "'" - end - - local c = ipkg.." "..cmd.." "..pkg.." >/dev/null 2>&1" - local r = os.execute(c) - return (r == 0), r -end - --- Internal parser function -local function _parselist(rawdata) - if type(rawdata) ~= "function" then - error("IPKG: Invalid rawdata given") - end - - local data = {} - local c = {} - local l = nil - - for line in rawdata do - if line:sub(1, 1) ~= " " then - local key, val = line:match("(.-): ?(.*)%s*") - - if key and val then - if key == "Package" then - c = {Package = val} - data[val] = c - elseif key == "Status" then - c.Status = {} - for j in val:gmatch("([^ ]+)") do - c.Status[j] = true - end - else - c[key] = val - end - l = key - end - else - -- Multi-line field - c[l] = c[l] .. "\n" .. line - end - end - - return data -end - --- Internal lookup function -local function _lookup(act, pkg) - local cmd = ipkg .. " " .. act - if pkg then - cmd = cmd .. " '" .. pkg:gsub("'", "") .. "'" - end - - -- IPKG sometimes kills the whole machine because it sucks - -- Therefore we have to use a sucky approach too and use - -- tmpfiles instead of directly reading the output - local tmpfile = os.tmpname() - os.execute(cmd .. (" >%s 2>/dev/null" % tmpfile)) - - local data = _parselist(io.lines(tmpfile)) - os.remove(tmpfile) - return data -end - - ---- Return information about installed and available packages. --- @param pkg Limit output to a (set of) packages --- @return Table containing package information -function info(pkg) - return _lookup("info", pkg) -end - ---- Return the package status of one or more packages. --- @param pkg Limit output to a (set of) packages --- @return Table containing package status information -function status(pkg) - return _lookup("status", pkg) -end - ---- Install one or more packages. --- @param ... List of packages to install --- @return Boolean indicating the status of the action --- @return IPKG return code -function install(...) - return _action("install", ...) -end - ---- Determine whether a given package is installed. --- @param pkg Package --- @return Boolean -function installed(pkg) - local p = status(pkg)[pkg] - return (p and p.Status and p.Status.installed) -end - ---- Remove one or more packages. --- @param ... List of packages to install --- @return Boolean indicating the status of the action --- @return IPKG return code -function remove(...) - return _action("remove", ...) -end - ---- Update package lists. --- @return Boolean indicating the status of the action --- @return IPKG return code -function update() - return _action("update") -end - ---- Upgrades all installed packages. --- @return Boolean indicating the status of the action --- @return IPKG return code -function upgrade() - return _action("upgrade") -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/uci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/uci.lua deleted file mode 100644 index 6c6b93b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/model/uci.lua +++ /dev/null @@ -1,333 +0,0 @@ ---[[ -LuCI - UCI model - -Description: -Generalized UCI model - -FileId: -$Id: uci.lua 4190 2009-01-30 15:36:49Z jow $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -local os = require "os" -local uci = require "uci" -local util = require "luci.util" -local table = require "table" - - -local setmetatable, rawget, rawset = setmetatable, rawget, rawset -local error, pairs, ipairs, tostring = error, pairs, ipairs, tostring -local require, getmetatable, type = require, getmetatable, type - ---- LuCI UCI model library. --- @cstyle instance -module "luci.model.uci" - ---- Create a new UCI-Cursor. --- @class function --- @name cursor --- @return UCI-Cursor -cursor = uci.cursor - -APIVERSION = uci.APIVERSION - ---- Create a new Cursor initialized to the state directory. --- @return UCI cursor -function cursor_state() - return cursor(nil, "/var/state") -end - - -local Cursor = getmetatable(cursor()) - ---- Applies UCI configuration changes --- @param configlist List of UCI configurations --- @param command Don't apply only return the command -function Cursor.apply(self, configlist, command) - configlist = self:_affected(configlist) - local reloadcmd = "/sbin/luci-reload " .. table.concat(configlist, " ") - - return command and reloadcmd or os.execute(reloadcmd .. " >/dev/null 2>&1") -end - - ---- Delete all sections of a given type that match certain criteria. --- @param config UCI config --- @param type UCI section type --- @param comparator Function that will be called for each section and --- returns a boolean whether to delete the current section (optional) -function Cursor.delete_all(self, config, stype, comparator) - local del = {} - - if type(comparator) == "table" then - local tbl = comparator - comparator = function(section) - for k, v in pairs(tbl) do - if section[k] ~= v then - return false - end - end - return true - end - end - - local function helper (section) - - if not comparator or comparator(section) then - del[#del+1] = section[".name"] - end - end - - self:foreach(config, stype, helper) - - for i, j in ipairs(del) do - self:delete(config, j) - end -end - ---- Create a new section and initialize it with data. --- @param config UCI config --- @param type UCI section type --- @param name UCI section name (optional) --- @param values Table of key - value pairs to initialize the section with --- @return Name of created section -function Cursor.section(self, config, type, name, values) - local stat = true - if name then - stat = self:set(config, name, type) - else - name = self:add(config, type) - stat = name and true - end - - if stat and values then - stat = self:tset(config, name, values) - end - - return stat and name -end - ---- Updated the data of a section using data from a table. --- @param config UCI config --- @param section UCI section name (optional) --- @param values Table of key - value pairs to update the section with -function Cursor.tset(self, config, section, values) - local stat = true - for k, v in pairs(values) do - if k:sub(1, 1) ~= "." then - stat = stat and self:set(config, section, k, v) - end - end - return stat -end - ---- Get a boolean option and return it's value as true or false. --- @param config UCI config --- @param section UCI section name --- @param option UCI option --- @return Boolean -function Cursor.get_bool(self, ...) - local val = self:get(...) - return ( val == "1" or val == "true" or val == "yes" or val == "on" ) -end - ---- Get an option or list and return values as table. --- @param config UCI config --- @param section UCI section name --- @param option UCI option --- @return UCI value -function Cursor.get_list(self, config, section, option) - if config and section and option then - local val = self:get(config, section, option) - return ( type(val) == "table" and val or { val } ) - end - return nil -end - ---- Set given values as list. --- @param config UCI config --- @param section UCI section name --- @param option UCI option --- @param value UCI value --- @return Boolean whether operation succeeded -function Cursor.set_list(self, config, section, option, value) - if config and section and option then - return self:set( - config, section, option, - ( type(value) == "table" and value or { value } ) - ) - end - return false -end - --- Return a list of initscripts affected by configuration changes. -function Cursor._affected(self, configlist) - configlist = type(configlist) == "table" and configlist or {configlist} - - local c = cursor() - c:load("ucitrack") - - -- Resolve dependencies - local reloadlist = {} - - local function _resolve_deps(name) - local reload = {name} - local deps = {} - - c:foreach("ucitrack", name, - function(section) - if section.affects then - for i, aff in ipairs(section.affects) do - deps[#deps+1] = aff - end - end - end) - - for i, dep in ipairs(deps) do - for j, add in ipairs(_resolve_deps(dep)) do - reload[#reload+1] = add - end - end - - return reload - end - - -- Collect initscripts - for j, config in ipairs(configlist) do - for i, e in ipairs(_resolve_deps(config)) do - if not util.contains(reloadlist, e) then - reloadlist[#reloadlist+1] = e - end - end - end - - return reloadlist -end - - ---- Add an anonymous section. --- @class function --- @name Cursor.add --- @param config UCI config --- @param type UCI section type --- @return Name of created section - ---- Get a table of unsaved changes. --- @class function --- @name Cursor.changes --- @param config UCI config --- @return Table of changes - ---- Commit unsaved changes. --- @class function --- @name Cursor.commit --- @param config UCI config --- @return Boolean whether operation succeeded --- @see Cursor.revert - ---- Deletes a section or an option. --- @class function --- @name Cursor.delete --- @param config UCI config --- @param section UCI section name --- @param option UCI option (optional) --- @return Boolean whether operation succeeded - ---- Call a function for every section of a certain type. --- @class function --- @name Cursor.foreach --- @param config UCI config --- @param type UCI section type --- @param callback Function to be called --- @return Boolean whether operation succeeded - ---- Get a section type or an option --- @class function --- @name Cursor.get --- @param config UCI config --- @param section UCI section name --- @param option UCI option (optional) --- @return UCI value - ---- Get all sections of a config or all values of a section. --- @class function --- @name Cursor.get_all --- @param config UCI config --- @param section UCI section name (optional) --- @return Table of UCI sections or table of UCI values - ---- Manually load a config. --- @class function --- @name Cursor.load --- @param config UCI config --- @return Boolean whether operation succeeded --- @see Cursor.save --- @see Cursor.unload - ---- Revert unsaved changes. --- @class function --- @name Cursor.revert --- @param config UCI config --- @return Boolean whether operation succeeded --- @see Cursor.commit - ---- Saves changes made to a config to make them committable. --- @class function --- @name Cursor.save --- @param config UCI config --- @return Boolean whether operation succeeded --- @see Cursor.load --- @see Cursor.unload - ---- Set a value or create a named section. --- @class function --- @name Cursor.set --- @param config UCI config --- @param section UCI section name --- @param option UCI option or UCI section type --- @param value UCI value or nil if you want to create a section --- @return Boolean whether operation succeeded - ---- Get the configuration directory. --- @class function --- @name Cursor.get_confdir --- @return Configuration directory - ---- Get the directory for uncomitted changes. --- @class function --- @name Cursor.get_savedir --- @return Save directory - ---- Set the configuration directory. --- @class function --- @name Cursor.set_confdir --- @param directory UCI configuration directory --- @return Boolean whether operation succeeded - ---- Set the directory for uncommited changes. --- @class function --- @name Cursor.set_savedir --- @param directory UCI changes directory --- @return Boolean whether operation succeeded - ---- Discard changes made to a config. --- @class function --- @name Cursor.unload --- @param config UCI config --- @return Boolean whether operation succeeded --- @see Cursor.load --- @see Cursor.save diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sauth.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sauth.lua deleted file mode 100644 index 758934e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sauth.lua +++ /dev/null @@ -1,106 +0,0 @@ ---[[ - -Session authentication -(c) 2008 Steven Barth - -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 - -$Id: sauth.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - ---- LuCI session library. -module("luci.sauth", package.seeall) -require("luci.fs") -require("luci.util") -require("luci.sys") -require("luci.config") - - -luci.config.sauth = luci.config.sauth or {} -sessionpath = luci.config.sauth.sessionpath -sessiontime = tonumber(luci.config.sauth.sessiontime) or 15 * 60 - ---- Manually clean up expired sessions. -function clean() - local now = os.time() - local files = luci.fs.dir(sessionpath) - - if not files then - return nil - end - - for i, file in pairs(files) do - local fname = sessionpath .. "/" .. file - local stat = luci.fs.stat(fname) - if stat and stat.type == "regular" and stat.atime + sessiontime < now then - luci.fs.unlink(fname) - end - end -end - ---- Prepare session storage by creating the session directory. -function prepare() - luci.fs.mkdir(sessionpath) - luci.fs.chmod(sessionpath, "a-rwx,u+rwx") - - if not sane() then - error("Security Exception: Session path is not sane!") - end -end - ---- Read a session and return its content. --- @param id Session identifier --- @return Session data -function read(id) - if not id then - return - end - if not id:match("^%w+$") then - error("Session ID is not sane!") - end - clean() - if not sane(sessionpath .. "/" .. id) then - return - end - return luci.fs.readfile(sessionpath .. "/" .. id) -end - - ---- Check whether Session environment is sane. --- @return Boolean status -function sane(file) - return luci.sys.process.info("uid") - == luci.fs.stat(file or sessionpath, "uid") - and luci.fs.stat(file or sessionpath, "mode") - == (file and "rw-------" or "rwx------") -end - - ---- Write session data to a session file. --- @param id Session identifier --- @param data Session data -function write(id, data) - if not sane() then - prepare() - end - if not id:match("^%w+$") then - error("Session ID is not sane!") - end - luci.fs.writefile(sessionpath .. "/" .. id, data) - luci.fs.chmod(sessionpath .. "/" .. id, "a-rwx,u+rw") -end - - ---- Kills a session --- @param id Session identifier -function kill(id) - if not id:match("^%w+$") then - error("Session ID is not sane!") - end - luci.fs.unlink(sessionpath .. "/" .. id) -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/cgi.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/cgi.lua deleted file mode 100644 index 00d9636..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/cgi.lua +++ /dev/null @@ -1,90 +0,0 @@ ---[[ -LuCI - SGI-Module for CGI - -Description: -Server Gateway Interface for CGI - -FileId: -$Id: cgi.lua 3739 2008-11-08 20:25:49Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -module("luci.sgi.cgi", package.seeall) -local ltn12 = require("luci.ltn12") -require("luci.http") -require("luci.sys") -require("luci.dispatcher") - --- Limited source to avoid endless blocking -local function limitsource(handle, limit) - limit = limit or 0 - local BLOCKSIZE = ltn12.BLOCKSIZE - - return function() - if limit < 1 then - handle:close() - return nil - else - local read = (limit > BLOCKSIZE) and BLOCKSIZE or limit - limit = limit - read - - local chunk = handle:read(read) - if not chunk then handle:close() end - return chunk - end - end -end - -function run() - local r = luci.http.Request( - luci.sys.getenv(), - limitsource(io.stdin, tonumber(luci.sys.getenv("CONTENT_LENGTH"))), - ltn12.sink.file(io.stderr) - ) - - local x = coroutine.create(luci.dispatcher.httpdispatch) - local hcache = "" - local active = true - - while coroutine.status(x) ~= "dead" do - local res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - print("Status: 500 Internal Server Error") - print("Content-Type: text/plain\n") - print(id) - break; - end - - if active then - if id == 1 then - io.write("Status: " .. tostring(data1) .. " " .. data2 .. "\r\n") - elseif id == 2 then - hcache = hcache .. data1 .. ": " .. data2 .. "\r\n" - elseif id == 3 then - io.write(hcache) - io.write("\r\n") - elseif id == 4 then - io.write(data1) - elseif id == 5 then - io.flush() - io.close() - active = false - end - end - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/webuci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/webuci.lua deleted file mode 100644 index e0416db..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/webuci.lua +++ /dev/null @@ -1,74 +0,0 @@ ---[[ -LuCI - SGI-Module for Webuci - -Description: -Server Gateway Interface for Webuci - -FileId: -$Id: webuci.lua 2656 2008-07-23 18:52:12Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -module("luci.sgi.webuci", package.seeall) -local ltn12 = require("luci.ltn12") -require("luci.http") -require("luci.util") -require("luci.dispatcher") - -function run(env, vars) - local r = luci.http.Request( - env, - ltn12.source.empty(), - ltn12.sink.file(io.stderr) - ) - - r.message.params = vars - - local x = coroutine.create(luci.dispatcher.httpdispatch) - local status = "" - local headers = {} - local active = true - - while coroutine.status(x) ~= "dead" do - local res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - print(env.SERVER_PROTOCOL .. " 500 Internal Server Error") - print("Content-Type: text/plain\n") - print(id) - break; - end - - if active then - if id == 1 then - status = env.SERVER_PROTOCOL .. " " .. tostring(data1) .. " " .. data2 .. "\r\n" - elseif id == 2 then - headers[data1] = data2 - elseif id == 3 then - io.write(status) - for k, v in pairs(headers) do - io.write(k .. ": " .. v .. "\r\n") - end - io.write("\r\n") - elseif id == 4 then - io.write(data1) - elseif id == 5 then - active = false - end - end - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/wsapi.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/wsapi.lua deleted file mode 100644 index 1d6e118..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sgi/wsapi.lua +++ /dev/null @@ -1,79 +0,0 @@ ---[[ -LuCI - SGI-Module for WSAPI - -Description: -Server Gateway Interface for WSAPI - -FileId: -$Id: wsapi.lua 2656 2008-07-23 18:52:12Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- -module("luci.sgi.wsapi", package.seeall) -local ltn12 = require("luci.ltn12") -require("luci.http") -require("luci.dispatcher") -require("luci.http.protocol") - -function run(wsapi_env) - local r = luci.http.Request( - wsapi_env, - ltn12.source.file(wsapi_env.input), - ltn12.sink.file(wsapi_env.error) - ) - - local res, id, data1, data2 = true, 0, nil, nil - local headers = {} - local status = 200 - - local x = coroutine.create(luci.dispatcher.httpdispatch) - local active = true - - while id < 3 do - res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - status = 500 - headers["Content-Type"] = "text/plain" - local err = {id} - return status, headers, function() local x = table.remove(err) return x end - end - - if id == 1 then - status = data1 - elseif id == 2 then - headers[data1] = data2 - end - end - - local function iter() - local res, id, data = coroutine.resume(x) - if id == 4 and active then - return data - elseif id == 5 then - active = false - return "" - else - return "" - end - if coroutine.status(x) == "dead" then - return nil - end - end - - return status, headers, iter -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/datatree.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/datatree.lua deleted file mode 100644 index 3411702..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/datatree.lua +++ /dev/null @@ -1,181 +0,0 @@ ---[[ - -Luci statistics - rrd data tree builder -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: datatree.lua 3642 2008-10-29 05:08:03Z jow $ - -]]-- - -module("luci.statistics.datatree", package.seeall) - -local util = require("luci.util") -local sys = require("luci.sys") -local fs = require("luci.fs") -local uci = require("luci.model.uci").cursor() -local sections = uci:get_all("luci_statistics") - - -Instance = util.class() - -function Instance.__init__( self, host ) - self._host = host or sections.collectd.Hostname or sys.hostname() - self._libdir = sections.collectd.PluginDir or "/usr/lib/collectd" - self._rrddir = sections.collectd_rrdtool.DataDir or "/tmp/rrd" - - self._libdir = self._libdir:gsub("/$","") - self._rrddir = self._rrddir:gsub("/$","") - self._plugins = { } - - self:_scan() -end - -function Instance._mkpath( self, plugin, pinstance ) - local dir = self._rrddir .. "/" .. self._host - - if type(plugin) == "string" and plugin:len() > 0 then - dir = dir .. "/" .. plugin - - if type(pinstance) == "string" and pinstance:len() > 0 then - dir = dir .. "-" .. pinstance - end - end - - return dir -end - -function Instance._notzero( self, table ) - for k in pairs(table) do - return true - end - - return false -end - -function Instance._scan( self ) - local dirs = fs.dir( self:_mkpath() ) - if not dirs then - return - end - --- for i, plugin in ipairs( dirs ) do --- if plugin:match("%w+.so") then --- self._plugins[ plugin:gsub("%.so$", "") ] = { } --- end --- end - - for _, dir in ipairs(dirs) do - if dir ~= "." and dir ~= ".." and - fs.stat(self:_mkpath(dir)).type == "directory" - then - local plugin = dir:gsub("%-.+$", "") - if not self._plugins[plugin] then - self._plugins[plugin] = { } - end - end - end - - for plugin, instances in pairs( self._plugins ) do - - local dirs = fs.dir( self:_mkpath() ) - - if type(dirs) == "table" then - for i, dir in ipairs(dirs) do - if dir:find( plugin .. "%-" ) or dir == plugin then - local instance = "" - - if dir ~= plugin then - instance = dir:gsub( plugin .. "%-", "", 1 ) - end - - instances[instance] = { } - end - end - end - - for instance, data_instances in pairs( instances ) do - - dirs = fs.dir( self:_mkpath( plugin, instance ) ) - - if type(dirs) == "table" then - for i, file in ipairs(dirs) do - if file:find("%.rrd") then - file = file:gsub("%.rrd","") - - local data_type - local data_instance - - if file:find("%-") then - data_type = file:gsub( "%-.+","" ) - data_instance = file:gsub( "[^%-]-%-", "", 1 ) - else - data_type = file - data_instance = "" - end - - if not data_instances[data_type] then - data_instances[data_type] = { data_instance } - else - table.insert( data_instances[data_type], data_instance ) - end - end - end - end - end - end -end - - -function Instance.plugins( self ) - local rv = { } - - for plugin, val in pairs( self._plugins ) do - if self:_notzero( val ) then - table.insert( rv, plugin ) - end - end - - return rv -end - -function Instance.plugin_instances( self, plugin ) - local rv = { } - - for instance, val in pairs( self._plugins[plugin] ) do - table.insert( rv, instance ) - end - - return rv -end - -function Instance.data_types( self, plugin, instance ) - local rv = { } - local p = self._plugins[plugin] - - if type(p) == "table" and type(p[instance]) == "table" then - for type, val in pairs(p[instance]) do - table.insert( rv, type ) - end - end - - return rv -end - -function Instance.data_instances( self, plugin, instance, dtype ) - local rv = { } - local p = self._plugins[plugin] - - if type(p) == "table" and type(p[instance]) == "table" and type(p[instance][dtype]) == "table" then - for i, instance in ipairs(p[instance][dtype]) do - table.insert( rv, instance ) - end - end - - return rv -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/i18n.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/i18n.lua deleted file mode 100644 index b54e30b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/i18n.lua +++ /dev/null @@ -1,115 +0,0 @@ ---[[ - -Luci statistics - diagram i18n helper -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: i18n.lua 3033 2008-08-31 14:38:28Z jow $ - -]]-- - -module("luci.statistics.i18n", package.seeall) - -require("luci.util") -require("luci.i18n") - - -Instance = luci.util.class() - - -function Instance.__init__( self, graph ) - self.i18n = luci.i18n - self.graph = graph - - self.i18n.loadc("rrdtool") - self.i18n.loadc("statistics") -end - -function Instance._subst( self, str, val ) - str = str:gsub( "%%H", self.graph.opts.host or "" ) - str = str:gsub( "%%pn", val.plugin or "" ) - str = str:gsub( "%%pi", val.pinst or "" ) - str = str:gsub( "%%dt", val.dtype or "" ) - str = str:gsub( "%%di", val.dinst or "" ) - str = str:gsub( "%%ds", val.dsrc or "" ) - - return str -end - -function Instance.title( self, plugin, pinst, dtype, dinst ) - - local title = self.i18n.translate( - string.format( "stat_dg_title_%s_%s_%s", plugin, pinst, dtype ), - self.i18n.translate( - string.format( "stat_dg_title_%s_%s", plugin, pinst ), - self.i18n.translate( - string.format( "stat_dg_title_%s__%s", plugin, dtype ), - self.i18n.translate( - string.format( "stat_dg_title_%s", plugin ), - self.graph:_mkpath( plugin, pinst, dtype ) - ) - ) - ) - ) - - return self:_subst( title, { - plugin = plugin, - pinst = pinst, - dtype = dtype, - dinst = dinst - } ) - -end - -function Instance.label( self, plugin, pinst, dtype, dinst ) - - local label = self.i18n.translate( - string.format( "stat_dg_label_%s_%s_%s", plugin, pinst, dtype ), - self.i18n.translate( - string.format( "stat_dg_label_%s_%s", plugin, pinst ), - self.i18n.translate( - string.format( "stat_dg_label_%s__%s", plugin, dtype ), - self.i18n.translate( - string.format( "stat_dg_label_%s", plugin ), - self.graph:_mkpath( plugin, pinst, dtype ) - ) - ) - ) - ) - - return self:_subst( label, { - plugin = plugin, - pinst = pinst, - dtype = dtype, - dinst = dinst - } ) - -end - -function Instance.ds( self, source ) - - local label = self.i18n.translate( - string.format( "stat_ds_%s_%s_%s", source.type, source.instance, source.ds ), - self.i18n.translate( - string.format( "stat_ds_%s_%s", source.type, source.instance ), - self.i18n.translate( - string.format( "stat_ds_label_%s__%s", source.type, source.ds ), - self.i18n.translate( - string.format( "stat_ds_%s", source.type ), - source.type .. "_" .. source.instance:gsub("[^%w]","_") .. "_" .. source.ds - ) - ) - ) - ) - - return self:_subst( label, { - dtype = source.type, - dinst = source.instance, - dsrc = source.ds - } ) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool.lua deleted file mode 100644 index ca00e42..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool.lua +++ /dev/null @@ -1,607 +0,0 @@ ---[[ - -Luci statistics - rrdtool interface library / diagram model interpreter -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: rrdtool.lua 3873 2008-12-07 23:44:22Z jow $ - -]]-- - -module("luci.statistics.rrdtool", package.seeall) - -require("luci.statistics.datatree") -require("luci.statistics.rrdtool.colors") -require("luci.statistics.rrdtool.definitions") -require("luci.statistics.i18n") -require("luci.model.uci") -require("luci.util") -require("luci.sys") -require("luci.fs") - - -Graph = luci.util.class() - -function Graph.__init__( self, timespan, opts ) - - opts = opts or { } - - local uci = luci.model.uci.cursor() - local sections = uci:get_all( "luci_statistics" ) - - -- helper classes - self.colors = luci.statistics.rrdtool.colors.Instance() - self.defs = luci.statistics.rrdtool.definitions.Instance() - self.tree = luci.statistics.datatree.Instance() - self.i18n = luci.statistics.i18n.Instance( self ) - - -- options - opts.timespan = timespan or sections.rrdtool.default_timespan or 900 - opts.rrasingle = opts.rrasingle or ( sections.collectd_rrdtool.RRASingle == "1" ) - opts.host = opts.host or sections.collectd.Hostname or luci.sys.hostname() - opts.width = opts.width or sections.rrdtool.image_width or 400 - opts.rrdpath = opts.rrdpath or sections.collectd_rrdtool.DataDir or "/tmp/rrd" - opts.imgpath = opts.imgpath or sections.rrdtool.image_path or "/tmp/rrdimg" - opts.rrdpath = opts.rrdpath:gsub("/$","") - opts.imgpath = opts.imgpath:gsub("/$","") - - -- rrdtool default args - self.args = { - "-a", "PNG", - "-s", "NOW-" .. opts.timespan, - "-w", opts.width - } - - -- store options - self.opts = opts -end - -function Graph._mkpath( self, plugin, plugin_instance, dtype, dtype_instance ) - local t = self.opts.host .. "/" .. plugin - if type(plugin_instance) == "string" and plugin_instance:len() > 0 then - t = t .. "-" .. plugin_instance - end - t = t .. "/" .. dtype - if type(dtype_instance) == "string" and dtype_instance:len() > 0 then - t = t .. "-" .. dtype_instance - end - return t -end - -function Graph.mkrrdpath( self, ... ) - return string.format( "%s/%s.rrd", self.opts.rrdpath, self:_mkpath( ... ) ) -end - -function Graph.mkpngpath( self, ... ) - return string.format( "%s/%s.%i.png", self.opts.imgpath, self:_mkpath( ... ), self.opts.timespan ) -end - -function Graph.strippngpath( self, path ) - return path:sub( self.opts.imgpath:len() + 2 ) -end - -function Graph._forcelol( self, list ) - if type(list[1]) ~= "table" then - return( { list } ) - end - return( list ) -end - -function Graph._rrdtool( self, def, rrd ) - - -- prepare directory - local dir = def[1]:gsub("/[^/]+$","") - luci.fs.mkdir( dir, true ) - - -- construct commandline - local cmdline = "rrdtool graph" - - -- copy default arguments to def stack - for i, opt in ipairs(self.args) do - table.insert( def, 1 + i, opt ) - end - - -- construct commandline from def stack - for i, opt in ipairs(def) do - opt = opt .. "" -- force string - - if rrd then - opt = opt:gsub( "{file}", rrd ) - end - - if opt:match("[^%w]") then - cmdline = cmdline .. " '" .. opt .. "'" - else - cmdline = cmdline .. " " .. opt - end - end - - -- execute rrdtool - local rrdtool = io.popen( cmdline ) - rrdtool:close() -end - -function Graph._generic( self, opts, plugin, plugin_instance, dtype, index ) - - -- generated graph defs - local defs = { } - - -- internal state variables - local _args = { } - local _sources = { } - local _stack_neg = { } - local _stack_pos = { } - local _longest_name = 0 - local _has_totals = false - - -- some convenient aliases - local _ti = table.insert - local _sf = string.format - - -- local helper: append a string.format() formatted string to given table - function _tif( list, fmt, ... ) - table.insert( list, string.format( fmt, ... ) ) - end - - -- local helper: create definitions for min, max, avg and create *_nnl (not null) variable from avg - function __def(source) - - local inst = source.sname - local rrd = source.rrd - local ds = source.ds - - if not ds or ds:len() == 0 then ds = "value" end - - _tif( _args, "DEF:%s_avg=%s:%s:AVERAGE", inst, rrd, ds ) - - if not self.opts.rrasingle then - _tif( _args, "DEF:%s_min=%s:%s:MIN", inst, rrd, ds ) - _tif( _args, "DEF:%s_max=%s:%s:MAX", inst, rrd, ds ) - end - - _tif( _args, "CDEF:%s_nnl=%s_avg,UN,0,%s_avg,IF", inst, inst, inst ) - end - - -- local helper: create cdefs depending on source options like flip and overlay - function __cdef(source) - - local prev - - -- find previous source, choose stack depending on flip state - if source.flip then - prev = _stack_neg[#_stack_neg] - else - prev = _stack_pos[#_stack_pos] - end - - -- is first source in stack or overlay source: source_stk = source_nnl - if not prev or source.overlay then - -- create cdef statement - _tif( _args, "CDEF:%s_stk=%s_nnl", source.sname, source.sname ) - - -- is subsequent source without overlay: source_stk = source_nnl + previous_stk - else - -- create cdef statement - _tif( _args, "CDEF:%s_stk=%s_nnl,%s_stk,+", source.sname, source.sname, prev ) - end - - -- create multiply by minus one cdef if flip is enabled - if source.flip then - - -- create cdef statement: source_stk = source_stk * -1 - _tif( _args, "CDEF:%s_neg=%s_stk,-1,*", source.sname, source.sname ) - - -- push to negative stack if overlay is disabled - if not source.overlay then - _ti( _stack_neg, source.sname ) - end - - -- no flipping, push to positive stack if overlay is disabled - elseif not source.overlay then - - -- push to positive stack - _ti( _stack_pos, source.sname ) - end - - -- calculate total amount of data if requested - if source.total then - _tif( _args, - "CDEF:%s_avg_sample=%s_avg,UN,0,%s_avg,IF,sample_len,*", - source.sname, source.sname, source.sname - ) - - _tif( _args, - "CDEF:%s_avg_sum=PREV,UN,0,PREV,IF,%s_avg_sample,+", - source.sname, source.sname, source.sname - ) - end - end - - -- local helper: create cdefs required for calculating total values - function __cdef_totals() - if _has_totals then - _tif( _args, "CDEF:mytime=%s_avg,TIME,TIME,IF", _sources[1].sname ) - _ti( _args, "CDEF:sample_len_raw=mytime,PREV(mytime),-" ) - _ti( _args, "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF" ) - end - end - - -- local helper: create line and area statements - function __line(source) - - local line_color - local area_color - local legend - local var - - -- find colors: try source, then opts.colors; fall back to random color - if type(source.color) == "string" then - line_color = source.color - area_color = self.colors:from_string( line_color ) - elseif type(opts.colors[source.name:gsub("[^%w]","_")]) == "string" then - line_color = opts.colors[source.name:gsub("[^%w]","_")] - area_color = self.colors:from_string( line_color ) - else - area_color = self.colors:random() - line_color = self.colors:to_string( area_color ) - end - - -- derive area background color from line color - area_color = self.colors:to_string( self.colors:faded( area_color ) ) - - -- choose source_stk or source_neg variable depending on flip state - if source.flip then - var = "neg" - else - var = "stk" - end - - -- create legend - legend = _sf( "%-" .. _longest_name .. "s", source.title ) - - -- create area if not disabled - if not source.noarea then - _tif( _args, "AREA:%s_%s#%s", source.sname, var, area_color ) - end - - -- create line1 statement - _tif( _args, "LINE1:%s_%s#%s:%s", source.sname, var, line_color, legend ) - end - - -- local helper: create gprint statements - function __gprint(source) - - local numfmt = opts.number_format or "%6.1lf" - local totfmt = opts.totals_format or "%5.1lf%s" - - -- don't include MIN if rrasingle is enabled - if not self.opts.rrasingle then - _tif( _args, "GPRINT:%s_min:MIN:\tMin\\: %s", source.sname, numfmt ) - end - - -- always include AVERAGE - _tif( _args, "GPRINT:%s_avg:AVERAGE:\tAvg\\: %s", source.sname, numfmt ) - - -- don't include MAX if rrasingle is enabled - if not self.opts.rrasingle then - _tif( _args, "GPRINT:%s_max:MAX:\tMax\\: %s", source.sname, numfmt ) - end - - -- include total count if requested else include LAST - if source.total then - _tif( _args, "GPRINT:%s_avg_sum:LAST:(ca. %s Total)\\l", source.sname, totfmt ) - else - _tif( _args, "GPRINT:%s_avg:LAST:\tLast\\: %s\\l", source.sname, numfmt ) - end - end - - - -- - -- find all data sources - -- - - -- find data types - local data_types - - if dtype then - data_types = { dtype } - else - data_types = opts.data.types or { } - end - - if not ( dtype or opts.data.types ) then - if opts.data.instances then - for k, v in pairs(opts.data.instances) do - _ti( data_types, k ) - end - elseif opts.data.sources then - for k, v in pairs(opts.data.sources) do - _ti( data_types, k ) - end - end - end - - - -- iterate over data types - for i, dtype in ipairs(data_types) do - - -- find instances - - local data_instances - - if not opts.per_instance then - if type(opts.data.instances) == "table" and type(opts.data.instances[dtype]) == "table" then - data_instances = opts.data.instances[dtype] - else - data_instances = self.tree:data_instances( plugin, plugin_instance, dtype ) - end - end - - if type(data_instances) ~= "table" or #data_instances == 0 then data_instances = { "" } end - - - -- iterate over data instances - for i, dinst in ipairs(data_instances) do - - -- construct combined data type / instance name - local dname = dtype - - if dinst:len() > 0 then - dname = dname .. "_" .. dinst - end - - - -- find sources - local data_sources = { "value" } - - if type(opts.data.sources) == "table" then - if type(opts.data.sources[dname]) == "table" then - data_sources = opts.data.sources[dname] - elseif type(opts.data.sources[dtype]) == "table" then - data_sources = opts.data.sources[dtype] - end - end - - - -- iterate over data sources - for i, dsource in ipairs(data_sources) do - - local dsname = dtype .. "_" .. dinst:gsub("[^%w]","_") .. "_" .. dsource - local altname = dtype .. "__" .. dsource - - -- find datasource options - local dopts = { } - - if type(opts.data.options) == "table" then - if type(opts.data.options[dsname]) == "table" then - dopts = opts.data.options[dsname] - elseif type(opts.data.options[altname]) == "table" then - dopts = opts.data.options[altname] - elseif type(opts.data.options[dname]) == "table" then - dopts = opts.data.options[dname] - elseif type(opts.data.options[dtype]) == "table" then - dopts = opts.data.options[dtype] - end - end - - - -- store values - _ti( _sources, { - rrd = dopts.rrd or self:mkrrdpath( plugin, plugin_instance, dtype, dinst ), - color = dopts.color or self.colors:to_string( self.colors:random() ), - flip = dopts.flip or false, - total = dopts.total or false, - overlay = dopts.overlay or false, - noarea = dopts.noarea or false, - ds = dsource, - type = dtype, - instance = dinst, - index = #_sources + 1, - sname = ( #_sources + 1 ) .. dtype - } ) - - - -- generate datasource title - _sources[#_sources].title = self.i18n:ds( _sources[#_sources] ) - - - -- find longest name ... - if _sources[#_sources].title:len() > _longest_name then - _longest_name = _sources[#_sources].title:len() - end - - - -- has totals? - if _sources[#_sources].total then - _has_totals = true - end - end - end - end - - - -- - -- construct diagrams - -- - - -- if per_instance is enabled then find all instances from the first datasource in diagram - -- if per_instance is disabled then use an empty pseudo instance and use model provided values - local instances = { "" } - - if opts.per_instance then - instances = self.tree:data_instances( plugin, plugin_instance, _sources[1].type ) - end - - - -- iterate over instances - for i, instance in ipairs(instances) do - - -- store title and vlabel - _ti( _args, "-t" ) - _ti( _args, opts.title or self.i18n:title( plugin, plugin_instance, _sources[1].type, instance ) ) - _ti( _args, "-v" ) - _ti( _args, opts.vlabel or self.i18n:label( plugin, plugin_instance, _sources[1].type, instance ) ) - - -- store additional rrd options - if opts.rrdopts then - for i, o in ipairs(opts.rrdopts) do _ti( _args, o ) end - end - - - -- create DEF statements for each instance - for i, source in ipairs(_sources) do - -- fixup properties for per instance mode... - if opts.per_instance then - source.instance = instance - source.rrd = self:mkrrdpath( plugin, plugin_instance, source.type, instance ) - end - - __def( source ) - end - - -- create CDEF required for calculating totals - __cdef_totals() - - -- create CDEF statements for each instance in reversed order - for i, source in ipairs(_sources) do - __cdef( _sources[1 + #_sources - i] ) - end - - -- create LINE1, AREA and GPRINT statements for each instance - for i, source in ipairs(_sources) do - __line( source ) - __gprint( source ) - end - - -- prepend image path to arg stack - _ti( _args, 1, self:mkpngpath( plugin, plugin_instance, index .. instance ) ) - - -- push arg stack to definition list - _ti( defs, _args ) - - -- reset stacks - _args = { } - _stack_pos = { } - _stack_neg = { } - end - - return defs -end - -function Graph.render( self, plugin, plugin_instance ) - - dtype_instances = dtype_instances or { "" } - local pngs = { } - - -- check for a whole graph handler - local plugin_def = "luci.statistics.rrdtool.definitions." .. plugin - local stat, def = luci.util.copcall( require, plugin_def ) - - if stat and def and type(def.rrdargs) == "function" then - - -- temporary image matrix - local _images = { } - - -- get diagram definitions - for i, opts in ipairs( self:_forcelol( def.rrdargs( self, plugin, plugin_instance ) ) ) do - - _images[i] = { } - - -- get diagram definition instances - local diagrams = self:_generic( opts, plugin, plugin_instance, nil, i ) - - -- render all diagrams - for j, def in ipairs( diagrams ) do - - -- remember image - _images[i][j] = def[1] - - -- exec - self:_rrdtool( def ) - end - end - - -- remember images - XXX: fixme (will cause probs with asymmetric data) - for y = 1, #_images[1] do - for x = 1, #_images do - table.insert( pngs, _images[x][y] ) - end - end - else - - -- no graph handler, iterate over data types - for i, dtype in ipairs( self.tree:data_types( plugin, plugin_instance ) ) do - - -- check for data type handler - local dtype_def = plugin_def .. "." .. dtype - local stat, def = luci.util.copcall( require, dtype_def ) - - if stat and def and type(def.rrdargs) == "function" then - - -- temporary image matrix - local _images = { } - - -- get diagram definitions - for i, opts in ipairs( self:_forcelol( def.rrdargs( self, plugin, plugin_instance, dtype ) ) ) do - - _images[i] = { } - - -- get diagram definition instances - local diagrams = self:_generic( opts, plugin, plugin_instance, dtype, i ) - - -- render all diagrams - for j, def in ipairs( diagrams ) do - - -- remember image - _images[i][j] = def[1] - - -- exec - self:_rrdtool( def ) - end - end - - -- remember images - XXX: fixme (will cause probs with asymmetric data) - for y = 1, #_images[1] do - for x = 1, #_images do - table.insert( pngs, _images[x][y] ) - end - end - else - - -- no data type handler, fall back to builtin definition - if type(self.defs.definitions[dtype]) == "table" then - - -- iterate over data type instances - for i, inst in ipairs( self.tree:data_instances( plugin, plugin_instance, dtype ) ) do - - local title = self.i18n:title( plugin, plugin_instance, dtype, inst ) - local label = self.i18n:label( plugin, plugin_instance, dtype, inst ) - local png = self:mkpngpath( plugin, plugin_instance, dtype, inst ) - local rrd = self:mkrrdpath( plugin, plugin_instance, dtype, inst ) - local args = { png, "-t", title, "-v", label } - - for i, o in ipairs(self.defs.definitions[dtype]) do - -- XXX: this is a somewhat ugly hack to exclude min/max RRAs when rrasingle is on - if not ( self.opts.rrasingle and ( o:match("_min") or o:match("_max") ) ) then - table.insert( args, o ) - end - end - - -- remember image - table.insert( pngs, png ) - - -- exec - self:_rrdtool( args, rrd ) - end - end - end - end - end - - return pngs -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/colors.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/colors.lua deleted file mode 100644 index e5fef17..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/colors.lua +++ /dev/null @@ -1,73 +0,0 @@ ---[[ - -Luci statistics - diagram color helper class -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: colors.lua 2829 2008-08-14 22:51:12Z Cyrus $ - -]]-- - -module("luci.statistics.rrdtool.colors", package.seeall) - -require("luci.util") - - -Instance = luci.util.class() - -function Instance.from_string( self, s ) - return { - tonumber(s:sub(1,2), 16), - tonumber(s:sub(3,4), 16), - tonumber(s:sub(5,6), 16) - } -end - -function Instance.to_string( self, c ) - return string.format( - "%02x%02x%02x", - math.floor(c[1]), - math.floor(c[2]), - math.floor(c[3]) - ) -end - -function Instance.random( self ) - local r = math.random(255) - local g = math.random(255) - local min = 0 - local max = 255 - - if ( r + g ) < 255 then - min = 255 - r - g - else - max = 511 - r - g - end - - local b = min + math.floor( math.random() * ( max - min ) ) - - return { r, g, b } -end - -function Instance.faded( self, fg, opts ) - opts = opts or {} - opts.background = opts.background or { 255, 255, 255 } - opts.alpha = opts.alpha or 0.25 - - if type(opts.background) == "string" then - opts.background = _string_to_color(opts.background) - end - - local bg = opts.background - - return { - ( opts.alpha * fg[1] ) + ( ( 1.0 - opts.alpha ) * bg[1] ), - ( opts.alpha * fg[2] ) + ( ( 1.0 - opts.alpha ) * bg[2] ), - ( opts.alpha * fg[3] ) + ( ( 1.0 - opts.alpha ) * bg[3] ) - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions.lua deleted file mode 100644 index 159fa7e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions.lua +++ /dev/null @@ -1,1123 +0,0 @@ ---[[ - -Luci statistics - data definition database (obsolete) -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: definitions.lua 3540 2008-10-08 15:59:10Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions", package.seeall) - -require("luci.util") -require("luci.fs") - - -Instance = luci.util.class() - -function Instance.__init__( self, ... ) - - -- used color palette - self.palette = { - Canvas = "FFFFFF", - FullRed = "FF0000", - FullGreen = "00E000", - FullBlue = "0000FF", - FullYellow = "F0A000", - FullCyan = "00A0FF", - FullMagenta = "A000FF", - HalfRed = "F7B7B7", - HalfGreen = "B7EFB7", - HalfBlue = "B7B7F7", - HalfYellow = "F3DFB7", - HalfCyan = "B7DFF7", - HalfMagenta = "DFB7F7", - HalfBlueGreen = "89B3C9" - } - - -- plotting arguments for each defined datasource - self.definitions = { - apache_bytes = { - "DEF:min_raw={file}:count:MIN", - "DEF:avg_raw={file}:count:AVERAGE", - "DEF:max_raw={file}:count:MAX", - "CDEF:min=min_raw,8,*", - "CDEF:avg=avg_raw,8,*", - "CDEF:max=max_raw,8,*", - "CDEF:mytime=avg_raw,TIME,TIME,IF", - "CDEF:sample_len_raw=mytime,PREV(mytime),-", - "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF", - "CDEF:avg_sample=avg_raw,UN,0,avg_raw,IF,sample_len,*", - "CDEF:avg_sum=PREV,UN,0,PREV,IF,avg_sample,+", - "AREA:avg#" .. self.palette.HalfBlue, - "LINE1:avg#" .. self.palette.FullBlue .. ":Bit/s", - "GPRINT:min:MIN:%5.1lf%s Min,", - "GPRINT:avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:max:MAX:%5.1lf%s Max,", - "GPRINT:avg:LAST:%5.1lf%s Last\\l", - "GPRINT:avg_sum:LAST:(ca. %5.1lf%sB Total)" - }, - - apache_requests = { - "DEF:min={file}:count:MIN", - "DEF:avg={file}:count:AVERAGE", - "DEF:max={file}:count:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Requests/s", - "GPRINT:min:MIN:%6.2lf Min,", - "GPRINT:avg:AVERAGE:%6.2lf Avg,", - "GPRINT:max:MAX:%6.2lf Max,", - "GPRINT:avg:LAST:%6.2lf Last\\l" - }, - - apache_scoreboard = { - "DEF:min={file}:count:MIN", - "DEF:avg={file}:count:AVERAGE", - "DEF:max={file}:count:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Processes", - "GPRINT:min:MIN:%6.2lf Min,", - "GPRINT:avg:AVERAGE:%6.2lf Avg,", - "GPRINT:max:MAX:%6.2lf Max,", - "GPRINT:avg:LAST:%6.2lf Last\\l" - }, - - bitrate = { - "-v", "Bits/s", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Bits/s", - "GPRINT:min:MIN:%5.1lf%s Min,", - "GPRINT:avg:AVERAGE:%5.1lf%s Average,", - "GPRINT:max:MAX:%5.1lf%s Max,", - "GPRINT:avg:LAST:%5.1lf%s Last\\l" - }, - - charge = { - "-v", "Ah", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Charge", - "GPRINT:min:MIN:%5.1lf%sAh Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sAh Avg,", - "GPRINT:max:MAX:%5.1lf%sAh Max,", - "GPRINT:avg:LAST:%5.1lf%sAh Last\\l" - }, - - current = { - "-v", "Ampere", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Current", - "GPRINT:min:MIN:%5.1lf%sA Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sA Avg,", - "GPRINT:max:MAX:%5.1lf%sA Max,", - "GPRINT:avg:LAST:%5.1lf%sA Last\\l" - }, - - disk = { - "DEF:rtime_avg={file}:rtime:AVERAGE", - "DEF:rtime_min={file}:rtime:MIN", - "DEF:rtime_max={file}:rtime:MAX", - "DEF:wtime_avg={file}:wtime:AVERAGE", - "DEF:wtime_min={file}:wtime:MIN", - "DEF:wtime_max={file}:wtime:MAX", - "CDEF:rtime_avg_ms=rtime_avg,1000,/", - "CDEF:rtime_min_ms=rtime_min,1000,/", - "CDEF:rtime_max_ms=rtime_max,1000,/", - "CDEF:wtime_avg_ms=wtime_avg,1000,/", - "CDEF:wtime_min_ms=wtime_min,1000,/", - "CDEF:wtime_max_ms=wtime_max,1000,/", - "CDEF:total_avg_ms=rtime_avg_ms,wtime_avg_ms,+", - "CDEF:total_min_ms=rtime_min_ms,wtime_min_ms,+", - "CDEF:total_max_ms=rtime_max_ms,wtime_max_ms,+", - "AREA:total_max_ms#" .. self.palette.HalfRed, - "AREA:total_min_ms#" .. self.palette.Canvas, - "LINE1:wtime_avg_ms#" .. self.palette.FullGreen .. ":Write", - "GPRINT:wtime_min_ms:MIN:%5.1lf%s Min,", - "GPRINT:wtime_avg_ms:AVERAGE:%5.1lf%s Avg,", - "GPRINT:wtime_max_ms:MAX:%5.1lf%s Max,", - "GPRINT:wtime_avg_ms:LAST:%5.1lf%s Last\n", - "LINE1:rtime_avg_ms#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:rtime_min_ms:MIN:%5.1lf%s Min,", - "GPRINT:rtime_avg_ms:AVERAGE:%5.1lf%s Avg,", - "GPRINT:rtime_max_ms:MAX:%5.1lf%s Max,", - "GPRINT:rtime_avg_ms:LAST:%5.1lf%s Last\n", - "LINE1:total_avg_ms#" .. self.palette.FullRed .. ":Total", - "GPRINT:total_min_ms:MIN:%5.1lf%s Min,", - "GPRINT:total_avg_ms:AVERAGE:%5.1lf%s Avg,", - "GPRINT:total_max_ms:MAX:%5.1lf%s Max,", - "GPRINT:total_avg_ms:LAST:%5.1lf%s Last\\l" - }, - - disk_octets = { - "-v", "Bytes/s", - "DEF:out_min={file}:write:MIN", - "DEF:out_avg={file}:write:AVERAGE", - "DEF:out_max={file}:write:MAX", - "DEF:inc_min={file}:read:MIN", - "DEF:inc_avg={file}:read:AVERAGE", - "DEF:inc_max={file}:read:MAX", - "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF", - "CDEF:mytime=out_avg,TIME,TIME,IF", - "CDEF:sample_len_raw=mytime,PREV(mytime),-", - "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF", - "CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*", - "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+", - "CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*", - "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+", - "AREA:out_avg#" .. self.palette.HalfGreen, - "AREA:inc_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:out_avg#" .. self.palette.FullGreen .. ":Written", - "GPRINT:out_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:out_max:MAX:%5.1lf%s Max,", - "GPRINT:out_avg:LAST:%5.1lf%s Last\\l", - "GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)", - "LINE1:inc_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:inc_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:inc_max:MAX:%5.1lf%s Max,", - "GPRINT:inc_avg:LAST:%5.1lf%s Last\\l", - "GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)" - }, - - disk_merged = { - "-v", "Merged Ops/s", - "DEF:out_min={file}:write:MIN", - "DEF:out_avg={file}:write:AVERAGE", - "DEF:out_max={file}:write:MAX", - "DEF:inc_min={file}:read:MIN", - "DEF:inc_avg={file}:read:AVERAGE", - "DEF:inc_max={file}:read:MAX", - "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF", - "AREA:out_avg#" .. self.palette.HalfGreen, - "AREA:inc_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:out_avg#" .. self.palette.FullGreen .. ":Written", - "GPRINT:out_avg:AVERAGE:%6.2lf Avg,", - "GPRINT:out_max:MAX:%6.2lf Max,", - "GPRINT:out_avg:LAST:%6.2lf Last\\l", - "LINE1:inc_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:inc_avg:AVERAGE:%6.2lf Avg,", - "GPRINT:inc_max:MAX:%6.2lf Max,", - "GPRINT:inc_avg:LAST:%6.2lf Last\\l" - }, - - disk_ops = { - "-v", "Ops/s", - "DEF:out_min={file}:write:MIN", - "DEF:out_avg={file}:write:AVERAGE", - "DEF:out_max={file}:write:MAX", - "DEF:inc_min={file}:read:MIN", - "DEF:inc_avg={file}:read:AVERAGE", - "DEF:inc_max={file}:read:MAX", - "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF", - "AREA:out_avg#" .. self.palette.HalfGreen, - "AREA:inc_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:out_avg#" .. self.palette.FullGreen .. ":Written", - "GPRINT:out_avg:AVERAGE:%6.2lf Avg,", - "GPRINT:out_max:MAX:%6.2lf Max,", - "GPRINT:out_avg:LAST:%6.2lf Last\\l", - "LINE1:inc_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:inc_avg:AVERAGE:%6.2lf Avg,", - "GPRINT:inc_max:MAX:%6.2lf Max,", - "GPRINT:inc_avg:LAST:%6.2lf Last\\l" - }, - - disk_time = { - "-v", "Seconds/s", - "DEF:out_min_raw={file}:write:MIN", - "DEF:out_avg_raw={file}:write:AVERAGE", - "DEF:out_max_raw={file}:write:MAX", - "DEF:inc_min_raw={file}:read:MIN", - "DEF:inc_avg_raw={file}:read:AVERAGE", - "DEF:inc_max_raw={file}:read:MAX", - "CDEF:out_min=out_min_raw,1000,/", - "CDEF:out_avg=out_avg_raw,1000,/", - "CDEF:out_max=out_max_raw,1000,/", - "CDEF:inc_min=inc_min_raw,1000,/", - "CDEF:inc_avg=inc_avg_raw,1000,/", - "CDEF:inc_max=inc_max_raw,1000,/", - "CDEF:overlap=out_avg,inc_avg,GT,inc_avg,out_avg,IF", - "AREA:out_avg#" .. self.palette.HalfGreen, - "AREA:inc_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:out_avg#" .. self.palette.FullGreen .. ":Written", - "GPRINT:out_avg:AVERAGE:%5.1lf%ss Avg,", - "GPRINT:out_max:MAX:%5.1lf%ss Max,", - "GPRINT:out_avg:LAST:%5.1lf%ss Last\\l", - "LINE1:inc_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:inc_avg:AVERAGE:%5.1lf%ss Avg,", - "GPRINT:inc_max:MAX:%5.1lf%ss Max,", - "GPRINT:inc_avg:LAST:%5.1lf%ss Last\\l" - }, - - dns_octets = { - "DEF:rsp_min_raw={file}:responses:MIN", - "DEF:rsp_avg_raw={file}:responses:AVERAGE", - "DEF:rsp_max_raw={file}:responses:MAX", - "DEF:qry_min_raw={file}:queries:MIN", - "DEF:qry_avg_raw={file}:queries:AVERAGE", - "DEF:qry_max_raw={file}:queries:MAX", - "CDEF:rsp_min=rsp_min_raw,8,*", - "CDEF:rsp_avg=rsp_avg_raw,8,*", - "CDEF:rsp_max=rsp_max_raw,8,*", - "CDEF:qry_min=qry_min_raw,8,*", - "CDEF:qry_avg=qry_avg_raw,8,*", - "CDEF:qry_max=qry_max_raw,8,*", - "CDEF:overlap=rsp_avg,qry_avg,GT,qry_avg,rsp_avg,IF", - "CDEF:mytime=rsp_avg_raw,TIME,TIME,IF", - "CDEF:sample_len_raw=mytime,PREV(mytime),-", - "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF", - "CDEF:rsp_avg_sample=rsp_avg_raw,UN,0,rsp_avg_raw,IF,sample_len,*", - "CDEF:rsp_avg_sum=PREV,UN,0,PREV,IF,rsp_avg_sample,+", - "CDEF:qry_avg_sample=qry_avg_raw,UN,0,qry_avg_raw,IF,sample_len,*", - "CDEF:qry_avg_sum=PREV,UN,0,PREV,IF,qry_avg_sample,+", - "AREA:rsp_avg#" .. self.palette.HalfGreen, - "AREA:qry_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:rsp_avg#" .. self.palette.FullGreen .. ":Responses", - "GPRINT:rsp_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:rsp_max:MAX:%5.1lf%s Max,", - "GPRINT:rsp_avg:LAST:%5.1lf%s Last", - "GPRINT:rsp_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l", - "LINE1:qry_avg#" .. self.palette.FullBlue .. ":Queries ", - "GPRINT:qry_min:MIN:%5.1lf %s Min,", - "GPRINT:qry_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:qry_max:MAX:%5.1lf%s Max,", - "GPRINT:qry_avg:LAST:%5.1lf%s Last", - "GPRINT:qry_avg_sum:LAST:(ca. %5.1lf%sB Total)\\l" - }, - - dns_opcode = { - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Queries/s", - "GPRINT:min:MIN:%9.3lf Min,", - "GPRINT:avg:AVERAGE:%9.3lf Average,", - "GPRINT:max:MAX:%9.3lf Max,", - "GPRINT:avg:LAST:%9.3lf Last\\l" - }, - - email_count = { - "-v", "Mails", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfMagenta, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullMagenta .. ":Count ", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - email_size = { - "-v", "Bytes", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfMagenta, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullMagenta .. ":Count ", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - spam_score = { - "-v", "Score", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Score ", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - spam_check = { - "DEF:avg={file}:hits:AVERAGE", - "DEF:min={file}:hits:MIN", - "DEF:max={file}:hits:MAX", - "AREA:max#" .. self.palette.HalfMagenta, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullMagenta .. ":Count ", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - entropy = { - "-v", "Bits", - "DEF:avg={file}:entropy:AVERAGE", - "DEF:min={file}:entropy:MIN", - "DEF:max={file}:entropy:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Bits", - "GPRINT:min:MIN:%4.0lfbit Min,", - "GPRINT:avg:AVERAGE:%4.0lfbit Avg,", - "GPRINT:max:MAX:%4.0lfbit Max,", - "GPRINT:avg:LAST:%4.0lfbit Last\\l" - }, - - fanspeed = { - "-v", "RPM", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfMagenta, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullMagenta .. ":RPM", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - frequency = { - "-v", "Hertz", - "DEF:avg={file}:frequency:AVERAGE", - "DEF:min={file}:frequency:MIN", - "DEF:max={file}:frequency:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Frequency [Hz]", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - frequency_offset = { - "DEF:ppm_avg={file}:ppm:AVERAGE", - "DEF:ppm_min={file}:ppm:MIN", - "DEF:ppm_max={file}:ppm:MAX", - "AREA:ppm_max#" .. self.palette.HalfBlue, - "AREA:ppm_min#" .. self.palette.Canvas, - "LINE1:ppm_avg#" .. self.palette.FullBlue .. ":{inst}", - "GPRINT:ppm_min:MIN:%5.2lf Min,", - "GPRINT:ppm_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:ppm_max:MAX:%5.2lf Max,", - "GPRINT:ppm_avg:LAST:%5.2lf Last\\l" - }, - - gauge = { - "-v", "Exec value", - "DEF:temp_avg={file}:value:AVERAGE", - "DEF:temp_min={file}:value:MIN", - "DEF:temp_max={file}:value:MAX", - "AREA:temp_max#" .. self.palette.HalfBlue, - "AREA:temp_min#" .. self.palette.Canvas, - "LINE1:temp_avg#" .. self.palette.FullBlue .. ":Exec value", - "GPRINT:temp_min:MIN:%6.2lf Min,", - "GPRINT:temp_avg:AVERAGE:%6.2lf Avg,", - "GPRINT:temp_max:MAX:%6.2lf Max,", - "GPRINT:temp_avg:LAST:%6.2lf Last\\l" - }, - - hddtemp = { - "DEF:temp_avg={file}:value:AVERAGE", - "DEF:temp_min={file}:value:MIN", - "DEF:temp_max={file}:value:MAX", - "AREA:temp_max#" .. self.palette.HalfRed, - "AREA:temp_min#" .. self.palette.Canvas, - "LINE1:temp_avg#" .. self.palette.FullRed .. ":Temperature", - "GPRINT:temp_min:MIN:%4.1lf Min,", - "GPRINT:temp_avg:AVERAGE:%4.1lf Avg,", - "GPRINT:temp_max:MAX:%4.1lf Max,", - "GPRINT:temp_avg:LAST:%4.1lf Last\\l" - }, - - humidity = { - "-v", "Percent", - "DEF:temp_avg={file}:value:AVERAGE", - "DEF:temp_min={file}:value:MIN", - "DEF:temp_max={file}:value:MAX", - "AREA:temp_max#" .. self.palette.HalfGreen, - "AREA:temp_min#" .. self.palette.Canvas, - "LINE1:temp_avg#" .. self.palette.FullGreen .. ":Temperature", - "GPRINT:temp_min:MIN:%4.1lf%% Min,", - "GPRINT:temp_avg:AVERAGE:%4.1lf%% Avg,", - "GPRINT:temp_max:MAX:%4.1lf%% Max,", - "GPRINT:temp_avg:LAST:%4.1lf%% Last\\l" - }, - - load = { - "-v", "System load", - "DEF:s_avg={file}:shortterm:AVERAGE", - "DEF:s_min={file}:shortterm:MIN", - "DEF:s_max={file}:shortterm:MAX", - "DEF:m_avg={file}:midterm:AVERAGE", - "DEF:m_min={file}:midterm:MIN", - "DEF:m_max={file}:midterm:MAX", - "DEF:l_avg={file}:longterm:AVERAGE", - "DEF:l_min={file}:longterm:MIN", - "DEF:l_max={file}:longterm:MAX", - "AREA:s_max#" .. self.palette.HalfGreen, - "AREA:s_min#" .. self.palette.Canvas, - "LINE1:s_avg#" .. self.palette.FullGreen .. ": 1m average", - "GPRINT:s_min:MIN:%4.2lf Min,", - "GPRINT:s_avg:AVERAGE:%4.2lf Avg,", - "GPRINT:s_max:MAX:%4.2lf Max,", - "GPRINT:s_avg:LAST:%4.2lf Last\n", - "LINE1:m_avg#" .. self.palette.FullBlue .. ": 5m average", - "GPRINT:m_min:MIN:%4.2lf Min,", - "GPRINT:m_avg:AVERAGE:%4.2lf Avg,", - "GPRINT:m_max:MAX:%4.2lf Max,", - "GPRINT:m_avg:LAST:%4.2lf Last\n", - "LINE1:l_avg#" .. self.palette.FullRed .. ":15m average", - "GPRINT:l_min:MIN:%4.2lf Min,", - "GPRINT:l_avg:AVERAGE:%4.2lf Avg,", - "GPRINT:l_max:MAX:%4.2lf Max,", - "GPRINT:l_avg:LAST:%4.2lf Last\\l" - }, - - load_percent = { - "DEF:avg={file}:percent:AVERAGE", - "DEF:min={file}:percent:MIN", - "DEF:max={file}:percent:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Load", - "GPRINT:min:MIN:%5.1lf%s%% Min,", - "GPRINT:avg:AVERAGE:%5.1lf%s%% Avg,", - "GPRINT:max:MAX:%5.1lf%s%% Max,", - "GPRINT:avg:LAST:%5.1lf%s%% Last\\l" - }, - - mails = { - "DEF:rawgood={file}:good:AVERAGE", - "DEF:rawspam={file}:spam:AVERAGE", - "CDEF:good=rawgood,UN,0,rawgood,IF", - "CDEF:spam=rawspam,UN,0,rawspam,IF", - "CDEF:negspam=spam,-1,*", - "AREA:good#" .. self.palette.HalfGreen, - "LINE1:good#" .. self.palette.FullGreen .. ":Good mails", - "GPRINT:good:AVERAGE:%4.1lf Avg,", - "GPRINT:good:MAX:%4.1lf Max,", - "GPRINT:good:LAST:%4.1lf Last\n", - "AREA:negspam#" .. self.palette.HalfRed, - "LINE1:negspam#" .. self.palette.FullRed .. ":Spam mails", - "GPRINT:spam:AVERAGE:%4.1lf Avg,", - "GPRINT:spam:MAX:%4.1lf Max,", - "GPRINT:spam:LAST:%4.1lf Last\\l", - "HRULE:0#000000" - }, - - memory = { - "-b", "1024", "-v", "Bytes", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Memory", - "GPRINT:min:MIN:%5.1lf%sbyte Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sbyte Avg,", - "GPRINT:max:MAX:%5.1lf%sbyte Max,", - "GPRINT:avg:LAST:%5.1lf%sbyte Last\\l" - }, - - old_memory = { - "DEF:used_avg={file}:used:AVERAGE", - "DEF:free_avg={file}:free:AVERAGE", - "DEF:buffers_avg={file}:buffers:AVERAGE", - "DEF:cached_avg={file}:cached:AVERAGE", - "DEF:used_min={file}:used:MIN", - "DEF:free_min={file}:free:MIN", - "DEF:buffers_min={file}:buffers:MIN", - "DEF:cached_min={file}:cached:MIN", - "DEF:used_max={file}:used:MAX", - "DEF:free_max={file}:free:MAX", - "DEF:buffers_max={file}:buffers:MAX", - "DEF:cached_max={file}:cached:MAX", - "CDEF:cached_avg_nn=cached_avg,UN,0,cached_avg,IF", - "CDEF:buffers_avg_nn=buffers_avg,UN,0,buffers_avg,IF", - "CDEF:free_cached_buffers_used=free_avg,cached_avg_nn,+,buffers_avg_nn,+,used_avg,+", - "CDEF:cached_buffers_used=cached_avg,buffers_avg_nn,+,used_avg,+", - "CDEF:buffers_used=buffers_avg,used_avg,+", - "AREA:free_cached_buffers_used#" .. self.palette.HalfGreen, - "AREA:cached_buffers_used#" .. self.palette.HalfBlue, - "AREA:buffers_used#" .. self.palette.HalfYellow, - "AREA:used_avg#" .. self.palette.HalfRed, - "LINE1:free_cached_buffers_used#" .. self.palette.FullGreen .. ":Free ", - "GPRINT:free_min:MIN:%5.1lf%s Min,", - "GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:free_max:MAX:%5.1lf%s Max,", - "GPRINT:free_avg:LAST:%5.1lf%s Last\n", - "LINE1:cached_buffers_used#" .. self.palette.FullBlue .. ":Page cache ", - "GPRINT:cached_min:MIN:%5.1lf%s Min,", - "GPRINT:cached_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:cached_max:MAX:%5.1lf%s Max,", - "GPRINT:cached_avg:LAST:%5.1lf%s Last\n", - "LINE1:buffers_used#" .. self.palette.FullYellow .. ":Buffer cache", - "GPRINT:buffers_min:MIN:%5.1lf%s Min,", - "GPRINT:buffers_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:buffers_max:MAX:%5.1lf%s Max,", - "GPRINT:buffers_avg:LAST:%5.1lf%s Last\n", - "LINE1:used_avg#" .. self.palette.FullRed .. ":Used ", - "GPRINT:used_min:MIN:%5.1lf%s Min,", - "GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:used_max:MAX:%5.1lf%s Max,", - "GPRINT:used_avg:LAST:%5.1lf%s Last\\l" - }, - - mysql_commands = { - "-v", "Issues/s", - "DEF:val_avg={file}:value:AVERAGE", - "DEF:val_min={file}:value:MIN", - "DEF:val_max={file}:value:MAX", - "AREA:val_max#" .. self.palette.HalfBlue, - "AREA:val_min#" .. self.palette.Canvas, - "LINE1:val_avg#" .. self.palette.FullBlue .. ":Issues/s", - "GPRINT:val_min:MIN:%5.2lf Min,", - "GPRINT:val_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:val_max:MAX:%5.2lf Max,", - "GPRINT:val_avg:LAST:%5.2lf Last\\l" - }, - - mysql_handler = { - "-v", "Issues/s", - "DEF:val_avg={file}:value:AVERAGE", - "DEF:val_min={file}:value:MIN", - "DEF:val_max={file}:value:MAX", - "AREA:val_max#" .. self.palette.HalfBlue, - "AREA:val_min#" .. self.palette.Canvas, - "LINE1:val_avg#" .. self.palette.FullBlue .. ":Issues/s", - "GPRINT:val_min:MIN:%5.2lf Min,", - "GPRINT:val_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:val_max:MAX:%5.2lf Max,", - "GPRINT:val_avg:LAST:%5.2lf Last\\l" - }, - - mysql_octets = { - "-v", "Bits/s", - "DEF:out_min={file}:tx:MIN", - "DEF:out_avg={file}:tx:AVERAGE", - "DEF:out_max={file}:tx:MAX", - "DEF:inc_min={file}:rx:MIN", - "DEF:inc_avg={file}:rx:AVERAGE", - "DEF:inc_max={file}:rx:MAX", - "CDEF:mytime=out_avg,TIME,TIME,IF", - "CDEF:sample_len_raw=mytime,PREV(mytime),-", - "CDEF:sample_len=sample_len_raw,UN,0,sample_len_raw,IF", - "CDEF:out_avg_sample=out_avg,UN,0,out_avg,IF,sample_len,*", - "CDEF:out_avg_sum=PREV,UN,0,PREV,IF,out_avg_sample,+", - "CDEF:inc_avg_sample=inc_avg,UN,0,inc_avg,IF,sample_len,*", - "CDEF:inc_avg_sum=PREV,UN,0,PREV,IF,inc_avg_sample,+", - "CDEF:out_bit_min=out_min,8,*", - "CDEF:out_bit_avg=out_avg,8,*", - "CDEF:out_bit_max=out_max,8,*", - "CDEF:inc_bit_min=inc_min,8,*", - "CDEF:inc_bit_avg=inc_avg,8,*", - "CDEF:inc_bit_max=inc_max,8,*", - "CDEF:overlap=out_bit_avg,inc_bit_avg,GT,inc_bit_avg,out_bit_avg,IF", - "AREA:out_bit_avg#" .. self.palette.HalfGreen, - "AREA:inc_bit_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:out_bit_avg#" .. self.palette.FullGreen .. ":Written", - "GPRINT:out_bit_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:out_bit_max:MAX:%5.1lf%s Max,", - "GPRINT:out_bit_avg:LAST:%5.1lf%s Last\\l", - "GPRINT:out_avg_sum:LAST:(ca. %5.1lf%sB Total)", - "LINE1:inc_bit_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:inc_bit_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:inc_bit_max:MAX:%5.1lf%s Max,", - "GPRINT:inc_bit_avg:LAST:%5.1lf%s Last\\l", - "GPRINT:inc_avg_sum:LAST:(ca. %5.1lf%sB Total)" - }, - - mysql_qcache = { - "-v", "Queries/s", - "DEF:hits_min={file}:hits:MIN", - "DEF:hits_avg={file}:hits:AVERAGE", - "DEF:hits_max={file}:hits:MAX", - "DEF:inserts_min={file}:inserts:MIN", - "DEF:inserts_avg={file}:inserts:AVERAGE", - "DEF:inserts_max={file}:inserts:MAX", - "DEF:not_cached_min={file}:not_cached:MIN", - "DEF:not_cached_avg={file}:not_cached:AVERAGE", - "DEF:not_cached_max={file}:not_cached:MAX", - "DEF:lowmem_prunes_min={file}:lowmem_prunes:MIN", - "DEF:lowmem_prunes_avg={file}:lowmem_prunes:AVERAGE", - "DEF:lowmem_prunes_max={file}:lowmem_prunes:MAX", - "DEF:queries_min={file}:queries_in_cache:MIN", - "DEF:queries_avg={file}:queries_in_cache:AVERAGE", - "DEF:queries_max={file}:queries_in_cache:MAX", - "CDEF:unknown=queries_avg,UNKN,+", - "CDEF:not_cached_agg=hits_avg,inserts_avg,+,not_cached_avg,+", - "CDEF:inserts_agg=hits_avg,inserts_avg,+", - "CDEF:hits_agg=hits_avg", - "AREA:not_cached_agg#" .. self.palette.HalfYellow, - "AREA:inserts_agg#" .. self.palette.HalfBlue, - "AREA:hits_agg#" .. self.palette.HalfGreen, - "LINE1:not_cached_agg#" .. self.palette.FullYellow .. ":Not Cached ", - "GPRINT:not_cached_min:MIN:%5.2lf Min,", - "GPRINT:not_cached_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:not_cached_max:MAX:%5.2lf Max,", - "GPRINT:not_cached_avg:LAST:%5.2lf Last\\l", - "LINE1:inserts_agg#" .. self.palette.FullBlue .. ":Inserts ", - "GPRINT:inserts_min:MIN:%5.2lf Min,", - "GPRINT:inserts_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:inserts_max:MAX:%5.2lf Max,", - "GPRINT:inserts_avg:LAST:%5.2lf Last\\l", - "LINE1:hits_agg#" .. self.palette.FullGreen .. ":Hits ", - "GPRINT:hits_min:MIN:%5.2lf Min,", - "GPRINT:hits_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:hits_max:MAX:%5.2lf Max,", - "GPRINT:hits_avg:LAST:%5.2lf Last\\l", - "LINE1:lowmem_prunes_avg#" .. self.palette.FullRed .. ":Lowmem Prunes ", - "GPRINT:lowmem_prunes_min:MIN:%5.2lf Min,", - "GPRINT:lowmem_prunes_avg:AVERAGE:%5.2lf Avg,", - "GPRINT:lowmem_prunes_max:MAX:%5.2lf Max,", - "GPRINT:lowmem_prunes_avg:LAST:%5.2lf Last\\l", - "LINE1:unknown#" .. self.palette.Canvas .. ":Queries in cache", - "GPRINT:queries_min:MIN:%5.0lf Min,", - "GPRINT:queries_avg:AVERAGE:%5.0lf Avg,", - "GPRINT:queries_max:MAX:%5.0lf Max,", - "GPRINT:queries_avg:LAST:%5.0lf Last\\l" - }, - - mysql_threads = { - "-v", "Threads", - "DEF:running_min={file}:running:MIN", - "DEF:running_avg={file}:running:AVERAGE", - "DEF:running_max={file}:running:MAX", - "DEF:connected_min={file}:connected:MIN", - "DEF:connected_avg={file}:connected:AVERAGE", - "DEF:connected_max={file}:connected:MAX", - "DEF:cached_min={file}:cached:MIN", - "DEF:cached_avg={file}:cached:AVERAGE", - "DEF:cached_max={file}:cached:MAX", - "DEF:created_min={file}:created:MIN", - "DEF:created_avg={file}:created:AVERAGE", - "DEF:created_max={file}:created:MAX", - "CDEF:unknown=created_avg,UNKN,+", - "CDEF:cached_agg=connected_avg,cached_avg,+", - "AREA:cached_agg#" .. self.palette.HalfGreen, - "AREA:connected_avg#" .. self.palette.HalfBlue, - "AREA:running_avg#" .. self.palette.HalfRed, - "LINE1:cached_agg#" .. self.palette.FullGreen .. ":Cached ", - "GPRINT:cached_min:MIN:%5.1lf Min,", - "GPRINT:cached_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:cached_max:MAX:%5.1lf Max,", - "GPRINT:cached_avg:LAST:%5.1lf Last\\l", - "LINE1:connected_avg#" .. self.palette.FullBlue .. ":Connected", - "GPRINT:connected_min:MIN:%5.1lf Min,", - "GPRINT:connected_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:connected_max:MAX:%5.1lf Max,", - "GPRINT:connected_avg:LAST:%5.1lf Last\\l", - "LINE1:running_avg#" .. self.palette.FullRed .. ":Running ", - "GPRINT:running_min:MIN:%5.1lf Min,", - "GPRINT:running_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:running_max:MAX:%5.1lf Max,", - "GPRINT:running_avg:LAST:%5.1lf Last\\l", - "LINE1:unknown#" .. self.palette.Canvas .. ":Created ", - "GPRINT:created_min:MIN:%5.0lf Min,", - "GPRINT:created_avg:AVERAGE:%5.0lf Avg,", - "GPRINT:created_max:MAX:%5.0lf Max,", - "GPRINT:created_avg:LAST:%5.0lf Last\\l" - }, - - nfs_procedure = { - "-v", "Issues/s", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Issues/s", - "GPRINT:min:MIN:%6.2lf Min,", - "GPRINT:avg:AVERAGE:%6.2lf Avg,", - "GPRINT:max:MAX:%6.2lf Max,", - "GPRINT:avg:LAST:%6.2lf Last\\l" - }, - - nfs3_procedures = { - "DEF:null_avg={file}:null:AVERAGE", - "DEF:getattr_avg={file}:getattr:AVERAGE", - "DEF:setattr_avg={file}:setattr:AVERAGE", - "DEF:lookup_avg={file}:lookup:AVERAGE", - "DEF:access_avg={file}:access:AVERAGE", - "DEF:readlink_avg={file}:readlink:AVERAGE", - "DEF:read_avg={file}:read:AVERAGE", - "DEF:write_avg={file}:write:AVERAGE", - "DEF:create_avg={file}:create:AVERAGE", - "DEF:mkdir_avg={file}:mkdir:AVERAGE", - "DEF:symlink_avg={file}:symlink:AVERAGE", - "DEF:mknod_avg={file}:mknod:AVERAGE", - "DEF:remove_avg={file}:remove:AVERAGE", - "DEF:rmdir_avg={file}:rmdir:AVERAGE", - "DEF:rename_avg={file}:rename:AVERAGE", - "DEF:link_avg={file}:link:AVERAGE", - "DEF:readdir_avg={file}:readdir:AVERAGE", - "DEF:readdirplus_avg={file}:readdirplus:AVERAGE", - "DEF:fsstat_avg={file}:fsstat:AVERAGE", - "DEF:fsinfo_avg={file}:fsinfo:AVERAGE", - "DEF:pathconf_avg={file}:pathconf:AVERAGE", - "DEF:commit_avg={file}:commit:AVERAGE", - "DEF:null_max={file}:null:MAX", - "DEF:getattr_max={file}:getattr:MAX", - "DEF:setattr_max={file}:setattr:MAX", - "DEF:lookup_max={file}:lookup:MAX", - "DEF:access_max={file}:access:MAX", - "DEF:readlink_max={file}:readlink:MAX", - "DEF:read_max={file}:read:MAX", - "DEF:write_max={file}:write:MAX", - "DEF:create_max={file}:create:MAX", - "DEF:mkdir_max={file}:mkdir:MAX", - "DEF:symlink_max={file}:symlink:MAX", - "DEF:mknod_max={file}:mknod:MAX", - "DEF:remove_max={file}:remove:MAX", - "DEF:rmdir_max={file}:rmdir:MAX", - "DEF:rename_max={file}:rename:MAX", - "DEF:link_max={file}:link:MAX", - "DEF:readdir_max={file}:readdir:MAX", - "DEF:readdirplus_max={file}:readdirplus:MAX", - "DEF:fsstat_max={file}:fsstat:MAX", - "DEF:fsinfo_max={file}:fsinfo:MAX", - "DEF:pathconf_max={file}:pathconf:MAX", - "DEF:commit_max={file}:commit:MAX", - "CDEF:other_avg=null_avg,readlink_avg,create_avg,mkdir_avg,symlink_avg,mknod_avg,remove_avg,rmdir_avg,rename_avg,link_avg,readdir_avg,readdirplus_avg,fsstat_avg,fsinfo_avg,pathconf_avg,+,+,+,+,+,+,+,+,+,+,+,+,+,+", - "CDEF:other_max=null_max,readlink_max,create_max,mkdir_max,symlink_max,mknod_max,remove_max,rmdir_max,rename_max,link_max,readdir_max,readdirplus_max,fsstat_max,fsinfo_max,pathconf_max,+,+,+,+,+,+,+,+,+,+,+,+,+,+", - "CDEF:stack_read=read_avg", - "CDEF:stack_getattr=stack_read,getattr_avg,+", - "CDEF:stack_access=stack_getattr,access_avg,+", - "CDEF:stack_lookup=stack_access,lookup_avg,+", - "CDEF:stack_write=stack_lookup,write_avg,+", - "CDEF:stack_commit=stack_write,commit_avg,+", - "CDEF:stack_setattr=stack_commit,setattr_avg,+", - "CDEF:stack_other=stack_setattr,other_avg,+", - "AREA:stack_other#" .. self.palette.HalfRed, - "AREA:stack_setattr#" .. self.palette.HalfGreen, - "AREA:stack_commit#" .. self.palette.HalfYellow, - "AREA:stack_write#" .. self.palette.HalfGreen, - "AREA:stack_lookup#" .. self.palette.HalfBlue, - "AREA:stack_access#" .. self.palette.HalfMagenta, - "AREA:stack_getattr#" .. self.palette.HalfCyan, - "AREA:stack_read#" .. self.palette.HalfBlue, - "LINE1:stack_other#" .. self.palette.FullRed .. ":Other ", - "GPRINT:other_max:MAX:%5.1lf Max,", - "GPRINT:other_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:other_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_setattr#" .. self.palette.FullGreen .. ":setattr", - "GPRINT:setattr_max:MAX:%5.1lf Max,", - "GPRINT:setattr_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:setattr_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_commit#" .. self.palette.FullYellow .. ":commit ", - "GPRINT:commit_max:MAX:%5.1lf Max,", - "GPRINT:commit_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:commit_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_write#" .. self.palette.FullGreen .. ":write ", - "GPRINT:write_max:MAX:%5.1lf Max,", - "GPRINT:write_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:write_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_lookup#" .. self.palette.FullBlue .. ":lookup ", - "GPRINT:lookup_max:MAX:%5.1lf Max,", - "GPRINT:lookup_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:lookup_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_access#" .. self.palette.FullMagenta .. ":access ", - "GPRINT:access_max:MAX:%5.1lf Max,", - "GPRINT:access_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:access_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_getattr#" .. self.palette.FullCyan .. ":getattr", - "GPRINT:getattr_max:MAX:%5.1lf Max,", - "GPRINT:getattr_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:getattr_avg:LAST:%5.1lf Last\\l", - "LINE1:stack_read#" .. self.palette.FullBlue .. ":read ", - "GPRINT:read_max:MAX:%5.1lf Max,", - "GPRINT:read_avg:AVERAGE:%5.1lf Avg,", - "GPRINT:read_avg:LAST:%5.1lf Last\\l" - }, - - partition = { - "DEF:rbyte_avg={file}:rbytes:AVERAGE", - "DEF:rbyte_min={file}:rbytes:MIN", - "DEF:rbyte_max={file}:rbytes:MAX", - "DEF:wbyte_avg={file}:wbytes:AVERAGE", - "DEF:wbyte_min={file}:wbytes:MIN", - "DEF:wbyte_max={file}:wbytes:MAX", - "CDEF:overlap=wbyte_avg,rbyte_avg,GT,rbyte_avg,wbyte_avg,IF", - "AREA:wbyte_avg#" .. self.palette.HalfGreen, - "AREA:rbyte_avg#" .. self.palette.HalfBlue, - "AREA:overlap#" .. self.palette.HalfBlueGreen, - "LINE1:wbyte_avg#" .. self.palette.FullGreen .. ":Write", - "GPRINT:wbyte_min:MIN:%5.1lf%s Min,", - "GPRINT:wbyte_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:wbyte_max:MAX:%5.1lf%s Max,", - "GPRINT:wbyte_avg:LAST:%5.1lf%s Last\\l", - "LINE1:rbyte_avg#" .. self.palette.FullBlue .. ":Read ", - "GPRINT:rbyte_min:MIN:%5.1lf%s Min,", - "GPRINT:rbyte_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:rbyte_max:MAX:%5.1lf%s Max,", - "GPRINT:rbyte_avg:LAST:%5.1lf%s Last\\l" - }, - - percent = { - "-v", "Percent", - "DEF:avg={file}:percent:AVERAGE", - "DEF:min={file}:percent:MIN", - "DEF:max={file}:percent:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Percent", - "GPRINT:min:MIN:%5.1lf%% Min,", - "GPRINT:avg:AVERAGE:%5.1lf%% Avg,", - "GPRINT:max:MAX:%5.1lf%% Max,", - "GPRINT:avg:LAST:%5.1lf%% Last\\l" - }, - - power = { - "-v", "Watt", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Watt", - "GPRINT:min:MIN:%5.1lf%sW Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sW Avg,", - "GPRINT:max:MAX:%5.1lf%sW Max,", - "GPRINT:avg:LAST:%5.1lf%sW Last\\l" - }, - - swap = { - "-v", "Bytes", "-b", "1024", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Bytes", - "GPRINT:min:MIN:%6.2lf%sByte Min,", - "GPRINT:avg:AVERAGE:%6.2lf%sByte Avg,", - "GPRINT:max:MAX:%6.2lf%sByte Max,", - "GPRINT:avg:LAST:%6.2lf%sByte Last\\l" - }, - - old_swap = { - "DEF:used_avg={file}:used:AVERAGE", - "DEF:used_min={file}:used:MIN", - "DEF:used_max={file}:used:MAX", - "DEF:free_avg={file}:free:AVERAGE", - "DEF:free_min={file}:free:MIN", - "DEF:free_max={file}:free:MAX", - "DEF:cach_avg={file}:cached:AVERAGE", - "DEF:cach_min={file}:cached:MIN", - "DEF:cach_max={file}:cached:MAX", - "DEF:resv_avg={file}:resv:AVERAGE", - "DEF:resv_min={file}:resv:MIN", - "DEF:resv_max={file}:resv:MAX", - "CDEF:cach_avg_notnull=cach_avg,UN,0,cach_avg,IF", - "CDEF:resv_avg_notnull=resv_avg,UN,0,resv_avg,IF", - "CDEF:used_acc=used_avg", - "CDEF:resv_acc=used_acc,resv_avg_notnull,+", - "CDEF:cach_acc=resv_acc,cach_avg_notnull,+", - "CDEF:free_acc=cach_acc,free_avg,+", - "AREA:free_acc#" .. self.palette.HalfGreen, - "AREA:cach_acc#" .. self.palette.HalfBlue, - "AREA:resv_acc#" .. self.palette.HalfYellow, - "AREA:used_acc#" .. self.palette.HalfRed, - "LINE1:free_acc#" .. self.palette.FullGreen .. ":Free ", - "GPRINT:free_min:MIN:%5.1lf%s Min,", - "GPRINT:free_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:free_max:MAX:%5.1lf%s Max,", - "GPRINT:free_avg:LAST:%5.1lf%s Last\n", - "LINE1:cach_acc#" .. self.palette.FullBlue .. ":Cached ", - "GPRINT:cach_min:MIN:%5.1lf%s Min,", - "GPRINT:cach_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:cach_max:MAX:%5.1lf%s Max,", - "GPRINT:cach_avg:LAST:%5.1lf%s Last\\l", - "LINE1:resv_acc#" .. self.palette.FullYellow .. ":Reserved", - "GPRINT:resv_min:MIN:%5.1lf%s Min,", - "GPRINT:resv_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:resv_max:MAX:%5.1lf%s Max,", - "GPRINT:resv_avg:LAST:%5.1lf%s Last\n", - "LINE1:used_acc#" .. self.palette.FullRed .. ":Used ", - "GPRINT:used_min:MIN:%5.1lf%s Min,", - "GPRINT:used_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:used_max:MAX:%5.1lf%s Max,", - "GPRINT:used_avg:LAST:%5.1lf%s Last\\l" - }, - - tcp_connections = { - "-v", "Connections", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Connections", - "GPRINT:min:MIN:%4.1lf Min,", - "GPRINT:avg:AVERAGE:%4.1lf Avg,", - "GPRINT:max:MAX:%4.1lf Max,", - "GPRINT:avg:LAST:%4.1lf Last\\l" - }, - - temperature = { - "-v", "Celsius", - "DEF:temp_avg={file}:value:AVERAGE", - "DEF:temp_min={file}:value:MIN", - "DEF:temp_max={file}:value:MAX", - "CDEF:average=temp_avg,0.2,*,PREV,UN,temp_avg,PREV,IF,0.8,*,+", - "AREA:temp_max#" .. self.palette.HalfRed, - "AREA:temp_min#" .. self.palette.Canvas, - "LINE1:temp_avg#" .. self.palette.FullRed .. ":Temperature", - "GPRINT:temp_min:MIN:%4.1lf Min,", - "GPRINT:temp_avg:AVERAGE:%4.1lf Avg,", - "GPRINT:temp_max:MAX:%4.1lf Max,", - "GPRINT:temp_avg:LAST:%4.1lf Last\\l" - }, - - timeleft = { - "-v", "Minutes", - "DEF:avg={file}:timeleft:AVERAGE", - "DEF:min={file}:timeleft:MIN", - "DEF:max={file}:timeleft:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Time left [min]", - "GPRINT:min:MIN:%5.1lf%s Min,", - "GPRINT:avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:max:MAX:%5.1lf%s Max,", - "GPRINT:avg:LAST:%5.1lf%s Last\\l" - }, - - time_offset = { - "DEF:s_avg={file}:seconds:AVERAGE", - "DEF:s_min={file}:seconds:MIN", - "DEF:s_max={file}:seconds:MAX", - "AREA:s_max#" .. self.palette.HalfBlue, - "AREA:s_min#" .. self.palette.Canvas, - "LINE1:s_avg#" .. self.palette.FullBlue .. ":{inst}", - "GPRINT:s_min:MIN:%7.3lf%s Min,", - "GPRINT:s_avg:AVERAGE:%7.3lf%s Avg,", - "GPRINT:s_max:MAX:%7.3lf%s Max,", - "GPRINT:s_avg:LAST:%7.3lf%s Last\\l" - }, - - cpufreq = { - "DEF:cpufreq_avg={file}:value:AVERAGE", - "DEF:cpufreq_min={file}:value:MIN", - "DEF:cpufreq_max={file}:value:MAX", - "AREA:cpufreq_max#" .. self.palette.HalfBlue, - "AREA:cpufreq_min#" .. self.palette.Canvas, - "LINE1:cpufreq_avg#" .. self.palette.FullBlue .. ":Frequency", - "GPRINT:cpufreq_min:MIN:%5.1lf%s Min,", - "GPRINT:cpufreq_avg:AVERAGE:%5.1lf%s Avg,", - "GPRINT:cpufreq_max:MAX:%5.1lf%s Max,", - "GPRINT:cpufreq_avg:LAST:%5.1lf%s Last\\l" - }, - - multimeter = { - "DEF:multimeter_avg={file}:value:AVERAGE", - "DEF:multimeter_min={file}:value:MIN", - "DEF:multimeter_max={file}:value:MAX", - "AREA:multimeter_max#" .. self.palette.HalfBlue, - "AREA:multimeter_min#" .. self.palette.Canvas, - "LINE1:multimeter_avg#" .. self.palette.FullBlue .. ":Multimeter", - "GPRINT:multimeter_min:MIN:%4.1lf Min,", - "GPRINT:multimeter_avg:AVERAGE:%4.1lf Average,", - "GPRINT:multimeter_max:MAX:%4.1lf Max,", - "GPRINT:multimeter_avg:LAST:%4.1lf Last\\l" - }, - - users = { - "-v", "Users", - "DEF:users_avg={file}:users:AVERAGE", - "DEF:users_min={file}:users:MIN", - "DEF:users_max={file}:users:MAX", - "AREA:users_max#" .. self.palette.HalfBlue, - "AREA:users_min#" .. self.palette.Canvas, - "LINE1:users_avg#" .. self.palette.FullBlue .. ":Users", - "GPRINT:users_min:MIN:%4.1lf Min,", - "GPRINT:users_avg:AVERAGE:%4.1lf Average,", - "GPRINT:users_max:MAX:%4.1lf Max,", - "GPRINT:users_avg:LAST:%4.1lf Last\\l" - }, - - voltage = { - "-v", "Voltage", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Voltage", - "GPRINT:min:MIN:%5.1lf%sV Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sV Avg,", - "GPRINT:max:MAX:%5.1lf%sV Max,", - "GPRINT:avg:LAST:%5.1lf%sV Last\\l" - }, - - vs_threads = { - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Threads", - "GPRINT:min:MIN:%5.1lf Min,", - "GPRINT:avg:AVERAGE:%5.1lf Avg.,", - "GPRINT:max:MAX:%5.1lf Max,", - "GPRINT:avg:LAST:%5.1lf Last\\l", - }, - - vs_memory = { - "-b", "1024", "-v", "Bytes", - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":", - "GPRINT:min:MIN:%5.1lf%sbytes Min,", - "GPRINT:avg:AVERAGE:%5.1lf%sbytes Avg.,", - "GPRINT:max:MAX:%5.1lf%sbytes Max,", - "GPRINT:avg:LAST:%5.1lf%sbytes Last\\l", - }, - - vs_processes = { - "DEF:avg={file}:value:AVERAGE", - "DEF:min={file}:value:MIN", - "DEF:max={file}:value:MAX", - "AREA:max#" .. self.palette.HalfBlue, - "AREA:min#" .. self.palette.Canvas, - "LINE1:avg#" .. self.palette.FullBlue .. ":Processes", - "GPRINT:min:MIN:%5.1lf Min,", - "GPRINT:avg:AVERAGE:%5.1lf Avg.,", - "GPRINT:max:MAX:%5.1lf Max,", - "GPRINT:avg:LAST:%5.1lf Last\\l", - }, - } -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/cpu/cpu.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/cpu/cpu.lua deleted file mode 100644 index aca3fb7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/cpu/cpu.lua +++ /dev/null @@ -1,38 +0,0 @@ ---[[ - -Luci statistics - cpu plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: cpu.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.cpu.cpu",package.seeall) - -function rrdargs( graph, host, plugin, plugin_instance, dtype ) - - return { - data = { - instances = { - cpu = { "idle", "user", "system", "nice" } - }, - - options = { - cpu_idle = { color = "ffffff" }, - cpu_nice = { color = "00e000" }, - cpu_user = { color = "0000ff" }, - cpu_wait = { color = "ffb000" }, - cpu_system = { color = "ff0000" }, - cpu_softirq = { color = "ff00ff" }, - cpu_interrupt = { color = "a000a0" }, - cpu_steal = { color = "000000" } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/df/df.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/df/df.lua deleted file mode 100644 index 4fd630d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/df/df.lua +++ /dev/null @@ -1,41 +0,0 @@ ---[[ - -Luci statistics - df plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: df.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.df.df", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - per_instance = true, - number_format = "%5.1lf%s", - - data = { - sources = { - df = { "free", "used" } - }, - - options = { - df__free = { - color = "00ff00" - }, - - df__used = { - color = "ff0000", - flip = true - } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/interface.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/interface.lua deleted file mode 100644 index fff8e81..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/interface.lua +++ /dev/null @@ -1,107 +0,0 @@ ---[[ - -Luci statistics - interface plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: interface.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.interface", package.seeall) - -function rrdargs( graph, host, plugin, plugin_instance ) - - -- - -- traffic diagram - -- - local traffic = { - - -- draw this diagram for each data instance - per_instance = true, - - -- diagram data description - data = { - -- defined sources for data types, if ommitted assume a single DS named "value" (optional) - sources = { - if_octets = { "tx", "rx" } - }, - - -- special options for single data lines - options = { - if_octets__tx = { - total = true, -- report total amount of bytes - color = "00ff00" -- tx is green - }, - - if_octets__rx = { - flip = true, -- flip rx line - total = true, -- report total amount of bytes - color = "0000ff" -- rx is blue - } - } - } - } - - - -- - -- packet diagram - -- - local packets = { - - -- draw this diagram for each data instance - per_instance = true, - - -- diagram data description - data = { - -- data type order - types = { "if_packets", "if_errors" }, - - -- defined sources for data types - sources = { - if_packets = { "tx", "rx" }, - if_errors = { "tx", "rx" } - }, - - -- special options for single data lines - options = { - -- processed packets (tx DS) - if_packets__tx = { - overlay = true, -- don't summarize - total = true, -- report total amount of bytes - color = "00ff00" -- processed tx is green - }, - - -- processed packets (rx DS) - if_packets__rx = { - overlay = true, -- don't summarize - flip = true, -- flip rx line - total = true, -- report total amount of bytes - color = "0000ff" -- processed rx is blue - }, - - -- packet errors (tx DS) - if_errors__tx = { - overlay = true, -- don't summarize - total = true, -- report total amount of packets - color = "ff5500" -- tx errors are orange - }, - - -- packet errors (rx DS) - if_errors__rx = { - overlay = true, -- don't summarize - flip = true, -- flip rx line - total = true, -- report total amount of packets - color = "ff0000" -- rx errors are red - } - } - } - } - - return { traffic, packets } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_bytes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_bytes.lua deleted file mode 100644 index c3c2bb9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_bytes.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ - -Luci statistics - iptables plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: ipt_bytes.lua 2276 2008-06-03 23:18:37Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.iptables.ipt_bytes", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - options = { - ipt_bytes = { total = true } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_packets.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_packets.lua deleted file mode 100644 index 698464a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/iptables/ipt_packets.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ - -Luci statistics - iptables plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: ipt_packets.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.iptables.ipt_packets", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - options = { - ipt_packets = { total = true } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/irq/irq.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/irq/irq.lua deleted file mode 100644 index 65ed1e6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/irq/irq.lua +++ /dev/null @@ -1,25 +0,0 @@ ---[[ - -Luci statistics - irq plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: irq.lua 2276 2008-06-03 23:18:37Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.irq.irq", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - types = { "irq" } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/load/load.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/load/load.lua deleted file mode 100644 index 0c1eb2b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/load/load.lua +++ /dev/null @@ -1,33 +0,0 @@ ---[[ - -Luci statistics - load plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: load.lua 2329 2008-06-08 21:51:55Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.load.load", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - sources = { - load = { "shortterm", "midterm", "longterm" } - }, - - options = { - load__shortterm = { color = "ff0000" }, - load__midterm = { color = "ff6600" }, - load__longterm = { color = "ffaa00" } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/netlink.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/netlink.lua deleted file mode 100644 index a46f7cc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/netlink.lua +++ /dev/null @@ -1,193 +0,0 @@ ---[[ - -Luci statistics - netlink plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: netlink.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.netlink", package.seeall) - -function rrdargs( graph, plugin, plugin_instance ) - - -- - -- traffic diagram - -- - local traffic = { - - -- diagram data description - data = { - -- defined sources for data types, if ommitted assume a single DS named "value" (optional) - sources = { - if_octets = { "tx", "rx" } - }, - - -- special options for single data lines - options = { - if_octets__tx = { - total = true, -- report total amount of bytes - color = "00ff00" -- tx is green - }, - - if_octets__rx = { - flip = true, -- flip rx line - total = true, -- report total amount of bytes - color = "0000ff" -- rx is blue - } - } - } - } - - - -- - -- packet diagram - -- - local packets = { - - -- diagram data description - data = { - -- data type order - types = { "if_packets", "if_dropped", "if_errors" }, - - -- defined sources for data types - sources = { - if_packets = { "tx", "rx" }, - if_dropped = { "tx", "rx" }, - if_errors = { "tx", "rx" } - }, - - -- special options for single data lines - options = { - -- processed packets (tx DS) - if_packets__tx = { - overlay = true, -- don't summarize - total = true, -- report total amount of bytes - color = "00ff00" -- processed tx is green - }, - - -- processed packets (rx DS) - if_packets__rx = { - overlay = true, -- don't summarize - flip = true, -- flip rx line - total = true, -- report total amount of bytes - color = "0000ff" -- processed rx is blue - }, - - -- dropped packets (tx DS) - if_dropped__tx = { - overlay = true, -- don't summarize - total = true, -- report total amount of bytes - color = "660055" -- dropped tx is ... dunno ;) - }, - - -- dropped packets (rx DS) - if_dropped__rx = { - overlay = true, -- don't summarize - flip = true, -- flip rx line - total = true, -- report total amount of bytes - color = "440066" -- dropped rx is violett - }, - - -- packet errors (tx DS) - if_errors__tx = { - overlay = true, -- don't summarize - total = true, -- report total amount of packets - color = "ff5500" -- tx errors are orange - }, - - -- packet errors (rx DS) - if_errors__rx = { - overlay = true, -- don't summarize - flip = true, -- flip rx line - total = true, -- report total amount of packets - color = "ff0000" -- rx errors are red - } - } - } - } - - - -- - -- multicast diagram - -- - local multicast = { - - -- diagram data description - data = { - -- data type order - types = { "if_multicast" }, - - -- special options for single data lines - options = { - -- multicast packets - if_multicast = { - total = true, -- report total amount of packets - color = "0000ff" -- multicast is blue - } - } - } - } - - - -- - -- collision diagram - -- - local collisions = { - - -- diagram data description - data = { - -- data type order - types = { "if_collisions" }, - - -- special options for single data lines - options = { - -- collision rate - if_collisions = { - total = true, -- report total amount of packets - color = "ff0000" -- collsions are red - } - } - } - } - - - -- - -- error diagram - -- - local errors = { - - -- diagram data description - data = { - -- data type order - types = { "if_tx_errors", "if_rx_errors" }, - - -- data type instances - instances = { - if_tx_errors = { "aborted", "carrier", "fifo", "heartbeat", "window" }, - if_rx_errors = { "length", "missed", "over", "crc", "fifo", "frame" } - }, - - -- special options for single data lines - options = { -- XXX: fixme (define colors...) - if_tx_errors = { - total = true - }, - - if_rx_errors = { - flip = true, - total = true - } - } - } - } - - - return { traffic, packets, multicast, collisions, errors } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/ping/ping.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/ping/ping.lua deleted file mode 100644 index a094737..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/ping/ping.lua +++ /dev/null @@ -1,27 +0,0 @@ ---[[ - -Luci statistics - ping plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: ping.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.ping.ping", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - sources = { - ping = { "ping" } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/processes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/processes.lua deleted file mode 100644 index fc01ca5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/processes.lua +++ /dev/null @@ -1,101 +0,0 @@ ---[[ - -Luci statistics - processes plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: processes.lua 2276 2008-06-03 23:18:37Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.processes", package.seeall) - -function rrdargs( graph, plugin, plugin_instance ) - - if plugin_instance == "" then - return { - data = { - instances = { - ps_state = { - "sleeping", "running", "paging", "blocked", "stopped", "zombies" - } - }, - - options = { - ps_state_sleeping = { color = "0000ff" }, - ps_state_running = { color = "008000" }, - ps_state_paging = { color = "ffff00" }, - ps_state_blocked = { color = "ff5000" }, - ps_state_stopped = { color = "555555" }, - ps_state_zombies = { color = "ff0000" } - } - } - } - else - return { - - { - data = { - sources = { - ps_cputime = { "syst", "user" } - }, - - options = { - ps_cputime__user = { - color = "0000ff", - overlay = true - }, - - ps_cputime__syst = { - color = "ff0000", - overlay = true - } - } - } - }, - - { - data = { - sources = { - ps_count = { "threads", "processes" } - }, - - options = { - ps_count__threads = { color = "00ff00" }, - ps_count__processes = { color = "0000bb" } - } - } - }, - - { - data = { - sources = { - ps_pagefaults = { "minflt", "majflt" } - }, - - options = { - ps_pagefaults__minflt = { color = "ff0000" }, - ps_pagefaults__majflt = { color = "ff5500" } - } - } - }, - - { - number_format = "%5.1lf%s", - - data = { - types = { "ps_rss" }, - - options = { - ps_rss = { color = "0000ff" } - } - } - } - } - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua deleted file mode 100644 index 9d94dd7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/tcpconns/tcp_connections.lua +++ /dev/null @@ -1,31 +0,0 @@ ---[[ - -Luci statistics - tcpconns plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: tcp_connections.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.tcpconns.tcp_connections", package.seeall) - -function rrdargs( graph, plugin, plugin_instance, dtype ) - - return { - data = { - instances = { - tcp_connections = { - "SYN_SENT", "SYN_RECV", "LISTEN", "ESTABLISHED", - "LAST_ACK", "TIME_WAIT", "CLOSING", "CLOSE_WAIT", - "CLOSED", "FIN_WAIT1", "FIN_WAIT2" - } - } - } - } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/wireless.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/wireless.lua deleted file mode 100644 index 867eabd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/statistics/rrdtool/definitions/wireless.lua +++ /dev/null @@ -1,71 +0,0 @@ ---[[ - -Luci statistics - wireless plugin diagram definition -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id: wireless.lua 2274 2008-06-03 23:15:16Z jow $ - -]]-- - -module("luci.statistics.rrdtool.definitions.wireless", package.seeall) - -function rrdargs( graph, host, plugin, plugin_instance ) - - -- - -- signal/noise diagram - -- - local snr = { - - -- draw this diagram for each data instance - per_instance = true, - - -- diagram data description - data = { - types = { "signal_noise", "signal_power" }, - - -- special options for single data lines - options = { - signal_power = { - overlay = true, -- don't summarize - color = "0000ff" -- power is blue - }, - - signal_noise = { - overlay = true, -- don't summarize - color = "ff0000" -- noise is red - } - } - } - } - - - -- - -- signal quality diagram - -- - local quality = { - - -- draw this diagram for each data instance - per_instance = true, - - -- diagram data description - data = { - types = { "signal_quality" }, - - -- special options for single data lines - options = { - signal_quality = { - noarea = true, -- don't draw area - color = "0000ff" -- quality is blue - } - } - } - } - - return { snr, quality } -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys.lua deleted file mode 100644 index 38a25f9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys.lua +++ /dev/null @@ -1,782 +0,0 @@ ---[[ -LuCI - System library - -Description: -Utilities for interaction with the Linux system - -FileId: -$Id: sys.lua 3867 2008-12-07 19:49:45Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - - -local io = require "io" -local os = require "os" -local posix = require "posix" -local table = require "table" - -local luci = {} -luci.util = require "luci.util" -luci.fs = require "luci.fs" -luci.ip = require "luci.ip" - -local tonumber, ipairs, pairs, pcall = tonumber, ipairs, pairs, pcall - - ---- LuCI Linux and POSIX system utilities. -module "luci.sys" - ---- Execute a given shell command and return the error code --- @class function --- @name call --- @param ... Command to call --- @return Error code of the command -function call(...) - return os.execute(...) / 256 -end - ---- Execute a given shell command and capture its standard output --- @class function --- @name exec --- @param command Command to call --- @return String containg the return the output of the command -exec = luci.util.exec - ---- Invoke the luci-flash executable to write an image to the flash memory. --- @param image Local path or URL to image file --- @param kpattern Pattern of files to keep over flash process --- @return Return value of os.execute() -function flash(image, kpattern) - local cmd = "luci-flash " - if kpattern then - cmd = cmd .. "-k '" .. kpattern:gsub("'", "") .. "' " - end - cmd = cmd .. "'" .. image:gsub("'", "") .. "' >/dev/null 2>&1" - - return os.execute(cmd) -end - ---- Retrieve information about currently mounted file systems. --- @return Table containing mount information -function mounts() - local data = {} - local k = {"fs", "blocks", "used", "available", "percent", "mountpoint"} - local ps = luci.util.execi("df") - - if not ps then - return - else - ps() - end - - for line in ps do - local row = {} - - local j = 1 - for value in line:gmatch("[^%s]+") do - row[k[j]] = value - j = j + 1 - end - - if row[k[1]] then - - -- this is a rather ugly workaround to cope with wrapped lines in - -- the df output: - -- - -- /dev/scsi/host0/bus0/target0/lun0/part3 - -- 114382024 93566472 15005244 86% /mnt/usb - -- - - if not row[k[2]] then - j = 2 - line = ps() - for value in line:gmatch("[^%s]+") do - row[k[j]] = value - j = j + 1 - end - end - - table.insert(data, row) - end - end - - return data -end - ---- Retrieve environment variables. If no variable is given then a table --- containing the whole environment is returned otherwise this function returns --- the corresponding string value for the given name or nil if no such variable --- exists. --- @class function --- @name getenv --- @param var Name of the environment variable to retrieve (optional) --- @return String containg the value of the specified variable --- @return Table containing all variables if no variable name is given -getenv = posix.getenv - ---- Determine the current hostname. --- @return String containing the system hostname -function hostname() - return posix.uname("%n") -end - ---- Returns the contents of a documented referred by an URL. --- @param url The URL to retrieve --- @param stream Return a stream instead of a buffer --- @param target Directly write to target file name --- @return String containing the contents of given the URL -function httpget(url, stream, target) - if not target then - local source = stream and io.popen or luci.util.exec - return source("wget -qO- '"..url:gsub("'", "").."'") - else - return os.execute("wget -qO '%s' '%s'" % - {target:gsub("'", ""), url:gsub("'", "")}) - end -end - ---- Returns the system load average values. --- @return String containing the average load value 1 minute ago --- @return String containing the average load value 5 minutes ago --- @return String containing the average load value 15 minutes ago --- @return String containing the active and total number of processes --- @return String containing the last used pid -function loadavg() - local loadavg = io.lines("/proc/loadavg")() - return loadavg:match("^(.-) (.-) (.-) (.-) (.-)$") -end - ---- Initiate a system reboot. --- @return Return value of os.execute() -function reboot() - return os.execute("reboot >/dev/null 2>&1") -end - ---- Returns the system type, cpu name and installed physical memory. --- @return String containing the system or platform identifier --- @return String containing hardware model information --- @return String containing the total memory amount in kB --- @return String containing the memory used for caching in kB --- @return String containing the memory used for buffering in kB --- @return String containing the free memory amount in kB -function sysinfo() - local cpuinfo = luci.fs.readfile("/proc/cpuinfo") - local meminfo = luci.fs.readfile("/proc/meminfo") - - local system = cpuinfo:match("system typ.-:%s*([^\n]+)") - local model = "" - local memtotal = tonumber(meminfo:match("MemTotal:%s*(%d+)")) - local memcached = tonumber(meminfo:match("\nCached:%s*(%d+)")) - local memfree = tonumber(meminfo:match("MemFree:%s*(%d+)")) - local membuffers = tonumber(meminfo:match("Buffers:%s*(%d+)")) - - if not system then - system = posix.uname("%m") - model = cpuinfo:match("model name.-:%s*([^\n]+)") - if not model then - model = cpuinfo:match("Processor.-:%s*([^\n]+)") - end - else - model = cpuinfo:match("cpu model.-:%s*([^\n]+)") - end - - return system, model, memtotal, memcached, membuffers, memfree -end - ---- Retrieves the output of the "logread" command. --- @return String containing the current log buffer -function syslog() - return luci.util.exec("logread") -end - ---- Retrieves the output of the "dmesg" command. --- @return String containing the current log buffer -function dmesg() - return luci.util.exec("dmesg") -end - ---- Generates a random id with specified length. --- @param bytes Number of bytes for the unique id --- @return String containing hex encoded id -function uniqueid(bytes) - local fp = io.open("/dev/urandom") - local chunk = { fp:read(bytes):byte(1, bytes) } - fp:close() - - local hex = "" - - local pattern = "%02X" - for i, byte in ipairs(chunk) do - hex = hex .. pattern:format(byte) - end - - return hex -end - ---- Returns the current system uptime stats. --- @return String containing total uptime in seconds --- @return String containing idle time in seconds -function uptime() - local loadavg = io.lines("/proc/uptime")() - return loadavg:match("^(.-) (.-)$") -end - ---- LuCI system utilities / POSIX user group related functions. --- @class module --- @name luci.sys.group -group = {} - ---- Returns information about a POSIX user group. --- @class function --- @name getgroup --- @param group Group ID or name of a system user group --- @return Table with information about the requested group -group.getgroup = posix.getgroup - - ---- LuCI system utilities / network related functions. --- @class module --- @name luci.sys.net -net = {} - ---- Returns the current arp-table entries as two-dimensional table. --- @return Table of table containing the current arp entries. --- The following fields are defined for arp entry objects: --- { "IP address", "HW address", "HW type", "Flags", "Mask", "Device" } -function net.arptable() - return _parse_delimited_table(io.lines("/proc/net/arp"), "%s%s+") -end - ---- Returns conntrack information --- @return Table with the currently tracked IP connections -function net.conntrack() - local connt = {} - if luci.fs.access("/proc/net/nf_conntrack", "r") then - for line in io.lines("/proc/net/nf_conntrack") do - line = line:match "^(.-( [^ =]+=).-)%2" - local entry, flags = _parse_mixed_record(line, " +") - entry.layer3 = flags[1] - entry.layer4 = flags[3] - for i=1, #entry do - entry[i] = nil - end - - connt[#connt+1] = entry - end - elseif luci.fs.access("/proc/net/ip_conntrack", "r") then - for line in io.lines("/proc/net/ip_conntrack") do - line = line:match "^(.-( [^ =]+=).-)%2" - local entry, flags = _parse_mixed_record(line, " +") - entry.layer3 = "ipv4" - entry.layer4 = flags[1] - for i=1, #entry do - entry[i] = nil - end - - connt[#connt+1] = entry - end - else - return nil - end - return connt -end - ---- Determine the current IPv4 default route. If multiple default routes exist, --- return the one with the lowest metric. --- @return Table with the properties of the current default route. --- The following fields are defined: --- { "dest", "gateway", "metric", "refcount", "usecount", "irtt", --- "flags", "device" } -function net.defaultroute() - local route = nil - for _, r in pairs(net.routes()) do - if r.dest:prefix() == 0 and (not route or route.metric > r.metric) then - route = r - end - end - return route -end - ---- Determine the current IPv6 default route. If multiple default routes exist, --- return the one with the lowest metric. --- @return Table with the properties of the current default route. --- The following fields are defined: --- { "source", "dest", "nexthop", "metric", "refcount", "usecount", --- "flags", "device" } -function net.defaultroute6() - local route = nil - local routes6 = net.routes6() - if routes6 then - for _, r in pairs(routes6) do - if r.dest:prefix() == 0 and - (not route or route.metric > r.metric) - then - route = r - end - end - end - return route -end - ---- Determine the names of available network interfaces. --- @return Table containing all current interface names -function net.devices() - local devices = {} - for line in io.lines("/proc/net/dev") do - table.insert(devices, line:match(" *(.-):")) - end - return devices -end - - ---- Return information about available network interfaces. --- @return Table containing all current interface names and their information -function net.deviceinfo() - local devices = {} - for line in io.lines("/proc/net/dev") do - local name, data = line:match("^ *(.-): *(.*)$") - if name and data then - devices[name] = luci.util.split(data, " +", nil, true) - end - end - return devices -end - - --- Determine the MAC address belonging to the given IP address. --- @param ip IPv4 address --- @return String containing the MAC address or nil if it cannot be found -function net.ip4mac(ip) - local mac = nil - - for i, l in ipairs(net.arptable()) do - if l["IP address"] == ip then - mac = l["HW address"] - end - end - - return mac -end - ---- Returns the current kernel routing table entries. --- @return Table of tables with properties of the corresponding routes. --- The following fields are defined for route entry tables: --- { "dest", "gateway", "metric", "refcount", "usecount", "irtt", --- "flags", "device" } -function net.routes() - local routes = { } - - for line in io.lines("/proc/net/route") do - - local dev, dst_ip, gateway, flags, refcnt, usecnt, metric, - dst_mask, mtu, win, irtt = line:match( - "([^%s]+)\t([A-F0-9]+)\t([A-F0-9]+)\t([A-F0-9]+)\t" .. - "(%d+)\t(%d+)\t(%d+)\t([A-F0-9]+)\t(%d+)\t(%d+)\t(%d+)" - ) - - if dev then - gateway = luci.ip.Hex( gateway, 32, luci.ip.FAMILY_INET4 ) - dst_mask = luci.ip.Hex( dst_mask, 32, luci.ip.FAMILY_INET4 ) - dst_ip = luci.ip.Hex( - dst_ip, dst_mask:prefix(dst_mask), luci.ip.FAMILY_INET4 - ) - - routes[#routes+1] = { - dest = dst_ip, - gateway = gateway, - metric = tonumber(metric), - refcount = tonumber(refcnt), - usecount = tonumber(usecnt), - mtu = tonumber(mtu), - window = tonumber(window), - irtt = tonumber(irtt), - flags = tonumber(flags, 16), - device = dev - } - end - end - - return routes -end - ---- Returns the current ipv6 kernel routing table entries. --- @return Table of tables with properties of the corresponding routes. --- The following fields are defined for route entry tables: --- { "source", "dest", "nexthop", "metric", "refcount", "usecount", --- "flags", "device" } -function net.routes6() - if luci.fs.access("/proc/net/ipv6_route", "r") then - local routes = { } - - for line in io.lines("/proc/net/ipv6_route") do - - local dst_ip, dst_prefix, src_ip, src_prefix, nexthop, - metric, refcnt, usecnt, flags, dev = line:match( - "([a-f0-9]+) ([a-f0-9]+) " .. - "([a-f0-9]+) ([a-f0-9]+) " .. - "([a-f0-9]+) ([a-f0-9]+) " .. - "([a-f0-9]+) ([a-f0-9]+) " .. - "([a-f0-9]+) +([^%s]+)" - ) - - src_ip = luci.ip.Hex( - src_ip, tonumber(src_prefix, 16), luci.ip.FAMILY_INET6, false - ) - - dst_ip = luci.ip.Hex( - dst_ip, tonumber(dst_prefix, 16), luci.ip.FAMILY_INET6, false - ) - - nexthop = luci.ip.Hex( nexthop, 128, luci.ip.FAMILY_INET6, false ) - - routes[#routes+1] = { - source = src_ip, - dest = dst_ip, - nexthop = nexthop, - metric = tonumber(metric, 16), - refcount = tonumber(refcnt, 16), - usecount = tonumber(usecnt, 16), - flags = tonumber(flags, 16), - device = dev - } - end - - return routes - end -end - ---- Tests whether the given host responds to ping probes. --- @param host String containing a hostname or IPv4 address --- @return Number containing 0 on success and >= 1 on error -function net.pingtest(host) - return os.execute("ping -c1 '"..host:gsub("'", '').."' >/dev/null 2>&1") -end - - ---- LuCI system utilities / process related functions. --- @class module --- @name luci.sys.process -process = {} - ---- Get the current process id. --- @class function --- @name process.info --- @return Number containing the current pid -process.info = posix.getpid - ---- Retrieve information about currently running processes. --- @return Table containing process information -function process.list() - local data = {} - local k - local ps = luci.util.execi("top -bn1") - - if not ps then - return - end - - while true do - local line = ps() - if not line then - return - end - - k = luci.util.split(luci.util.trim(line), "%s+", nil, true) - if k[1] == "PID" then - break - end - end - - for line in ps do - local row = {} - - line = luci.util.trim(line) - for i, value in ipairs(luci.util.split(line, "%s+", #k-1, true)) do - row[k[i]] = value - end - - local pid = tonumber(row[k[1]]) - if pid then - data[pid] = row - end - end - - return data -end - ---- Set the gid of a process identified by given pid. --- @param pid Number containing the process id --- @param gid Number containing the Unix group id --- @return Boolean indicating successful operation --- @return String containing the error message if failed --- @return Number containing the error code if failed -function process.setgroup(pid, gid) - return posix.setpid("g", pid, gid) -end - ---- Set the uid of a process identified by given pid. --- @param pid Number containing the process id --- @param uid Number containing the Unix user id --- @return Boolean indicating successful operation --- @return String containing the error message if failed --- @return Number containing the error code if failed -function process.setuser(pid, uid) - return posix.setpid("u", pid, uid) -end - ---- Send a signal to a process identified by given pid. --- @class function --- @name process.signal --- @param pid Number containing the process id --- @param sig Signal to send (default: 15 [SIGTERM]) --- @return Boolean indicating successful operation --- @return Number containing the error code if failed -process.signal = posix.kill - - ---- LuCI system utilities / user related functions. --- @class module --- @name luci.sys.user -user = {} - ---- Retrieve user informations for given uid. --- @class function --- @name getuser --- @param uid Number containing the Unix user id --- @return Table containing the following fields: --- { "uid", "gid", "name", "passwd", "dir", "shell", "gecos" } -user.getuser = posix.getpasswd - ---- Test whether given string matches the password of a given system user. --- @param username String containing the Unix user name --- @param password String containing the password to compare --- @return Boolean indicating wheather the passwords are equal -function user.checkpasswd(username, password) - local account = user.getuser(username) - - if account then - local pwd = account.passwd - local shadowpw - if #pwd == 1 then - if luci.fs.stat("/etc/shadow") then - if not pcall(function() - for l in io.lines("/etc/shadow") do - shadowpw = l:match("^%s:([^:]+)" % username) - if shadowpw then - pwd = shadowpw - break - end - end - end) then - return nil, "Unable to access shadow-file" - end - end - - if pwd == "!" then - return true - end - end - - if pwd and #pwd > 0 and password and #password > 0 then - return (pwd == posix.crypt(password, pwd)) - end - end - - return false -end - ---- Change the password of given user. --- @param username String containing the Unix user name --- @param password String containing the password to compare --- @return Number containing 0 on success and >= 1 on error -function user.setpasswd(username, password) - if password then - password = password:gsub("'", "") - end - - if username then - username = username:gsub("'", "") - end - - local cmd = "(echo '"..password.."';sleep 1;echo '"..password.."')|" - cmd = cmd .. "passwd '"..username.."' >/dev/null 2>&1" - return os.execute(cmd) -end - - ---- LuCI system utilities / wifi related functions. --- @class module --- @name luci.sys.wifi -wifi = {} - ---- Get iwconfig output for all wireless devices. --- @return Table of tables containing the iwconfing output for each wifi device -function wifi.getiwconfig() - local cnt = luci.util.exec("PATH=/sbin:/usr/sbin iwconfig 2>/dev/null") - local iwc = {} - - for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do - local k = l:match("^(.-) ") - l = l:gsub("^(.-) +", "", 1) - if k then - local entry, flags = _parse_mixed_record(l) - if entry then - entry.flags = flags - end - iwc[k] = entry - end - end - - return iwc -end - ---- Get iwlist scan output from all wireless devices. --- @return Table of tables contaiing all scan results -function wifi.iwscan(iface) - local siface = iface or "" - local cnt = luci.util.exec("iwlist "..siface.." scan 2>/dev/null") - local iws = {} - - for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n\n")) do - local k = l:match("^(.-) ") - l = l:gsub("^[^\n]+", "", 1) - l = luci.util.trim(l) - if k then - iws[k] = {} - for j, c in pairs(luci.util.split(l, "\n Cell")) do - c = c:gsub("^(.-)- ", "", 1) - c = luci.util.split(c, "\n", 7) - c = table.concat(c, "\n", 1) - local entry, flags = _parse_mixed_record(c) - if entry then - entry.flags = flags - end - table.insert(iws[k], entry) - end - end - end - - return iface and (iws[iface] or {}) or iws -end - - ---- LuCI system utilities / init related functions. --- @class module --- @name luci.sys.init -init = {} -init.dir = "/etc/init.d/" - ---- Get the names of all installed init scripts --- @return Table containing the names of all inistalled init scripts -function init.names() - local names = { } - for _, name in ipairs(luci.fs.glob(init.dir.."*")) do - names[#names+1] = luci.fs.basename(name) - end - return names -end - ---- Test whether the given init script is enabled --- @param name Name of the init script --- @return Boolean indicating whether init is enabled -function init.enabled(name) - if luci.fs.access(init.dir..name) then - return ( call(init.dir..name.." enabled") == 0 ) - end - return false -end - ---- Get the index of he given init script --- @param name Name of the init script --- @return Numeric index value -function init.index(name) - if luci.fs.access(init.dir..name) then - return call("source "..init.dir..name.."; exit $START") - end -end - ---- Enable the given init script --- @param name Name of the init script --- @return Boolean indicating success -function init.enable(name) - if luci.fs.access(init.dir..name) then - return ( call(init.dir..name.." enable") == 1 ) - end -end - ---- Disable the given init script --- @param name Name of the init script --- @return Boolean indicating success -function init.disable(name) - if luci.fs.access(init.dir..name) then - return ( call(init.dir..name.." disable") == 0 ) - end -end - - --- Internal functions - -function _parse_delimited_table(iter, delimiter) - delimiter = delimiter or "%s+" - - local data = {} - local trim = luci.util.trim - local split = luci.util.split - - local keys = split(trim(iter()), delimiter, nil, true) - for i, j in pairs(keys) do - keys[i] = trim(keys[i]) - end - - for line in iter do - local row = {} - line = trim(line) - if #line > 0 then - for i, j in pairs(split(line, delimiter, nil, true)) do - if keys[i] then - row[keys[i]] = j - end - end - end - table.insert(data, row) - end - - return data -end - -function _parse_mixed_record(cnt, delimiter) - delimiter = delimiter or " " - local data = {} - local flags = {} - - for i, l in pairs(luci.util.split(luci.util.trim(cnt), "\n")) do - for j, f in pairs(luci.util.split(luci.util.trim(l), delimiter, nil, true)) do - local k, x, v = f:match('([^%s][^:=]*) *([:=]*) *"*([^\n"]*)"*') - - if k then - if x == "" then - table.insert(flags, k) - else - data[k] = v - end - end - end - end - - return data, flags -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/iptparser.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/iptparser.lua deleted file mode 100644 index 524dfd9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/iptparser.lua +++ /dev/null @@ -1,244 +0,0 @@ ---[[ -LuCI - Iptables parser and query library - -Copyright 2008 Jo-Philipp Wich - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -$Id: iptparser.lua 2733 2008-08-06 21:40:48Z Cyrus $ - -]]-- - -module("luci.sys.iptparser", package.seeall) -require("luci.util") - - -IptParser = luci.util.class() - ---[[ -IptParser.__init__( ... ) - -The class constructor, initializes the internal lookup table. -]]-- - -function IptParser.__init__( self, ... ) - self._rules = { } - self._chain = nil - self:_parse_rules() -end - - ---[[ -IptParser.find( args ) - -Find all firewall rules that match the given criteria. Expects a table with search criteria as only argument. -If args is nil or an empty table then all rules will be returned. - -The following keys in the args table are recognized: - - - table Match rules that are located within the given table - - chain Match rules that are located within the given chain - - target Match rules with the given target - - protocol Match rules that match the given protocol, rules with protocol "all" are always matched - - source Match rules with the given source, rules with source "0.0.0.0/0" are always matched - - destination Match rules with the given destination, rules with destination "0.0.0.0/0" are always matched - - inputif Match rules with the given input interface, rules with input interface "*" (=all) are always matched - - outputif Match rules with the given output interface, rules with output interface "*" (=all) are always matched - - flags Match rules that match the given flags, current supported values are "-f" (--fragment) and "!f" (! --fragment) - - options Match rules containing all given options - -The return value is a list of tables representing the matched rules. -Each rule table contains the following fields: - - - index The index number of the rule - - table The table where the rule is located, can be one of "filter", "nat" or "mangle" - - chain The chain where the rule is located, e.g. "INPUT" or "postrouting_wan" - - target The rule target, e.g. "REJECT" or "DROP" - - protocol The matching protocols, e.g. "all" or "tcp" - - flags Special rule options ("--", "-f" or "!f") - - inputif Input interface of the rule, e.g. "eth0.0" or "*" for all interfaces - - outputif Output interface of the rule, e.g. "eth0.0" or "*" for all interfaces - - source The source ip range, e.g. "0.0.0.0/0" - - destination The destination ip range, e.g. "0.0.0.0/0" - - options A list of specific options of the rule, e.g. { "reject-with", "tcp-reset" } - - packets The number of packets matched by the rule - - bytes The number of total bytes matched by the rule - -Example: - -ip = luci.sys.iptparser.IptParser() -result = ip.find( { - target="REJECT", - protocol="tcp", - options={ "reject-with", "tcp-reset" } -} ) - -This will match all rules with target "-j REJECT", protocol "-p tcp" (or "-p all") and the option "--reject-with tcp-reset". - -]]-- - -function IptParser.find( self, args ) - - local args = args or { } - local rv = { } - - for i, rule in ipairs(self._rules) do - local match = true - - -- match table - if not ( not args.table or args.table == rule.table ) then - match = false - end - - -- match chain - if not ( match == true and ( not args.chain or args.chain == rule.chain ) ) then - match = false - end - - -- match target - if not ( match == true and ( not args.target or args.target == rule.target ) ) then - match = false - end - - -- match protocol - if not ( match == true and ( not args.protocol or rule.protocol == "all" or args.protocol == rule.protocol ) ) then - match = false - end - - -- match source (XXX: implement ipcalc stuff so that 192.168.1.0/24 matches 0.0.0.0/0 etc.) - if not ( match == true and ( not args.source or rule.source == "0.0.0.0/0" or rule.source == args.source ) ) then - match = false - end - - -- match destination (XXX: implement ipcalc stuff so that 192.168.1.0/24 matches 0.0.0.0/0 etc.) - if not ( match == true and ( not args.destination or rule.destination == "0.0.0.0/0" or rule.destination == args.destination ) ) then - match = false - end - - -- match input interface - if not ( match == true and ( not args.inputif or rule.inputif == "*" or args.inputif == rule.inputif ) ) then - match = false - end - - -- match output interface - if not ( match == true and ( not args.outputif or rule.outputif == "*" or args.outputif == rule.outputif ) ) then - match = false - end - - -- match flags (the "opt" column) - if not ( match == true and ( not args.flags or rule.flags == args.flags ) ) then - match = false - end - - -- match specific options - if not ( match == true and ( not args.options or self:_match_options( rule.options, args.options ) ) ) then - match = false - end - - - -- insert match - if match == true then - table.insert( rv, rule ) - end - end - - return rv -end - - ---[[ -IptParser.resync() - -Rebuild the internal lookup table, for example when rules have changed through external commands. -]]-- - -function IptParser.resync( self ) - self._rules = { } - self._chain = nil - self:_parse_rules() -end - - ---[[ -IptParser._parse_rules() - -[internal] Parse iptables output from all tables. -]]-- - -function IptParser._parse_rules( self ) - - for i, tbl in ipairs({ "filter", "nat", "mangle" }) do - - for i, rule in ipairs(luci.util.execl("iptables -t " .. tbl .. " --line-numbers -nxvL")) do - - if rule:find( "Chain " ) == 1 then - - self._chain = rule:gsub("Chain ([^%s]*) .*", "%1") - - else - if rule:find("%d") == 1 then - - local rule_parts = luci.util.split( rule, "%s+", nil, true ) - local rule_details = { } - - rule_details["table"] = tbl - rule_details["chain"] = self._chain - rule_details["index"] = tonumber(rule_parts[1]) - rule_details["packets"] = tonumber(rule_parts[2]) - rule_details["bytes"] = tonumber(rule_parts[3]) - rule_details["target"] = rule_parts[4] - rule_details["protocol"] = rule_parts[5] - rule_details["flags"] = rule_parts[6] - rule_details["inputif"] = rule_parts[7] - rule_details["outputif"] = rule_parts[8] - rule_details["source"] = rule_parts[9] - rule_details["destination"] = rule_parts[10] - rule_details["options"] = { } - - for i = 11, #rule_parts - 1 do - rule_details["options"][i-10] = rule_parts[i] - end - - table.insert( self._rules, rule_details ) - end - end - end - end - - self._chain = nil -end - - ---[[ -IptParser._match_options( optlist1, optlist2 ) - -[internal] Return true if optlist1 contains all elements of optlist2. Return false in all other cases. -]]-- - -function IptParser._match_options( self, o1, o2 ) - - -- construct a hashtable of first options list to speed up lookups - local oh = { } - for i, opt in ipairs( o1 ) do oh[opt] = true end - - -- iterate over second options list - -- each string in o2 must be also present in o1 - -- if o2 contains a string which is not found in o1 then return false - for i, opt in ipairs( o2 ) do - if not oh[opt] then - return false - end - end - - return true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/zoneinfo.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/zoneinfo.lua deleted file mode 100644 index d6de704..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/sys/zoneinfo.lua +++ /dev/null @@ -1,572 +0,0 @@ ---[[ -LuCI - Autogenerated Zoneinfo Module - -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 - -]]-- - -module "luci.sys.zoneinfo" - -TZ = { - { 'Africa/Abidjan', 'GMT0' }, - { 'Africa/Accra', 'GMT0' }, - { 'Africa/Addis Ababa', 'EAT-3' }, - { 'Africa/Algiers', 'CET-1' }, - { 'Africa/Asmara', 'EAT-3' }, - { 'Africa/Bamako', 'GMT0' }, - { 'Africa/Bangui', 'WAT-1' }, - { 'Africa/Banjul', 'GMT0' }, - { 'Africa/Bissau', 'GMT0' }, - { 'Africa/Blantyre', 'CAT-2' }, - { 'Africa/Brazzaville', 'WAT-1' }, - { 'Africa/Bujumbura', 'CAT-2' }, - { 'Africa/Casablanca', 'WET0' }, - { 'Africa/Ceuta', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Africa/Conakry', 'GMT0' }, - { 'Africa/Dakar', 'GMT0' }, - { 'Africa/Dar es Salaam', 'EAT-3' }, - { 'Africa/Djibouti', 'EAT-3' }, - { 'Africa/Douala', 'WAT-1' }, - { 'Africa/El Aaiun', 'WET0' }, - { 'Africa/Freetown', 'GMT0' }, - { 'Africa/Gaborone', 'CAT-2' }, - { 'Africa/Harare', 'CAT-2' }, - { 'Africa/Johannesburg', 'SAST-2' }, - { 'Africa/Kampala', 'EAT-3' }, - { 'Africa/Khartoum', 'EAT-3' }, - { 'Africa/Kigali', 'CAT-2' }, - { 'Africa/Kinshasa', 'WAT-1' }, - { 'Africa/Lagos', 'WAT-1' }, - { 'Africa/Libreville', 'WAT-1' }, - { 'Africa/Lome', 'GMT0' }, - { 'Africa/Luanda', 'WAT-1' }, - { 'Africa/Lubumbashi', 'CAT-2' }, - { 'Africa/Lusaka', 'CAT-2' }, - { 'Africa/Malabo', 'WAT-1' }, - { 'Africa/Maputo', 'CAT-2' }, - { 'Africa/Maseru', 'SAST-2' }, - { 'Africa/Mbabane', 'SAST-2' }, - { 'Africa/Mogadishu', 'EAT-3' }, - { 'Africa/Monrovia', 'GMT0' }, - { 'Africa/Nairobi', 'EAT-3' }, - { 'Africa/Ndjamena', 'WAT-1' }, - { 'Africa/Niamey', 'WAT-1' }, - { 'Africa/Nouakchott', 'GMT0' }, - { 'Africa/Ouagadougou', 'GMT0' }, - { 'Africa/Porto-Novo', 'WAT-1' }, - { 'Africa/Sao Tome', 'GMT0' }, - { 'Africa/Tripoli', 'EET-2' }, - { 'Africa/Tunis', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Africa/Windhoek', 'WAT-1WAST,M9.1.0,M4.1.0' }, - { 'America/Adak', 'HAST10HADT,M3.2.0,M11.1.0' }, - { 'America/Anchorage', 'AKST9AKDT,M3.2.0,M11.1.0' }, - { 'America/Anguilla', 'AST4' }, - { 'America/Antigua', 'AST4' }, - { 'America/Araguaina', 'BRT3' }, - { 'America/Argentina/Buenos Aires', 'ART3ARST,M10.3.0/0,M3.3.0/0' }, - { 'America/Argentina/Catamarca', 'ART3' }, - { 'America/Argentina/Cordoba', 'ART3ARST,M10.3.0/0,M3.3.0/0' }, - { 'America/Argentina/Jujuy', 'ART3' }, - { 'America/Argentina/La Rioja', 'ART3' }, - { 'America/Argentina/Mendoza', 'ART3' }, - { 'America/Argentina/Rio Gallegos', 'ART3' }, - { 'America/Argentina/Salta', 'ART3' }, - { 'America/Argentina/San Juan', 'ART3' }, - { 'America/Argentina/San Luis', 'ART3' }, - { 'America/Argentina/Tucuman', 'ART3ARST,M10.3.0/0,M3.3.0/0' }, - { 'America/Argentina/Ushuaia', 'ART3' }, - { 'America/Aruba', 'AST4' }, - { 'America/Asuncion', 'PYT4PYST,M10.3.0/0,M3.2.0/0' }, - { 'America/Atikokan', 'EST5' }, - { 'America/Bahia', 'BRT3' }, - { 'America/Barbados', 'AST4' }, - { 'America/Belem', 'BRT3' }, - { 'America/Belize', 'CST6' }, - { 'America/Blanc-Sablon', 'AST4' }, - { 'America/Boa Vista', 'AMT4' }, - { 'America/Bogota', 'COT5' }, - { 'America/Boise', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/Cambridge Bay', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/Campo Grande', 'AMT4AMST,M10.3.0/0,M2.3.0/0' }, - { 'America/Cancun', 'CST6CDT,M4.1.0,M10.5.0' }, - { 'America/Caracas', 'VET4:30' }, - { 'America/Cayenne', 'GFT3' }, - { 'America/Cayman', 'EST5' }, - { 'America/Chicago', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Chihuahua', 'MST7MDT,M4.1.0,M10.5.0' }, - { 'America/Costa Rica', 'CST6' }, - { 'America/Cuiaba', 'AMT4AMST,M10.3.0/0,M2.3.0/0' }, - { 'America/Curacao', 'AST4' }, - { 'America/Danmarkshavn', 'GMT0' }, - { 'America/Dawson', 'PST8PDT,M3.2.0,M11.1.0' }, - { 'America/Dawson Creek', 'MST7' }, - { 'America/Denver', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/Detroit', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Dominica', 'AST4' }, - { 'America/Edmonton', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/Eirunepe', 'AMT4' }, - { 'America/El Salvador', 'CST6' }, - { 'America/Fortaleza', 'BRT3' }, - { 'America/Glace Bay', 'AST4ADT,M3.2.0,M11.1.0' }, - { 'America/Goose Bay', 'AST4ADT,M3.2.0/0:01,M11.1.0/0:01' }, - { 'America/Grand Turk', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Grenada', 'AST4' }, - { 'America/Guadeloupe', 'AST4' }, - { 'America/Guatemala', 'CST6' }, - { 'America/Guayaquil', 'ECT5' }, - { 'America/Guyana', 'GYT4' }, - { 'America/Halifax', 'AST4ADT,M3.2.0,M11.1.0' }, - { 'America/Havana', 'CST5CDT,M3.3.0/0,M10.5.0/1' }, - { 'America/Hermosillo', 'MST7' }, - { 'America/Indiana/Indianapolis', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Knox', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Marengo', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Petersburg', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Tell City', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Vevay', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Vincennes', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Indiana/Winamac', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Inuvik', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/Iqaluit', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Jamaica', 'EST5' }, - { 'America/Juneau', 'AKST9AKDT,M3.2.0,M11.1.0' }, - { 'America/Kentucky/Louisville', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Kentucky/Monticello', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/La Paz', 'BOT4' }, - { 'America/Lima', 'PET5' }, - { 'America/Los Angeles', 'PST8PDT,M3.2.0,M11.1.0' }, - { 'America/Maceio', 'BRT3' }, - { 'America/Managua', 'CST6' }, - { 'America/Manaus', 'AMT4' }, - { 'America/Marigot', 'AST4' }, - { 'America/Martinique', 'AST4' }, - { 'America/Mazatlan', 'MST7MDT,M4.1.0,M10.5.0' }, - { 'America/Menominee', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Merida', 'CST6CDT,M4.1.0,M10.5.0' }, - { 'America/Mexico City', 'CST6CDT,M4.1.0,M10.5.0' }, - { 'America/Miquelon', 'PMST3PMDT,M3.2.0,M11.1.0' }, - { 'America/Moncton', 'AST4ADT,M3.2.0,M11.1.0' }, - { 'America/Monterrey', 'CST6CDT,M4.1.0,M10.5.0' }, - { 'America/Montevideo', 'UYT3UYST,M10.1.0,M3.2.0' }, - { 'America/Montreal', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Montserrat', 'AST4' }, - { 'America/Nassau', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/New York', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Nipigon', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Nome', 'AKST9AKDT,M3.2.0,M11.1.0' }, - { 'America/Noronha', 'FNT2' }, - { 'America/North Dakota/Center', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/North Dakota/New Salem', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Panama', 'EST5' }, - { 'America/Pangnirtung', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Paramaribo', 'SRT3' }, - { 'America/Phoenix', 'MST7' }, - { 'America/Port of Spain', 'AST4' }, - { 'America/Port-au-Prince', 'EST5' }, - { 'America/Porto Velho', 'AMT4' }, - { 'America/Puerto Rico', 'AST4' }, - { 'America/Rainy River', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Rankin Inlet', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Recife', 'BRT3' }, - { 'America/Regina', 'CST6' }, - { 'America/Resolute', 'EST5' }, - { 'America/Rio Branco', 'AMT4' }, - { 'America/Santarem', 'BRT3' }, - { 'America/Santo Domingo', 'AST4' }, - { 'America/Sao Paulo', 'BRT3BRST,M10.3.0/0,M2.3.0/0' }, - { 'America/Scoresbysund', 'EGT1EGST,M3.5.0/0,M10.5.0/1' }, - { 'America/Shiprock', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'America/St Barthelemy', 'AST4' }, - { 'America/St Johns', 'NST3:30NDT,M3.2.0/0:01,M11.1.0/0:01' }, - { 'America/St Kitts', 'AST4' }, - { 'America/St Lucia', 'AST4' }, - { 'America/St Thomas', 'AST4' }, - { 'America/St Vincent', 'AST4' }, - { 'America/Swift Current', 'CST6' }, - { 'America/Tegucigalpa', 'CST6' }, - { 'America/Thule', 'AST4ADT,M3.2.0,M11.1.0' }, - { 'America/Thunder Bay', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Tijuana', 'PST8PDT,M4.1.0,M10.5.0' }, - { 'America/Toronto', 'EST5EDT,M3.2.0,M11.1.0' }, - { 'America/Tortola', 'AST4' }, - { 'America/Vancouver', 'PST8PDT,M3.2.0,M11.1.0' }, - { 'America/Whitehorse', 'PST8PDT,M3.2.0,M11.1.0' }, - { 'America/Winnipeg', 'CST6CDT,M3.2.0,M11.1.0' }, - { 'America/Yakutat', 'AKST9AKDT,M3.2.0,M11.1.0' }, - { 'America/Yellowknife', 'MST7MDT,M3.2.0,M11.1.0' }, - { 'Antarctica/Casey', 'WST-8' }, - { 'Antarctica/Davis', 'DAVT-7' }, - { 'Antarctica/DumontDUrville', 'DDUT-10' }, - { 'Antarctica/Mawson', 'MAWT-6' }, - { 'Antarctica/McMurdo', 'NZST-12NZDT,M9.5.0,M4.1.0/3' }, - { 'Antarctica/Rothera', 'ROTT3' }, - { 'Antarctica/South Pole', 'NZST-12NZDT,M9.5.0,M4.1.0/3' }, - { 'Antarctica/Syowa', 'SYOT-3' }, - { 'Antarctica/Vostok', 'VOST-6' }, - { 'Arctic/Longyearbyen', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Asia/Aden', 'AST-3' }, - { 'Asia/Almaty', 'ALMT-6' }, - { 'Asia/Amman', 'EET-2EEST,M3.5.4/0,M10.5.5/1' }, - { 'Asia/Anadyr', 'ANAT-12ANAST,M3.5.0,M10.5.0/3' }, - { 'Asia/Aqtau', 'AQTT-5' }, - { 'Asia/Aqtobe', 'AQTT-5' }, - { 'Asia/Ashgabat', 'TMT-5' }, - { 'Asia/Baghdad', 'AST-3' }, - { 'Asia/Bahrain', 'AST-3' }, - { 'Asia/Baku', 'AZT-4AZST,M3.5.0/4,M10.5.0/5' }, - { 'Asia/Bangkok', 'ICT-7' }, - { 'Asia/Beirut', 'EET-2EEST,M3.5.0/0,M10.5.0/0' }, - { 'Asia/Bishkek', 'KGT-6' }, - { 'Asia/Brunei', 'BNT-8' }, - { 'Asia/Choibalsan', 'CHOT-8' }, - { 'Asia/Chongqing', 'CST-8' }, - { 'Asia/Colombo', 'IST-5:30' }, - { 'Asia/Damascus', 'EET-2EEST,M4.1.5/0,J305/0' }, - { 'Asia/Dhaka', 'BDT-6' }, - { 'Asia/Dili', 'TLT-9' }, - { 'Asia/Dubai', 'GST-4' }, - { 'Asia/Dushanbe', 'TJT-5' }, - { 'Asia/Gaza', 'EET-2EEST,J91/0,M8.5.4' }, - { 'Asia/Harbin', 'CST-8' }, - { 'Asia/Ho Chi Minh', 'ICT-7' }, - { 'Asia/Hong Kong', 'HKT-8' }, - { 'Asia/Hovd', 'HOVT-7' }, - { 'Asia/Irkutsk', 'IRKT-8IRKST,M3.5.0,M10.5.0/3' }, - { 'Asia/Jakarta', 'WIT-7' }, - { 'Asia/Jayapura', 'EIT-9' }, - { 'Asia/Kabul', 'AFT-4:30' }, - { 'Asia/Kamchatka', 'PETT-12PETST,M3.5.0,M10.5.0/3' }, - { 'Asia/Karachi', 'PKT-5' }, - { 'Asia/Kashgar', 'CST-8' }, - { 'Asia/Katmandu', 'NPT-5:45' }, - { 'Asia/Kolkata', 'IST-5:30' }, - { 'Asia/Krasnoyarsk', 'KRAT-7KRAST,M3.5.0,M10.5.0/3' }, - { 'Asia/Kuala Lumpur', 'MYT-8' }, - { 'Asia/Kuching', 'MYT-8' }, - { 'Asia/Kuwait', 'AST-3' }, - { 'Asia/Macau', 'CST-8' }, - { 'Asia/Magadan', 'MAGT-11MAGST,M3.5.0,M10.5.0/3' }, - { 'Asia/Makassar', 'CIT-8' }, - { 'Asia/Manila', 'PHT-8' }, - { 'Asia/Muscat', 'GST-4' }, - { 'Asia/Nicosia', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Asia/Novosibirsk', 'NOVT-6NOVST,M3.5.0,M10.5.0/3' }, - { 'Asia/Omsk', 'OMST-6OMSST,M3.5.0,M10.5.0/3' }, - { 'Asia/Oral', 'ORAT-5' }, - { 'Asia/Phnom Penh', 'ICT-7' }, - { 'Asia/Pontianak', 'WIT-7' }, - { 'Asia/Pyongyang', 'KST-9' }, - { 'Asia/Qatar', 'AST-3' }, - { 'Asia/Qyzylorda', 'QYZT-6' }, - { 'Asia/Rangoon', 'MMT-6:30' }, - { 'Asia/Riyadh', 'AST-3' }, - { 'Asia/Sakhalin', 'SAKT-10SAKST,M3.5.0,M10.5.0/3' }, - { 'Asia/Samarkand', 'UZT-5' }, - { 'Asia/Seoul', 'KST-9' }, - { 'Asia/Shanghai', 'CST-8' }, - { 'Asia/Singapore', 'SGT-8' }, - { 'Asia/Taipei', 'CST-8' }, - { 'Asia/Tashkent', 'UZT-5' }, - { 'Asia/Tbilisi', 'GET-4' }, - { 'Asia/Thimphu', 'BTT-6' }, - { 'Asia/Tokyo', 'JST-9' }, - { 'Asia/Ulaanbaatar', 'ULAT-8' }, - { 'Asia/Urumqi', 'CST-8' }, - { 'Asia/Vientiane', 'ICT-7' }, - { 'Asia/Vladivostok', 'VLAT-10VLAST,M3.5.0,M10.5.0/3' }, - { 'Asia/Yakutsk', 'YAKT-9YAKST,M3.5.0,M10.5.0/3' }, - { 'Asia/Yekaterinburg', 'YEKT-5YEKST,M3.5.0,M10.5.0/3' }, - { 'Asia/Yerevan', 'AMT-4AMST,M3.5.0,M10.5.0/3' }, - { 'Atlantic/Azores', 'AZOT1AZOST,M3.5.0/0,M10.5.0/1' }, - { 'Atlantic/Bermuda', 'AST4ADT,M3.2.0,M11.1.0' }, - { 'Atlantic/Canary', 'WET0WEST,M3.5.0/1,M10.5.0' }, - { 'Atlantic/Cape Verde', 'CVT1' }, - { 'Atlantic/Faroe', 'WET0WEST,M3.5.0/1,M10.5.0' }, - { 'Atlantic/Madeira', 'WET0WEST,M3.5.0/1,M10.5.0' }, - { 'Atlantic/Reykjavik', 'GMT0' }, - { 'Atlantic/South Georgia', 'GST2' }, - { 'Atlantic/St Helena', 'GMT0' }, - { 'Atlantic/Stanley', 'FKT4FKST,M9.1.0,M4.3.0' }, - { 'Australia/Adelaide', 'CST-9:30CST,M10.1.0,M4.1.0/3' }, - { 'Australia/Brisbane', 'EST-10' }, - { 'Australia/Broken Hill', 'CST-9:30CST,M10.1.0,M4.1.0/3' }, - { 'Australia/Currie', 'EST-10EST,M10.1.0,M4.1.0/3' }, - { 'Australia/Darwin', 'CST-9:30' }, - { 'Australia/Eucla', 'CWST-8:45' }, - { 'Australia/Hobart', 'EST-10EST,M10.1.0,M4.1.0/3' }, - { 'Australia/Lindeman', 'EST-10' }, - { 'Australia/Lord Howe', 'LHST-10:30LHST-11,M10.1.0,M4.1.0' }, - { 'Australia/Melbourne', 'EST-10EST,M10.1.0,M4.1.0/3' }, - { 'Australia/Perth', 'WST-8' }, - { 'Australia/Sydney', 'EST-10EST,M10.1.0,M4.1.0/3' }, - { 'Europe/Amsterdam', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Andorra', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Athens', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Belgrade', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Berlin', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Bratislava', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Brussels', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Bucharest', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Budapest', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Chisinau', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Copenhagen', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Dublin', 'GMT0IST,M3.5.0/1,M10.5.0' }, - { 'Europe/Gibraltar', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Guernsey', 'GMT0BST,M3.5.0/1,M10.5.0' }, - { 'Europe/Helsinki', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Isle of Man', 'GMT0BST,M3.5.0/1,M10.5.0' }, - { 'Europe/Istanbul', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Jersey', 'GMT0BST,M3.5.0/1,M10.5.0' }, - { 'Europe/Kaliningrad', 'EET-2EEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Kiev', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Lisbon', 'WET0WEST,M3.5.0/1,M10.5.0' }, - { 'Europe/Ljubljana', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/London', 'GMT0BST,M3.5.0/1,M10.5.0' }, - { 'Europe/Luxembourg', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Madrid', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Malta', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Mariehamn', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Minsk', 'EET-2EEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Monaco', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Moscow', 'MSK-3MSD,M3.5.0,M10.5.0/3' }, - { 'Europe/Oslo', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Paris', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Podgorica', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Prague', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Riga', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Rome', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Samara', 'SAMT-4SAMST,M3.5.0,M10.5.0/3' }, - { 'Europe/San Marino', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Sarajevo', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Simferopol', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Skopje', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Sofia', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Stockholm', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Tallinn', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Tirane', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Uzhgorod', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Vaduz', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Vatican', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Vienna', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Vilnius', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Volgograd', 'VOLT-3VOLST,M3.5.0,M10.5.0/3' }, - { 'Europe/Warsaw', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Zagreb', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Europe/Zaporozhye', 'EET-2EEST,M3.5.0/3,M10.5.0/4' }, - { 'Europe/Zurich', 'CET-1CEST,M3.5.0,M10.5.0/3' }, - { 'Indian/Antananarivo', 'EAT-3' }, - { 'Indian/Chagos', 'IOT-6' }, - { 'Indian/Christmas', 'CXT-7' }, - { 'Indian/Cocos', 'CCT-6:30' }, - { 'Indian/Comoro', 'EAT-3' }, - { 'Indian/Kerguelen', 'TFT-5' }, - { 'Indian/Mahe', 'SCT-4' }, - { 'Indian/Maldives', 'MVT-5' }, - { 'Indian/Mauritius', 'MUT-4MUST,M10.5.0,M3.5.0/3' }, - { 'Indian/Mayotte', 'EAT-3' }, - { 'Indian/Reunion', 'RET-4' }, - { 'Pacific/Apia', 'WST11' }, - { 'Pacific/Auckland', 'NZST-12NZDT,M9.5.0,M4.1.0/3' }, - { 'Pacific/Chatham', 'CHAST-12:45CHADT,M9.5.0/2:45,M4.1.0/3:45' }, - { 'Pacific/Efate', 'VUT-11' }, - { 'Pacific/Enderbury', 'PHOT-13' }, - { 'Pacific/Fakaofo', 'TKT10' }, - { 'Pacific/Fiji', 'FJT-12' }, - { 'Pacific/Funafuti', 'TVT-12' }, - { 'Pacific/Galapagos', 'GALT6' }, - { 'Pacific/Gambier', 'GAMT9' }, - { 'Pacific/Guadalcanal', 'SBT-11' }, - { 'Pacific/Guam', 'ChST-10' }, - { 'Pacific/Honolulu', 'HST10' }, - { 'Pacific/Johnston', 'HST10' }, - { 'Pacific/Kiritimati', 'LINT-14' }, - { 'Pacific/Kosrae', 'KOST-11' }, - { 'Pacific/Kwajalein', 'MHT-12' }, - { 'Pacific/Majuro', 'MHT-12' }, - { 'Pacific/Marquesas', 'MART9:30' }, - { 'Pacific/Midway', 'SST11' }, - { 'Pacific/Nauru', 'NRT-12' }, - { 'Pacific/Niue', 'NUT11' }, - { 'Pacific/Norfolk', 'NFT-11:30' }, - { 'Pacific/Noumea', 'NCT-11' }, - { 'Pacific/Pago Pago', 'SST11' }, - { 'Pacific/Palau', 'PWT-9' }, - { 'Pacific/Pitcairn', 'PST8' }, - { 'Pacific/Ponape', 'PONT-11' }, - { 'Pacific/Port Moresby', 'PGT-10' }, - { 'Pacific/Rarotonga', 'CKT10' }, - { 'Pacific/Saipan', 'ChST-10' }, - { 'Pacific/Tahiti', 'TAHT10' }, - { 'Pacific/Tarawa', 'GILT-12' }, - { 'Pacific/Tongatapu', 'TOT-13' }, - { 'Pacific/Truk', 'TRUT-10' }, - { 'Pacific/Wake', 'WAKT-12' }, - { 'Pacific/Wallis', 'WFT-12' }, -} - -OFFSET = { - gmt = 0, -- GMT - eat = 10800, -- EAT - cet = 3600, -- CET - wat = 3600, -- WAT - cat = 7200, -- CAT - wet = 0, -- WET - sast = 7200, -- SAST - eet = 7200, -- EET - hast = -36000, -- HAST - hadt = -32400, -- HADT - akst = -32400, -- AKST - akdt = -28800, -- AKDT - ast = -14400, -- AST - brt = -10800, -- BRT - art = -10800, -- ART - arst = -7200, -- ARST - pyt = -14400, -- PYT - pyst = -10800, -- PYST - est = -18000, -- EST - cst = -21600, -- CST - amt = -14400, -- AMT - cot = -18000, -- COT - mst = -25200, -- MST - mdt = -21600, -- MDT - vet = -16200, -- VET - gft = -10800, -- GFT - pst = -28800, -- PST - pdt = -25200, -- PDT - ect = -18000, -- ECT - gyt = -14400, -- GYT - bot = -14400, -- BOT - pet = -18000, -- PET - pmst = -10800, -- PMST - pmdt = -7200, -- PMDT - uyt = -10800, -- UYT - uyst = -7200, -- UYST - fnt = -7200, -- FNT - srt = -10800, -- SRT - egt = -3600, -- EGT - egst = 0, -- EGST - nst = -12600, -- NST - ndt = -9000, -- NDT - wst = 28800, -- WST - davt = 25200, -- DAVT - ddut = 36000, -- DDUT - mawt = 21600, -- MAWT - nzst = 43200, -- NZST - nzdt = 46800, -- NZDT - rott = -10800, -- ROTT - syot = 10800, -- SYOT - vost = 21600, -- VOST - almt = 21600, -- ALMT - anat = 43200, -- ANAT - anast = 46800, -- ANAST - aqtt = 18000, -- AQTT - tmt = 18000, -- TMT - azt = 14400, -- AZT - azst = 18000, -- AZST - ict = 25200, -- ICT - kgt = 21600, -- KGT - bnt = 28800, -- BNT - chot = 28800, -- CHOT - ist = 19800, -- IST - bdt = 21600, -- BDT - tlt = 32400, -- TLT - gst = 14400, -- GST - tjt = 18000, -- TJT - hkt = 28800, -- HKT - hovt = 25200, -- HOVT - irkt = 28800, -- IRKT - irkst = 32400, -- IRKST - wit = 25200, -- WIT - eit = 32400, -- EIT - aft = 16200, -- AFT - pett = 43200, -- PETT - petst = 46800, -- PETST - pkt = 18000, -- PKT - npt = 20700, -- NPT - krat = 25200, -- KRAT - krast = 28800, -- KRAST - myt = 28800, -- MYT - magt = 39600, -- MAGT - magst = 43200, -- MAGST - cit = 28800, -- CIT - pht = 28800, -- PHT - novt = 21600, -- NOVT - novst = 25200, -- NOVST - omst = 21600, -- OMST - omsst = 25200, -- OMSST - orat = 18000, -- ORAT - kst = 32400, -- KST - qyzt = 21600, -- QYZT - mmt = 23400, -- MMT - sakt = 36000, -- SAKT - sakst = 39600, -- SAKST - uzt = 18000, -- UZT - sgt = 28800, -- SGT - get = 14400, -- GET - btt = 21600, -- BTT - jst = 32400, -- JST - ulat = 28800, -- ULAT - vlat = 36000, -- VLAT - vlast = 39600, -- VLAST - yakt = 32400, -- YAKT - yakst = 36000, -- YAKST - yekt = 18000, -- YEKT - yekst = 21600, -- YEKST - azot = -3600, -- AZOT - azost = 0, -- AZOST - cvt = -3600, -- CVT - fkt = -14400, -- FKT - fkst = -10800, -- FKST - cwst = 31500, -- CWST - lhst = 37800, -- LHST - lhst = 39600, -- LHST - msk = 10800, -- MSK - msd = 14400, -- MSD - samt = 14400, -- SAMT - samst = 18000, -- SAMST - volt = 10800, -- VOLT - volst = 14400, -- VOLST - iot = 21600, -- IOT - cxt = 25200, -- CXT - cct = 23400, -- CCT - tft = 18000, -- TFT - sct = 14400, -- SCT - mvt = 18000, -- MVT - mut = 14400, -- MUT - must = 18000, -- MUST - ret = 14400, -- RET - chast = 45900, -- CHAST - chadt = 49500, -- CHADT - vut = 39600, -- VUT - phot = 46800, -- PHOT - tkt = -36000, -- TKT - fjt = 43200, -- FJT - tvt = 43200, -- TVT - galt = -21600, -- GALT - gamt = -32400, -- GAMT - sbt = 39600, -- SBT - hst = -36000, -- HST - lint = 50400, -- LINT - kost = 39600, -- KOST - mht = 43200, -- MHT - mart = -34200, -- MART - sst = -39600, -- SST - nrt = 43200, -- NRT - nut = -39600, -- NUT - nft = 41400, -- NFT - nct = 39600, -- NCT - pwt = 32400, -- PWT - pont = 39600, -- PONT - pgt = 36000, -- PGT - ckt = -36000, -- CKT - taht = -36000, -- TAHT - gilt = 43200, -- GILT - tot = 46800, -- TOT - trut = 36000, -- TRUT - wakt = 43200, -- WAKT - wft = 43200, -- WFT -} diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/template.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/template.lua deleted file mode 100644 index df30060..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/template.lua +++ /dev/null @@ -1,239 +0,0 @@ ---[[ -LuCI - Template Parser - -Description: -A template parser supporting includes, translations, Lua code blocks -and more. It can be used either as a compiler or as an interpreter. - -FileId: $Id: template.lua 3246 2008-09-12 07:48:36Z Cyrus $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local fs = require"luci.fs" -local sys = require "luci.sys" -local util = require "luci.util" -local table = require "table" -local string = require "string" -local config = require "luci.config" -local coroutine = require "coroutine" - -local tostring, pairs, loadstring = tostring, pairs, loadstring -local setmetatable, loadfile = setmetatable, loadfile -local getfenv, setfenv, rawget = getfenv, setfenv, rawget -local assert, type, error = assert, type, error - ---- LuCI template library. -module "luci.template" - -config.template = config.template or {} - -viewdir = config.template.viewdir or util.libpath() .. "/view" -compiledir = config.template.compiledir or util.libpath() .. "/view" - - --- Compile modes: --- memory: Always compile, do not save compiled files, ignore precompiled --- file: Compile on demand, save compiled files, update precompiled -compiler_mode = config.template.compiler_mode or "memory" - - --- Define the namespace for template modules -context = util.threadlocal() - ---- Manually compile a given template into an executable Lua function --- @param template LuCI template --- @return Lua template function -function compile(template) - local expr = {} - - -- Search all <% %> expressions - local function expr_add(ws1, skip1, command, skip2, ws2) - expr[#expr+1] = command - return ( #skip1 > 0 and "" or ws1 ) .. - "<%" .. tostring(#expr) .. "%>" .. - ( #skip2 > 0 and "" or ws2 ) - end - - -- Save all expressiosn to table "expr" - template = template:gsub("(%s*)<%%(%-?)(.-)(%-?)%%>(%s*)", expr_add) - - local function sanitize(s) - s = "%q" % s - return s:sub(2, #s-1) - end - - -- Escape and sanitize all the template (all non-expressions) - template = sanitize(template) - - -- Template module header/footer declaration - local header = 'write("' - local footer = '")' - - template = header .. template .. footer - - -- Replacements - local r_include = '")\ninclude("%s")\nwrite("' - local r_i18n = '"..translate("%1","%2").."' - local r_i18n2 = '"..translate("%1", "").."' - local r_pexec = '"..(%s or "").."' - local r_exec = '")\n%s\nwrite("' - - -- Parse the expressions - for k,v in pairs(expr) do - local p = v:sub(1, 1) - v = v:gsub("%%", "%%%%") - local re = nil - if p == "+" then - re = r_include:format(sanitize(string.sub(v, 2))) - elseif p == ":" then - if v:find(" ") then - re = sanitize(v):gsub(":(.-) (.*)", r_i18n) - else - re = sanitize(v):gsub(":(.+)", r_i18n2) - end - elseif p == "=" then - re = r_pexec:format(v:sub(2)) - elseif p == "#" then - re = "" - else - re = r_exec:format(v) - end - template = template:gsub("<%%"..tostring(k).."%%>", re) - end - - return loadstring(template) -end - ---- Render a certain template. --- @param name Template name --- @param scope Scope to assign to template (optional) -function render(name, scope) - return Template(name):render(scope or getfenv(2)) -end - - --- Template class -Template = util.class() - --- Shared template cache to store templates in to avoid unnecessary reloading -Template.cache = setmetatable({}, {__mode = "v"}) - - --- Constructor - Reads and compiles the template on-demand -function Template.__init__(self, name) - local function _encode_filename(str) - - local function __chrenc( chr ) - return "%%%02x" % string.byte( chr ) - end - - if type(str) == "string" then - str = str:gsub( - "([^a-zA-Z0-9$_%-%.%+!*'(),])", - __chrenc - ) - end - - return str - end - - self.template = self.cache[name] - self.name = name - - -- Create a new namespace for this template - self.viewns = context.viewns - - -- If we have a cached template, skip compiling and loading - if self.template then - return - end - - -- Enforce cache security - local cdir = compiledir .. "/" .. sys.process.info("uid") - - -- Compile and build - local sourcefile = viewdir .. "/" .. name - local compiledfile = cdir .. "/" .. _encode_filename(name) .. ".lua" - local err - - if compiler_mode == "file" then - local tplmt = fs.mtime(sourcefile) or fs.mtime(sourcefile .. ".htm") - local commt = fs.mtime(compiledfile) - - if not fs.mtime(cdir) then - fs.mkdir(cdir, true) - fs.chmod(fs.dirname(cdir), "a+rxw") - end - - assert(tplmt or commt, "No such template: " .. name) - - -- Build if there is no compiled file or if compiled file is outdated - if not commt or (commt and tplmt and commt < tplmt) then - local source - source, err = fs.readfile(sourcefile) or fs.readfile(sourcefile .. ".htm") - - if source then - local compiled, err = compile(source) - - fs.writefile(compiledfile, util.get_bytecode(compiled)) - fs.chmod(compiledfile, "a-rwx,u+rw") - self.template = compiled - end - else - assert( - sys.process.info("uid") == fs.stat(compiledfile, "uid") - and fs.stat(compiledfile, "mode") == "rw-------", - "Fatal: Cachefile is not sane!" - ) - self.template, err = loadfile(compiledfile) - end - - elseif compiler_mode == "memory" then - local source - source, err = fs.readfile(sourcefile) or fs.readfile(sourcefile .. ".htm") - if source then - self.template, err = compile(source) - end - - end - - -- If we have no valid template throw error, otherwise cache the template - if not self.template then - error(err) - else - self.cache[name] = self.template - end -end - - --- Renders a template -function Template.render(self, scope) - scope = scope or getfenv(2) - - -- Put our predefined objects in the scope of the template - setfenv(self.template, setmetatable({}, {__index = - function(tbl, key) - return rawget(tbl, key) or self.viewns[key] or scope[key] - end})) - - -- Now finally render the thing - local stat, err = util.copcall(self.template) - if not stat then - error("Error in template %s: %s" % {self.name, err}) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/ffwizard.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/ffwizard.lua deleted file mode 100644 index 3f5e17a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/ffwizard.lua +++ /dev/null @@ -1,149 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ffwizard.lua 3941 2008-12-23 21:39:38Z jow $ - -]]-- - -local uci = require "luci.model.uci" -local util = require "luci.util" -local table = require "table" - -local type = type - -module "luci.tools.ffwizard" - --- Deletes all references of a wifi device -function wifi_delete_ifaces(device) - local cursor = uci.cursor() - cursor:delete_all("wireless", "wifi-iface", {device=device}) - cursor:save("wireless") -end - --- Deletes a network interface and all occurences of it in firewall zones and dhcp -function network_remove_interface(iface) - local cursor = uci.cursor() - - if not cursor:delete("network", iface) then - return false - end - - local aliases = {iface} - cursor:foreach("network", "alias", - function(section) - if section.interface == iface then - table.insert(aliases, section[".name"]) - end - end) - - -- Delete Aliases and Routes - cursor:delete_all("network", "route", {interface=iface}) - cursor:delete_all("network", "alias", {interface=iface}) - - -- Delete DHCP sections - cursor:delete_all("dhcp", "dhcp", - function(section) - return util.contains(aliases, section.interface) - end) - - -- Remove OLSR sections - cursor:delete_all("olsrd", "Interface", {Interface=iface}) - - -- Remove Splash sections - cursor:delete_all("luci-splash", "iface", {network=iface}) - - cursor:save("network") - cursor:save("olsr") - cursor:save("dhcp") - cursor:save("luci-splash") -end - --- Creates a firewall zone -function firewall_create_zone(zone, input, output, forward, masq) - local cursor = uci.cursor() - if not firewall_find_zone(zone) then - local stat = cursor:section("firewall", "zone", nil, { - input = input, - output = output, - forward = forward, - masq = masq and "1", - name = zone - }) - cursor:save("firewall") - return stat - end -end - --- Adds interface to zone, creates zone on-demand -function firewall_zone_add_interface(name, interface) - local cursor = uci.cursor() - local zone = firewall_find_zone(name) - local net = cursor:get("firewall", zone, "network") - local old = net or (cursor:get("network", name) and name) - cursor:set("firewall", zone, "network", (old and old .. " " or "") .. interface) - cursor:save("firewall") -end - --- Removes interface from zone -function firewall_zone_remove_interface(name, interface) - local cursor = uci.cursor() - local zone = firewall_find_zone(name) - if zone then - local net = cursor:get("firewall", zone, "network") - local new = remove_list_entry(net, interface) - if new then - if #new > 0 then - cursor:set("firewall", zone, "network", new) - else - cursor:delete("firewall", zone, "network") - end - cursor:save("firewall") - end - end -end - - --- Finds the firewall zone with given name -function firewall_find_zone(name) - local find - - uci.cursor():foreach("firewall", "zone", - function (section) - if section.name == name then - find = section[".name"] - end - end) - - return find -end - - - --- Helpers -- - --- Removes a listentry, handles real and pseduo lists transparently -function remove_list_entry(value, entry) - if type(value) == "nil" then - return nil - end - - local result = type(value) == "table" and value or util.split(value, " ") - local key = util.contains(result, entry) - - while key do - table.remove(result, key) - key = util.contains(result, entry) - end - - result = type(value) == "table" and result or table.concat(result, " ") - return result ~= value and result -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/webadmin.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/webadmin.lua deleted file mode 100644 index ae90c50..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/tools/webadmin.lua +++ /dev/null @@ -1,173 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: webadmin.lua 4169 2009-01-27 17:15:58Z jow $ -]]-- - -module("luci.tools.webadmin", package.seeall) -local uci = require("luci.model.uci") -require("luci.sys") -require("luci.ip") - -function byte_format(byte) - local suff = {"B", "KB", "MB", "GB", "TB"} - for i=1, 5 do - if byte > 1024 and i < 5 then - byte = byte / 1024 - else - return string.format("%.2f %s", byte, suff[i]) - end - end -end - -function date_format(secs) - local suff = {"min", "h", "d"} - local mins = 0 - local hour = 0 - local days = 0 - - secs = math.floor(secs) - if secs > 60 then - mins = math.floor(secs / 60) - secs = secs % 60 - end - - if mins > 60 then - hour = math.floor(mins / 60) - mins = mins % 60 - end - - if hour > 24 then - days = math.floor(hour / 24) - hour = hour % 24 - end - - if days > 0 then - return string.format("%.0fd %02.0fh %02.0fmin %02.0fs", days, hour, mins, secs) - else - return string.format("%02.0fh %02.0fmin %02.0fs", hour, mins, secs) - end -end - -function network_get_addresses(net) - local state = uci.cursor_state() - state:load("network") - local addr = {} - local ipv4 = state:get("network", net, "ipaddr") - local mav4 = state:get("network", net, "netmask") - local ipv6 = state:get("network", net, "ip6addr") - - if ipv4 and #ipv4 > 0 then - if mav4 and #mav4 == 0 then mav4 = nil end - - ipv4 = luci.ip.IPv4(ipv4, mav4) - - if ipv4 then - table.insert(addr, ipv4:string()) - end - end - - if ipv6 then - table.insert(addr, ipv6) - end - - state:foreach("network", "alias", - function (section) - if section.interface == net then - if section.ipaddr and section.netmask then - local ipv4 = luci.ip.IPv4(section.ipaddr, section.netmask) - - if ipv4 then - table.insert(addr, ipv4:string()) - end - end - - if section.ip6addr then - table.insert(addr, section.ip6addr) - end - end - end - ) - - return addr -end - -function cbi_add_networks(field) - uci.cursor():foreach("network", "interface", - function (section) - if section[".name"] ~= "loopback" then - field:value(section[".name"]) - end - end - ) - field.titleref = luci.dispatcher.build_url("admin", "network", "network") -end - -function cbi_add_knownips(field) - for i, dataset in ipairs(luci.sys.net.arptable()) do - field:value(dataset["IP address"]) - end -end - -function network_get_zones(net) - local state = uci.cursor_state() - if not state:load("firewall") then - return nil - end - - local zones = {} - - state:foreach("firewall", "zone", - function (section) - local znet = section.network or section.name - if luci.util.contains(luci.util.split(znet, " "), net) then - table.insert(zones, section.name) - end - end - ) - - return zones -end - -function firewall_find_zone(name) - local find - - luci.model.uci.cursor():foreach("firewall", "zone", - function (section) - if section.name == name then - find = section[".name"] - end - end - ) - - return find -end - -function iface_get_network(iface) - local state = uci.cursor_state() - state:load("network") - local net - - state:foreach("network", "interface", - function (section) - local ifname = state:get( - "network", section[".name"], "ifname" - ) - - if iface == ifname then - net = section[".name"] - end - end - ) - - return net -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/file.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/file.lua deleted file mode 100644 index e1f707c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/file.lua +++ /dev/null @@ -1,252 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - file handler -(c) 2008 Steven Barth -(c) 2008 Freifunk Leipzig / Jo-Philipp Wich - -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 - -$Id$ - -]]-- - -local ipairs, type, tonumber = ipairs, type, tonumber -local io = require "io" -local os = require "os" -local fs = require "luci.fs" -local util = require "luci.util" -local ltn12 = require "luci.ltn12" -local mod = require "luci.ttpd.module" -local srv = require "luci.ttpd.server" -local string = require "string" - -local prot = require "luci.http.protocol" -local date = require "luci.http.protocol.date" -local mime = require "luci.http.protocol.mime" -local cond = require "luci.http.protocol.conditionals" - -module "luci.ttpd.handler.file" - -Simple = util.class(mod.Handler) -Response = mod.Response - -function Simple.__init__(self, docroot, dirlist) - mod.Handler.__init__(self) - self.docroot = docroot - self.dirlist = dirlist and true or false -end - -function Simple.parse_range(self, request, size) - if not request.headers.Range then - return true - end - - local from, to = request.headers.Range:match("bytes=([0-9]*)-([0-9]*)") - if not (from or to) then - return true - end - - from, to = tonumber(from), tonumber(to) - if not (from or to) then - return true - elseif not from then - from, to = size - to, size - 1 - elseif not to then - to = size - 1 - end - - -- Not satisfiable - if from >= size then - return false - end - - -- Normalize - if to >= size then - to = size - 1 - end - - local range = "bytes " .. from .. "-" .. to .. "/" .. size - return from, (1 + to - from), range -end - -function Simple.getfile(self, uri) - local file = self.docroot .. uri:gsub("%.%./+", "") - local stat = fs.stat(file) - - return file, stat -end - -function Simple.handle_get(self, request, sourcein, sinkerr) - local file, stat = self:getfile( prot.urldecode( request.env.PATH_INFO, true ) ) - - if stat then - if stat.type == "regular" then - - -- Generate Entity Tag - local etag = cond.mk_etag( stat ) - - -- Check conditionals - local ok, code, hdrs - - ok, code, hdrs = cond.if_modified_since( request, stat ) - if ok then - ok, code, hdrs = cond.if_match( request, stat ) - if ok then - ok, code, hdrs = cond.if_unmodified_since( request, stat ) - if ok then - ok, code, hdrs = cond.if_none_match( request, stat ) - if ok then - local f, err = io.open(file) - - if f then - local code = 200 - local o, s, r = self:parse_range(request, stat.size) - - if not o then - return self:failure(416, "Invalid Range") - end - - local headers = { - ["Last-Modified"] = date.to_http( stat.mtime ), - ["Content-Type"] = mime.to_mime( file ), - ["ETag"] = etag, - ["Accept-Ranges"] = "bytes", - } - - if o == true then - o = 0 - s = stat.size - else - code = 206 - headers["Content-Range"] = r - end - - headers["Content-Length"] = s - - -- Send Response - return Response(code, headers), - srv.IOResource(f, o, s) - else - return self:failure( 403, err:gsub("^.+: ", "") ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - else - return Response( code, hdrs or { } ) - end - - elseif stat.type == "directory" then - - local ruri = request.request_uri:gsub("/$","") - local duri = prot.urldecode( ruri, true ) - local root = self.docroot:gsub("/$","") - - -- check for index files - local index_candidates = { - "index.html", "index.htm", "default.html", "default.htm", - "index.txt", "default.txt" - } - - -- try to find an index file and redirect to it - for i, candidate in ipairs( index_candidates ) do - local istat = fs.stat( - root .. "/" .. duri .. "/" .. candidate - ) - - if istat ~= nil and istat.type == "regular" then - return Response( 302, { - ["Location"] = ruri .. "/" .. candidate - } ) - end - end - - - local html = string.format( - '\n' .. - '\n' .. - '\n' .. - '\n' .. - 'Index of %s/\n' .. - '

Index of %s/


    ', - duri, duri - ) - - local entries = fs.dir( file ) - - if type(entries) == "table" then - for i, e in util.spairs( - entries, function(a,b) - if entries[a] == '..' then - return true - elseif entries[b] == '..' then - return false - else - return ( entries[a] < entries[b] ) - end - end - ) do - if e ~= '.' and ( e == '..' or e:sub(1,1) ~= '.' ) then - local estat = fs.stat( file .. "/" .. e ) - - if estat.type == "directory" then - html = html .. string.format( - '
  • %s/ ' .. - '(directory)
    ' .. - 'Changed: %s

  • ', - ruri, prot.urlencode( e ), e, - date.to_http( estat.mtime ) - ) - else - html = html .. string.format( - '
  • %s ' .. - '(%s)
    ' .. - 'Size: %i Bytes | ' .. - 'Changed: %s

  • ', - ruri, prot.urlencode( e ), e, - mime.to_mime( e ), - estat.size, date.to_http( estat.mtime ) - ) - end - end - end - - html = html .. '

' - - return Response( - 200, { - ["Date"] = date.to_http( os.time() ); - ["Content-Type"] = "text/html; charset=ISO-8859-15"; - } - ), ltn12.source.string(html) - else - return self:failure(403, "Permission denied") - end - else - return self:failure(403, "Unable to transmit " .. stat.type .. " " .. file) - end - else - return self:failure(404, "No such file: " .. file) - end -end - -function Simple.handle_head(self, ...) - return (self:handle_get(...)) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/luci.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/luci.lua deleted file mode 100644 index eb60625..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/handler/luci.lua +++ /dev/null @@ -1,92 +0,0 @@ ---[[ - -HTTP server implementation for LuCI - luci handler -(c) 2008 Steven Barth - -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 - -$Id$ - -]]-- -local dsp = require "luci.dispatcher" -local util = require "luci.util" -local http = require "luci.http" -local ltn12 = require "luci.ltn12" -local mod = require "luci.ttpd.module" -local table = require "table" -local coroutine = require "coroutine" - -module "luci.ttpd.handler.luci" - -Luci = util.class(mod.Handler) -Response = mod.Response - -function Luci.__init__(self, limit) - mod.Handler.__init__(self) -end - -function Luci.handle_head(self, ...) - return (self:handle_get(...)) -end - -function Luci.handle_post(self, ...) - return self:handle_get(...) -end - -function Luci.handle_get(self, request, sourcein, sinkerr) - local r = http.Request( - request.env, - sourcein, - sinkerr - ) - - local res, id, data1, data2 = true, 0, nil, nil - local headers = {} - local status = 200 - local active = true - - local x = coroutine.create(dsp.httpdispatch) - while not id or id < 3 do - res, id, data1, data2 = coroutine.resume(x, r) - - if not res then - status = 500 - headers["Content-Type"] = "text/plain" - local err = {id} - return Response( status, headers ), function() return table.remove(err) end - end - - if id == 1 then - status = data1 - elseif id == 2 then - headers[data1] = data2 - end - end - - local function iter() - local res, id, data = coroutine.resume(x) - if not res then - return nil, id - elseif not id or not active then - return true - elseif id == 5 then - active = false - - while (coroutine.resume(x)) do - end - - return nil - elseif id == 4 then - return data - end - if coroutine.status(x) == "dead" then - return nil - end - end - - return Response(status, headers), iter -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/module.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/module.lua deleted file mode 100644 index 1a7c574..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/module.lua +++ /dev/null @@ -1,121 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth - -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 - -$Id$ -]]-- - -local pcall, ipairs, tonumber, type, next = pcall, ipairs, tonumber, type, next -local util = require "luci.util" -local http = require "luci.http.protocol" -local ltn12 = require "luci.ltn12" -local table = require "table" - -module "luci.ttpd.module" - - --- Server handler implementation -Handler = util.class() - --- Constructor -function Handler.__init__(self) - self.handler = {} - self.filters = {} - self.modifiers = {} -end - --- Add a filter -function Handler.setfilter(self, filter, key) - self.filters[(key) or (#self.filters+1)] = filter -end - --- Add a modifier -function Handler.setmodifier(self, modifier, key) - self.modifiers[(pos) or (#self.modifiers+1)] = modifier -end - --- Creates a failure reply -function Handler.failure(self, code, message) - local response = Response(code, { ["Content-Type"] = "text/plain" }) - local sourceout = ltn12.source.string(message) - - return response, sourceout -end - --- Processes a request -function Handler.process(self, request, sourcein, sinkerr) - local stat, response, sourceout - - -- Detect request Method - local hname = "handle_" .. request.request_method - if self[hname] then - local t = { - processor = self[hname], - handler = self, - request = request, - sourcein = sourcein, - sinkerr = sinkerr - } - - if next(self.modifiers) then - for _, mod in util.kspairs(self.modifiers) do - mod(t) - end - end - - -- Run the handler - stat, response, sourceout = pcall( - t.processor, t.handler, t.request, t.sourcein, t.sinkerr - ) - - -- Check for any errors - if not stat then - response, sourceout = self:failure(500, response) - elseif next(self.filters) then - local t = { - response = response, - sourceout = sourceout, - sinkerr = t.sinkerr - } - - for _, filter in util.kspairs(self.filters) do - filter(t) - end - - response = t.response - sourceout = t.sourceout - end - else - response, sourceout = self:failure(405, http.protocol.statusmsg[405]) - end - - -- Check data - if not util.instanceof(response, Response) then - response, sourceout = self:failure(500, "Core error: Invalid module response!") - end - - return response, sourceout -end - --- Handler Response -Response = util.class() - -function Response.__init__(self, status, headers) - self.status = tonumber(status) or 200 - self.headers = (type(headers) == "table") and headers or {} -end - -function Response.addheader(self, key, value) - self.headers[key] = value -end - -function Response.setstatus(self, status) - self.status = status -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/server.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/server.lua deleted file mode 100644 index a2c7ffc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/ttpd/server.lua +++ /dev/null @@ -1,444 +0,0 @@ ---[[ -LuCIttpd -(c) 2008 Steven Barth -(c) 2008 Jo-Philipp Wich - -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 - -$Id$ -]]-- - -local ipairs, pairs = ipairs, pairs -local tostring, tonumber = tostring, tonumber -local pcall, assert = pcall, assert - -local os = require "os" -local io = require "io" -local uci = require "luci.model.uci" -local util = require "luci.util" -local ltn12 = require "luci.ltn12" -local proto = require "luci.http.protocol" -local string = require "string" -local date = require "luci.http.protocol.date" - -module "luci.ttpd.server" - -BUFSIZE = 4096 -VERSION = 0.91 - - --- File Resource -IOResource = util.class() - -function IOResource.__init__(self, fd, offset, len) - self.fd, self.offset, self.len = fd, offset, len -end - - -VHost = util.class() - -function VHost.__init__(self, handler) - self.handler = handler - self.dhandler = {} -end - -function VHost.process(self, request, sourcein, sinkerr, ...) - local handler = self.handler - - local uri = request.env.REQUEST_URI:match("^([^?]*)") - - -- SCRIPT_NAME - request.env.SCRIPT_NAME = "" - - -- Call URI part - request.env.PATH_INFO = uri - - for k, dhandler in pairs(self.dhandler) do - if k == uri or k.."/" == uri:sub(1, #k+1) then - handler = dhandler - request.env.SCRIPT_NAME = k - request.env.PATH_INFO = uri:sub(#k+1) - break; - end - end - - if handler then - return handler:process(request, sourcein, sinkerr, ...) - end -end - -function VHost.get_default_handler(self) - return self.handler -end - -function VHost.set_default_handler(self, handler) - self.handler = handler -end - -function VHost.get_handlers(self) - return self.dhandler -end - -function VHost.set_handler(self, match, handler) - self.dhandler[match] = handler -end - - - -Server = util.class() - -function Server.__init__(self, host) - self.uci = uci.cursor() - self.host = host - self.vhosts = {} - - self.rbuf = "" - self.wbuf = "" -end - -function Server.get_default_vhost(self) - return self.host -end - -function Server.set_default_vhost(self, vhost) - self.host = vhost -end - -function Server.get_vhosts(self) - return self.vhosts -end - -function Server.set_vhost(self, name, vhost) - self.vhosts[name] = vhost -end - -function Server.flush(self) - if #self.wbuf > 0 then - self._write(self.wbuf) - self.wbuf = "" - end -end - -function Server.read(self, len) - while #self.rbuf < len do - self.rbuf = self.rbuf .. self._read(len - #self.rbuf) - end - - local chunk = self.rbuf:sub(1, len) - self.rbuf = self.rbuf:sub(len + 1) - return chunk -end - -function Server.limitsource(self, limit) - limit = limit or 0 - - return function() - if limit < 1 then - return nil - else - local read = (limit > BUFSIZE) and BUFSIZE or limit - limit = limit - read - return self:read(read) - end - end -end - --- Adapted from Luaposix -function Server.receiveheaders(self) - local line, name, value, err - local headers = {} - -- get first line - line, err = self:readline() - if err then return nil, err end - -- headers go until a blank line is found - while line do - -- get field-name and value - _, _, name, value = line:find("^(.-):%s*(.*)") - if not (name and value) then return nil, "malformed reponse headers" end - name = name:lower() - -- get next line (value might be folded) - line, err = self:readline() - if err then return nil, err end - -- unfold any folded values - while line:find("^%s") do - value = value .. line - line = self:readline() - if err then return nil, err end - end - -- save pair in table - if headers[name] then headers[name] = headers[name] .. ", " .. value - else headers[name] = value end - end - return headers -end - -function Server.readchunk(self) - -- get chunk size, skip extention - local line, err = self:readline() - if err then return nil, err end - local size = tonumber(line:gsub(";.*", ""), 16) - if not size then return nil, "invalid chunk size" end - -- was it the last chunk? - if size > 0 then - -- if not, get chunk and skip terminating CRLF - local chunk, err, part = self:read(size) - if chunk then self:readline() end - return chunk, err - else - -- if it was, read trailers into headers table - headers, err = self:receiveheaders() - if not headers then return nil, err end - end -end - -function Server.readline(self) - if #self.rbuf < 1 then - self.rbuf = self._read(BUFSIZE) - end - - while true do - local le = self.rbuf:find("\r\n", nil, true) - if le then - if le == 1 then -- EoH - self.rbuf = self.rbuf:sub(le + 2) - return nil - else -- Header - local line = self.rbuf:sub(1, le - 1) - self.rbuf = self.rbuf:sub(le + 2) - return line - end - else - if #self.rbuf >= BUFSIZE then - return nil, "Invalid Request" - end - self.rbuf = self.rbuf .. self._read(BUFSIZE-#self.rbuf) - end - end -end - -function Server.sink(self) - return function(chunk, err) - if err then - return nil, err - elseif chunk then - local stat, err = pcall(self.write, self, chunk) - if stat then - return stat - else - return nil, err - end - else - return true - end - end -end - -function Server.chunksink(self) - return function(chunk, err) - local stat, err = pcall(self.writechunk, self, chunk) - if stat then - return stat - else - return nil, err - end - end -end - -function Server.writechunk(self, chunk, err) - self:flush() - if not chunk then return self._write("0\r\n\r\n") end - local size = string.format("%X\r\n", #chunk) - return self._write(size .. chunk .. "\r\n") -end - -function Server.write(self, chunk) - while #chunk > 0 do - local missing = BUFSIZE - #self.wbuf - self.wbuf = self.wbuf .. chunk:sub(1, missing) - chunk = chunk:sub(missing + 1) - if #self.wbuf == BUFSIZE then - assert(self._write(self.wbuf)) - self.wbuf = "" - end - end -end - -function Server.close(self) - self:flush() - self._close() -end - -function Server.sendfile(self, fd, offset, len) - self:flush() - self._sendfile(fd, offset, len) -end - - -function Server.error(self, code, msg) - hcode = tostring(code) - - self:write( "HTTP/1.0 " .. hcode .. " " .. - proto.statusmsg[code] .. "\r\n" ) - self:write( "Connection: close\r\n" ) - self:write( "Content-Type: text/plain\r\n\r\n" ) - - if msg then - self:write( "HTTP-Error " .. code .. ": " .. msg .. "\r\n" ) - end -end - - -function Server.process(self, functions) - util.update(self, functions) - - local sourcein = ltn12.source.empty() - local sourcehdr = function() return self:readline() or "" end - local sinkerr = ltn12.sink.file( io.stderr ) - local sinkout = self:sink() - - local close = false - local stat, message, err - - repeat - -- parse headers - stat, message, err = pcall(proto.parse_message_header, sourcehdr) - - -- remote socket closed - if not stat and message == 0 then - break - end - - -- remote timeout - if not stat and message == 11 then - --self:error(408) - break - end - - -- any other error - if not stat or not message then - self:error(400, err) - break - end - - -- keep-alive - if message.http_version == 1.1 then - close = (message.env.HTTP_CONNECTION == "close") - else - close = not message.env.HTTP_CONNECTION or message.env.HTTP_CONNECTION == "close" - end - -- Uncomment this to disable keep-alive - close = not (self.uci:get("lucittpd", "lucittpd", "keepalive") == "1") - - if message.request_method == "get" or message.request_method == "head" then - -- Be happy - - elseif message.request_method == "post" then - -- If we have a HTTP/1.1 client and an Expect: 100-continue header then - -- respond with HTTP 100 Continue message - if message.http_version == 1.1 and message.headers['Expect'] and - message.headers['Expect'] == '100-continue' - then - self:write("HTTP/1.1 100 Continue\r\n\r\n") - end - - if message.headers['Transfer-Encoding'] and - message.headers['Transfer-Encoding'] ~= "identity" then - sourcein = function() return self:readchunk() end - elseif message.env.CONTENT_LENGTH then - sourcein = self:limitsource( - tonumber(message.env.CONTENT_LENGTH) - ) - else - self:error( 411, proto.statusmsg[411] ) - break - end - else - self:error( 405, proto.statusmsg[405] ) - break - - end - - - local host = self.vhosts[message.env.HTTP_HOST] or self.host - if not host then - self:error( 500, "Unable to find matching host" ) - break; - end - - local response, sourceout = host:process( - message, sourcein, sinkerr, - client, io.stderr - ) - if not response then - self:error( 500, "Error processing handler" ) - end - - -- Post process response - if sourceout then - if util.instanceof(sourceout, IOResource) then - if not response.headers["Content-Length"] then - response.headers["Content-Length"] = sourceout.len - end - end - if not response.headers["Content-Length"] then - if message.http_version == 1.1 then - response.headers["Transfer-Encoding"] = "chunked" - sinkout = self:chunksink() - else - close = true - end - end - elseif message.request_method ~= "head" then - response.headers["Content-Length"] = 0 - end - - if close then - response.headers["Connection"] = "close" - end - - response.headers["Date"] = date.to_http(os.time()) - - local header = - message.env.SERVER_PROTOCOL .. " " .. - tostring(response.status) .. " " .. - proto.statusmsg[response.status] .. "\r\n" - - header = header .. "Server: LuCIttpd/" .. tostring(VERSION) .. "\r\n" - - - for k,v in pairs(response.headers) do - header = header .. k .. ": " .. v .. "\r\n" - end - - -- Output - local stat, err = pcall(function() - self:write(header .. "\r\n") - - if sourceout then - if util.instanceof(sourceout, IOResource) then - self:sendfile(sourceout.fd, sourceout.offset, sourceout.len) - else - ltn12.pump.all(sourceout, sinkout) - end - end - - self:flush() - end) - - -- Write errors - if not stat then - if err == 107 then - -- Remote end closed the socket, so do we - elseif err then - io.stderr:write("Error sending data: " .. err .. "\n") - end - break - end - until close - - self:close() -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/util.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/util.lua deleted file mode 100644 index 5815942..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/util.lua +++ /dev/null @@ -1,787 +0,0 @@ ---[[ -LuCI - Utility library - -Description: -Several common useful Lua functions - -FileId: -$Id: util.lua 4119 2009-01-25 13:14:29Z jow $ - -License: -Copyright 2008 Steven Barth - -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 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -]]-- - -local io = require "io" -local math = require "math" -local table = require "table" -local debug = require "debug" -local ldebug = require "luci.debug" -local string = require "string" -local coroutine = require "coroutine" - -local getmetatable, setmetatable = getmetatable, setmetatable -local rawget, rawset, unpack = rawget, rawset, unpack -local tostring, type, assert = tostring, type, assert -local ipairs, pairs, loadstring = ipairs, pairs, loadstring -local require, pcall, xpcall = require, pcall, xpcall - ---- LuCI utility functions. -module "luci.util" - --- --- Pythonic string formatting extension --- -getmetatable("").__mod = function(a, b) - if not b then - return a - elseif type(b) == "table" then - return a:format(unpack(b)) - else - return a:format(b) - end -end - - --- --- Class helper routines --- - --- Instantiates a class -local function _instantiate(class, ...) - local inst = setmetatable({}, {__index = class}) - - if inst.__init__ then - inst:__init__(...) - end - - return inst -end - ---- Create a Class object (Python-style object model). --- The class object can be instantiated by calling itself. --- Any class functions or shared parameters can be attached to this object. --- Attaching a table to the class object makes this table shared between --- all instances of this class. For object parameters use the __init__ function. --- Classes can inherit member functions and values from a base class. --- Class can be instantiated by calling them. All parameters will be passed --- to the __init__ function of this class - if such a function exists. --- The __init__ function must be used to set any object parameters that are not shared --- with other objects of this class. Any return values will be ignored. --- @param base The base class to inherit from (optional) --- @return A class object --- @see instanceof --- @see clone -function class(base) - return setmetatable({}, { - __call = _instantiate, - __index = base - }) -end - ---- Test whether the given object is an instance of the given class. --- @param object Object instance --- @param class Class object to test against --- @return Boolean indicating whether the object is an instance --- @see class --- @see clone -function instanceof(object, class) - local meta = getmetatable(object) - while meta and meta.__index do - if meta.__index == class then - return true - end - meta = getmetatable(meta.__index) - end - return false -end - - --- --- Scope manipulation routines --- - ---- Create a new or get an already existing thread local store associated with --- the current active coroutine. A thread local store is private a table object --- whose values can't be accessed from outside of the running coroutine. --- @return Table value representing the corresponding thread local store -function threadlocal() - local tbl = {} - - local function get(self, key) - local c = coroutine.running() - local thread = coxpt[c] or c or 0 - if not rawget(self, thread) then - return nil - end - return rawget(self, thread)[key] - end - - local function set(self, key, value) - local c = coroutine.running() - local thread = coxpt[c] or c or 0 - if not rawget(self, thread) then - rawset(self, thread, {}) - end - rawget(self, thread)[key] = value - end - - setmetatable(tbl, {__index = get, __newindex = set, __mode = "k"}) - - return tbl -end - - --- --- Debugging routines --- - ---- Write given object to stderr. --- @param obj Value to write to stderr --- @return Boolean indicating whether the write operation was successful -function perror(obj) - return io.stderr:write(tostring(obj) .. "\n") -end - ---- Recursively dumps a table to stdout, useful for testing and debugging. --- @param t Table value to dump --- @param maxdepth Maximum depth --- @return Always nil -function dumptable(t, maxdepth, i, seen) - i = i or 0 - seen = seen or setmetatable({}, {__mode="k"}) - - for k,v in pairs(t) do - perror(string.rep("\t", i) .. tostring(k) .. "\t" .. tostring(v)) - if type(v) == "table" and (not maxdepth or i < maxdepth) then - if not seen[v] then - seen[v] = true - dumptable(v, maxdepth, i+1, seen) - else - perror(string.rep("\t", i) .. "*** RECURSION ***") - end - end - end -end - - --- --- String and data manipulation routines --- - ---- Escapes all occurrences of the given character in given string. --- @param s String value containing unescaped characters --- @param c String value with character to escape (optional, defaults to "\") --- @return String value with each occurrence of character escaped with "\" -function escape(s, c) - c = c or "\\" - return s:gsub(c, "\\" .. c) -end - ---- Create valid XML PCDATA from given string. --- @param value String value containing the data to escape --- @return String value containing the escaped data -local function _pcdata_repl(c) - local i = string.byte(c) - - if ( i >= 0x00 and i <= 0x08 ) or ( i >= 0x0B and i <= 0x0C ) or - ( i >= 0x0E and i <= 0x1F ) or ( i == 0x7F ) - then - return "" - - elseif ( i == 0x26 ) or ( i == 0x27 ) or ( i == 0x22 ) or - ( i == 0x3C ) or ( i == 0x3E ) - then - return string.format("&#%i;", i) - end - - return c -end - -function pcdata(value) - return value and tostring(value):gsub("[&\"'<>%c]", _pcdata_repl) -end - ---- Strip HTML tags from given string. --- @param value String containing the HTML text --- @return String with HTML tags stripped of -function striptags(s) - return pcdata(s:gsub("]*>", " "):gsub("%s+", " ")) -end - ---- Splits given string on a defined separator sequence and return a table --- containing the resulting substrings. The optional max parameter specifies --- the number of bytes to process, regardless of the actual length of the given --- string. The optional last parameter, regex, specifies whether the separator --- sequence is interpreted as regular expression. --- @param str String value containing the data to split up --- @param pat String with separator pattern (optional, defaults to "\n") --- @param max Maximum times to split (optional) --- @param regex Boolean indicating whether to interpret the separator --- pattern as regular expression (optional, default is false) --- @return Table containing the resulting substrings -function split(str, pat, max, regex) - pat = pat or "\n" - max = max or #str - - local t = {} - local c = 1 - - if #str == 0 then - return {""} - end - - if #pat == 0 then - return nil - end - - if max == 0 then - return str - end - - repeat - local s, e = str:find(pat, c, not regex) - max = max - 1 - if s and max < 0 then - t[#t+1] = str:sub(c) - else - t[#t+1] = str:sub(c, s and s - 1) - end - c = e and e + 1 or #str + 1 - until not s or max < 0 - - return t -end - ---- Remove leading and trailing whitespace from given string value. --- @param str String value containing whitespace padded data --- @return String value with leading and trailing space removed -function trim(str) - return (str:gsub("^%s*(.-)%s*$", "%1")) -end - ---- Count the occurences of given substring in given string. --- @param str String to search in --- @param pattern String containing pattern to find --- @return Number of found occurences -function cmatch(str, pat) - local count = 0 - for _ in str:gmatch(pat) do count = count + 1 end - return count -end - ---- Parse certain units from the given string and return the canonical integer --- value or 0 if the unit is unknown. Upper- or lower case is irrelevant. --- Recognized units are: --- o "y" - one year (60*60*24*366) --- o "m" - one month (60*60*24*31) --- o "w" - one week (60*60*24*7) --- o "d" - one day (60*60*24) --- o "h" - one hour (60*60) --- o "min" - one minute (60) --- o "kb" - one kilobyte (1024) --- o "mb" - one megabyte (1024*1024) --- o "gb" - one gigabyte (1024*1024*1024) --- o "kib" - one si kilobyte (1000) --- o "mib" - one si megabyte (1000*1000) --- o "gib" - one si gigabyte (1000*1000*1000) --- @param ustr String containing a numerical value with trailing unit --- @return Number containing the canonical value -function parse_units(ustr) - - local val = 0 - - -- unit map - local map = { - -- date stuff - y = 60 * 60 * 24 * 366, - m = 60 * 60 * 24 * 31, - w = 60 * 60 * 24 * 7, - d = 60 * 60 * 24, - h = 60 * 60, - min = 60, - - -- storage sizes - kb = 1024, - mb = 1024 * 1024, - gb = 1024 * 1024 * 1024, - - -- storage sizes (si) - kib = 1000, - mib = 1000 * 1000, - gib = 1000 * 1000 * 1000 - } - - -- parse input string - for spec in ustr:lower():gmatch("[0-9%.]+[a-zA-Z]*") do - - local num = spec:gsub("[^0-9%.]+$","") - local spn = spec:gsub("^[0-9%.]+", "") - - if map[spn] or map[spn:sub(1,1)] then - val = val + num * ( map[spn] or map[spn:sub(1,1)] ) - else - val = val + num - end - end - - - return val -end - --- also register functions above in the central string class for convenience -string.escape = escape -string.pcdata = pcdata -string.striptags = striptags -string.split = split -string.trim = trim -string.cmatch = cmatch -string.parse_units = parse_units - - ---- Appends numerically indexed tables or single objects to a given table. --- @param src Target table --- @param ... Objects to insert --- @return Target table -function append(src, ...) - for i, a in ipairs({...}) do - if type(a) == "table" then - for j, v in ipairs(a) do - src[#src+1] = v - end - else - src[#src+1] = a - end - end - return src -end - ---- Combines two or more numerically indexed tables and single objects into one table. --- @param tbl1 Table value to combine --- @param tbl2 Table value to combine --- @param ... More tables to combine --- @return Table value containing all values of given tables -function combine(...) - return append({}, ...) -end - ---- Checks whether the given table contains the given value. --- @param table Table value --- @param value Value to search within the given table --- @return Boolean indicating whether the given value occurs within table -function contains(table, value) - for k, v in pairs(table) do - if value == v then - return k - end - end - return false -end - ---- Update values in given table with the values from the second given table. --- Both table are - in fact - merged together. --- @param t Table which should be updated --- @param updates Table containing the values to update --- @return Always nil -function update(t, updates) - for k, v in pairs(updates) do - t[k] = v - end -end - ---- Retrieve all keys of given associative table. --- @param t Table to extract keys from --- @return Sorted table containing the keys -function keys(t) - local keys = { } - if t then - for k, _ in kspairs(t) do - keys[#keys+1] = k - end - end - return keys -end - ---- Clones the given object and return it's copy. --- @param object Table value to clone --- @param deep Boolean indicating whether to do recursive cloning --- @return Cloned table value -function clone(object, deep) - local copy = {} - - for k, v in pairs(object) do - if deep and type(v) == "table" then - v = clone(v, deep) - end - copy[k] = v - end - - return setmetatable(copy, getmetatable(object)) -end - - ---- Create a dynamic table which automatically creates subtables. --- @return Dynamic Table -function dtable() - return setmetatable({}, { __index = - function(tbl, key) - return rawget(tbl, key) - or rawget(rawset(tbl, key, dtable()), key) - end - }) -end - - --- Serialize the contents of a table value. -function _serialize_table(t, seen) - assert(not seen[t], "Recursion detected.") - seen[t] = true - - local data = "" - local idata = "" - local ilen = 0 - - for k, v in pairs(t) do - if type(k) ~= "number" or k < 1 or math.floor(k) ~= k or ( k - #t ) > 3 then - k = serialize_data(k, seen) - v = serialize_data(v, seen) - data = data .. ( #data > 0 and ", " or "" ) .. - '[' .. k .. '] = ' .. v - elseif k > ilen then - ilen = k - end - end - - for i = 1, ilen do - local v = serialize_data(t[i], seen) - idata = idata .. ( #idata > 0 and ", " or "" ) .. v - end - - return idata .. ( #data > 0 and #idata > 0 and ", " or "" ) .. data -end - ---- Recursively serialize given data to lua code, suitable for restoring --- with loadstring(). --- @param val Value containing the data to serialize --- @return String value containing the serialized code --- @see restore_data --- @see get_bytecode -function serialize_data(val, seen) - seen = seen or setmetatable({}, {__mode="k"}) - - if val == nil then - return "nil" - elseif type(val) == "number" then - return val - elseif type(val) == "string" then - return "%q" % val - elseif type(val) == "boolean" then - return val and "true" or "false" - elseif type(val) == "function" then - return "loadstring(%q)" % get_bytecode(val) - elseif type(val) == "table" then - return "{ " .. _serialize_table(val, seen) .. " }" - else - return '"[unhandled data type:' .. type(val) .. ']"' - end -end - ---- Restore data previously serialized with serialize_data(). --- @param str String containing the data to restore --- @return Value containing the restored data structure --- @see serialize_data --- @see get_bytecode -function restore_data(str) - return loadstring("return " .. str)() -end - - --- --- Byte code manipulation routines --- - ---- Return the current runtime bytecode of the given data. The byte code --- will be stripped before it is returned. --- @param val Value to return as bytecode --- @return String value containing the bytecode of the given data -function get_bytecode(val) - local code - - if type(val) == "function" then - code = string.dump(val) - else - code = string.dump( loadstring( "return " .. serialize_data(val) ) ) - end - - return code and strip_bytecode(code) -end - ---- Strips unnescessary lua bytecode from given string. Information like line --- numbers and debugging numbers will be discarded. Original version by --- Peter Cawley (http://lua-users.org/lists/lua-l/2008-02/msg01158.html) --- @param code String value containing the original lua byte code --- @return String value containing the stripped lua byte code -function strip_bytecode(code) - local version, format, endian, int, size, ins, num, lnum = code:byte(5, 12) - local subint - if endian == 1 then - subint = function(code, i, l) - local val = 0 - for n = l, 1, -1 do - val = val * 256 + code:byte(i + n - 1) - end - return val, i + l - end - else - subint = function(code, i, l) - local val = 0 - for n = 1, l, 1 do - val = val * 256 + code:byte(i + n - 1) - end - return val, i + l - end - end - - local strip_function - strip_function = function(code) - local count, offset = subint(code, 1, size) - local stripped, dirty = string.rep("\0", size), offset + count - offset = offset + count + int * 2 + 4 - offset = offset + int + subint(code, offset, int) * ins - count, offset = subint(code, offset, int) - for n = 1, count do - local t - t, offset = subint(code, offset, 1) - if t == 1 then - offset = offset + 1 - elseif t == 4 then - offset = offset + size + subint(code, offset, size) - elseif t == 3 then - offset = offset + num - elseif t == 254 or t == 9 then - offset = offset + lnum - end - end - count, offset = subint(code, offset, int) - stripped = stripped .. code:sub(dirty, offset - 1) - for n = 1, count do - local proto, off = strip_function(code:sub(offset, -1)) - stripped, offset = stripped .. proto, offset + off - 1 - end - offset = offset + subint(code, offset, int) * int + int - count, offset = subint(code, offset, int) - for n = 1, count do - offset = offset + subint(code, offset, size) + size + int * 2 - end - count, offset = subint(code, offset, int) - for n = 1, count do - offset = offset + subint(code, offset, size) + size - end - stripped = stripped .. string.rep("\0", int * 3) - return stripped, offset - end - - return code:sub(1,12) .. strip_function(code:sub(13,-1)) -end - - --- --- Sorting iterator functions --- - -function _sortiter( t, f ) - local keys = { } - - for k, v in pairs(t) do - keys[#keys+1] = k - end - - local _pos = 0 - - table.sort( keys, f ) - - return function() - _pos = _pos + 1 - if _pos <= #keys then - return keys[_pos], t[keys[_pos]] - end - end -end - ---- Return a key, value iterator which returns the values sorted according to --- the provided callback function. --- @param t The table to iterate --- @param f A callback function to decide the order of elements --- @return Function value containing the corresponding iterator -function spairs(t,f) - return _sortiter( t, f ) -end - ---- Return a key, value iterator for the given table. --- The table pairs are sorted by key. --- @param t The table to iterate --- @return Function value containing the corresponding iterator -function kspairs(t) - return _sortiter( t ) -end - ---- Return a key, value iterator for the given table. --- The table pairs are sorted by value. --- @param t The table to iterate --- @return Function value containing the corresponding iterator -function vspairs(t) - return _sortiter( t, function (a,b) return t[a] < t[b] end ) -end - - --- --- System utility functions --- - ---- Test whether the current system is operating in big endian mode. --- @return Boolean value indicating whether system is big endian -function bigendian() - return string.byte(string.dump(function() end), 7) == 0 -end - ---- Execute given commandline and gather stdout. --- @param command String containing command to execute --- @return String containing the command's stdout -function exec(command) - local pp = io.popen(command) - local data = pp:read("*a") - pp:close() - - return data -end - ---- Return a line-buffered iterator over the output of given command. --- @param command String containing the command to execute --- @return Iterator -function execi(command) - local pp = io.popen(command) - - return pp and function() - local line = pp:read() - - if not line then - pp:close() - end - - return line - end -end - --- Deprecated -function execl(command) - local pp = io.popen(command) - local line = "" - local data = {} - - while true do - line = pp:read() - if (line == nil) then break end - data[#data+1] = line - end - pp:close() - - return data -end - ---- Returns the absolute path to LuCI base directory. --- @return String containing the directory path -function libpath() - return require "luci.fs".dirname(ldebug.__file__) -end - - --- --- Coroutine safe xpcall and pcall versions modified for Luci --- original version: --- coxpcall 1.13 - Copyright 2005 - Kepler Project (www.keplerproject.org) --- --- Copyright © 2005 Kepler Project. --- Permission is hereby granted, free of charge, to any person obtaining a --- copy of this software and associated documentation files (the "Software"), --- to deal in the Software without restriction, including without limitation --- the rights to use, copy, modify, merge, publish, distribute, sublicense, --- and/or sell copies of the Software, and to permit persons to whom the --- Software is furnished to do so, subject to the following conditions: --- --- The above copyright notice and this permission notice shall be --- included in all copies or substantial portions of the Software. --- --- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, --- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES --- OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, --- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE --- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -local performResume, handleReturnValue -local oldpcall, oldxpcall = pcall, xpcall -coxpt = {} -setmetatable(coxpt, {__mode = "kv"}) - --- Identity function for copcall -local function copcall_id(trace, ...) - return ... -end - ---- This is a coroutine-safe drop-in replacement for Lua's "xpcall"-function --- @param f Lua function to be called protected --- @param err Custom error handler --- @param ... Parameters passed to the function --- @return A boolean whether the function call succeeded and the return --- values of either the function or the error handler -function coxpcall(f, err, ...) - local res, co = oldpcall(coroutine.create, f) - if not res then - local params = {...} - local newf = function() return f(unpack(params)) end - co = coroutine.create(newf) - end - local c = coroutine.running() - coxpt[co] = coxpt[c] or c or 0 - - return performResume(err, co, ...) -end - ---- This is a coroutine-safe drop-in replacement for Lua's "pcall"-function --- @param f Lua function to be called protected --- @param ... Parameters passed to the function --- @return A boolean whether the function call succeeded and the returns --- values of the function or the error object -function copcall(f, ...) - return coxpcall(f, copcall_id, ...) -end - --- Handle return value of protected call -function handleReturnValue(err, co, status, ...) - if not status then - return false, err(debug.traceback(co, (...)), ...) - end - if coroutine.status(co) == 'suspended' then - return performResume(err, co, coroutine.yield(...)) - else - return true, ... - end -end - --- Resume execution of protected function call -function performResume(err, co, ...) - return handleReturnValue(err, co, coroutine.resume(co, ...)) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl.lua deleted file mode 100644 index 1eed5e0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl.lua +++ /dev/null @@ -1,1209 +0,0 @@ ---[[ - -UCI Validation Layer - Main Library -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: uvl.lua 4087 2009-01-18 00:02:52Z jow $ - -]]-- - - ---- UVL - UCI Validation Layer --- @class module --- @cstyle instance - -local fs = require "luci.fs" -local uci = require "luci.model.uci" -local util = require "luci.util" -local table = require "table" -local string = require "string" - -local require, pcall, ipairs, pairs = require, pcall, ipairs, pairs -local type, error, tonumber, tostring = type, error, tonumber, tostring -local unpack, loadfile = unpack, loadfile - -module "luci.uvl" - -local ERR = require "luci.uvl.errors" -local datatypes = require "luci.uvl.datatypes" -local validation = require "luci.uvl.validation" -local dependencies = require "luci.uvl.dependencies" - -local TYPE_SCHEME = 0x00 -local TYPE_CONFIG = 0x01 -local TYPE_SECTION = 0x02 -local TYPE_OPTION = 0x03 -local TYPE_ENUM = 0x04 - ---- Boolean; default true; --- treat sections found in config but not in scheme as error -STRICT_UNKNOWN_SECTIONS = true - ---- Boolean; default true; --- treat options found in config but not in scheme as error -STRICT_UNKNOWN_OPTIONS = true - ---- Boolean; default true; --- treat failed external validators as error -STRICT_EXTERNAL_VALIDATORS = true - ---- Boolean; default true; --- treat list values stored as options like errors -STRICT_LIST_TYPE = true - - -local default_schemedir = "/lib/uci/schema" -local default_savedir = "/tmp/.uvl" - - ---- Object constructor --- @class function --- @name UVL --- @param schemedir Path to the scheme directory (optional) --- @param configdir Override config directory (optional) --- @return Instance object -UVL = util.class() - -function UVL.__init__( self, schemedir, configdir ) - self.schemedir = schemedir or default_schemedir - self.configdir = configdir - self.packages = { } - self.beenthere = { } - self.depseen = { } - self.uci = uci - self.err = ERR - self.dep = dependencies - self.datatypes = datatypes -end - - ---- Parse given scheme and return the scheme tree. --- @param scheme Name of the scheme to parse --- @return Table containing the parsed scheme or nil on error --- @return String containing the reason for errors (if any) -function UVL.get_scheme( self, scheme ) - if not self.packages[scheme] then - local ok, err = self:read_scheme( scheme ) - if not ok then - return nil, err - end - end - return self.packages[scheme], nil -end - ---- Validate given configuration, section or option. --- @param config Name of the configuration to validate --- @param section Name of the section to validate (optional) --- @param option Name of the option to validate (optional) --- @return Boolean indicating whether the given config validates --- @return String containing the reason for errors (if any) -function UVL.validate( self, config, section, option ) - if config and section and option then - return self:validate_option( config, section, option ) - elseif config and section then - return self:validate_section( config, section ) - elseif config then - return self:validate_config( config ) - end -end - ---- Validate given configuration. --- @param cfg Name of the configuration to validate --- @return Boolean indicating whether the given config validates --- @return String containing the reason for errors (if any) -function UVL.validate_config( self, cfg, uci ) - - if not self.packages[cfg] then - local ok, err = self:read_scheme(cfg) - if not ok then - return false, err - end - end - - local co = config( self, uci or cfg, uci and cfg ) - local sc = { } - - self.beenthere = { } - self.depseen = { } - - if not co:config() then - return false, co:errors() - end - - local function _uci_foreach( type, func ) - for k, v in pairs(co:config()) do - if v['.type'] == type then - sc[type] = sc[type] + 1 - local ok, err = func( k, v ) - if not ok then co:error(err) end - end - end - end - - for k, v in pairs( self.packages[cfg].sections ) do - sc[k] = 0 - _uci_foreach( k, - function(s) - return self:_validate_section( co:section(s) ) - end - ) - end - - if STRICT_UNKNOWN_SECTIONS then - for k, v in pairs(co:config()) do - local so = co:section(k) - if not self.beenthere[so:cid()] then - co:error(ERR.SECT_UNKNOWN(so)) - end - end - end - - for _, k in ipairs(util.keys(sc)) do - local so = co:section(k) - if so:scheme('required') and sc[k] == 0 then - co:error(ERR.SECT_REQUIRED(so)) - elseif so:scheme('unique') and sc[k] > 1 then - co:error(ERR.SECT_UNIQUE(so)) - end - end - - return co:ok(), co:errors() -end - ---- Validate given config section. --- @param config Name of the configuration to validate --- @param section Name of the section to validate --- @return Boolean indicating whether the given config validates --- @return String containing the reason for errors (if any) -function UVL.validate_section( self, cfg, section, uci ) - - if not self.packages[cfg] then - local ok, err = self:read_scheme( cfg ) - if not ok then - return false, err - end - end - - local co = config( self, uci or cfg, uci and cfg ) - local so = co:section( section ) - - self.beenthere = { } - self.depseen = { } - - if not co:config() then - return false, co:errors() - end - - if so:config() then - return self:_validate_section( so ) - else - return false, ERR.SECT_NOTFOUND(so) - end -end - ---- Validate given config option. --- @param config Name of the configuration to validate --- @param section Name of the section to validate --- @param option Name of the option to validate --- @return Boolean indicating whether the given config validates --- @return String containing the reason for errors (if any) -function UVL.validate_option( self, cfg, section, option, uci ) - - if not self.packages[cfg] then - local ok, err = self:read_scheme( cfg ) - if not ok then - return false, err - end - end - - local co = config( self, uci or cfg, uci and cfg ) - local so = co:section( section ) - local oo = so:option( option ) - - if not co:config() then - return false, co:errors() - end - - if so:config() and oo:config() then - return self:_validate_option( oo ) - else - return false, ERR.OPT_NOTFOUND(oo) - end -end - - -function UVL._validate_section( self, section ) - - self.beenthere[section:cid()] = true - - if section:config() then - if section:scheme('named') == true and - section:config('.anonymous') == true - then - return false, ERR.SECT_NAMED(section) - end - - for _, v in ipairs(section:variables()) do - local ok, err = self:_validate_option( v ) - if not ok and ( - v:scheme('required') or v:scheme('type') == "enum" or ( - not err:is(ERR.ERR_DEP_NOTEQUAL) and - not err:is(ERR.ERR_DEP_NOVALUE) - ) - ) then - section:error(err) - end - end - - local ok, err = dependencies.check( self, section ) - if not ok then - section:error(err) - end - else - return false, ERR.SECT_NOTFOUND(section) - end - - if STRICT_UNKNOWN_OPTIONS and not section:scheme('dynamic') then - for k, v in pairs(section:config()) do - local oo = section:option(k) - if k:sub(1,1) ~= "." and not self.beenthere[oo:cid()] then - section:error(ERR.OPT_UNKNOWN(oo)) - end - end - end - - return section:ok(), section:errors() -end - -function UVL._validate_option( self, option, nodeps ) - - self.beenthere[option:cid()] = true - - if not option:scheme() and not option:parent():scheme('dynamic') then - if STRICT_UNKNOWN_OPTIONS then - return false, option:error(ERR.OPT_UNKNOWN(option)) - else - return true - end - - elseif option:scheme() then - if not nodeps then - local ok, err = dependencies.check( self, option ) - if not ok then - if not err:is_all( - ERR.ERR_OPT_REQUIRED, - ERR.ERR_DEP_NOTEQUAL, - ERR.ERR_DEP_NOVALUE - ) then - option:error(err) - return false, option:errors() - else - return true - end - end - end - - if option:scheme('required') and not option:value() then - return false, option:error(ERR.OPT_REQUIRED(option)) - - elseif option:value() then - local val = option:value() - - if option:scheme('type') == "reference" or - option:scheme('type') == "enum" - then - local scheme_values = option:scheme('values') or { } - local config_values = ( type(val) == "table" and val or { val } ) - for _, v in ipairs(config_values) do - if not scheme_values[v] then - return false, option:error( ERR.OPT_BADVALUE( - option, { v, util.serialize_data( - util.keys(scheme_values) - ) } - ) ) - end - end - elseif option:scheme('type') == "list" then - if type(val) ~= "table" and STRICT_LIST_TYPE then - return false, option:error(ERR.OPT_NOTLIST(option)) - end - end - - if option:scheme('datatype') then - local dt = option:scheme('datatype') - - if self.datatypes[dt] then - val = ( type(val) == "table" and val or { val } ) - for i, v in ipairs(val) do - if not self.datatypes[dt]( v ) then - return false, option:error( - ERR.OPT_INVVALUE(option, { v, dt }) - ) - end - end - else - return false, option:error(ERR.OPT_DATATYPE(option, dt)) - end - end - - val = ( type(val) == "table" and val or { val } ) - for _, v in ipairs(val) do - if option:scheme('minlength') then - if #v < option:scheme('minlength') then - return false, option:error(ERR.OPT_RANGE(option)) - end - end - - if option:scheme('maxlength') then - if #v > option:scheme('maxlength') then - return false, option:error(ERR.OPT_RANGE(option)) - end - end - - local w = tonumber(v) - - if option:scheme('minimum') then - if not w or w < option:scheme('minimum') then - return false, option:error(ERR.OPT_RANGE(option)) - end - end - - if option:scheme('maximum') then - if not w or w > option:scheme('maximum') then - return false, option:error(ERR.OPT_RANGE(option)) - end - end - end - end - - local ok, err = validation.check( self, option ) - if not ok and STRICT_EXTERNAL_VALIDATORS then - return false, option:error(err) - end - end - - return option:ok(), option:errors() -end - ---- Find all parts of given scheme and construct validation tree. --- This is normally done on demand, so you don't have to call this function --- by yourself. --- @param shm Name of the scheme to parse --- @param alias Create an alias for the loaded scheme -function UVL.read_scheme( self, shm, alias ) - - local so = scheme( self, shm ) - local bc = "%s/bytecode/%s.lua" %{ self.schemedir, shm } - - if not fs.access(bc) then - local files = fs.glob(self.schemedir .. '/*/' .. shm) - - if files then - local ok, err - for i, file in ipairs( files ) do - if not fs.access(file) then - return false, so:error(ERR.SME_READ(so,file)) - end - - local uci = uci.cursor( fs.dirname(file), default_savedir ) - - local sname = fs.basename(file) - local sd, err = uci:load( sname ) - - if not sd then - return false, ERR.UCILOAD(so, err) - end - - ok, err = pcall(function() - uci:foreach(sname, "package", function(s) - self:_parse_package(so, s[".name"], s) - end) - uci:foreach(sname, "section", function(s) - self:_parse_section(so, s[".name"], s) - end) - uci:foreach(sname, "variable", function(s) - self:_parse_var(so, s[".name"], s) - end) - uci:foreach(sname, "enum", function(s) - self:_parse_enum(so, s[".name"], s) - end) - - end) - end - - if ok and alias then self.packages[alias] = self.packages[shm] end - return ok and self, err - else - return false, so:error(ERR.SME_FIND(so, self.schemedir)) - end - else - local sc = loadfile(bc) - if sc then - self.packages[shm] = sc() - return true - else - return false, so:error(ERR.SME_READ(so,bc)) - end - end -end - --- helper function to check for required fields -local function _req( t, n, c, r ) - for i, v in ipairs(r) do - if not c[v] then - local p, o = scheme:sid(), nil - - if t == TYPE_SECTION then - o = section( scheme, nil, p, n ) - elseif t == TYPE_OPTION then - o = option( scheme, nil, p, '(nil)', n ) - elseif t == TYPE_ENUM then - o = enum( scheme, nil, p, '(nil)', '(nil)', n ) - end - - return false, ERR.SME_REQFLD(o,v) - end - end - return true -end - --- helper function to validate references -local function _ref( c, t ) - local r, k, n = {} - if c == TYPE_SECTION then - k = "package" - n = 1 - elseif c == TYPE_OPTION then - k = "section" - n = 2 - elseif c == TYPE_ENUM then - k = "variable" - n = 3 - end - - for o in t[k]:gmatch("[^.]+") do - r[#r+1] = o - end - r[1] = ( #r[1] > 0 and r[1] or scheme:sid() ) - - if #r ~= n then - return false, ERR.SME_BADREF(scheme, k) - end - - return r -end - --- helper function to read bools -local function _bool( v ) - return ( v == "true" or v == "yes" or v == "on" or v == "1" ) -end - --- Step 0: get package meta information -function UVL._parse_package(self, scheme, k, v) - local sid = scheme:sid() - local pkg = self.packages[sid] or { - ["name"] = sid; - ["sections"] = { }; - ["variables"] = { }; - } - - pkg.title = v.title - pkg.description = v.description - - self.packages[sid] = pkg -end - --- Step 1: get all sections -function UVL._parse_section(self, scheme, k, v) - local ok, err = _req( TYPE_SECTION, k, v, { "name", "package" } ) - if err then error(scheme:error(err)) end - - local r, err = _ref( TYPE_SECTION, v ) - if err then error(scheme:error(err)) end - - local p = self.packages[r[1]] or { - ["name"] = r[1]; - ["sections"] = { }; - ["variables"] = { }; - } - p.sections[v.name] = p.sections[v.name] or { } - p.variables[v.name] = p.variables[v.name] or { } - self.packages[r[1]] = p - - local s = p.sections[v.name] - local so = scheme:section(v.name) - - for k, v2 in pairs(v) do - if k ~= "name" and k ~= "package" and k:sub(1,1) ~= "." then - if k == "depends" then - s.depends = self:_read_dependency( v2, s.depends ) - if not s.depends then - return false, scheme:error( - ERR.SME_BADDEP(so, util.serialize_data(s.depends)) - ) - end - elseif k == "dynamic" or k == "unique" or - k == "required" or k == "named" - then - s[k] = _bool(v2) - else - s[k] = v2 - end - end - end - - s.dynamic = s.dynamic or false - s.unique = s.unique or false - s.required = s.required or false - s.named = s.named or false -end - --- Step 2: get all variables -function UVL._parse_var(self, scheme, k, v) - local ok, err = _req( TYPE_OPTION, k, v, { "name", "section" } ) - if err then error(scheme:error(err)) end - - local r, err = _ref( TYPE_OPTION, v ) - if err then error(scheme:error(err)) end - - local p = self.packages[r[1]] - if not p then - error(scheme:error( - ERR.SME_VBADPACK({scheme:sid(), '', v.name}, r[1]) - )) - end - - local s = p.variables[r[2]] - if not s then - error(scheme:error( - ERR.SME_VBADSECT({scheme:sid(), '', v.name}, r[2]) - )) - end - - s[v.name] = s[v.name] or { } - - local t = s[v.name] - local so = scheme:section(r[2]) - local to = so:option(v.name) - - for k, v2 in pairs(v) do - if k ~= "name" and k ~= "section" and k:sub(1,1) ~= "." then - if k == "depends" then - t.depends = self:_read_dependency( v2, t.depends ) - if not t.depends then - error(scheme:error(so:error( - ERR.SME_BADDEP(to, util.serialize_data(v2)) - ))) - end - elseif k == "validator" then - t.validators = self:_read_validator( v2, t.validators ) - if not t.validators then - error(scheme:error(so:error( - ERR.SME_BADVAL(to, util.serialize_data(v2)) - ))) - end - elseif k == "valueof" then - local values, err = self:_read_reference( v2 ) - if err then - error(scheme:error(so:error( - ERR.REFERENCE(to, util.serialize_data(v2)):child(err) - ))) - end - t.type = "reference" - t.values = values - t.valueof = type(v2) == "table" and v2 or {v2} - elseif k == "required" then - t[k] = _bool(v2) - elseif k == "minlength" or k == "maxlength" or - k == "minimum" or k == "maximum" - then - t[k] = tonumber(v2) - else - t[k] = t[k] or v2 - end - end - end - - t.type = t.type or "variable" - t.datatype = t.datatype or "string" - t.required = t.required or false -end - --- Step 3: get all enums -function UVL._parse_enum(self, scheme, k, v) - local ok, err = _req( TYPE_ENUM, k, v, { "value", "variable" } ) - if err then error(scheme:error(err)) end - - local r, err = _ref( TYPE_ENUM, v ) - if err then error(scheme:error(err)) end - - local p = self.packages[r[1]] - if not p then - error(scheme:error( - ERR.SME_EBADPACK({scheme:sid(), '', '', v.value}, r[1]) - )) - end - - local s = p.variables[r[2]] - if not s then - error(scheme:error( - ERR.SME_EBADSECT({scheme:sid(), '', '', v.value}, r[2]) - )) - end - - local t = s[r[3]] - if not t then - error(scheme:error( - ERR.SME_EBADOPT({scheme:sid(), '', '', v.value}, r[3]) - )) - end - - - local so = scheme:section(r[2]) - local oo = so:option(r[3]) - local eo = oo:enum(v.value) - - if t.type ~= "enum" and t.type ~= "reference" then - error(scheme:error(ERR.SME_EBADTYPE(eo))) - end - - if not t.values then - t.values = { [v.value] = v.title or v.value } - t.valuelist = { {value = v.value, title = v.title} } - else - t.values[v.value] = v.title or v.value - t.valuelist[#t.valuelist + 1] = {value = v.value, title = v.title} - end - - if not t.enum_depends then - t.enum_depends = { } - end - - if v.default then - if t.default then - error(scheme:error(ERR.SME_EBADDEF(eo))) - end - t.default = v.value - end - - if v.depends then - t.enum_depends[v.value] = self:_read_dependency( - v.depends, t.enum_depends[v.value] - ) - - if not t.enum_depends[v.value] then - error(scheme:error(so:error(oo:error( - ERR.SME_BADDEP(eo, util.serialize_data(v.depends)) - )))) - end - end -end - --- Read a dependency specification -function UVL._read_dependency( self, values, deps ) - local expr = "%$?[%w_]+" - if values then - values = ( type(values) == "table" and values or { values } ) - for _, value in ipairs(values) do - local condition = { } - for val in value:gmatch("[^,]+") do - local k, e, v = val:match("%s*([%w$_.]+)%s*(=?)%s*(.*)") - - if k and ( - k:match("^"..expr.."%."..expr.."%."..expr.."$") or - k:match("^"..expr.."%."..expr.."$") or - k:match("^"..expr.."$") - ) then - condition[k] = (e == '=') and v or true - else - return nil - end - end - - if not deps then - deps = { condition } - else - deps[#deps+1] = condition - end - end - end - - return deps -end - --- Read a validator specification -function UVL._read_validator( self, values, validators ) - if values then - values = ( type(values) == "table" and values or { values } ) - for _, value in ipairs(values) do - local validator - - if value:match("^exec:") then - validator = value:gsub("^exec:","") - elseif value:match("^lua:") then - validator = self:_resolve_function( (value:gsub("^lua:","") ) ) - elseif value:match("^regexp:") then - local pattern = value:gsub("^regexp:","") - validator = function( type, dtype, pack, sect, optn, ... ) - local values = { ... } - for _, v in ipairs(values) do - local ok, match = - pcall( string.match, v, pattern ) - - if not ok then - return false, match - elseif not match then - return false, - 'Value "%s" does not match pattern "%s"' % { - v, pattern - } - end - end - return true - end - end - - if validator then - if not validators then - validators = { validator } - else - validators[#validators+1] = validator - end - else - return nil - end - end - - return validators - end -end - --- Read a reference specification (XXX: We should validate external configs too...) -function UVL._read_reference( self, values ) - local val = { } - values = ( type(values) == "table" and values or { values } ) - - for _, value in ipairs(values) do - local ref = util.split(value, ".") - - if #ref == 2 or #ref == 3 then - local co = config( self, ref[1] ) - if not co:config() then return false, co:errors() end - - for k, v in pairs(co:config()) do - if v['.type'] == ref[2] then - if #ref == 2 then - if v['.anonymous'] == true then - return false, ERR.SME_INVREF('', value) - end - val[k] = k -- XXX: title/description would be nice - elseif v[ref[3]] then - val[v[ref[3]]] = v[ref[3]] -- XXX: dito - end - end - end - else - return false, ERR.SME_BADREF('', value) - end - end - - return val, nil -end - --- Resolve given path -function UVL._resolve_function( self, value ) - local path = util.split(value, ".") - - for i=1, #path-1 do - local stat, mod = pcall( - require, table.concat(path, ".", 1, i) - ) - - if stat and mod then - for j=i+1, #path-1 do - if not type(mod) == "table" then - break - end - mod = mod[path[j]] - if not mod then - break - end - end - mod = type(mod) == "table" and mod[path[#path]] or nil - if type(mod) == "function" then - return mod - end - end - end -end - - ---- Object representation of an uvl item - base class. -uvlitem = util.class() - -function uvlitem.cid(self) - if #self.cref == 1 then - return self.cref[1] - else - local r = { unpack(self.cref) } - local c = self.c - if c and c[r[2]] and c[r[2]]['.anonymous'] and c[r[2]]['.index'] then - r[2] = '@' .. c[r[2]]['.type'] .. - '[' .. tostring(c[r[2]]['.index']) .. ']' - end - return table.concat( r, '.' ) - end -end - -function uvlitem.sid(self) - return table.concat( self.sref, '.' ) -end - -function uvlitem.scheme(self, opt) - local s = self.s and self.s.packages - s = s and s[self.sref[1]] - if #self.sref == 4 or #self.sref == 3 then - s = s and s.variables - s = s and s[self.sref[2]] - s = s and s[self.sref[3]] - elseif #self.sref == 2 then - s = s and s.sections - s = s and s[self.sref[2]] - end - - if s and opt then - return s[opt] - elseif s then - return s - end -end - -function uvlitem.config(self, opt) - local c = self.c - - if #self.cref >= 2 and #self.cref <= 4 then - c = c and self.c[self.cref[2]] or nil - if #self.cref >= 3 then - c = c and c[self.cref[3]] or nil - end - end - - if c and opt then - return c[opt] - elseif c then - return c - end -end - -function uvlitem.title(self) - return self:scheme() and self:scheme('title') or - self.cref[3] or self.cref[2] or self.cref[1] -end - -function uvlitem.type(self) - if self.t == TYPE_CONFIG then - return 'config' - elseif self.t == TYPE_SECTION then - return 'section' - elseif self.t == TYPE_OPTION then - return 'option' - elseif self.t == TYPE_ENUM then - return 'enum' - end -end - -function uvlitem.error(self, ...) - if not self.e then - local errconst = { ERR.CONFIG, ERR.SECTION, ERR.OPTION, ERR.OPTION } - self.e = errconst[#self.cref]( self ) - end - - return self.e:child( ... ) -end - -function uvlitem.errors(self) - return self.e -end - -function uvlitem.ok(self) - return not self:errors() -end - -function uvlitem.parent(self) - if self.p then - return self.p - elseif #self.cref == 3 or #self.cref == 4 then - return section( self.s, self.c, self.cref[1], self.cref[2] ) - elseif #self.cref == 2 then - return config( self.s, self.c, self.cref[1] ) - else - return nil - end -end - -function uvlitem._loadconf(self, co, c, configdir) - co = co or self._configcache - if not co then - local err - co, err = uci.cursor(configdir):get_all(c) - - if err then - self:error(ERR.UCILOAD(self, err)) - end - - self._configcache = co - end - return co -end - - ---- Object representation of a scheme. --- @class scheme --- @cstyle instance --- @name luci.uvl.scheme - ---- Scheme instance constructor. --- @class function --- @name scheme --- @param scheme Scheme instance --- @param co Configuration data --- @param c Configuration name --- @return Config instance -scheme = util.class(uvlitem) - -function scheme.__init__(self, scheme, co, c) - if not c then - c, co = co, nil - end - - self.cref = { c } - self.sref = { c } - self.c = self:_loadconf(co, c, scheme.configdir) - self.s = scheme - self.t = TYPE_SCHEME -end - ---- Add an error to scheme. --- @return Scheme error context -function scheme.error(self, ...) - if not self.e then self.e = ERR.SCHEME( self ) end - return self.e:child( ... ) -end - ---- Get an associated config object. --- @return Config instance -function scheme.config(self) - local co = config( self.s, self.cref[1] ) - co.p = self - - return co -end - ---- Get all section objects associated with this scheme. --- @return Table containing all associated luci.uvl.section instances -function scheme.sections(self) - local v = { } - if self.s.packages[self.sref[1]].sections then - for o, _ in pairs( self.s.packages[self.sref[1]].sections ) do - v[#v+1] = option( - self.s, self.c, self.cref[1], self.cref[2], o - ) - end - end - return v -end - ---- Get an associated section object. --- @param s Section to select --- @return Section instance -function scheme.section(self, s) - local so = section( self.s, self.c, self.cref[1], s ) - so.p = self - - return so -end - - ---- Object representation of a config. --- @class config --- @cstyle instance --- @name luci.uvl.config - ---- Config instance constructor. --- @class function --- @name config --- @param scheme Scheme instance --- @param co Configuration data --- @param c Configuration name --- @return Config instance -config = util.class(uvlitem) - -function config.__init__(self, scheme, co, c) - if not c then - c, co = co, nil - end - self.cref = { c } - self.sref = { c } - self.c = self:_loadconf(co, c, scheme.configdir) - self.s = scheme - self.t = TYPE_CONFIG -end - ---- Get all section objects associated with this config. --- @return Table containing all associated luci.uvl.section instances -function config.sections(self) - local v = { } - if self.s.packages[self.sref[1]].sections then - for o, _ in pairs( self.s.packages[self.sref[1]].sections ) do - v[#v+1] = option( - self.s, self.c, self.cref[1], self.cref[2], o - ) - end - end - return v -end - ---- Get an associated section object. --- @param s Section to select --- @return Section instance -function config.section(self, s) - local so = section( self.s, self.c, self.cref[1], s ) - so.p = self - - return so -end - - ---- Object representation of a scheme/config section. --- @class module --- @cstyle instance --- @name luci.uvl.section - ---- Section instance constructor. --- @class function --- @name section --- @param scheme Scheme instance --- @param co Configuration data --- @param c Configuration name --- @param s Section name --- @return Section instance -section = util.class(uvlitem) - -function section.__init__(self, scheme, co, c, s) - self.cref = { c, s } - self.sref = { c, co and co[s] and co[s]['.type'] or s } - self.c = self:_loadconf(co, c, scheme.configdir) - self.s = scheme - self.t = TYPE_SECTION -end - ---- Get all option objects associated with this section. --- @return Table containing all associated luci.uvl.option instances -function section.variables(self) - local v = { } - if self.s.packages[self.sref[1]].variables[self.sref[2]] then - for o, _ in pairs( - self.s.packages[self.sref[1]].variables[self.sref[2]] - ) do - v[#v+1] = option( - self.s, self.c, self.cref[1], self.cref[2], o - ) - end - end - return v -end - ---- Get an associated option object. --- @param o Option to select --- @return Option instance -function section.option(self, o) - local oo = option( self.s, self.c, self.cref[1], self.cref[2], o ) - oo.p = self - - return oo -end - - ---- Object representation of a scheme/config option. --- @class module --- @cstyle instance --- @name luci.uvl.option - ---- Section instance constructor. --- @class function --- @name option --- @param scheme Scheme instance --- @param co Configuration data --- @param c Configuration name --- @param s Section name --- @param o Option name --- @return Option instance -option = util.class(uvlitem) - -function option.__init__(self, scheme, co, c, s, o) - self.cref = { c, s, o } - self.sref = { c, co and co[s] and co[s]['.type'] or s, o } - self.c = self:_loadconf(co, c, scheme.configdir) - self.s = scheme - self.t = TYPE_OPTION -end - ---- Get the value of this option. --- @return The associated configuration value -function option.value(self) - local v = self:config() or self:scheme('default') - if v and self:scheme('multival') then - v = util.split( v, "%s+", nil, true ) - end - return v -end - ---- Get the associated section information in scheme. --- @return Table containing the scheme properties -function option.section(self) - return self.s.packages[self.sref[1]].sections[self.sref[2]] -end - ---- Construct an enum object instance from given or default value. --- @param v Value to select --- @return Enum instance for selected value -function option.enum(self, val) - return enum( - self.s, self.c, - self.cref[1], self.cref[2], self.cref[3], - val or self:value() - ) -end - - ---- Object representation of a enum value. --- @class module --- @cstyle instance --- @name luci.uvl.enum - ---- Section instance constructor. --- @class function --- @name enum --- @param scheme Scheme instance --- @param co Configuration data --- @param c Configuration name --- @param s Section name --- @param o Enum name --- @param v Enum value --- @return Enum value instance -enum = util.class(option) - -function enum.__init__(self, scheme, co, c, s, o, v) - self.cref = { c, s, o, v } - self.sref = { c, co and co[s] and co[s]['.type'] or s, o, v } - self.c = self:_loadconf(co, c, scheme.configdir) - self.s = scheme - self.t = TYPE_ENUM -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/datatypes.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/datatypes.lua deleted file mode 100644 index b6aeb2e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/datatypes.lua +++ /dev/null @@ -1,187 +0,0 @@ ---[[ - -UCI Validation Layer - Datatype Tests -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: datatypes.lua 3569 2008-10-12 22:38:30Z jow $ - -]]-- - -local fs = require "luci.fs" -local ip = require "luci.ip" -local math = require "math" -local util = require "luci.util" - -local tonumber = tonumber - -module "luci.uvl.datatypes" - - -function boolean( val ) - if val == "1" or val == "yes" or val == "on" or val == "true" then - return true - elseif val == "0" or val == "no" or val == "off" or val == "false" then - return true - elseif val == "" or val == nil then - return true - end - - return false -end - -function uint( val ) - local n = tonumber(val) - if n ~= nil and math.floor(n) == n and n >= 0 then - return true - end - - return false -end - -function integer( val ) - local n = tonumber(val) - if n ~= nil and math.floor(n) == n then - return true - end - - return false -end - -function float( val ) - return ( tonumber(val) ~= nil ) -end - -function ipaddr( val ) - return ip4addr(val) or ip6addr(val) -end - -function ip4addr( val ) - if val then - return ip.IPv4(val) and true or false - end - - return false -end - -function ip4prefix( val ) - val = tonumber(val) - return ( val and val >= 0 and val <= 32 ) -end - -function ip6addr( val ) - if val then - return ip.IPv6(val) and true or false - end - - return false -end - -function ip6prefix( val ) - val = tonumber(val) - return ( val and val >= 0 and val <= 128 ) -end - -function port( val ) - val = tonumber(val) - return ( val and val >= 1 and val <= 65535 ) -end - -function portrange( val ) - local p1, p2 = val:match("^(%d+)%-(%d+)$") - if p1 and p2 and port(p1) and port(p2) then - return true - else - return port(val) - end -end - -function macaddr( val ) - if val and val:match( - "^[a-fA-F0-9]+:[a-fA-F0-9]+:[a-fA-F0-9]+:" .. - "[a-fA-F0-9]+:[a-fA-F0-9]+:[a-fA-F0-9]+$" - ) then - local parts = util.split( val, ":" ) - - for i = 1,6 do - parts[i] = tonumber( parts[i], 16 ) - if parts[i] < 0 or parts[i] > 255 then - return false - end - end - - return true - end - - return false -end - -function hostname( val ) - if val and val:match("[a-zA-Z0-9_][a-zA-Z0-9_%-%.]*") then - return true -- XXX: ToDo: need better solution - end - - return false -end - -function host( val ) - return hostname(val) or ipaddr(val) -end - -function string( val ) - return true -- Everything qualifies as valid string -end - -function directory( val, seen ) - local s = fs.stat( val ) - seen = seen or { } - - if s and not seen[s.ino] then - seen[s.ino] = true - if s.type == "directory" then - return true - elseif s.type == "link" then - return directory( fs.readlink(val), seen ) - end - end - - return false -end - -function file( val, seen ) - local s = fs.stat( val ) - seen = seen or { } - - if s and not seen[s.ino] then - seen[s.ino] = true - if s.type == "regular" then - return true - elseif s.type == "link" then - return file( fs.readlink(val), seen ) - end - end - - return false -end - -function device( val, seen ) - local s = fs.stat( val ) - seen = seen or { } - - if s and not seen[s.ino] then - seen[s.ino] = true - if s.type == "character device" or s.type == "block device" then - return true - elseif s.type == "link" then - return device( fs.readlink(val), seen ) - end - end - - return false -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/dependencies.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/dependencies.lua deleted file mode 100644 index 567b972..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/dependencies.lua +++ /dev/null @@ -1,196 +0,0 @@ ---[[ - -UCI Validation Layer - Dependency helper -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: dependencies.lua 3260 2008-09-13 09:09:38Z Cyrus $ - -]]-- - -local uvl = require "luci.uvl" -local ERR = require "luci.uvl.errors" -local util = require "luci.util" -local table = require "table" - -local type, unpack = type, unpack -local ipairs, pairs = ipairs, pairs - -module "luci.uvl.dependencies" - - - -function _parse_reference( r, c, s, o ) - local ref = { } - local vars = { - config = c, - section = s, - option = o - } - - for v in r:gmatch("[^.]+") do - ref[#ref+1] = (v:gsub( "%$(.+)", vars )) - end - - if #ref < 2 then - table.insert(ref, 1, s or '$section') - end - if #ref < 3 then - table.insert(ref, 1, c or '$config') - end - - return ref -end - -function _serialize_dependency( dep, v ) - local str - - for k, v in util.spairs( dep, - function(a,b) - a = ( type(dep[a]) ~= "boolean" and "_" or "" ) .. a - b = ( type(dep[b]) ~= "boolean" and "_" or "" ) .. b - return a < b - end - ) do - str = ( str and str .. " and " or "" ) .. k .. - ( type(v) ~= "boolean" and "=" .. v or "" ) - end - - return str -end - -function check( self, object, nodeps ) - - local derr = ERR.DEPENDENCY(object) - - if not self.depseen[object:cid()] then - self.depseen[object:cid()] = true - else - return false, derr:child(ERR.DEP_RECURSIVE(object)) - end - - if object:scheme('depends') then - local ok = true - local valid = false - - for _, dep in ipairs(object:scheme('depends')) do - local subcondition = true - for k, v in pairs(dep) do - -- XXX: better error - local ref = _parse_reference( k, unpack(object.cref) ) - - if not ref then - return false, derr:child(ERR.SME_BADDEP(object,k)) - end - - local option = uvl.option( self, object.c, unpack(ref) ) - - valid, err = self:_validate_option( option, true ) - if valid then - if not ( - ( type(v) == "boolean" and option:value() ) or - ( ref[3] and option:value() ) == v - ) then - subcondition = false - - local depstr = _serialize_dependency( dep, v ) - derr:child( - type(v) == "boolean" - and ERR.DEP_NOVALUE(option, depstr) - or ERR.DEP_NOTEQUAL(option, {depstr, v}) - ) - - break - end - else - subcondition = false - - local depstr = _serialize_dependency( dep, v ) - derr:child(ERR.DEP_NOTVALID(option, depstr):child(err)) - - break - end - end - - if subcondition then - ok = true - break - else - ok = false - end - end - - if not ok then - return false, derr - end - else - return true - end - - if object:scheme("type") == "enum" and - object:scheme("enum_depends")[object:value()] - then - local ok = true - local valid = false - local enum = object:enum() - local eerr = ERR.DEP_BADENUM(enum) - - for _, dep in ipairs(enum:scheme('enum_depends')[object:value()]) do - local subcondition = true - for k, v in pairs(dep) do - -- XXX: better error - local ref = _parse_reference( k, unpack(object.cref) ) - - if not ref then - return false, derr:child(eerr:child(ERR.SME_BADDEP(enum,k))) - end - - local option = luci.uvl.option( self, object.c, unpack(ref) ) - - valid, err = self:_validate_option( option, true ) - if valid then - if not ( - ( type(v) == "boolean" and object.config[ref[2]][ref[3]] ) or - ( ref[3] and object:config() ) == v - ) then - subcondition = false - - local depstr = _serialize_dependency( dep, v ) - eerr:child( - type(v) == "boolean" - and ERR.DEP_NOVALUE(option, depstr) - or ERR.DEP_NOTEQUAL(option, {depstr, v}) - ) - - break - end - else - subcondition = false - - local depstr = _serialize_dependency( dep, v ) - eerr:child(ERR.DEP_NOTVALID(option, depstr):child(err)) - - break - end - end - - if subcondition then - return true - else - ok = false - end - end - - if not ok then - return false, derr:child(eerr) - end - end - - return true -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/errors.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/errors.lua deleted file mode 100644 index e2a9f2c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/errors.lua +++ /dev/null @@ -1,204 +0,0 @@ ---[[ - -UCI Validation Layer - Error handling -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: errors.lua 3711 2008-11-04 23:50:14Z jow $ - -]]-- - -local uci = require "luci.model.uci" -local uvl = require "luci.uvl" -local util = require "luci.util" -local string = require "string" - -local ipairs, error, type = ipairs, error, type -local tonumber, unpack = tonumber, unpack - - -local luci = luci - -module "luci.uvl.errors" - -ERRCODES = { - { 'UCILOAD', 'Unable to load config "%p": %1' }, - - { 'SCHEME', 'Error in scheme "%p":\n%c' }, - { 'CONFIG', 'Error in config "%p":\n%c' }, - { 'SECTION', 'Error in section "%i" (%I):\n%c' }, - { 'OPTION', 'Error in option "%i" (%I):\n%c' }, - { 'REFERENCE', 'Option "%i" has invalid reference specification %1:\n%c' }, - { 'DEPENDENCY', 'In dependency check for %t "%i":\n%c' }, - - { 'SME_FIND', 'Can not find scheme "%p" in "%1"' }, - { 'SME_READ', 'Can not access file "%1"' }, - { 'SME_REQFLD', 'Missing required scheme field "%1" in "%i"' }, - { 'SME_INVREF', 'Illegal reference "%1" to an anonymous section' }, - { 'SME_BADREF', 'Malformed reference in "%1"' }, - { 'SME_BADDEP', 'Malformed dependency specification "%1" in "%i"' }, - { 'SME_BADVAL', 'Malformed validator specification "%1" in "%i"' }, - { 'SME_ERRVAL', 'External validator "%1" failed: %2' }, - { 'SME_VBADPACK', 'Variable "%o" in scheme "%p" references unknown package "%1"' }, - { 'SME_VBADSECT', 'Variable "%o" in scheme "%p" references unknown section "%1"' }, - { 'SME_EBADPACK', 'Enum "%v" in scheme "%p" references unknown package "%1"' }, - { 'SME_EBADSECT', 'Enum "%v" in scheme "%p" references unknown section "%1"' }, - { 'SME_EBADOPT', 'Enum "%v" in scheme "%p" references unknown option "%1"' }, - { 'SME_EBADTYPE', 'Enum "%v" in scheme "%p" references non-enum option "%I"' }, - { 'SME_EBADDEF', 'Enum "%v" in scheme "%p" redeclares the default value of "%I"' }, - - { 'SECT_UNKNOWN', 'Section "%i" (%I) not found in scheme' }, - { 'SECT_REQUIRED', 'Required section "%p.%S" not found in config' }, - { 'SECT_UNIQUE', 'Unique section "%p.%S" occurs multiple times in config' }, - { 'SECT_NAMED', 'The section of type "%p.%S" is stored anonymously in config but must be named' }, - { 'SECT_NOTFOUND', 'Section "%p.%s" not found in config' }, - - { 'OPT_UNKNOWN', 'Option "%i" (%I) not found in scheme' }, - { 'OPT_REQUIRED', 'Required option "%i" has no value' }, - { 'OPT_BADVALUE', 'Value "%1" of option "%i" is not defined in enum %2' }, - { 'OPT_INVVALUE', 'Value "%1" of option "%i" does not validate as datatype "%2"' }, - { 'OPT_NOTLIST', 'Option "%i" is defined as list but stored as plain value' }, - { 'OPT_DATATYPE', 'Option "%i" has unknown datatype "%1"' }, - { 'OPT_NOTFOUND', 'Option "%p.%s.%o" not found in config' }, - { 'OPT_RANGE', 'Option "%p.%s.%o" is not within the specified range' }, - - { 'DEP_NOTEQUAL', 'Dependency (%1) failed:\nOption "%i" is not eqal "%2"' }, - { 'DEP_NOVALUE', 'Dependency (%1) failed:\nOption "%i" has no value' }, - { 'DEP_NOTVALID', 'Dependency (%1) failed:\n%c' }, - { 'DEP_RECURSIVE', 'Recursive dependency for option "%i" detected' }, - { 'DEP_BADENUM', 'In dependency check for enum value "%i":\n%c' } -} - --- build error constants and instance constructors -for i, v in ipairs(ERRCODES) do - _M[v[1]] = function(...) - return error(i, ...) - end - - _M['ERR_'..v[1]] = i -end - - -function i18n(key, def) - if luci.i18n then - return luci.i18n.translate(key,def) - else - return def - end -end - - -error = util.class() - -function error.__init__(self, code, pso, args) - - self.code = code - self.args = ( type(args) == "table" and args or { args } ) - - if util.instanceof( pso, uvl.uvlitem ) then - self.stype = pso.sref[2] - self.package, self.section, self.option, self.value = unpack(pso.cref) - self.object = pso - self.value = self.value or ( pso.value and pso:value() ) - else - pso = ( type(pso) == "table" and pso or { pso } ) - - if pso[2] then - local uci = uci.cursor() - self.stype = uci:get(pso[1], pso[2]) or pso[2] - end - - self.package, self.section, self.option, self.value = unpack(pso) - end -end - -function error.child(self, err) - if not self.childs then - self.childs = { err } - else - self.childs[#self.childs+1] = err - end - return self -end - -function error.string(self,pad) - pad = pad or " " - - local str = i18n( - 'uvl_err_%s' % string.lower(ERRCODES[self.code][1]), - ERRCODES[self.code][2] - ) - :gsub("\n", "\n"..pad) - :gsub("%%i", self:cid()) - :gsub("%%I", self:sid()) - :gsub("%%p", self.package or '(nil)') - :gsub("%%s", self.section or '(nil)') - :gsub("%%S", self.stype or '(nil)') - :gsub("%%o", self.option or '(nil)') - :gsub("%%v", self.value or '(nil)') - :gsub("%%t", self.object and self.object:type() or '(nil)' ) - :gsub("%%T", self.object and self.object:title() or '(nil)' ) - :gsub("%%([1-9])", function(n) return self.args[tonumber(n)] or '(nil)' end) - :gsub("%%c", - function() - local s = "" - for _, err in ipairs(self.childs or {}) do - s = s .. err:string(pad.." ") .. "\n" .. pad - end - return s - end - ) - - return (str:gsub("%s+$","")) -end - -function error.cid(self) - return self.object and self.object:cid() or self.package .. - ( self.section and '.' .. self.section or '' ) .. - ( self.option and '.' .. self.option or '' ) .. - ( self.value and '.' .. self.value or '' ) -end - -function error.sid(self) - return self.object and self.object:sid() or self.package .. - ( self.stype and '.' .. self.stype or '' ) .. - ( self.option and '.' .. self.option or '' ) .. - ( self.value and '.' .. self.value or '' ) -end - -function error.is(self, code) - if self.code == code then - return true - elseif self.childs then - for _, c in ipairs(self.childs) do - if c:is(code) then - return true - end - end - end - return false -end - -function error.is_all(self, ...) - local codes = { ... } - - if util.contains(codes, self.code) then - return true - else - local equal = false - for _, c in ipairs(self.childs) do - if c.childs then - equal = c:is_all(...) - else - equal = util.contains(codes, c.code) - end - end - return equal - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/validation.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/validation.lua deleted file mode 100644 index 24f2f0c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvl/validation.lua +++ /dev/null @@ -1,72 +0,0 @@ ---[[ - -UCI Validation Layer - Validation helper -(c) 2008 Jo-Philipp Wich -(c) 2008 Steven Barth - -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 - -$Id: validation.lua 3260 2008-09-13 09:09:38Z Cyrus $ - -]]-- - -local os = require "os" -local fs = require "luci.fs" -local sys = require "luci.sys" -local ERR = require "luci.uvl.errors" - -local ipairs, unpack, type, tostring = ipairs, unpack, type, tostring - -module "luci.uvl.validation" - -function _exec( bin, args ) - local cmd, output = "", nil - - for _, v in ipairs({ bin, unpack(args) }) do - cmd = cmd .. ("%q " % v):gsub("([%$`])","\\%1") - end - - local tmpfile = "/tmp/uvl" .. sys.uniqueid(8) - local retval = os.execute( cmd .. " 1>" .. tmpfile .. " 2>" .. tmpfile ) - - if fs.access(tmpfile) then - output = fs.readfile(tmpfile) - fs.unlink(tmpfile) - end - - return retval, output -end - -function check( self, object ) - if object:scheme('validators') then - for _, val in ipairs(object:scheme('validators')) do - local ok, err = false, nil - - local values = object:value() - values = type(values) == "table" and values or { values } - - local args = { - object:scheme('type'), object:scheme('datatype'), - object.cref[1], object.cref[2], object.cref[3] or '', - unpack(values) - } - - if type(val) == "function" then - ok, err = val(unpack(args)) - else - ok, err = _exec( val, args ) - ok = ( ok == 0 ) - end - - if not ok then - return false, ERR.SME_ERRVAL(object, {tostring(val), err}) - end - end - end - - return true, nil -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/footer.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/footer.xml deleted file mode 100644 index 4b97469..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/footer.xml +++ /dev/null @@ -1,11 +0,0 @@ - -
-
-generated on <%=require "os".date("%c")%> with LuCI UVLDoc - written by Steven Barth and Jo-Philipp Wich -
- - -
 
- - - \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/header.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/header.xml deleted file mode 100644 index f4a89b5..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/header.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - <% if title then %><%=title%> - <% end %>LuCI UVLDoc - - - - - -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/index.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/index.xml deleted file mode 100644 index a905004..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/index.xml +++ /dev/null @@ -1,12 +0,0 @@ -<%+header.xml%> -

UCI Documentation

-

Schemes

- -<% for k, v in luci.util.kspairs(self.schemes) do %> - - - - -<% end %> -
<%=k%><%=self.schemes[k].title%>
-<%+footer.xml%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/menu.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/menu.xml deleted file mode 100644 index c0ad3da..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/menu.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/scheme.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/scheme.xml deleted file mode 100644 index f4fe22e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/scheme.xml +++ /dev/null @@ -1,16 +0,0 @@ -<%- title = scheme -%> -<%+header.xml%> -

<%=scheme-%> -<%-if package.title then%> - <%=package.title%><%end%>

-
<%=package.description%>
- -

Sections:

- -<% for k, v in luci.util.kspairs(package.sections) do %> - - - - -<% end %> -
<%=k%><%=v.title%>
-<%+footer.xml%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/section.xml b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/section.xml deleted file mode 100644 index 691fde4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/section.xml +++ /dev/null @@ -1,198 +0,0 @@ -<%- title = scheme .. "." .. type -%> -<%+header.xml%> -<% -local table = require "table" - -types = { - list = "List", - variable = "Variable", - lazylist = "Mixed", - enum = "Enumerator", - reference = "Reference" -} - -datatypes = { - boolean = "Boolean", - string = "String", - uint = "Unsigned Integer", - integer = "Integer", - float = "Real Number", - ipaddr = "IP-Address", - ip4addr = "IPv4-Address", - ip6addr = "IPv6-Address", - ip4prefix = "IPv4-Prefix", - ip6prefix = "IPv6-Prefix", - hostname = "Hostname", - host = "Host (Hostname or IP-Address)", - directory = "Filesystem path (to directory)", - file = "Filesystem path (to file)", - macaddr = "MAC-Address", - port = "Port", - portrange = "Single Port or Portrange (First-Last)" -} - -function _parse_ref( r ) - local k, v, h = r:match("([^.]+)%.([^.]+)%.([^.]+)") - if not k then - k, v = r:match("([^.]+)%.([^.]+)") - end - if k then - if h then - return self:_variable_target(k, v, h), true - else - return self:_section_filename(k, v) - end - end -end - -function _parse_dep( r, c, s, o ) - local ref = { } - local vars = { - config = c, - section = s, - option = o - } - - for v in r:gmatch("[^.]+") do - ref[#ref+1] = (v:gsub( "%$(.+)", vars )) - end - - if #ref < 2 then - table.insert(ref, 1, s or '$section') - end - if #ref < 3 then - table.insert(ref, 1, c or '$config') - end - - return self:_variable_target(unpack(ref)) -end - -%> - -

<%=scheme-%> -<%-if package.title then%> - <%=package.title%><%end%>

-

<%=type-%> -<%-if section.title then%> - <%=section.title%><%end%>

-
<%=section.description%>
- -

Attributes:

-
    -<%- -if section.required then %> -
  • required: A section of this type is required.
  • -<% end -if section.unique then %> -
  • unique: There can be only one section of this type.
  • -<%- else -%> -
  • multiple: There can be more than one section of this type.
  • -<% end -if section.dynamic then %> -
  • dynamic: Sections of this type may contain user-defined options.
  • -<% end -if section.named then %> -
  • named: Sections of this type require a name.
  • -<% end -%> -
- -<% if section.depends then %> -

Requirements (one of):

-
    - <% for i, d in ipairs(section.depends) do - local nf = false%> -
  • - <% for k2, v in luci.util.kspairs(d) do - local t = _parse_dep(k2, scheme, type) - %> - <% if nf then %>and<% end %> - <%if t then%><%end%><%=k2%><%if t then%><%end%><%if v~=true then%>=<%=v%><%end%> - <% nf = true - end %> -
  • - <% end %> -
-<% end %> - -

Variable Overview:

- -<% for k, v in luci.util.kspairs(package.variables[type]) do -if v.required then%> - - - - -<% end end -for k, v in luci.util.kspairs(package.variables[type]) do -if not v.required then%> - - - - -<% end end %> -
<%=k%><%=v.title%>
<%=k%><%=v.title%>
- -

Options:

-<%- -for i=0, 1 do -for k, v in luci.util.kspairs(package.variables[type]) do -if (i==0) == v.required then -%> -
-
- -

<%=k-%> - <%-if v.title then%> - <%=v.title%><%end%>

-
-
<%=v.description%>
-
Attributes:
-
    - <% if v.required then %> -
  • required
  • - <% end %> -
  • Type: <%=types[v.type] or v.type%>
  • -
  • Datatype: <%=datatypes[v.datatype] or v.datatype%>
  • - <% if v.multival then %> -
  • multiple values: space-separated
  • - <% end %> -
- <% if v.depends then %> -
Dependencies (one of):
-
    - <% for i, d in ipairs(v.depends) do - local nf = false %> -
  • - <% for k2, v in luci.util.kspairs(d) do - local t = _parse_dep(k2, scheme, type, k) - %> - <% if nf then %>and<% end %> - <%if t then%><%end%><%=k2%><%if t then%><%end%><%if v~=true then%>=<%=v%><%end%> - <% nf = true - end %> -
  • - <% end %> -
- <% end %> - <% if v.type == "enum" then %> -
Possible Values:
-
    - <% for k, d in pairs(v.values) do %> -
  • <%=k%><%if d then%> (<%=d%>)<%end%>
  • - <% end %> -
- <% elseif v.type == "reference" then %> -
Value references:
-
    - <% for k, d in ipairs(v.valueof) do %> -
  • - <% local t, x = _parse_ref(d) - if t then %><%=x and "Value of" or "Section of type"%> <% end %> - <%=d%> - <% if t then%><% end %> -
  • - <% end %> -
- <% end %> -
- -
-<% end end end -%> -<%+footer.xml%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/uvldoc.css b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/uvldoc.css deleted file mode 100644 index 32a5e96..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/proto/xhtml/uvldoc.css +++ /dev/null @@ -1,135 +0,0 @@ -body { - font-family: sans-serif; - font-size: 0.85em; - color: #101010; -} - -h1, h2, h3, h4, h5, h6 { - margin-top: 0; - font-weight: bold; -} - -h1 { - font-size: 1.5em; -} - -h2 { - font-size: 1.4em; -} - -h3 { - font-size: 1.2em; -} - -h4 { - font-size: 1.1em; -} - -h5 { - font-size: 1.0em; -} - -dfn { - font-weight: normal; - font-size: 0.9em; -} - -table { - border-collapse: collapse; -} - -tr, td, th { - border: 1px solid #e0e0ff; - padding: 3px; -} - -th { - background-color: #f0f0ff; - text-align: left; -} - - -hr { - border: none; - background-color: #cccccc; - height: 1px; -} - -ul, li { - margin-top: 0; -} - -div.clear { - clear: both; -} - -div.variable-declaration { - padding-left: 2em; -} - -div.variable-description { - margin-bottom: 1em; -} - -h3.section-variables { - margin-top: 2em; -} - -h4.variable-title { - margin-bottom: 0; -} - -div#menu { - float: left; - background-color: #f0f0ff; - margin: 0; - padding: 0; - border: 1px solid #e0e0ff; - width: 11.5em; -} - -#menu ul { - list-style-type: none; - margin-bottom: 0.5em; - padding-left: 1em; -} -#menu ul li { - margin-left: 0; - -} - -div.menu-title { - background-color: #e0e0ff; - color: #000000; - font-weight: bold; - padding: 2px; -} - -div#content { - margin-top: 0; - padding-top: 0; - margin-left: 12.5em; -} - -div#copy { - margin-top: 2.5em; - font-size: 0.7em; - text-align: center; - font-size: bold; -} - -a:link { - font-weight: bold; - color: #004080; - text-decoration: none; -} - -a:visited { - font-weight:bold; - color: #006699; - text-decoration: none; -} - -a:hover { - text-decoration:underline; -} diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/renderer.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/renderer.lua deleted file mode 100644 index d005ba3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/uvldoc/renderer.lua +++ /dev/null @@ -1,124 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface - -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ -]]-- - -local io = require "io" -local fs = require "luci.fs" -local uvl = require "luci.uvl" -local util = require "luci.util" -local ltn12 = require "luci.ltn12" -local template = require "luci.template" - -local ipairs, getfenv, pairs, require, unpack = ipairs, getfenv, pairs, require, unpack -local luci = luci - -module "luci.uvldoc.renderer" - - -Generator = util.class() - -function Generator.__init__(self, schemes, output, uvlpath) - self.names = schemes - self.output = output or "doc" - self.schemes = {} - self.uvl = uvl.UVL() - - self.extension = ".xml" - self.additionals = {"uvldoc.css"} - self.sourcedir = util.libpath() .. "/uvldoc/proto/xhtml/" -end - - -function Generator.make(self) - for i, scheme in ipairs(self.names) do - self.schemes[scheme] = self.uvl:get_scheme(scheme) - end - - fs.mkdir(self.output) - - for i, file in ipairs(self.additionals) do - fs.copy(self.sourcedir .. file, self.output .. "/" .. file) - end - - template.compiler_mode = "memory" - template.viewdir = self.sourcedir - template.context.viewns = { - include = function(name) template.Template(name):render(getfenv(2)) end, - pairs = pairs, - ipairs = ipairs, - unpack = unpack, - luci = luci, - require = require - } - - self:_make_index() - - for scheme, package in pairs(self.schemes) do - self:_make_package(scheme) - for type, section in pairs(package.sections) do - self:_make_section(scheme, type) - end - end -end - -function Generator._make_index(self) - local t = template.Template("index.xml") - local sink = ltn12.sink.file( - io.open(self.output .. "/" .. self:_index_filename(), "w") - ) - t:render({self = self, write = sink}) - sink() -end - -function Generator._make_package(self, scheme) - local t = template.Template("scheme.xml") - local sink = ltn12.sink.file( - io.open(self.output .. "/" .. self:_scheme_filename(scheme), "w") - ) - t:render({self = self, package = self.schemes[scheme], scheme = scheme, write = sink}) - sink() -end - -function Generator._make_section(self, scheme, section) - local t = template.Template("section.xml") - local sink = ltn12.sink.file( - io.open(self.output .. "/" .. self:_section_filename(scheme, section), "w") - ) - local pkg = self.schemes[scheme] - t:render({self = self, package = pkg, - scheme = scheme, type=section, section=pkg.sections[section], - write = sink}) - sink() -end - -function Generator._index_filename(self) - return "index%s" % self.extension -end - -function Generator._scheme_filename(self, scheme) - return "scheme.%s%s" % {scheme, self.extension} -end - -function Generator._section_filename(self, scheme, section) - if self.schemes[scheme] and self.schemes[scheme].sections[section] then - return "section.%s.%s%s" % {scheme, section, self.extension} - end -end - -function Generator._variable_target(self, scheme, section, variable) - if self.schemes[scheme] and self.schemes[scheme].variables[section] and - self.schemes[scheme].variables[section][variable] then - return "section.%s.%s%s#variable.%s" % {scheme, section, self.extension, variable} - end -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/version.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/version.lua deleted file mode 100644 index 9e5cb71..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/version.lua +++ /dev/null @@ -1,12 +0,0 @@ ---[[ -LuCI - Lua Configuration Interface -Version definition - do not edit this file -]]-- - -module "luci.version" - -distname = "Host System" -distversion = "SDK" - -luciname = "LuCI" -luciversion = "SVN" diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/about.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/about.htm deleted file mode 100644 index 5de651f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/about.htm +++ /dev/null @@ -1,45 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: about.htm 3650 2008-10-29 19:40:40Z jow $ - --%> -<%+header%> -

<%:about%> LuCI

-

<%:c_lucidesc%>

- -

<%:c_projecthome%>: luci.freifunk-halle.net

- -
-

<%:c_leaddev%>

- -
- -

<%:c_contributors%>

- -
- -

<%:c_thanksto%>

-
    -
  • Mono (Freifunk Halle)
  • -
  • tetzlav (Freifunk Leipzig)
  • -
  • Mickey Knox (Freifunk Hannover)
  • -
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_index/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_index/index.htm deleted file mode 100644 index 2f935ee..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_index/index.htm +++ /dev/null @@ -1,24 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:a_i_i_hello%>

-

<%:a_i_i_admin1%>

-

<%:a_i_i_admin2%>
-<%:a_i_i_admin3%>

-

<%:a_i_i_admin4%>

-

<%:a_i_i_admin5%>

-

<%:a_i_i_admin6%>

-

<%:a_i_i_team%>

-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_services/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_services/index.htm deleted file mode 100644 index a892d13..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_services/index.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:services%>

-

<%:a_srv_services1%>

-

<%:a_srv_services2%>

-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/index.htm deleted file mode 100644 index 3225753..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/index.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> - -

<%:stat_statistics Statistics%>

- -

<%:stat_desc The statistics package is based on Collectd -and uses RRD Tool to render diagram images from collected data.%>

- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/networkplugins.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/networkplugins.htm deleted file mode 100644 index 0c7b448..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/networkplugins.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: networkplugins.htm 3987 2009-01-02 21:35:25Z Cyrus $ - --%> -<%+header%> - -

<%:stat_networkplugins Network plugins%>

- -

<%:stat_networkplugins_desc Network plugins are used to collect information -about open tcp connections, interface traffic, iptables rules etc.%>

- -

<%:stat_networkplugins_installed Installed network plugins:%> -

    - <% for plugin, desc in pairs(plugins) do %> - <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %> -
  • <%=desc%>
  • - <% end %> - <% end %> -
-

- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/outputplugins.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/outputplugins.htm deleted file mode 100644 index 18f7103..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/outputplugins.htm +++ /dev/null @@ -1,33 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: outputplugins.htm 3987 2009-01-02 21:35:25Z Cyrus $ - --%> -<%+header%> - -

<%:stat_outputplugins Output plugins%>

- -

<%:stat_outputplugins_desc Output plugins provide different possibilities to store collected data. -It is possible to enable multiple plugin at one, for example to store collected data in rrd databases -and to transmit the data over the network to other collectd instances.%>

- -

<%:stat_outputplugins_installed Installed output plugins:%> -

    - <% for plugin, desc in pairs(plugins) do %> - <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %> -
  • <%=desc%>
  • - <% end %> - <% end %> -
-

- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/systemplugins.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/systemplugins.htm deleted file mode 100644 index 547a9fc..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_statistics/systemplugins.htm +++ /dev/null @@ -1,29 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: systemplugins.htm 3987 2009-01-02 21:35:25Z Cyrus $ - --%> -<%+header%> - -

<%:stat_systemplugins System plugins%>

- -

<%:stat_systemplugins_desc System plugins collecting values about system state and ressource usage on the device.:%> -

    - <% for plugin, desc in pairs(plugins) do %> - <% if luci.fs.access("/usr/lib/collectd/" .. plugin .. ".so") then %> -
  • <%=desc%>
  • - <% end %> - <% end %> -
-

- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/dmesg.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/dmesg.htm deleted file mode 100644 index 4fa8673..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/dmesg.htm +++ /dev/null @@ -1,20 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: syslog.htm 3622 2008-10-23 16:05:55Z jow $ - --%> -<%+header%> -

<%:dmesg%>

-
- -
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/index.htm deleted file mode 100644 index 4a3d938..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/index.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:status%>

-

<%:a_st_i_status1%>

-

<%:a_st_i_status2%>

-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/syslog.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/syslog.htm deleted file mode 100644 index 1da1c84..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_status/syslog.htm +++ /dev/null @@ -1,20 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: syslog.htm 3792 2008-11-16 22:46:25Z jow $ - --%> -<%+header%> -

<%:syslog%>

-
- -
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/applyreboot.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/applyreboot.htm deleted file mode 100644 index 73cf4a7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/applyreboot.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: applyreboot.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-
-

<% if msg then %><%=msg%><% else %><%:a_s_applyreboot1%><% end %>

-

<%:a_s_reboot_running%>

- -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/backup.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/backup.htm deleted file mode 100644 index 3162e73..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/backup.htm +++ /dev/null @@ -1,40 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: backup.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:a_s_backup%>

-

<%:a_s_backup1%>

-
-
- -
- -
- -
-
<%:a_s_backup_archive%>:
-
- -
-
- -
-
-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/ipkg.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/ipkg.htm deleted file mode 100644 index 2ebebfd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/ipkg.htm +++ /dev/null @@ -1,18 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ipkg.htm 2819 2008-08-14 17:16:56Z Cyrus $ - --%> -
    -
  • <%:a_s_p_ipkg_pkglists%>: src Name URL
  • -
  • <%:a_s_p_ipkg_targets%>: dest Name Pfad
  • -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/packages.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/packages.htm deleted file mode 100644 index de71a68..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/packages.htm +++ /dev/null @@ -1,98 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: packages.htm 4065 2009-01-17 13:21:50Z Cyrus $ - --%> -<%- -local rowcnt = 1 -function rowstyle() - rowcnt = rowcnt + 1 - return (rowcnt % 2) + 1 -end --%> -<%+header%> -

<%:system%>

-

<%:a_s_packages%>

- -
- -<% if install or remove or update or upgrade then %> -
<%:status%>:
-<% if update then %> - <%:a_s_packages_update%>: <% if update == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=update%>)<% end %>
-<% end %> -<% if upgrade then%> - <%:a_s_packages_upgrade%>: <% if upgrade == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=upgrade%>)<% end %>
-<% end %> -<% if install then for k,v in pairs(install) do %> - <%:a_s_packages_install%> '<%=k%>': <% if v == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=v%>)<% end %>
-<% end end %> -<% if remove then for k,v in pairs(remove) do %> - <%:a_s_packages_remove%> '<%=k%>': <% if v == 0 then %><%:ok%><% else %><%:error%> (<%:code%> <%=v%>)<% end %>
-<% end end %> -
-
-<% end %> - -
-
-
- -
-
-
- -
- - -
-
- -
- -
- - -
-
- - - - - - - - - - <% for k, pkg in pairs(pkgs) do %> - - - - - - - - <% end %> -
<%:a_s_packages_name%><%:version%><%:install%><%:delete%><%:descr%>
<%=luci.util.pcdata(pkg.Package)%><%=luci.util.pcdata(pkg.Version)%><% if not pkg.Status or not pkg.Status.installed then %><% else %><%:installed%><% end %><% if pkg.Status and pkg.Status.installed then %><% else %><%:notinstalled%><% end %><%=luci.util.pcdata(pkg.Description)%>
- -
- -
- -
-
-
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/reboot.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/reboot.htm deleted file mode 100644 index 115a918..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/reboot.htm +++ /dev/null @@ -1,33 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: reboot.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:reboot%>

-

<%:a_s_reboot1%>

-<%- -local c = require("luci.model.uci").cursor():changes() -if c and next(c) then --%> -

<%:a_s_reboot_u%>

-<%- -end -if not reboot then --%> -

<%:a_s_reboot_do%>

-<%- else -%> -

<%:a_s_reboot_running%>

- -<%- end -%> -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/upgrade.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/upgrade.htm deleted file mode 100644 index 080aa07..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_system/upgrade.htm +++ /dev/null @@ -1,52 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upgrade.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:a_s_flash%>

-

<%:a_s_flash_upgrade1%>

-
-<% if sysupgrade and not ret then %> -
-
<%:a_s_flash_fwimage%>:
-
- -
-
- <% if keep_avail then -%> - - <%:a_s_flash_keepcfg%> - <% end -%> -
-
- -
-
-<% elseif ret then %> -

<%:a_s_flash_received%>

-

<%:a_s_flash_inprogress%>

- - - <% %> - <% local ret = ret() - if ret == 0 then %> -
<%:a_s_flash_flashed%>
- <% else %> -
<%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)
- <% end %> -<% else %> -
<%:a_s_flash_notimplemented%>
-<% end %> -<%+footer%> -<% if ret == 0 then luci.sys.reboot() end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/apply.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/apply.htm deleted file mode 100644 index ac2dd38..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/apply.htm +++ /dev/null @@ -1,42 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: apply.htm 3871 2008-12-07 21:27:52Z jow $ - --%> -<%+header%> - -

<%:config%>

-

<%:uci_applied%>:

- -
- <%=(changes or "-")%> -
- -
-
    <%- - local fp = reload() - local line = fp:read() - while line do - write("
  • " .. luci.util.pcdata(line) .. "
  • \n") - line = fp:read() - end - fp:close() - -%>
-
- -
-
"> - -
-
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/changes.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/changes.htm deleted file mode 100644 index 3e6339b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/changes.htm +++ /dev/null @@ -1,45 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: changes.htm 3871 2008-12-07 21:27:52Z jow $ - --%> - -<%+header%> - -

<%:config%>

-

<%:changes%>:

- -
- <%=changes%> -
- -
-
-
"> - -
-
- -
-
- -
-
- -
-
- -
-
-
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/revert.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/revert.htm deleted file mode 100644 index 7f58c2a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/admin_uci/revert.htm +++ /dev/null @@ -1,31 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: revert.htm 3871 2008-12-07 21:27:52Z jow $ - --%> - -<%+header%> - -

<%:config%>

-

<%:uci_reverted%>:

- -
- <%=(changes or "-")%> -
- -
-
"> - -
-
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/browser.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/browser.htm deleted file mode 100644 index 224da0e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/browser.htm +++ /dev/null @@ -1,23 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: browser.htm 3555 2008-10-10 21:52:22Z jow $ - --%> - -<% - local t = require("luci.tools.webadmin") - local v = self:cfgvalue(section) --%> -<%+cbi/valueheader%> - /> - '<%=self.default_path and ", '"..self.default_path.."'"%>);return false" alt="<%:cbi_browser%>" title="<%:cbi_browser%>" src="<%=resource%>/cbi/folder.png" style="vertical-align:bottom" /> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/button.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/button.htm deleted file mode 100644 index 99c3ba6..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/button.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: button.htm 3652 2008-10-29 19:41:33Z jow $ - --%> -<%+cbi/valueheader%> - <% if self:cfgvalue(section) ~= false then %> - " type="submit"<%= attr("name", cbid) .. attr("id", cbid) .. attr("value", self.title)%> /> - <% else %> - - - <% end %> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valuefooter.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valuefooter.htm deleted file mode 100644 index 43ce1c3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valuefooter.htm +++ /dev/null @@ -1,34 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: cell_valuefooter.htm 3340 2008-09-16 15:51:35Z Cyrus $ - --%> -
-
">
- - -<% if #self.deps > 0 then -%> - -<%- end %> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valueheader.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valueheader.htm deleted file mode 100644 index 5d081e3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/cell_valueheader.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: cell_valueheader.htm 3340 2008-09-16 15:51:35Z Cyrus $ - --%> - - -
"> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dvalue.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dvalue.htm deleted file mode 100644 index 2915a93..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dvalue.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: dvalue.htm 3369 2008-09-19 10:44:35Z Cyrus $ - --%> - -<%+cbi/valueheader%> -<% if self.href then %><% end -%> - <%=luci.util.pcdata(self:cfgvalue(section))%> -<%- if self.href then %><%end%> -  - -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dynlist.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dynlist.htm deleted file mode 100644 index a23a4eb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/dynlist.htm +++ /dev/null @@ -1,45 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<%+cbi/valueheader%> -<% - local vals = self:cfgvalue(section) or {} - for i=1, #vals + 1 do - local val = vals[i] -%> - /> - <% if i <= #vals then %> - " alt="<%:cbi_del%>" title="<%:cbi_del%>" src="<%=resource%>/cbi/remove.gif" /> - <% else %> - " alt="<%:cbi_add%>" title="<%:cbi_add%>" src="<%=resource%>/cbi/add.gif" /> - <% end %> - <% if #self.keylist > 0 then -%> - - <% end -%> -<% if i <= #vals then %>
-<% end end %> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/filebrowser.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/filebrowser.htm deleted file mode 100644 index b106d6b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/filebrowser.htm +++ /dev/null @@ -1,122 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: filebrowser.htm 3555 2008-10-10 21:52:22Z jow $ - --%> - - - - - - Filebrowser - LuCI - - - - - - <% - require("luci.fs") - require("luci.http") - require("luci.dispatcher") - - local field = luci.http.formvalue('field') - local request = luci.dispatcher.context.path - local path = { '' } - - for i = 3, #request do - if request[i] ~= '..' and #request[i] > 0 then - path[#path+1] = request[i] - end - end - - local filepath = table.concat( path, '/' ) - local filestat = luci.fs.stat( filepath ) - local baseurl = luci.dispatcher.build_url('admin', 'filebrowser') - - if filestat and filestat.type == "regular" then - table.remove( path, #path ) - filepath = table.concat( path, '/' ) .. '/' - elseif not ( filestat and filestat.type == "directory" ) then - path = { '' } - filepath = '/' - else - filepath = filepath .. '/' - end - - local entries = luci.fs.dir(filepath) - -%> -
- Location: - <% for i, dir in ipairs(path) do %> - <% if i == 1 then %> - (root) - <% elseif next(path, i) then %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% else %> - <% baseurl = baseurl .. '/' .. dir %> - / <%=dir%> - <% end %> - <% end %> -
- -
- -
-
    - <% for _, e in luci.util.vspairs(entries) do - local stat = luci.fs.stat(filepath..e) - if e ~= '.' and e ~= '..' and stat and stat.type == 'directory' then - -%> -
  • - Directory - <%=e%>/ -
  • - <% end end -%> - - <% for _, e in luci.util.vspairs(entries) do - local stat = luci.fs.stat(filepath..e) - if stat and stat.type ~= 'directory' then - -%> -
  • - File - <%=e%> -
  • - <% end end -%> -
-
- - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/footer.htm deleted file mode 100644 index 7762124..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/footer.htm +++ /dev/null @@ -1,26 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 3941 2008-12-23 21:39:38Z jow $ - --%> - <%- if pageaction then -%> -
- <% if not autoapply then%> - - <% end %> - - - -
- <%- end -%> - -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valuefooter.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valuefooter.htm deleted file mode 100644 index 32e6d05..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valuefooter.htm +++ /dev/null @@ -1,45 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: full_valuefooter.htm 3657 2008-10-30 02:41:25Z jow $ - --%> - - <% if self.description and #self.description > 0 then -%> - <% if not luci.util.instanceof( self, luci.cbi.Flag ) then -%> -
- <%- end %> -
- <%:help%> - <%=self.description%> -
- <%- end %> - <%- if self.title and #self.title > 0 then -%> -
- <%- end -%> - - -<% if #self.deps > 0 then -%> - -<%- end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valueheader.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valueheader.htm deleted file mode 100644 index dd2eb8e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/full_valueheader.htm +++ /dev/null @@ -1,24 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: full_valueheader.htm 3171 2008-09-06 22:42:55Z jow $ - --%> - -
"> - <%- if self.title and #self.title > 0 then -%> - -
- <%- end -%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/fvalue.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/fvalue.htm deleted file mode 100644 index 5aade0c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/fvalue.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: fvalue.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+cbi/valueheader%> - value="1" /> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/header.htm deleted file mode 100644 index bc40e19..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/header.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 3941 2008-12-23 21:39:38Z jow $ - --%> - -<%+header%> -
-
- - - -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/lvalue.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/lvalue.htm deleted file mode 100644 index 90a5ca4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/lvalue.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: lvalue.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+cbi/valueheader%> -<% if self.widget == "select" then %> - -<% elseif self.widget == "radio" then - local c = 0 - for i, key in pairs(self.keylist) do - c = c + 1 -%> - /> - ><%=self.vallist[i]%>
-<% if c == self.size then c = 0 %>
-<% end end %> -<% end %> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/map.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/map.htm deleted file mode 100644 index 23d09a2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/map.htm +++ /dev/null @@ -1,36 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: map.htm 3646 2008-10-29 18:54:56Z jow $ - --%> - -
-

<%=self.title%>

-
<%=self.description%>
- <%- if self._apply then -%> -
- <%:cbi_applying%> -
    <%- - local fp = self._apply() - self._apply = nil - local line = fp:read() - while line do - write("
  • " .. luci.util.pcdata(line) .. "
  • \n") - line = fp:read() - end - fp:close() - -%>
-
- <%- end -%> - <%- self:render_children() %> -
-
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/mvalue.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/mvalue.htm deleted file mode 100644 index 9f1a8f3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/mvalue.htm +++ /dev/null @@ -1,35 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: mvalue.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<% -local v = self:valuelist(section) or {} -%> -<%+cbi/valueheader%> -<% if self.widget == "select" then %> - -<% elseif self.widget == "checkbox" then - local c = 0; - for i, key in pairs(self.keylist) do - c = c + 1 -%> - /> - ><%=self.vallist[i]%>
-<% if c == self.size then c = 0 %>
-<% end end %> -<% end %> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nsection.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nsection.htm deleted file mode 100644 index 5042a37..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nsection.htm +++ /dev/null @@ -1,45 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: nsection.htm 3652 2008-10-29 19:41:33Z jow $ - --%> - -<% if self:cfgvalue(self.section) then section = self.section %> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> - <% if self.description and #self.description > 0 then -%> -
<%=self.description%>
- <%- end %> - <% if self.addremove then -%> -
- -
- <%- end %> -
- <%+cbi/ucisection%> -
-
-
-<% elseif self.addremove then %> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
- -
- <%- end %> -<% end %> - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nullsection.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nullsection.htm deleted file mode 100644 index 9b2882a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/nullsection.htm +++ /dev/null @@ -1,23 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: nullsection.htm 3340 2008-09-16 15:51:35Z Cyrus $ - --%> -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
- <% self:render_children(1, scope or {}) %> -
-
-
\ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/simpleform.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/simpleform.htm deleted file mode 100644 index 0e9d535..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/simpleform.htm +++ /dev/null @@ -1,46 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: simpleform.htm 3941 2008-12-23 21:39:38Z jow $ - --%> - - -
- - -
-
-

<%=self.title%>

-
<%=self.description%>
- <% self:render_children() %> -
-
-<%- if self.message then %> -
<%=self.message%>
-<%- end %> -<%- if self.errmessage then %> -
<%=self.errmessage%>
-<%- end %> -
-<%- if self.submit ~= false then %> - -<% end %> -<%- if self.reset ~= false then %> - -<% end %> - -
- diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tblsection.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tblsection.htm deleted file mode 100644 index fb00ed3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tblsection.htm +++ /dev/null @@ -1,135 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: tblsection.htm 4051 2009-01-16 20:29:47Z Cyrus $ - --%> -<%- -local rowcnt = 1 -function rowstyle() - rowcnt = rowcnt + 1 - return (rowcnt % 2) + 1 -end --%> - - -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
-
- <%- local count = 0 -%> - - - <%- if not self.anonymous then -%> - <%- if self.sectionhead then -%> - - <%- else -%> - - <%- end -%> - <%- end -%> - <%- for i, k in pairs(self.children) do if not k.optional then -%> - - <%- count = count + 1; end; end; if self.extedit or self.addremove then -%> - - <%- count = count + 1; end -%> - - - <%- if not self.anonymous then -%> - <%- if self.sectiondesc then -%> - - <%- else -%> - - <%- end -%> - <%- end -%> - <%- for i, k in pairs(self.children) do if not k.optional then -%> - - <%- end; end; if self.extedit or self.addremove then -%> - - <%- end -%> - - <%- local isempty = true - for i, k in ipairs(self:cfgsections()) do - section = k - isempty = false - scope = { valueheader = "cbi/cell_valueheader", valuefooter = "cbi/cell_valuefooter" } - -%> - - <% if not self.anonymous then -%> - - <%- end %> - - - <%- - for k, node in ipairs(self.children) do - if not node.optional then - node:render(section, scope or {}) - end - end - -%> - - <%- if self.extedit or self.addremove then -%> - - <%- end -%> - - <%- end -%> - - <%- if isempty then -%> - - - - <%- end -%> -
<%=self.sectionhead%>  - <%- if k.titleref then -%><%- end -%> - <%-=k.title-%> - <%- if k.titleref then -%><%- end -%> -  
<%=self.sectiondesc%><%=k.description%>

<%=k%>

- <%- if self.extedit then -%> - - <%=self.extedit:format(section)%> - <%- elseif type(self.extedit) == "function" then -%> - <%=self:extedit(section)%> - <%- end -%> - " title="<%:edit%>"><%:edit%> - <%- end; if self.addremove then %> - - <%- end -%> -

<%:cbi_sectempty%>
- - <% if self.error then %> -
-
    <% for _, c in pairs(self.error) do for _, e in ipairs(c) do -%> -
  • <%=luci.util.pcdata(e):gsub("\n","
    ")%>
  • - <%- end end %>
-
- <% end %> - - <%- if self.addremove then -%> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.anonymous then %> - - <% else %> - <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then -%> -
<%:cbi_invalid%>
- <%- end %> - <% end %> -
- <%- end %> - <%- end -%> -
-
- diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tsection.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tsection.htm deleted file mode 100644 index 56a9b4e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tsection.htm +++ /dev/null @@ -1,59 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: tsection.htm 3652 2008-10-29 19:41:33Z jow $ - --%> - -
- <% if self.title and #self.title > 0 then -%> - <%=self.title%> - <%- end %> -
<%=self.description%>
- <% local isempty = true for i, k in ipairs(self:cfgsections()) do -%> - <% if self.addremove then -%> -
- -
- <%- end %> - <% section = k; isempty = false %> - - <% if not self.anonymous then -%> -

<%=k:upper()%>

- <%- end %> - -
- <%+cbi/ucisection%> -
-
- <%- end %> - - <% if isempty then -%> - <%:cbi_sectempty%>

- <%- end %> - - <% if self.addremove then -%> - <% if self.template_addremove then include(self.template_addremove) else -%> -
- <% if self.anonymous then -%> - - <%- else -%> - <% if self.invalid_cts then -%>
<% end %> - - - <% if self.invalid_cts then -%> -
<%:cbi_invalid%>
- <%- end %> - <%- end %> -
- <%- end %> - <%- end %> -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tvalue.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tvalue.htm deleted file mode 100644 index 0cd3766..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/tvalue.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: tvalue.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+cbi/valueheader%> - -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/ucisection.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/ucisection.htm deleted file mode 100644 index f4c82a9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/ucisection.htm +++ /dev/null @@ -1,66 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: ucisection.htm 3475 2008-09-30 21:13:33Z Cyrus $ - --%> - -<% self:render_children(section, scope or {}) %> - -<% if self.error and self.error[section] then -%> -
-
    <% for _, e in ipairs(self.error[section]) do %>
  • <%=luci.util.pcdata(e):gsub("\n","
    ")%>
  • <% end %>
-
-<%- end %> - -<% if self.optionals[section] and #self.optionals[section] > 0 or self.dynamic then %> -
- <% if self.dynamic then %> - - <% if self.optionals[section] and #self.optionals[section] > 0 then %> - - <% end %> - <% else %> - - - <% end %> - -
-<% end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/upload.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/upload.htm deleted file mode 100644 index b56b84b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/upload.htm +++ /dev/null @@ -1,28 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upload.htm 3530 2008-10-07 15:41:15Z jow $ - --%> - -<% - local t = require("luci.tools.webadmin") - local v = self:cfgvalue(section) --%> -<%+cbi/valueheader%> - <% if v then %> - <%:cbi_upload Uploaded File%> (<%=t.byte_format(luci.fs.stat(v).size or 0)%>) - /> - " alt="<%:cbi_replace%>" title="<%:cbi_replace%>" src="<%=resource%>/cbi/reload.gif" /> - <% else %> - /> - <% end %> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/value.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/value.htm deleted file mode 100644 index e6e9948..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/value.htm +++ /dev/null @@ -1,38 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: value.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+cbi/valueheader%> - /> - <% if #self.keylist > 0 then -%> - - <% end -%> -<%+cbi/valuefooter%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valuefooter.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valuefooter.htm deleted file mode 100644 index fd8f97c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valuefooter.htm +++ /dev/null @@ -1,16 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: valuefooter.htm 2639 2008-07-20 15:16:13Z jow $ - --%> - -<% include( valuefooter or "cbi/full_valuefooter" ) %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valueheader.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valueheader.htm deleted file mode 100644 index 4aa9f07..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/cbi/valueheader.htm +++ /dev/null @@ -1,16 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: valueheader.htm 2639 2008-07-20 15:16:13Z jow $ - --%> - -<% include( valueheader or "cbi/full_valueheader" ) %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error404.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error404.htm deleted file mode 100644 index 0942341..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error404.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: error404.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

404 Not Found

-

Sorry, the object you requested was not found.

-Unable to dispatch: <%=luci.http.request.env.PATH_INFO%> -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error500.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error500.htm deleted file mode 100644 index bfa2e54..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/error500.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: error500.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

500 Internal Server Error

-

Sorry, the server encountered an unexpected error.

-
<%=message%>
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/footer.htm deleted file mode 100644 index fc29595..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/footer.htm +++ /dev/null @@ -1,15 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 3655 2008-10-29 19:54:59Z jow $ - --%> -<% include("themes/" .. theme .. "/footer") %> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/contact.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/contact.htm deleted file mode 100644 index c83cd58..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/contact.htm +++ /dev/null @@ -1,27 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: contact.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -<% local contact = luci.model.uci.cursor():get_all("freifunk", "contact") %> -

<%:contact%>

- - - - - - - - -
<%:ff_nickname%>:<%=contact.nickname%>
<%:ff_name%>:<%=contact.name%>
<%:ff_mail%>:<%=contact.mail%>
<%:ff_phone%>:<%=contact.phone%>
<%:ff_location%>:<%=contact.location%>
<%:ff_geocoord%>:<%=contact.geo%>
<%:ff_note%>:<%=contact.note%>
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/index.htm deleted file mode 100644 index 9f9aff9..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/freifunk/index.htm +++ /dev/null @@ -1,24 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3941 2008-12-23 21:39:38Z jow $ - --%> -<%+header%> -<% local ff = luci.model.uci.cursor():get_all("freifunk") %> -

<%:ff_hellonet%> <%=ff.community.name or 'Freifunk Deutschland'%>!

-

<%:ff_public1%>
-<%:ff_public2%> <%=luci.sys.hostname()%>. <%:ff_public3%> -"> <%=ff.contact.nickname%>.

-

<%:ff_public4%> Freifunk.net.
-<%:ff_public5%> <%=ff.community.name or 'Freifunk'%>.

-

<%:ff_note%>: <%:ff_public6%>

-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/header.htm deleted file mode 100644 index 84c6dc4..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/header.htm +++ /dev/null @@ -1,15 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 3650 2008-10-29 19:40:40Z jow $ - --%> -<% include("themes/" .. theme .. "/header") %> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/indexer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/indexer.htm deleted file mode 100644 index 363802b..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/indexer.htm +++ /dev/null @@ -1,15 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: indexer.htm 3552 2008-10-10 14:37:53Z Cyrus $ - --%> -<% include("themes/" .. theme .. "/indexer") %> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/loadavg.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/loadavg.htm deleted file mode 100644 index 49f800e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/loadavg.htm +++ /dev/null @@ -1,33 +0,0 @@ -<%+header%> - - - - - - - - - - -
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/traffic.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/traffic.htm deleted file mode 100644 index f0c194d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/traffic.htm +++ /dev/null @@ -1,66 +0,0 @@ -<%+header%> - - - - - - - - -<% - local interfaces = { } - local ifnames = {} - local uci = luci.model.uci.cursor_state() - - uci:foreach("network", "interface", - function(s) - if s.ifname ~= "lo" then - table.insert( interfaces, - "'" .. ( s.ifname or s['.name'] ) .. "'" - ) - ifnames[s.ifname or s['.name']] = s['.name'] - end - end - ) --%> - - - -
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/wireless.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/wireless.htm deleted file mode 100644 index 670d9fb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/livestats/wireless.htm +++ /dev/null @@ -1,43 +0,0 @@ -<%+header%> - - - - - - - - - - -
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/applyreboot.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/applyreboot.htm deleted file mode 100644 index 73cf4a7..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/applyreboot.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: applyreboot.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-
-

<% if msg then %><%=msg%><% else %><%:a_s_applyreboot1%><% end %>

-

<%:a_s_reboot_running%>

- -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/backup.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/backup.htm deleted file mode 100644 index 3162e73..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/backup.htm +++ /dev/null @@ -1,40 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: backup.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:a_s_backup%>

-

<%:a_s_backup1%>

-
-
- -
- -
- -
-
<%:a_s_backup_archive%>:
-
- -
-
- -
-
-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/index.htm deleted file mode 100644 index d7c5bd3..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/index.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 4069 2009-01-17 13:26:07Z Cyrus $ - --%> -

<%:a_i_i_hello%>

-

<%:a_i_i_admin1%>

-

<%:a_i_i_admin2%>
-<%:a_i_i_admin3%>

-

<%:a_i_i_admin5%>

-

<%:a_i_i_admin6%>

-

<%:a_i_i_team%>

diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/reboot.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/reboot.htm deleted file mode 100644 index f5e3304..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/reboot.htm +++ /dev/null @@ -1,33 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: reboot.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:reboot%>

-

<%:a_s_reboot1%>

-<%- -local c = require("luci.model.uci").cursor():changes() -if c and next(c) then --%> -

<%:a_s_reboot_u%>

-<%- -end -if not reboot then --%> -

<%:a_s_reboot_do%>

-<%- else -%> -

<%:a_s_reboot_running%>

- -<%- end -%> -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/upgrade.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/upgrade.htm deleted file mode 100644 index 080aa07..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/mini/upgrade.htm +++ /dev/null @@ -1,52 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: upgrade.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:system%>

-

<%:a_s_flash%>

-

<%:a_s_flash_upgrade1%>

-
-<% if sysupgrade and not ret then %> -
-
<%:a_s_flash_fwimage%>:
-
- -
-
- <% if keep_avail then -%> - - <%:a_s_flash_keepcfg%> - <% end -%> -
-
- -
-
-<% elseif ret then %> -

<%:a_s_flash_received%>

-

<%:a_s_flash_inprogress%>

- - - <% %> - <% local ret = ret() - if ret == 0 then %> -
<%:a_s_flash_flashed%>
- <% else %> -
<%:a_s_flash_flasherr%>! (<%:code%> <%=ret%>)
- <% end %> -<% else %> -
<%:a_s_flash_notimplemented%>
-<% end %> -<%+footer%> -<% if ret == 0 then luci.sys.reboot() end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/public_statistics/graph.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/public_statistics/graph.htm deleted file mode 100644 index 83a8b61..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/public_statistics/graph.htm +++ /dev/null @@ -1,39 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: graph.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> - -

<%:stat_statistics Statistics%>

- -
- - -
- -
-
-
- -
- <% for i, img in ipairs(images) do %> - -
- <% end %> -
- -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash/splash.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash/splash.htm deleted file mode 100644 index b906ec2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash/splash.htm +++ /dev/null @@ -1,47 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: splash.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<% local c = luci.model.uci.cursor():get_all("freifunk", "community") %> - -

Willkommen!

-

-Du bist jetzt mit dem freien Funknetz -<%=c.name%> verbunden.
-Wir sind ein experimentelles Gemeinschaftsnetzwerk, aber kein Internetanbieter. -

- -

-Ein Zugang ins Internet ist trotzdem möglich, -da einige Freifunker ihre privaten Internetzugänge zur Verfügung stellen. -Diese Zugänge müssen sich hier alle teilen. -Bitte sei Dir dessen bewusst und verhalte Dich dementsprechend: -

    -
  • bitte keine Filesharing-Programme betreiben!
  • -
  • bitte keine unnötigen Downloads oder Streams starten!
  • -
  • bitte keine illegalen Aktivitäten!
  • -
-

- -

-Wenn Du unsere Idee gut findest, kannst Du uns unterstützen: -

-

- -

-Mit einem Klick auf <%:accept%> kannst du für <%=c.leasetime%> Stunden -über unser Netz das Internet verwenden. Dann wirst du erneut aufgefordet, diese Bedingungen zu akzeptieren. -

\ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/index.htm deleted file mode 100644 index e2ed857..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/index.htm +++ /dev/null @@ -1,16 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 2539 2008-07-07 22:08:34Z jow $ - --%> -<%+header%> -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/splash.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/splash.htm deleted file mode 100644 index 7a873cf..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/splash_splash/splash.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: splash.htm 2539 2008-07-07 22:08:34Z jow $ - --%> -<%+header%> -<%+splash/splash%> -
- - -
-<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/error_olsr.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/error_olsr.htm deleted file mode 100644 index fbb0f11..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/error_olsr.htm +++ /dev/null @@ -1,19 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: error_olsr.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd%>

-

<%:olsrd_error%>

-

<%:olsrd_error_desc%>

-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/hna.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/hna.htm deleted file mode 100644 index 5108fe1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/hna.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: hna.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd_hna2%>

-

<%:olsrd_hna_desc%>

-
- - - - - -<% for k, route in ipairs(routes) do %> - - - - -<% end %> -
<%:olsrd_network%><%:olsrd_gateway%>
<%=route.Destination%><%=route.Gateway%>
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/index.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/index.htm deleted file mode 100644 index e1fa009..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/index.htm +++ /dev/null @@ -1,57 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: index.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd_links%>

-

<%:olsrd_links_desc%>

-
- - - - - - - - -<% for k, link in ipairs(links) do - local color = "#bb3333" - - link.Cost = tonumber(link.Cost) or 0 - if link.Cost == 0 then - color = "#bb3333" - elseif link.Cost < 4 then - color = "#00cc00" - elseif link.Cost < 10 then - color = "#ffcb05" - elseif link.Cost < 100 then - color = "#ff6600" - end -%> - - - - - - - -<% end %> -
<%:olsrd_neighbour_ip%><%:olsrd_local_ip%>LQNLQETX
"><%=link["Remote IP"]%><%=link["Local IP"]%><%=link.LQ%><%=link.NLQ%><%=string.format("%.3f", link.Cost)%>
-
-

<%:legend%>:

-
    -
  • LQ: <%:olsrd_links_lq_desc%>
  • -
  • NLQ: <%:olsrd_links_nlq_desc%>
  • -
  • ETX: <%:olsrd_links_etx_desc%>
  • -
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/mid.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/mid.htm deleted file mode 100644 index 9a3cf5f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/mid.htm +++ /dev/null @@ -1,32 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: mid.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd_mid%>

-

<%:olsrd_mid_desc%>

-
- - - - - -<% for k, mid in ipairs(mids) do %> - - - - -<% end %> -
<%:olsrd_node%><%:olsrd_mid_aliases%>
"><%=mid["IP address"]%><%=mid.Aliases%>
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/routes.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/routes.htm deleted file mode 100644 index ae176ae..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/routes.htm +++ /dev/null @@ -1,51 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: routes.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd_routes%>

-

<%:olsrd_routes_desc%>

-
- - - - - - - - -<% for k, route in ipairs(routes) do - local color = "#bb3333" - - route.ETX = tonumber(route.ETX) - if route.ETX == 0 then - color = "#bb3333" - elseif route.ETX < 4 then - color = "#00cc00" - elseif route.ETX < 10 then - color = "#ffcb05" - elseif route.ETX < 100 then - color = "#ff6600" - end -%> - - - - - - - -<% end %> -
<%:olsrd_network%><%:olsrd_gateway%><%:interface%><%:metric%>ETX
<%=route.Destination%><%=route["Gateway IP"]%><%=route.Interface%><%=route.Metric%><%=string.format("%.3f", tonumber(route.ETX) or 0)%>
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/topology.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/topology.htm deleted file mode 100644 index f827ceb..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/status-olsr/topology.htm +++ /dev/null @@ -1,39 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: topology.htm 3646 2008-10-29 18:54:56Z jow $ - --%> -<%+header%> -

<%:olsrd_topology%>

-

<%:olsrd_topology_desc%>

-
- - - - - - - - -<% for k, route in ipairs(routes) do -%> - - - - - - - -<% end %> -
<%:olsrd_node%><%:olsrd_topology_lasthop%>LQILQETX
"><%=route["Dest. IP"]%>"><%=route["Last hop IP"]%><%=route.LQ%><%=route.NLQ%><%=string.format("%.3f", tonumber(route.Cost) or 0)%>
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/sysauth.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/sysauth.htm deleted file mode 100644 index 0c8cf30..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/sysauth.htm +++ /dev/null @@ -1,49 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: sysauth.htm 3941 2008-12-23 21:39:38Z jow $ - --%> -<%+header%> -<% luci.i18n.loadc("sysauth") %> - -
"> -
-

<%:sysauth_head%>

-
- <%:sysauth_prompt%> - <%- if fuser then %> -
<%:sysauth_failed%>
-
- <% end -%> -
-
-
- -
- -
-
-
- -
- -
-
-
-
- -
- - -
-
-<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/footer.htm deleted file mode 100644 index 09eff44..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/footer.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 4185 2009-01-30 14:00:35Z jow $ - --%> -
-
-
- - - - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/header.htm deleted file mode 100644 index 194245f..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/fledermaus/header.htm +++ /dev/null @@ -1,180 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 3655 2008-10-29 19:54:59Z jow $ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("text/html") - --%> - - - - - - - <% if node and node.css then %><% end %> - - - <%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - - - -
-<%:path%>: <% -local c = tree -local url = controller -for k,v in pairs(request) do - if c.nodes and c.nodes[v] then - c = c.nodes[v] - url = url .. "/" .. v - %><%=c.title or v%> <% if k ~= #request then %>» <% end - end -end -%> -
- - -
-
    <% - for k,node in pairs(tree.nodes) do - if node.title and not node.hidden then %> - class="active"<%end%>><%=node.title%> -<% end - end%> -
-
- - <% - if tree.nodes[category] and tree.nodes[category].ucidata then - local ucic = 0 - - for i, j in pairs(require("luci.model.uci").cursor():changes()) do - for k, l in pairs(j) do - for m, n in pairs(l) do - ucic = ucic + 1; - end - end - end - %> - - <% end %> - -
- -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/footer.htm deleted file mode 100644 index c8c630e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/footer.htm +++ /dev/null @@ -1,29 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 3464 2008-09-29 19:10:51Z jow $ - --%> -
-
- - - - -
-
- - - - - - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/header.htm deleted file mode 100644 index 8ea3058..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk-bno/header.htm +++ /dev/null @@ -1,196 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 3529 2008-10-07 13:10:24Z jow $ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("text/html") - --%> - - - - - - - <% if node and node.css then %><% end %> - - - - <%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - -
-
- -
-
- - - - -
-<%:path%>: <% -local c = tree -local url = controller -for k,v in pairs(request) do - if c.nodes and c.nodes[v] then - c = c.nodes[v] - url = url .. "/" .. v - %><%=c.title or v%> <% if k ~= #request then %>» <% end - end -end -%> -
- - -
-
    <% - for k,node in pairs(tree.nodes) do - if node.title and not node.hidden then %> - class="active"<%end%>><%=node.title%> -<% end - end%> -
-
- - <% - if tree.nodes[category] and tree.nodes[category].ucidata then - local ucic = 0 - - for i, j in pairs(require("luci.model.uci").cursor():changes()) do - for k, l in pairs(j) do - for m, n in pairs(l) do - ucic = ucic + 1; - end - end - end - %> - - <% end %> - -
-
-
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/footer.htm deleted file mode 100644 index c8c630e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/footer.htm +++ /dev/null @@ -1,29 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 3464 2008-09-29 19:10:51Z jow $ - --%> -
-
-
- - - -
-
- - - - - - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/header.htm deleted file mode 100644 index 13e35fa..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/freifunk/header.htm +++ /dev/null @@ -1,196 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 3529 2008-10-07 13:10:24Z jow $ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("text/html") - --%> - - - - - - - <% if node and node.css then %><% end %> - - - - <%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - -
-
- -
-
- - - - -
-<%:path%>: <% -local c = tree -local url = controller -for k,v in pairs(request) do - if c.nodes and c.nodes[v] then - c = c.nodes[v] - url = url .. "/" .. v - %><%=c.title or v%> <% if k ~= #request then %>» <% end - end -end -%> -
- - -
-
    <% - for k,node in pairs(tree.nodes) do - if node.title and not node.hidden then %> - class="active"<%end%>><%=node.title%> -<% end - end%> -
-
- - <% - if tree.nodes[category] and tree.nodes[category].ucidata then - local ucic = 0 - - for i, j in pairs(require("luci.model.uci").cursor():changes()) do - for k, l in pairs(j) do - for m, n in pairs(l) do - ucic = ucic + 1; - end - end - end - %> - - <% end %> - -
-
-
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/footer.htm deleted file mode 100644 index 98d48ad..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/footer.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 4185 2009-01-30 14:00:35Z jow $ - --%> -
-
- -

Powered by <%= luci.__appname__ .. " (v" .. luci.__version__ .. ")" %>

- - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/header.htm deleted file mode 100644 index 4e53f99..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt-light/header.htm +++ /dev/null @@ -1,163 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 4079 2009-01-17 17:59:11Z Cyrus $ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("application/xhtml+xml") - --%> - - - - - - - - - - -<% if node and node.css then %> -<% end -%> - - - -<%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - - - - - -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/dashboard.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/dashboard.htm deleted file mode 100644 index 1e05575..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/dashboard.htm +++ /dev/null @@ -1,46 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<% - local node = luci.dispatcher.context.requested - if node.nodes then -%> -
-<%- - for k, v in luci.util.spairs(node.nodes, function (a,b) - return (node.nodes[a].order or 100) < (node.nodes[b].order or 100) - end) do - if v.title and #v.title > 0 and not v.ignoreindex and (v.index or v.target) then - local csscl = "dashicon di_%s" % (v.style or k) - local iconl = v.icon - local pref = luci.util.clone(luci.dispatcher.context.request) - pref[#pref+1] = k - local target = luci.dispatcher.build_url(unpack(pref)) -%> - -<% - end - end --%> -
-
-<% -end -%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/footer.htm deleted file mode 100644 index 8df68b1..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/footer.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -
-
- -

Powered by <%= luci.__appname__ .. " (v" .. luci.__version__ .. ")" %>

- - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/header.htm deleted file mode 100644 index fe18214..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/header.htm +++ /dev/null @@ -1,166 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local disp = node -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("application/xhtml+xml") - --%> - - - - - - - - - - - -<% if node and node.css then %> -<% end -%> - - - -<%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - - - - - -
-<% if disp and disp.subindex then %><%+themes/openwrt.org-oxygen/dashboard%><% end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/indexer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/indexer.htm deleted file mode 100644 index 8ba29e0..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org-oxygen/indexer.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<%+header%> -<%+themes/openwrt.org-oxygen/dashboard%> -<%+footer%> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/footer.htm deleted file mode 100644 index 98d48ad..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/footer.htm +++ /dev/null @@ -1,21 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: footer.htm 4185 2009-01-30 14:00:35Z jow $ - --%> -
-
- -

Powered by <%= luci.__appname__ .. " (v" .. luci.__version__ .. ")" %>

- - - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/header.htm deleted file mode 100644 index 657d5e8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/openwrt.org/header.htm +++ /dev/null @@ -1,163 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id: header.htm 4079 2009-01-17 17:59:11Z Cyrus $ - --%> -<% -require("luci.sys") -local load1, load5, load15 = luci.sys.loadavg() -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched -local hostname = luci.sys.hostname() - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("application/xhtml+xml") - --%> - - - - - - - - - - -<% if node and node.css then %> -<% end -%> - - - -<%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - - - - - - - -
diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/dashboard.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/dashboard.htm deleted file mode 100644 index 1e05575..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/dashboard.htm +++ /dev/null @@ -1,46 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<% - local node = luci.dispatcher.context.requested - if node.nodes then -%> -
-<%- - for k, v in luci.util.spairs(node.nodes, function (a,b) - return (node.nodes[a].order or 100) < (node.nodes[b].order or 100) - end) do - if v.title and #v.title > 0 and not v.ignoreindex and (v.index or v.target) then - local csscl = "dashicon di_%s" % (v.style or k) - local iconl = v.icon - local pref = luci.util.clone(luci.dispatcher.context.request) - pref[#pref+1] = k - local target = luci.dispatcher.build_url(unpack(pref)) -%> - -<% - end - end --%> -
-
-<% -end -%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm deleted file mode 100644 index 293a49c..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/footer.htm +++ /dev/null @@ -1,22 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -
-
- -

Powered by LuCI

- -
- - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/header.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/header.htm deleted file mode 100644 index fa86096..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/header.htm +++ /dev/null @@ -1,129 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<% -local hostname = require("luci.sys").hostname() -local crequest = luci.dispatcher.context.request -local request = require("luci.dispatcher").context.path -local category = request[1] -local tree = luci.dispatcher.node() -local cattree = category and luci.dispatcher.node(category) -local node = luci.dispatcher.context.dispatched - -local c = tree -for i,r in ipairs(request) do - if c.nodes and c.nodes[r] then - c = c.nodes[r] - c._menu_selected = true - end -end - -require("luci.i18n").loadc("default") -require("luci.http").prepare_content("application/xhtml+xml") - --%> - - - - - - - - - -<% if node and node.css then %> -<% end -%> -<%=striptags( hostname .. ( (node and node.title) and ' - ' .. node.title or '')) %> - LuCI - - -
- - - -<%- -local function ucimenu(prefix, node) - if not node.nodes or node.hidden then - return false - end - local index = {} - local count = 0 - for k, n in pairs(node.nodes) do - if n.title and n.target then - table.insert(index, {name=k, order=n.order or 100}) - count = count + 1 - end - end - - table.sort(index, function(a, b) return a.order < b.order end) - - if count > 0 then - for j, v in pairs(index) do - if #v.name > 0 then - local nnode = node.nodes[v.name] - local href = controller .. prefix .. v.name .. "/" - href = (nnode.query) and href .. luci.http.build_querystring(nnode.query) or href -%> - > <%=nnode.title%> -<%- - end - end -%> - -<% - end -end -%> - - - -<% -if tree.nodes[category] and tree.nodes[category].ucidata then - local ucic = 0 - for i, j in pairs(require("luci.model.uci").cursor():changes()) do - for k, l in pairs(j) do - for m, n in pairs(l) do - ucic = ucic + 1; - end - end - end --%> -<% if ucic > 0 then %> -<% end %> -<% end %> - - - -
-<% if node.subindex then %><%+themes/oxygen/dashboard%><% end %> diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/indexer.htm b/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/indexer.htm deleted file mode 100644 index 6e290dd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/luci/view/themes/oxygen/indexer.htm +++ /dev/null @@ -1,17 +0,0 @@ -<%# -LuCI - Lua Configuration Interface -Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich - -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 - -$Id$ - --%> -<%+header%> -<%+themes/oxygen/dashboard%> -<%+footer%> \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/mime.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/mime.lua deleted file mode 100644 index 169eda2..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/mime.lua +++ /dev/null @@ -1,87 +0,0 @@ ------------------------------------------------------------------------------ --- MIME support for the Lua language. --- Author: Diego Nehab --- Conforming to RFCs 2045-2049 --- RCS ID: $Id: mime.lua,v 1.29 2007/06/11 23:44:54 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local ltn12 = require("ltn12") -local mime = require("mime.core") -local io = require("io") -local string = require("string") -module("mime") - --- encode, decode and wrap algorithm tables -encodet = {} -decodet = {} -wrapt = {} - --- creates a function that chooses a filter by name from a given table -local function choose(table) - return function(name, opt1, opt2) - if base.type(name) ~= "string" then - name, opt1, opt2 = "default", name, opt1 - end - local f = table[name or "nil"] - if not f then - base.error("unknown key (" .. base.tostring(name) .. ")", 3) - else return f(opt1, opt2) end - end -end - --- define the encoding filters -encodet['base64'] = function() - return ltn12.filter.cycle(b64, "") -end - -encodet['quoted-printable'] = function(mode) - return ltn12.filter.cycle(qp, "", - (mode == "binary") and "=0D=0A" or "\r\n") -end - --- define the decoding filters -decodet['base64'] = function() - return ltn12.filter.cycle(unb64, "") -end - -decodet['quoted-printable'] = function() - return ltn12.filter.cycle(unqp, "") -end - -local function format(chunk) - if chunk then - if chunk == "" then return "''" - else return string.len(chunk) end - else return "nil" end -end - --- define the line-wrap filters -wrapt['text'] = function(length) - length = length or 76 - return ltn12.filter.cycle(wrp, length, length) -end -wrapt['base64'] = wrapt['text'] -wrapt['default'] = wrapt['text'] - -wrapt['quoted-printable'] = function() - return ltn12.filter.cycle(qpwrp, 76, 76) -end - --- function that choose the encoding, decoding or wrap algorithm -encode = choose(encodet) -decode = choose(decodet) -wrap = choose(wrapt) - --- define the end-of-line normalization filter -function normalize(marker) - return ltn12.filter.cycle(eol, 0, marker) -end - --- high level stuffing filter -function stuff() - return ltn12.filter.cycle(dot, 2) -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket.lua deleted file mode 100644 index 211adcd..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket.lua +++ /dev/null @@ -1,133 +0,0 @@ ------------------------------------------------------------------------------ --- LuaSocket helper module --- Author: Diego Nehab --- RCS ID: $Id: socket.lua,v 1.22 2005/11/22 08:33:29 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local string = require("string") -local math = require("math") -local socket = require("socket.core") -module("socket") - ------------------------------------------------------------------------------ --- Exported auxiliar functions ------------------------------------------------------------------------------ -function connect(address, port, laddress, lport) - local sock, err = socket.tcp() - if not sock then return nil, err end - if laddress then - local res, err = sock:bind(laddress, lport, -1) - if not res then return nil, err end - end - local res, err = sock:connect(address, port) - if not res then return nil, err end - return sock -end - -function bind(host, port, backlog) - local sock, err = socket.tcp() - if not sock then return nil, err end - sock:setoption("reuseaddr", true) - local res, err = sock:bind(host, port) - if not res then return nil, err end - res, err = sock:listen(backlog) - if not res then return nil, err end - return sock -end - -try = newtry() - -function choose(table) - return function(name, opt1, opt2) - if base.type(name) ~= "string" then - name, opt1, opt2 = "default", name, opt1 - end - local f = table[name or "nil"] - if not f then base.error("unknown key (".. base.tostring(name) ..")", 3) - else return f(opt1, opt2) end - end -end - ------------------------------------------------------------------------------ --- Socket sources and sinks, conforming to LTN12 ------------------------------------------------------------------------------ --- create namespaces inside LuaSocket namespace -sourcet = {} -sinkt = {} - -BLOCKSIZE = 2048 - -sinkt["close-when-done"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if not chunk then - sock:close() - return 1 - else return sock:send(chunk) end - end - }) -end - -sinkt["keep-open"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if chunk then return sock:send(chunk) - else return 1 end - end - }) -end - -sinkt["default"] = sinkt["keep-open"] - -sink = choose(sinkt) - -sourcet["by-length"] = function(sock, length) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - if length <= 0 then return nil end - local size = math.min(socket.BLOCKSIZE, length) - local chunk, err = sock:receive(size) - if err then return nil, err end - length = length - string.len(chunk) - return chunk - end - }) -end - -sourcet["until-closed"] = function(sock) - local done - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - if done then return nil end - local chunk, err, partial = sock:receive(socket.BLOCKSIZE) - if not err then return chunk - elseif err == "closed" then - sock:close() - done = 1 - return partial - else return nil, err end - end - }) -end - - -sourcet["default"] = sourcet["until-closed"] - -source = choose(sourcet) - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/ftp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/ftp.lua deleted file mode 100644 index 598f65d..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/ftp.lua +++ /dev/null @@ -1,281 +0,0 @@ ------------------------------------------------------------------------------ --- FTP support for the Lua language --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: ftp.lua,v 1.45 2007/07/11 19:25:47 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local table = require("table") -local string = require("string") -local math = require("math") -local socket = require("socket") -local url = require("socket.url") -local tp = require("socket.tp") -local ltn12 = require("ltn12") -module("socket.ftp") - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- timeout in seconds before the program gives up on a connection -TIMEOUT = 60 --- default port for ftp service -PORT = 21 --- this is the default anonymous password. used when no password is --- provided in url. should be changed to your e-mail. -USER = "ftp" -PASSWORD = "anonymous@anonymous.org" - ------------------------------------------------------------------------------ --- Low level FTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function open(server, port, create) - local tp = socket.try(tp.connect(server, port or PORT, TIMEOUT, create)) - local f = base.setmetatable({ tp = tp }, metat) - -- make sure everything gets closed in an exception - f.try = socket.newtry(function() f:close() end) - return f -end - -function metat.__index:portconnect() - self.try(self.server:settimeout(TIMEOUT)) - self.data = self.try(self.server:accept()) - self.try(self.data:settimeout(TIMEOUT)) -end - -function metat.__index:pasvconnect() - self.data = self.try(socket.tcp()) - self.try(self.data:settimeout(TIMEOUT)) - self.try(self.data:connect(self.pasvt.ip, self.pasvt.port)) -end - -function metat.__index:login(user, password) - self.try(self.tp:command("user", user or USER)) - local code, reply = self.try(self.tp:check{"2..", 331}) - if code == 331 then - self.try(self.tp:command("pass", password or PASSWORD)) - self.try(self.tp:check("2..")) - end - return 1 -end - -function metat.__index:pasv() - self.try(self.tp:command("pasv")) - local code, reply = self.try(self.tp:check("2..")) - local pattern = "(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)%D(%d+)" - local a, b, c, d, p1, p2 = socket.skip(2, string.find(reply, pattern)) - self.try(a and b and c and d and p1 and p2, reply) - self.pasvt = { - ip = string.format("%d.%d.%d.%d", a, b, c, d), - port = p1*256 + p2 - } - if self.server then - self.server:close() - self.server = nil - end - return self.pasvt.ip, self.pasvt.port -end - -function metat.__index:port(ip, port) - self.pasvt = nil - if not ip then - ip, port = self.try(self.tp:getcontrol():getsockname()) - self.server = self.try(socket.bind(ip, 0)) - ip, port = self.try(self.server:getsockname()) - self.try(self.server:settimeout(TIMEOUT)) - end - local pl = math.mod(port, 256) - local ph = (port - pl)/256 - local arg = string.gsub(string.format("%s,%d,%d", ip, ph, pl), "%.", ",") - self.try(self.tp:command("port", arg)) - self.try(self.tp:check("2..")) - return 1 -end - -function metat.__index:send(sendt) - self.try(self.pasvt or self.server, "need port or pasv first") - -- if there is a pasvt table, we already sent a PASV command - -- we just get the data connection into self.data - if self.pasvt then self:pasvconnect() end - -- get the transfer argument and command - local argument = sendt.argument or - url.unescape(string.gsub(sendt.path or "", "^[/\\]", "")) - if argument == "" then argument = nil end - local command = sendt.command or "stor" - -- send the transfer command and check the reply - self.try(self.tp:command(command, argument)) - local code, reply = self.try(self.tp:check{"2..", "1.."}) - -- if there is not a a pasvt table, then there is a server - -- and we already sent a PORT command - if not self.pasvt then self:portconnect() end - -- get the sink, source and step for the transfer - local step = sendt.step or ltn12.pump.step - local readt = {self.tp.c} - local checkstep = function(src, snk) - -- check status in control connection while downloading - local readyt = socket.select(readt, nil, 0) - if readyt[tp] then code = self.try(self.tp:check("2..")) end - return step(src, snk) - end - local sink = socket.sink("close-when-done", self.data) - -- transfer all data and check error - self.try(ltn12.pump.all(sendt.source, sink, checkstep)) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - -- done with data connection - self.data:close() - -- find out how many bytes were sent - local sent = socket.skip(1, self.data:getstats()) - self.data = nil - return sent -end - -function metat.__index:receive(recvt) - self.try(self.pasvt or self.server, "need port or pasv first") - if self.pasvt then self:pasvconnect() end - local argument = recvt.argument or - url.unescape(string.gsub(recvt.path or "", "^[/\\]", "")) - if argument == "" then argument = nil end - local command = recvt.command or "retr" - self.try(self.tp:command(command, argument)) - local code = self.try(self.tp:check{"1..", "2.."}) - if not self.pasvt then self:portconnect() end - local source = socket.source("until-closed", self.data) - local step = recvt.step or ltn12.pump.step - self.try(ltn12.pump.all(source, recvt.sink, step)) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - self.data:close() - self.data = nil - return 1 -end - -function metat.__index:cwd(dir) - self.try(self.tp:command("cwd", dir)) - self.try(self.tp:check(250)) - return 1 -end - -function metat.__index:type(type) - self.try(self.tp:command("type", type)) - self.try(self.tp:check(200)) - return 1 -end - -function metat.__index:greet() - local code = self.try(self.tp:check{"1..", "2.."}) - if string.find(code, "1..") then self.try(self.tp:check("2..")) end - return 1 -end - -function metat.__index:quit() - self.try(self.tp:command("quit")) - self.try(self.tp:check("2..")) - return 1 -end - -function metat.__index:close() - if self.data then self.data:close() end - if self.server then self.server:close() end - return self.tp:close() -end - ------------------------------------------------------------------------------ --- High level FTP API ------------------------------------------------------------------------------ -local function override(t) - if t.url then - local u = url.parse(t.url) - for i,v in base.pairs(t) do - u[i] = v - end - return u - else return t end -end - -local function tput(putt) - putt = override(putt) - socket.try(putt.host, "missing hostname") - local f = open(putt.host, putt.port, putt.create) - f:greet() - f:login(putt.user, putt.password) - if putt.type then f:type(putt.type) end - f:pasv() - local sent = f:send(putt) - f:quit() - f:close() - return sent -end - -local default = { - path = "/", - scheme = "ftp" -} - -local function parse(u) - local t = socket.try(url.parse(u, default)) - socket.try(t.scheme == "ftp", "wrong scheme '" .. t.scheme .. "'") - socket.try(t.host, "missing hostname") - local pat = "^type=(.)$" - if t.params then - t.type = socket.skip(2, string.find(t.params, pat)) - socket.try(t.type == "a" or t.type == "i", - "invalid type '" .. t.type .. "'") - end - return t -end - -local function sput(u, body) - local putt = parse(u) - putt.source = ltn12.source.string(body) - return tput(putt) -end - -put = socket.protect(function(putt, body) - if base.type(putt) == "string" then return sput(putt, body) - else return tput(putt) end -end) - -local function tget(gett) - gett = override(gett) - socket.try(gett.host, "missing hostname") - local f = open(gett.host, gett.port, gett.create) - f:greet() - f:login(gett.user, gett.password) - if gett.type then f:type(gett.type) end - f:pasv() - f:receive(gett) - f:quit() - return f:close() -end - -local function sget(u) - local gett = parse(u) - local t = {} - gett.sink = ltn12.sink.table(t) - tget(gett) - return table.concat(t) -end - -command = socket.protect(function(cmdt) - cmdt = override(cmdt) - socket.try(cmdt.host, "missing hostname") - socket.try(cmdt.command, "missing command") - local f = open(cmdt.host, cmdt.port, cmdt.create) - f:greet() - f:login(cmdt.user, cmdt.password) - f.try(f.tp:command(cmdt.command, cmdt.argument)) - if cmdt.check then f.try(f.tp:check(cmdt.check)) end - f:quit() - return f:close() -end) - -get = socket.protect(function(gett) - if base.type(gett) == "string" then return sget(gett) - else return tget(gett) end -end) - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/http.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/http.lua deleted file mode 100644 index ad8db1e..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/http.lua +++ /dev/null @@ -1,350 +0,0 @@ ------------------------------------------------------------------------------ --- HTTP/1.1 client support for the Lua language. --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: http.lua,v 1.71 2007/10/13 23:55:20 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies -------------------------------------------------------------------------------- -local socket = require("socket") -local url = require("socket.url") -local ltn12 = require("ltn12") -local mime = require("mime") -local string = require("string") -local base = _G -local table = require("table") -module("socket.http") - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- connection timeout in seconds -TIMEOUT = 60 --- default port for document retrieval -PORT = 80 --- user agent field sent in request -USERAGENT = socket._VERSION - ------------------------------------------------------------------------------ --- Reads MIME headers from a connection, unfolding where needed ------------------------------------------------------------------------------ -local function receiveheaders(sock, headers) - local line, name, value, err - headers = headers or {} - -- get first line - line, err = sock:receive() - if err then return nil, err end - -- headers go until a blank line is found - while line ~= "" do - -- get field-name and value - name, value = socket.skip(2, string.find(line, "^(.-):%s*(.*)")) - if not (name and value) then return nil, "malformed reponse headers" end - name = string.lower(name) - -- get next line (value might be folded) - line, err = sock:receive() - if err then return nil, err end - -- unfold any folded values - while string.find(line, "^%s") do - value = value .. line - line = sock:receive() - if err then return nil, err end - end - -- save pair in table - if headers[name] then headers[name] = headers[name] .. ", " .. value - else headers[name] = value end - end - return headers -end - ------------------------------------------------------------------------------ --- Extra sources and sinks ------------------------------------------------------------------------------ -socket.sourcet["http-chunked"] = function(sock, headers) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function() - -- get chunk size, skip extention - local line, err = sock:receive() - if err then return nil, err end - local size = base.tonumber(string.gsub(line, ";.*", ""), 16) - if not size then return nil, "invalid chunk size" end - -- was it the last chunk? - if size > 0 then - -- if not, get chunk and skip terminating CRLF - local chunk, err, part = sock:receive(size) - if chunk then sock:receive() end - return chunk, err - else - -- if it was, read trailers into headers table - headers, err = receiveheaders(sock, headers) - if not headers then return nil, err end - end - end - }) -end - -socket.sinkt["http-chunked"] = function(sock) - return base.setmetatable({ - getfd = function() return sock:getfd() end, - dirty = function() return sock:dirty() end - }, { - __call = function(self, chunk, err) - if not chunk then return sock:send("0\r\n\r\n") end - local size = string.format("%X\r\n", string.len(chunk)) - return sock:send(size .. chunk .. "\r\n") - end - }) -end - ------------------------------------------------------------------------------ --- Low level HTTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function open(host, port, create) - -- create socket with user connect function, or with default - local c = socket.try((create or socket.tcp)()) - local h = base.setmetatable({ c = c }, metat) - -- create finalized try - h.try = socket.newtry(function() h:close() end) - -- set timeout before connecting - h.try(c:settimeout(TIMEOUT)) - h.try(c:connect(host, port or PORT)) - -- here everything worked - return h -end - -function metat.__index:sendrequestline(method, uri) - local reqline = string.format("%s %s HTTP/1.1\r\n", method or "GET", uri) - return self.try(self.c:send(reqline)) -end - -function metat.__index:sendheaders(headers) - local h = "\r\n" - for i, v in base.pairs(headers) do - h = i .. ": " .. v .. "\r\n" .. h - end - self.try(self.c:send(h)) - return 1 -end - -function metat.__index:sendbody(headers, source, step) - source = source or ltn12.source.empty() - step = step or ltn12.pump.step - -- if we don't know the size in advance, send chunked and hope for the best - local mode = "http-chunked" - if headers["content-length"] then mode = "keep-open" end - return self.try(ltn12.pump.all(source, socket.sink(mode, self.c), step)) -end - -function metat.__index:receivestatusline() - local status = self.try(self.c:receive(5)) - -- identify HTTP/0.9 responses, which do not contain a status line - -- this is just a heuristic, but is what the RFC recommends - if status ~= "HTTP/" then return nil, status end - -- otherwise proceed reading a status line - status = self.try(self.c:receive("*l", status)) - local code = socket.skip(2, string.find(status, "HTTP/%d*%.%d* (%d%d%d)")) - return self.try(base.tonumber(code), status) -end - -function metat.__index:receiveheaders() - return self.try(receiveheaders(self.c)) -end - -function metat.__index:receivebody(headers, sink, step) - sink = sink or ltn12.sink.null() - step = step or ltn12.pump.step - local length = base.tonumber(headers["content-length"]) - local t = headers["transfer-encoding"] -- shortcut - local mode = "default" -- connection close - if t and t ~= "identity" then mode = "http-chunked" - elseif base.tonumber(headers["content-length"]) then mode = "by-length" end - return self.try(ltn12.pump.all(socket.source(mode, self.c, length), - sink, step)) -end - -function metat.__index:receive09body(status, sink, step) - local source = ltn12.source.rewind(socket.source("until-closed", self.c)) - source(status) - return self.try(ltn12.pump.all(source, sink, step)) -end - -function metat.__index:close() - return self.c:close() -end - ------------------------------------------------------------------------------ --- High level HTTP API ------------------------------------------------------------------------------ -local function adjusturi(reqt) - local u = reqt - -- if there is a proxy, we need the full url. otherwise, just a part. - if not reqt.proxy and not PROXY then - u = { - path = socket.try(reqt.path, "invalid path 'nil'"), - params = reqt.params, - query = reqt.query, - fragment = reqt.fragment - } - end - return url.build(u) -end - -local function adjustproxy(reqt) - local proxy = reqt.proxy or PROXY - if proxy then - proxy = url.parse(proxy) - return proxy.host, proxy.port or 3128 - else - return reqt.host, reqt.port - end -end - -local function adjustheaders(reqt) - -- default headers - local lower = { - ["user-agent"] = USERAGENT, - ["host"] = reqt.host, - ["connection"] = "close, TE", - ["te"] = "trailers" - } - -- if we have authentication information, pass it along - if reqt.user and reqt.password then - lower["authorization"] = - "Basic " .. (mime.b64(reqt.user .. ":" .. reqt.password)) - end - -- override with user headers - for i,v in base.pairs(reqt.headers or lower) do - lower[string.lower(i)] = v - end - return lower -end - --- default url parts -local default = { - host = "", - port = PORT, - path ="/", - scheme = "http" -} - -local function adjustrequest(reqt) - -- parse url if provided - local nreqt = reqt.url and url.parse(reqt.url, default) or {} - -- explicit components override url - for i,v in base.pairs(reqt) do nreqt[i] = v end - if nreqt.port == "" then nreqt.port = 80 end - socket.try(nreqt.host and nreqt.host ~= "", - "invalid host '" .. base.tostring(nreqt.host) .. "'") - -- compute uri if user hasn't overriden - nreqt.uri = reqt.uri or adjusturi(nreqt) - -- ajust host and port if there is a proxy - nreqt.host, nreqt.port = adjustproxy(nreqt) - -- adjust headers in request - nreqt.headers = adjustheaders(nreqt) - return nreqt -end - -local function shouldredirect(reqt, code, headers) - return headers.location and - string.gsub(headers.location, "%s", "") ~= "" and - (reqt.redirect ~= false) and - (code == 301 or code == 302) and - (not reqt.method or reqt.method == "GET" or reqt.method == "HEAD") - and (not reqt.nredirects or reqt.nredirects < 5) -end - -local function shouldreceivebody(reqt, code) - if reqt.method == "HEAD" then return nil end - if code == 204 or code == 304 then return nil end - if code >= 100 and code < 200 then return nil end - return 1 -end - --- forward declarations -local trequest, tredirect - -function tredirect(reqt, location) - local result, code, headers, status = trequest { - -- the RFC says the redirect URL has to be absolute, but some - -- servers do not respect that - url = url.absolute(reqt.url, location), - source = reqt.source, - sink = reqt.sink, - headers = reqt.headers, - proxy = reqt.proxy, - nredirects = (reqt.nredirects or 0) + 1, - create = reqt.create - } - -- pass location header back as a hint we redirected - headers = headers or {} - headers.location = headers.location or location - return result, code, headers, status -end - -function trequest(reqt) - -- we loop until we get what we want, or - -- until we are sure there is no way to get it - local nreqt = adjustrequest(reqt) - local h = open(nreqt.host, nreqt.port, nreqt.create) - -- send request line and headers - h:sendrequestline(nreqt.method, nreqt.uri) - h:sendheaders(nreqt.headers) - -- if there is a body, send it - if nreqt.source then - h:sendbody(nreqt.headers, nreqt.source, nreqt.step) - end - local code, status = h:receivestatusline() - -- if it is an HTTP/0.9 server, simply get the body and we are done - if not code then - h:receive09body(status, nreqt.sink, nreqt.step) - return 1, 200 - end - local headers - -- ignore any 100-continue messages - while code == 100 do - headers = h:receiveheaders() - code, status = h:receivestatusline() - end - headers = h:receiveheaders() - -- at this point we should have a honest reply from the server - -- we can't redirect if we already used the source, so we report the error - if shouldredirect(nreqt, code, headers) and not nreqt.source then - h:close() - return tredirect(reqt, headers.location) - end - -- here we are finally done - if shouldreceivebody(nreqt, code) then - h:receivebody(headers, nreqt.sink, nreqt.step) - end - h:close() - return 1, code, headers, status -end - -local function srequest(u, b) - local t = {} - local reqt = { - url = u, - sink = ltn12.sink.table(t) - } - if b then - reqt.source = ltn12.source.string(b) - reqt.headers = { - ["content-length"] = string.len(b), - ["content-type"] = "application/x-www-form-urlencoded" - } - reqt.method = "POST" - end - local code, headers, status = socket.skip(1, trequest(reqt)) - return table.concat(t), code, headers, status -end - -request = socket.protect(function(reqt, body) - if base.type(reqt) == "string" then return srequest(reqt, body) - else return trequest(reqt) end -end) diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/smtp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/smtp.lua deleted file mode 100644 index 8f3cfcf..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/smtp.lua +++ /dev/null @@ -1,251 +0,0 @@ ------------------------------------------------------------------------------ --- SMTP client support for the Lua language. --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: smtp.lua,v 1.46 2007/03/12 04:08:40 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local coroutine = require("coroutine") -local string = require("string") -local math = require("math") -local os = require("os") -local socket = require("socket") -local tp = require("socket.tp") -local ltn12 = require("ltn12") -local mime = require("mime") -module("socket.smtp") - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ --- timeout for connection -TIMEOUT = 60 --- default server used to send e-mails -SERVER = "localhost" --- default port -PORT = 25 --- domain used in HELO command and default sendmail --- If we are under a CGI, try to get from environment -DOMAIN = os.getenv("SERVER_NAME") or "localhost" --- default time zone (means we don't know) -ZONE = "-0000" - ---------------------------------------------------------------------------- --- Low level SMTP API ------------------------------------------------------------------------------ -local metat = { __index = {} } - -function metat.__index:greet(domain) - self.try(self.tp:check("2..")) - self.try(self.tp:command("EHLO", domain or DOMAIN)) - return socket.skip(1, self.try(self.tp:check("2.."))) -end - -function metat.__index:mail(from) - self.try(self.tp:command("MAIL", "FROM:" .. from)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:rcpt(to) - self.try(self.tp:command("RCPT", "TO:" .. to)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:data(src, step) - self.try(self.tp:command("DATA")) - self.try(self.tp:check("3..")) - self.try(self.tp:source(src, step)) - self.try(self.tp:send("\r\n.\r\n")) - return self.try(self.tp:check("2..")) -end - -function metat.__index:quit() - self.try(self.tp:command("QUIT")) - return self.try(self.tp:check("2..")) -end - -function metat.__index:close() - return self.tp:close() -end - -function metat.__index:login(user, password) - self.try(self.tp:command("AUTH", "LOGIN")) - self.try(self.tp:check("3..")) - self.try(self.tp:command(mime.b64(user))) - self.try(self.tp:check("3..")) - self.try(self.tp:command(mime.b64(password))) - return self.try(self.tp:check("2..")) -end - -function metat.__index:plain(user, password) - local auth = "PLAIN " .. mime.b64("\0" .. user .. "\0" .. password) - self.try(self.tp:command("AUTH", auth)) - return self.try(self.tp:check("2..")) -end - -function metat.__index:auth(user, password, ext) - if not user or not password then return 1 end - if string.find(ext, "AUTH[^\n]+LOGIN") then - return self:login(user, password) - elseif string.find(ext, "AUTH[^\n]+PLAIN") then - return self:plain(user, password) - else - self.try(nil, "authentication not supported") - end -end - --- send message or throw an exception -function metat.__index:send(mailt) - self:mail(mailt.from) - if base.type(mailt.rcpt) == "table" then - for i,v in base.ipairs(mailt.rcpt) do - self:rcpt(v) - end - else - self:rcpt(mailt.rcpt) - end - self:data(ltn12.source.chain(mailt.source, mime.stuff()), mailt.step) -end - -function open(server, port, create) - local tp = socket.try(tp.connect(server or SERVER, port or PORT, - TIMEOUT, create)) - local s = base.setmetatable({tp = tp}, metat) - -- make sure tp is closed if we get an exception - s.try = socket.newtry(function() - s:close() - end) - return s -end - --- convert headers to lowercase -local function lower_headers(headers) - local lower = {} - for i,v in base.pairs(headers or lower) do - lower[string.lower(i)] = v - end - return lower -end - ---------------------------------------------------------------------------- --- Multipart message source ------------------------------------------------------------------------------ --- returns a hopefully unique mime boundary -local seqno = 0 -local function newboundary() - seqno = seqno + 1 - return string.format('%s%05d==%05u', os.date('%d%m%Y%H%M%S'), - math.random(0, 99999), seqno) -end - --- send_message forward declaration -local send_message - --- yield the headers all at once, it's faster -local function send_headers(headers) - local h = "\r\n" - for i,v in base.pairs(headers) do - h = i .. ': ' .. v .. "\r\n" .. h - end - coroutine.yield(h) -end - --- yield multipart message body from a multipart message table -local function send_multipart(mesgt) - -- make sure we have our boundary and send headers - local bd = newboundary() - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or 'multipart/mixed' - headers['content-type'] = headers['content-type'] .. - '; boundary="' .. bd .. '"' - send_headers(headers) - -- send preamble - if mesgt.body.preamble then - coroutine.yield(mesgt.body.preamble) - coroutine.yield("\r\n") - end - -- send each part separated by a boundary - for i, m in base.ipairs(mesgt.body) do - coroutine.yield("\r\n--" .. bd .. "\r\n") - send_message(m) - end - -- send last boundary - coroutine.yield("\r\n--" .. bd .. "--\r\n\r\n") - -- send epilogue - if mesgt.body.epilogue then - coroutine.yield(mesgt.body.epilogue) - coroutine.yield("\r\n") - end -end - --- yield message body from a source -local function send_source(mesgt) - -- make sure we have a content-type - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or - 'text/plain; charset="iso-8859-1"' - send_headers(headers) - -- send body from source - while true do - local chunk, err = mesgt.body() - if err then coroutine.yield(nil, err) - elseif chunk then coroutine.yield(chunk) - else break end - end -end - --- yield message body from a string -local function send_string(mesgt) - -- make sure we have a content-type - local headers = lower_headers(mesgt.headers or {}) - headers['content-type'] = headers['content-type'] or - 'text/plain; charset="iso-8859-1"' - send_headers(headers) - -- send body from string - coroutine.yield(mesgt.body) -end - --- message source -function send_message(mesgt) - if base.type(mesgt.body) == "table" then send_multipart(mesgt) - elseif base.type(mesgt.body) == "function" then send_source(mesgt) - else send_string(mesgt) end -end - --- set defaul headers -local function adjust_headers(mesgt) - local lower = lower_headers(mesgt.headers) - lower["date"] = lower["date"] or - os.date("!%a, %d %b %Y %H:%M:%S ") .. (mesgt.zone or ZONE) - lower["x-mailer"] = lower["x-mailer"] or socket._VERSION - -- this can't be overriden - lower["mime-version"] = "1.0" - return lower -end - -function message(mesgt) - mesgt.headers = adjust_headers(mesgt) - -- create and return message source - local co = coroutine.create(function() send_message(mesgt) end) - return function() - local ret, a, b = coroutine.resume(co) - if ret then return a, b - else return nil, a end - end -end - ---------------------------------------------------------------------------- --- High level SMTP API ------------------------------------------------------------------------------ -send = socket.protect(function(mailt) - local s = open(mailt.server, mailt.port, mailt.create) - local ext = s:greet(mailt.domain) - s:auth(mailt.user, mailt.password, ext) - s:send(mailt) - s:quit() - return s:close() -end) diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/tp.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/tp.lua deleted file mode 100644 index 0683869..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/tp.lua +++ /dev/null @@ -1,123 +0,0 @@ ------------------------------------------------------------------------------ --- Unified SMTP/FTP subsystem --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: tp.lua,v 1.22 2006/03/14 09:04:15 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module and import dependencies ------------------------------------------------------------------------------ -local base = _G -local string = require("string") -local socket = require("socket") -local ltn12 = require("ltn12") -module("socket.tp") - ------------------------------------------------------------------------------ --- Program constants ------------------------------------------------------------------------------ -TIMEOUT = 60 - ------------------------------------------------------------------------------ --- Implementation ------------------------------------------------------------------------------ --- gets server reply (works for SMTP and FTP) -local function get_reply(c) - local code, current, sep - local line, err = c:receive() - local reply = line - if err then return nil, err end - code, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) - if not code then return nil, "invalid server reply" end - if sep == "-" then -- reply is multiline - repeat - line, err = c:receive() - if err then return nil, err end - current, sep = socket.skip(2, string.find(line, "^(%d%d%d)(.?)")) - reply = reply .. "\n" .. line - -- reply ends with same code - until code == current and sep == " " - end - return code, reply -end - --- metatable for sock object -local metat = { __index = {} } - -function metat.__index:check(ok) - local code, reply = get_reply(self.c) - if not code then return nil, reply end - if base.type(ok) ~= "function" then - if base.type(ok) == "table" then - for i, v in base.ipairs(ok) do - if string.find(code, v) then - return base.tonumber(code), reply - end - end - return nil, reply - else - if string.find(code, ok) then return base.tonumber(code), reply - else return nil, reply end - end - else return ok(base.tonumber(code), reply) end -end - -function metat.__index:command(cmd, arg) - if arg then - return self.c:send(cmd .. " " .. arg.. "\r\n") - else - return self.c:send(cmd .. "\r\n") - end -end - -function metat.__index:sink(snk, pat) - local chunk, err = c:receive(pat) - return snk(chunk, err) -end - -function metat.__index:send(data) - return self.c:send(data) -end - -function metat.__index:receive(pat) - return self.c:receive(pat) -end - -function metat.__index:getfd() - return self.c:getfd() -end - -function metat.__index:dirty() - return self.c:dirty() -end - -function metat.__index:getcontrol() - return self.c -end - -function metat.__index:source(source, step) - local sink = socket.sink("keep-open", self.c) - local ret, err = ltn12.pump.all(source, sink, step or ltn12.pump.step) - return ret, err -end - --- closes the underlying c -function metat.__index:close() - self.c:close() - return 1 -end - --- connect with server and return c object -function connect(host, port, timeout, create) - local c, e = (create or socket.tcp)() - if not c then return nil, e end - c:settimeout(timeout or TIMEOUT) - local r, e = c:connect(host, port) - if not r then - c:close() - return nil, e - end - return base.setmetatable({c = c}, metat) -end - diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/url.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/url.lua deleted file mode 100644 index 0e31d8a..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lua/socket/url.lua +++ /dev/null @@ -1,297 +0,0 @@ ------------------------------------------------------------------------------ --- URI parsing, composition and relative URL resolution --- LuaSocket toolkit. --- Author: Diego Nehab --- RCS ID: $Id: url.lua,v 1.38 2006/04/03 04:45:42 diego Exp $ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --- Declare module ------------------------------------------------------------------------------ -local string = require("string") -local base = _G -local table = require("table") -module("socket.url") - ------------------------------------------------------------------------------ --- Module version ------------------------------------------------------------------------------ -_VERSION = "URL 1.0.1" - ------------------------------------------------------------------------------ --- Encodes a string into its escaped hexadecimal representation --- Input --- s: binary string to be encoded --- Returns --- escaped representation of string binary ------------------------------------------------------------------------------ -function escape(s) - return string.gsub(s, "([^A-Za-z0-9_])", function(c) - return string.format("%%%02x", string.byte(c)) - end) -end - ------------------------------------------------------------------------------ --- Protects a path segment, to prevent it from interfering with the --- url parsing. --- Input --- s: binary string to be encoded --- Returns --- escaped representation of string binary ------------------------------------------------------------------------------ -local function make_set(t) - local s = {} - for i,v in base.ipairs(t) do - s[t[i]] = 1 - end - return s -end - --- these are allowed withing a path segment, along with alphanum --- other characters must be escaped -local segment_set = make_set { - "-", "_", ".", "!", "~", "*", "'", "(", - ")", ":", "@", "&", "=", "+", "$", ",", -} - -local function protect_segment(s) - return string.gsub(s, "([^A-Za-z0-9_])", function (c) - if segment_set[c] then return c - else return string.format("%%%02x", string.byte(c)) end - end) -end - ------------------------------------------------------------------------------ --- Encodes a string into its escaped hexadecimal representation --- Input --- s: binary string to be encoded --- Returns --- escaped representation of string binary ------------------------------------------------------------------------------ -function unescape(s) - return string.gsub(s, "%%(%x%x)", function(hex) - return string.char(base.tonumber(hex, 16)) - end) -end - ------------------------------------------------------------------------------ --- Builds a path from a base path and a relative path --- Input --- base_path --- relative_path --- Returns --- corresponding absolute path ------------------------------------------------------------------------------ -local function absolute_path(base_path, relative_path) - if string.sub(relative_path, 1, 1) == "/" then return relative_path end - local path = string.gsub(base_path, "[^/]*$", "") - path = path .. relative_path - path = string.gsub(path, "([^/]*%./)", function (s) - if s ~= "./" then return s else return "" end - end) - path = string.gsub(path, "/%.$", "/") - local reduced - while reduced ~= path do - reduced = path - path = string.gsub(reduced, "([^/]*/%.%./)", function (s) - if s ~= "../../" then return "" else return s end - end) - end - path = string.gsub(reduced, "([^/]*/%.%.)$", function (s) - if s ~= "../.." then return "" else return s end - end) - return path -end - ------------------------------------------------------------------------------ --- Parses a url and returns a table with all its parts according to RFC 2396 --- The following grammar describes the names given to the URL parts --- ::= :///;?# --- ::= @: --- ::= [:] --- :: = {/} --- Input --- url: uniform resource locator of request --- default: table with default values for each field --- Returns --- table with the following fields, where RFC naming conventions have --- been preserved: --- scheme, authority, userinfo, user, password, host, port, --- path, params, query, fragment --- Obs: --- the leading '/' in {/} is considered part of ------------------------------------------------------------------------------ -function parse(url, default) - -- initialize default parameters - local parsed = {} - for i,v in base.pairs(default or parsed) do parsed[i] = v end - -- empty url is parsed to nil - if not url or url == "" then return nil, "invalid url" end - -- remove whitespace - -- url = string.gsub(url, "%s", "") - -- get fragment - url = string.gsub(url, "#(.*)$", function(f) - parsed.fragment = f - return "" - end) - -- get scheme - url = string.gsub(url, "^([%w][%w%+%-%.]*)%:", - function(s) parsed.scheme = s; return "" end) - -- get authority - url = string.gsub(url, "^//([^/]*)", function(n) - parsed.authority = n - return "" - end) - -- get query stringing - url = string.gsub(url, "%?(.*)", function(q) - parsed.query = q - return "" - end) - -- get params - url = string.gsub(url, "%;(.*)", function(p) - parsed.params = p - return "" - end) - -- path is whatever was left - if url ~= "" then parsed.path = url end - local authority = parsed.authority - if not authority then return parsed end - authority = string.gsub(authority,"^([^@]*)@", - function(u) parsed.userinfo = u; return "" end) - authority = string.gsub(authority, ":([^:]*)$", - function(p) parsed.port = p; return "" end) - if authority ~= "" then parsed.host = authority end - local userinfo = parsed.userinfo - if not userinfo then return parsed end - userinfo = string.gsub(userinfo, ":([^:]*)$", - function(p) parsed.password = p; return "" end) - parsed.user = userinfo - return parsed -end - ------------------------------------------------------------------------------ --- Rebuilds a parsed URL from its components. --- Components are protected if any reserved or unallowed characters are found --- Input --- parsed: parsed URL, as returned by parse --- Returns --- a stringing with the corresponding URL ------------------------------------------------------------------------------ -function build(parsed) - local ppath = parse_path(parsed.path or "") - local url = build_path(ppath) - if parsed.params then url = url .. ";" .. parsed.params end - if parsed.query then url = url .. "?" .. parsed.query end - local authority = parsed.authority - if parsed.host then - authority = parsed.host - if parsed.port then authority = authority .. ":" .. parsed.port end - local userinfo = parsed.userinfo - if parsed.user then - userinfo = parsed.user - if parsed.password then - userinfo = userinfo .. ":" .. parsed.password - end - end - if userinfo then authority = userinfo .. "@" .. authority end - end - if authority then url = "//" .. authority .. url end - if parsed.scheme then url = parsed.scheme .. ":" .. url end - if parsed.fragment then url = url .. "#" .. parsed.fragment end - -- url = string.gsub(url, "%s", "") - return url -end - ------------------------------------------------------------------------------ --- Builds a absolute URL from a base and a relative URL according to RFC 2396 --- Input --- base_url --- relative_url --- Returns --- corresponding absolute url ------------------------------------------------------------------------------ -function absolute(base_url, relative_url) - if base.type(base_url) == "table" then - base_parsed = base_url - base_url = build(base_parsed) - else - base_parsed = parse(base_url) - end - local relative_parsed = parse(relative_url) - if not base_parsed then return relative_url - elseif not relative_parsed then return base_url - elseif relative_parsed.scheme then return relative_url - else - relative_parsed.scheme = base_parsed.scheme - if not relative_parsed.authority then - relative_parsed.authority = base_parsed.authority - if not relative_parsed.path then - relative_parsed.path = base_parsed.path - if not relative_parsed.params then - relative_parsed.params = base_parsed.params - if not relative_parsed.query then - relative_parsed.query = base_parsed.query - end - end - else - relative_parsed.path = absolute_path(base_parsed.path or "", - relative_parsed.path) - end - end - return build(relative_parsed) - end -end - ------------------------------------------------------------------------------ --- Breaks a path into its segments, unescaping the segments --- Input --- path --- Returns --- segment: a table with one entry per segment ------------------------------------------------------------------------------ -function parse_path(path) - local parsed = {} - path = path or "" - --path = string.gsub(path, "%s", "") - string.gsub(path, "([^/]+)", function (s) table.insert(parsed, s) end) - for i = 1, table.getn(parsed) do - parsed[i] = unescape(parsed[i]) - end - if string.sub(path, 1, 1) == "/" then parsed.is_absolute = 1 end - if string.sub(path, -1, -1) == "/" then parsed.is_directory = 1 end - return parsed -end - ------------------------------------------------------------------------------ --- Builds a path component from its segments, escaping protected characters. --- Input --- parsed: path segments --- unsafe: if true, segments are not protected before path is built --- Returns --- path: corresponding path stringing ------------------------------------------------------------------------------ -function build_path(parsed, unsafe) - local path = "" - local n = table.getn(parsed) - if unsafe then - for i = 1, n-1 do - path = path .. parsed[i] - path = path .. "/" - end - if n > 0 then - path = path .. parsed[n] - if parsed.is_directory then path = path .. "/" end - end - else - for i = 1, n-1 do - path = path .. protect_segment(parsed[i]) - path = path .. "/" - end - if n > 0 then - path = path .. protect_segment(parsed[n]) - if parsed.is_directory then path = path .. "/" end - end - end - if parsed.is_absolute then path = "/" .. path end - return path -end diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/httpd.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/httpd.lua deleted file mode 100644 index e40af98..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/httpd.lua +++ /dev/null @@ -1,34 +0,0 @@ -function initialize() - local lucittpd = require "luci.ttpd.server" - server = lucittpd.Server(lucittpd.VHost()) -end - -function register() - local filehnd = require "luci.ttpd.handler.file" - local filehandler = filehnd.Simple(os.getenv("LUCI_SYSROOT") .. "/www") - server:get_default_vhost():set_default_handler(filehandler) -end - -function accept() - server:process({ - _read = function(...) - local chunk, err = webuci_read(...) - return chunk or (err and error(err, 0)) - end, - - _write = function(...) - local chunk, err = webuci_write(...) - return chunk or (err and error(err, 0)) - end, - - _close = function(...) - local chunk, err = webuci_close(...) - return chunk or (err and error(err, 0)) - end, - - _sendfile = function(...) - local chunk, err = webuci_sendfile(...) - return chunk or (err and error(err, 0)) - end - }) -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/luci-webui.lua b/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/luci-webui.lua deleted file mode 100644 index 073e567..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/lib/lucittpd/plugins/luci-webui.lua +++ /dev/null @@ -1,29 +0,0 @@ -function initialize() - pcall(function() - local SYSROOT = os.getenv("LUCI_SYSROOT") - require "uci" - require "luci.model.uci".cursor = function(config, save) - return uci.cursor(config or SYSROOT .. "/etc/config", save or SYSROOT .. "/tmp/.uci") - end - - local x = require "luci.uvl".UVL.__init__ - require "luci.uvl".UVL.__init__ = function(self, schemedir) - x(self, schemedir or SYSROOT .. "/lib/uci/schema") - end - - require("luci.sys") - luci.sys.user.checkpasswd = function() return true end - - require "luci.dispatcher" - require "luci.uvl" - require "luci.cbi" - require "luci.template" - require "luci.json" - end) -end - --- Initialize LuCI -function register() - local lucihnd = require "luci.ttpd.handler.luci" - httpd.server:get_default_vhost():set_handler("/luci", lucihnd.Luci()) -end \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/sbin/ff_olsr_test_gw b/mote/v1/openwrt/package/luci/host/usr/sbin/ff_olsr_test_gw deleted file mode 100755 index 5c47b49..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/sbin/ff_olsr_test_gw +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/lua -local STRICT = true -- Only delete metric 0 routes -local PINGCMD = "ping -q -I%s -c3 -w3 '%s' >/dev/null 2>&1" -local PINGTRG = {"google.de", "www.de.debian.org", "eu.kernel.org", "freifunk.net"} -local ROUTECMD = "route del default gw '%s' >/dev/null 2>&1" -local THRESHOLD = 3 -- Maximum number of failed tests before dropping the route - -local sys = require "luci.sys" -local uci = require "luci.model.uci".cursor_state() -local ucisec = "ff_olsr_test_gw" -local section = nil - -uci:foreach("olsrd", "LoadPlugin", function(s) - if s.library == "olsrd_dyn_gw_plain.so.0.4" and s.ignore ~= "1" then - section = s[".name"] - end -end) - -local droute = sys.net.defaultroute() -if section and droute then -- dyn_gw is enabled and we have a defaultroute, test it - local state = false - - for _, host in ipairs(PINGTRG) do - state = state or (sys.call(PINGCMD % {droute.device, host}) == 0) - end - - if not state and (not STRICT or tonumber(droute.metric) == 0) then - local count = tonumber(uci:get("olsrd", ucisec, "noinet_count")) - if not THRESHOLD or (count and count >= THRESHOLD) then - sys.call(ROUTECMD % droute.gateway:string()) - else - if not count then - uci:set("olsrd", ucisec, "state") - end - uci:set("olsrd", ucisec, "noinet_count", (count or 0) + 1) - uci:save("olsrd") - end - else - uci:revert("olsrd", ucisec) - end -end diff --git a/mote/v1/openwrt/package/luci/host/usr/sbin/luci-splash b/mote/v1/openwrt/package/luci/host/usr/sbin/luci-splash deleted file mode 100755 index 82662c8..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/sbin/luci-splash +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/lua - -require("luci.http") -require("luci.util") -require("luci.model.uci") - --- Init state session -local uci = luci.model.uci.cursor_state() - - -function main(argv) - local cmd = argv[1] - local arg = argv[2] - - if cmd == "status" then - if not arg then - os.exit(1) - end - - if iswhitelisted(arg) then - print("whitelisted") - os.exit(0) - end - - if haslease(arg) then - print("lease") - os.exit(0) - end - - print("unknown") - os.exit(0) - elseif cmd == "add" then - if not arg then - os.exit(1) - end - - if not haslease(arg) then - add_lease(arg) - else - print("already leased!") - os.exit(2) - end - os.exit(0) - elseif cmd == "remove" then - if not arg then - os.exit(1) - end - - remove_lease(arg) - os.exit(0) - elseif cmd == "sync" then - sync() - os.exit(0) - else - print("Usage: " .. argv[0] .. " [MAC]") - os.exit(1) - end -end - --- Add a lease to state and invoke add_rule -function add_lease(mac) - uci:section("luci_splash", "lease", nil, { - mac = mac, - start = os.time() - }) - add_rule(mac) - - uci:save("luci_splash") -end - - --- Remove a lease from state and invoke remove_rule -function remove_lease(mac) - mac = mac:lower() - local del = {} - - uci:foreach("luci_splash", "lease", - function (section) - if section.mac:lower() == mac then - table.insert(del, section[".name"]) - end - end) - - for i,j in ipairs(del) do - remove_rule(j) - uci:delete("luci_splash", j) - end - - uci:save("luci_splash") -end - - --- Add an iptables rule -function add_rule(mac) - return os.execute("iptables -t nat -I luci_splash_leases -m mac --mac-source '"..mac.."' -j RETURN") -end - - --- Remove an iptables rule -function remove_rule(mac) - return os.execute("iptables -t nat -D luci_splash_leases -m mac --mac-source '"..mac.."' -j RETURN") -end - - --- Check whether a MAC-Address is listed in the lease state list -function haslease(mac) - mac = mac:lower() - local stat = false - - uci:foreach("luci_splash", "lease", - function (section) - if section.mac:lower() == mac then - stat = true - return - end - end) - - return stat -end - - --- Check whether a MAC-Address is whitelisted -function iswhitelisted(mac) - mac = mac:lower() - - uci:foreach("luci_splash", "whitelist", - function (section) - if section.mac:lower() == mac then - stat = true - return - end - end) - - return false -end - - --- Returns a list of MAC-Addresses for which a rule is existing -function listrules() - local cmd = "iptables -t nat -L luci_splash_leases | grep RETURN |" - cmd = cmd .. "egrep -io [0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+" - return luci.util.split(luci.util.exec(cmd)) -end - - --- Synchronise leases, remove abandoned rules -function sync() - local written = {} - local time = os.time() - - -- Current leases in state files - local leases = uci:get_all("luci_splash") - - -- Convert leasetime to seconds - local leasetime = tonumber(uci:get("luci_splash", "general", "leasetime")) * 3600 - - -- Clean state file - uci:load("luci_splash") - uci:revert("luci_splash") - - - -- For all leases - for k, v in pairs(leases) do - if v[".type"] == "lease" then - if os.difftime(time, tonumber(v.start)) > leasetime then - -- Remove expired - remove_rule(v.mac) - else - -- Rewrite state - uci:section("luci_splash", "lease", nil, { - mac = v.mac, - start = v.start - }) - written[v.mac:lower()] = 1 - end - end - end - - - -- Delete rules without state - for i, r in ipairs(listrules()) do - if #r > 0 and not written[r:lower()] then - remove_rule(r) - end - end - - uci:save("luci_splash") -end - -main(arg) \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/usr/sbin/polipo_purge b/mote/v1/openwrt/package/luci/host/usr/sbin/polipo_purge deleted file mode 100755 index ce7c885..0000000 --- a/mote/v1/openwrt/package/luci/host/usr/sbin/polipo_purge +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -DAEMON=/usr/sbin/polipo -PIDFILE=`uci get polipo.daemon.pidFile` -CFGFILE=/var/etc/polipo.conf - -[ -e "$PIDFILE" ] && { - PID=`cat $PID_FILE` - - # send Polipo USR1 signal to write its in-memory cache to disk - kill -USR1 $PID - sleep 2 - # start polipo with -x flag to purge the on-disk cache - polipo -c $CFGFILE -x - # send Polipo USR2 signal to discard its in-memory cache - kill -USR2 $PID -} - diff --git a/mote/v1/openwrt/package/luci/host/www/cgi-bin-nodes.html b/mote/v1/openwrt/package/luci/host/www/cgi-bin-nodes.html deleted file mode 100644 index 8dd86b0..0000000 --- a/mote/v1/openwrt/package/luci/host/www/cgi-bin-nodes.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -LuCI - Lua Configuration Interface - - diff --git a/mote/v1/openwrt/package/luci/host/www/cgi-bin-status.html b/mote/v1/openwrt/package/luci/host/www/cgi-bin-status.html deleted file mode 100644 index 8dd86b0..0000000 --- a/mote/v1/openwrt/package/luci/host/www/cgi-bin-status.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -LuCI - Lua Configuration Interface - - diff --git a/mote/v1/openwrt/package/luci/host/www/cgi-bin/luci b/mote/v1/openwrt/package/luci/host/www/cgi-bin/luci deleted file mode 100755 index 529d1d0..0000000 --- a/mote/v1/openwrt/package/luci/host/www/cgi-bin/luci +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/lua -require "luci.cacheloader" -require "luci.sgi.cgi" -luci.dispatcher.indexcache = "/tmp/luci-indexcache" -luci.sgi.cgi.run() \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/www/index.html b/mote/v1/openwrt/package/luci/host/www/index.html deleted file mode 100644 index 838da04..0000000 --- a/mote/v1/openwrt/package/luci/host/www/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -LuCI - Lua Configuration Interface - - diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/cascade.css deleted file mode 100644 index f9adade..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/cascade.css +++ /dev/null @@ -1,626 +0,0 @@ -* { - margin: 0; - padding: 0; -} - -body { - background-color: #e5e6ec; - color: #ffffff; - font-family: Verdana, Arial, sans-serif; - font-size: 100%; - line-height: 100%; -} - -code { - font-family: monospace; - white-space: pre; -} - -div#maincontent ul { - margin-left: 2em; -} - -.warning { - color: red !important; - font-weight: bold; -} - -.clear { - clear: both; - height: 1px; -} - -.hidden { - display: none; -} - -.error { - color: #ff0000; -} - -#header { - min-height: 98px; - background-image: url(logo.png); - background-repeat: no-repeat; - background-position: left center; - background-color: #000000; - text-align: center; - border-bottom: 1px solid #dc0067; -} - -#header2 { - min-height: 98px; - background-image: url(fledermaus.png); - background-repeat: no-repeat; - background-position: right center; -} - -#header3 { - font-size: 2.6em; - font-family: serif; - color: #FFCB05; - letter-spacing: 0.35em; - font-weight: bold; - line-height: 1.4em; -} - -#header4 { - font-size: 1.25em; - line-height: 1.2em; - letter-spacing: 0.2em; - color: white; -} - -.pathbar { - display: none; -} - -.menubar { - width: 100%; - min-height: 1.8em; - background: #000000; - color: #ffffff; -} - -.mainmenu { - float: left; - width: auto; - min-height: 1.8em; - background: #000000; - color: #ffffff; -} - -.mainmenu div { - float: left; -} - -.mainmenu li { - white-space: nowrap; -} - -.mainmenu div ul { - display: none; - position: absolute; - background: #000000; - color: #ffffff; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - list-style-type: none; -} - -.mainmenu ul li:hover > ul, -.mainmenu div:hover > ul { - display: block; -} - -.mainmenu ul li > ul { - left: 100%; - margin-top: -1.8em; - border-width: 1px; -} - -.modemenu a, -.mainmenu a { - display: block; - padding: 0.5em; - color: #ffffff; - text-decoration: none; - font-size: 80%; -} - -.mainmenu .active a, -.modemenu .active a { - color: #ffff00; - font-weight: bold; -} - -.mainmenu li:hover > span > a, -.mainmenu div:hover > a { - font-weight: bold; -} - -.modemenu a:hover, -.modemenu a:focus, -.mainmenu a:hover, -.mainmenu a:focus { - color: #ffff00; - font-weight: bold; -} - -.mainmenu div.preactive > a { - color: #ffff00; - font-weight: bold; -} - -.modemenu ul { - width: auto; - background: #000000; - color: #ffffff; - list-style-type: none; -} - -.modemenu li { - float: right; -} - -#maincontent { - clear: both; - width: 90%; - margin: 0 auto; - padding: 0.5em; - background: #f8f9fe; - color: #000000; - font-size: 80%; -} - -#maincontent h2 { - margin: 0.25em 0 0.5em 0; - font-size: 150%; - font-weight: normal; -} - -#maincontent h3 { - margin: 0.5em 0; - font-size: 120%; - font-weight: normal; - text-decoration: underline; -} - -#maincontent p { - margin-bottom: 1em; -} - -textarea#syslog { - width: 98%; - min-height: 500px; - border: 3px solid #cccccc; - padding: 5px; - font-family: monospace; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #f2f3f9; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - height: 1.5em; - font-size: 90%; - color: #555555; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -input[type=submit], -input[type=reset], -input[type=image], -label { - cursor: pointer; -} - -select, -input, -textarea { - background: #eeeeee; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #f2f3f9; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table.smalltext { - background: #f5f5f5; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { - background-color: #bbddee; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -.cbi-rowstyle-1 { - background-color: #eeeeff; -} - -.cbi-rowstyle-2 { - -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-value:hover { - background: #f8f8f8; -} - -div.cbi-value:last-child { - border: none; -} - -.cbi-value-title { - float: left; - width: 40%; -} - -div.cbi-value-field { - width: 58%; - margin: 0.25em 0 0.25em 40%; -} - -div.cbi-value-description { - font-size: 90%; -} - -div.cbi-value-field > div.cbi-value-description { - display: none; -} - -div.cbi-value:hover div.cbi-value-field > div.cbi-value-description { - display: block; -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - margin: 0.5em 0; - padding: 0 0.25em; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border: 1px dotted #bbbbbb; - padding-bottom: 0; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #FF0000; -} - -td.cbi-value-error { - border-color: red !important; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red !important; - background-color: #FFCCCC; -} - -.cbi-section-error { - color: red; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -ul.cbi-apply { - font-size: 90%; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a { - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #FF0000; - background-color: #FFFFFF; - padding: 0.5em; -} - -#memorybar { - width:200px; - height:8px; - border:1px solid #bbb; - background-color:red -} - -#memfree, #membuffers, #memcached { - float:right; - border:1px solid #bbb; - height:6px; -} - -#memfree { - background-color:green; -} - -#membuffers { - background-color:yellow; -} - -#memcached { - background-color:orange; -} - - -/* obligatory IE6 Voodoo Code */ -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div.menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.mainmenu div.hover ul, -* html div.mainmenu div li.hover ul, -* html div.mainmenu div li li.hover ul, -* html div.mainmenu div li li li.hover ul, -* html div.mainmenu div li li li li.hover ul { - display: block !important; - margin-left: 3em; -} - -* html div.mainmenu div.hover ul { - margin-left: 0; -} - -* html div.mainmenu .hover ul ul, -* html div.mainmenu .hover ul ul ul, -* html div.mainmenu .hover ul ul ul ul, -* html div.mainmenu .hover ul ul ul ul ul { - display: none !important; -} - -* html div.mainmenu li { - height: 1em !important; - width: 10em !important; -} - -* html .mainmenu { - height: 1.8em; -} - -* html div.cbi-value-description { - margin-left: 40%; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/fledermaus.png b/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/fledermaus.png deleted file mode 100644 index 852e9d0..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/fledermaus.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/logo.png b/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/logo.png deleted file mode 100644 index d4c5dd9..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/fledermaus/logo.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/cascade.css deleted file mode 100644 index 3507777..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/cascade.css +++ /dev/null @@ -1,726 +0,0 @@ -* { - margin: 0; - padding: 0; -} - -body { - background-color: #ffffff; - color: #ffffff; - font-family: Verdana, Arial, sans-serif; - font-size: 100%; - line-height: 100%; - background-image: url(images/main-back.png); - background-repeat: repeat-x; - background-position: left bottom; - } -#all { - margin: 0px; - padding: 0px; - min-height: 800px; -} - -code { - font-family: monospace; - white-space: pre; -} - -a:link, a:visited { - color:#000000; - font-weight:bold; - text-decoration:none; - } -a:hover { - color:#333333; - font-weight:bold; - } - -/* Custom*/ - #wrapper -{ - width: 95%; - color: #333333; - margin-left: auto; - margin-right: auto; -/* background-image: url(images/corner-left.gif); */ -/* background-repeat: no-repeat; */ -/* background-position: left bottom; */ - background-color: #FffdF4; - min-width: 710px; - min-height: 710px; -} -#main { - clear: both; - width: 100%; - margin: 0; - padding: 0; - color: #333333; -/* background-image: url(images/corner-right.gif); */ -/* background-repeat: no-repeat; */ -/* background-position: right bottom; */ - min-height: 710px; -} - -div#maincontent ul { - margin-left: 2em; -} - -.warning { - color: red !important; - font-weight: bold; -} - -.clear { - clear: both; - height: 1px; -} - -.hidden { - display: none; -} - -.error { - color: #ff0000; -} - -#header -{ - padding: 0px; - height: 100px; -} -#headerleft -{ - height: 100px; - background-color: #FFFfff; - background-image: url(images/header-left.gif); - background-repeat: no-repeat; - background-position: left top; -} -#headerright -{ - height: 100px; - background-color: #FFfffF; - - margin-left: 5px; - background-image: url(images/header-right.gif); - background-repeat: no-repeat; - background-position: right top; -} - -#headerback -{ - margin-right: 5px; - height: 100px; - background-color: #FFfffF; - background-image: url(images/header-back.gif); - background-repeat: repeat-x; - background-position: left top; -} -#schriftzug { - font-size : 1.5em; - text-align:left; - margin-bottom: 7px; - margin-top: 7px; - float:left; - width: 450px; -} - -#schriftzug a:hover{ - background-color:transparent; -} -#logo{ - margin-top: 5px; - float:right; - width: 115px; -} - -.pathbar { - display: none; -} - -.menubar { - width: 100%; - min-height: 1.8em; - background: #ffffff; - color: #000000; - border-top:0.4em solid #DC0067; -} - -.mainmenu { - float: left; - width: auto; - min-height: 1.8em; - background: #ffffff; - color: #000000; -} -.modemenu li { - border-top:0.3em solid #DC0067; - margin-left: 0.3em; - margin-top: -0.3em; -} -.mainmenu div { - float: left; - border-top:0.3em solid #DC0067; - margin-right: 0.3em; - margin-top: -0.3em; -} -.mainmenu div.preactive { - border-top: 0.3em solid #FFCB05; - margin-top: -0.2em; -} - -.mainmenu li { - white-space: nowrap; -} - -.mainmenu div ul { - display: none; - position: absolute; - background: #ffffff; - color: #000000; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - list-style-type: none; -} - -.mainmenu ul li:hover > ul, -.mainmenu div:hover > ul { - display: block; -} - -.mainmenu ul li > ul { - left: 100%; - margin-top: -1.8em; - border-width: 1px; -} - -.modemenu a, -.mainmenu a { - display: block; - padding: 0.2em; - color: #000000; - text-decoration: none; - font-size: 70%; - font-weight: bold; -} - - -.modemenu .active a { - color: #000000; - font-weight: bold; - border-top:0.3em solid #FFCB05; - margin-top: -0.2em; -} -.mainmenu .active a{ - color: #000000; - font-weight: bold; - border-top:0.2em solid #FFCB05; -} -.mainmenu li > span:active { - background-color: #FFE990; -} - -.mainmenu li:hover > span > a, -.mainmenu div:hover > a { -color: #ffffff; -background-color: #FFCB05; -} - - -.modemenu a:focus, -.mainmenu a:focus { - color: #000000; -} - -.mainmenu a:hover, -.modemenu a:hover { -color: #ffffff; -background-color: #FFCB05; -} - -.mainmenu div.preactive > a { - color: #DC0067; - font-weight: bold; -} -.mainmenu div.preactive > a:hover, -.mainmenu div.preactive > a:focus { - color: #ffffff; - font-weight: bold; -} - -.modemenu ul { - width: auto; - background: #000000; - color: #ffffff; - list-style-type: none; -} - -.modemenu li { - float: right; - -} - -#maincontent { - clear: both; - width: 98%; - margin: 0 auto; - padding: 0.5em; - background: #FFF4BE; - color: #000000; - font-size: 80%; - border-top:1px solid #D2A800; -} - -#maincontent h2 { - margin: 0.25em 0 0.5em 0; - font-size: 150%; - font-weight: normal; -} - -#maincontent h3 { - margin: 0.5em 0; - font-size: 120%; - font-weight: normal; - text-decoration: underline; -} - -#maincontent p { - margin-bottom: 1em; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #D2A800; - background-color: #FFE990; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - height: 1.5em; - font-size: 90%; - color: #555555; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -input[type=submit], -input[type=reset], -input[type=image], -label { - cursor: pointer; -} - -select, -input, -textarea { - background: #FffdF4; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #FFF4BE; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table.smalltext { -background-color: #FFCB05; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { -background-color: #FFE990; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -.cbi-rowstyle-1 { - background-color: #FFF4BE; -} - -.cbi-rowstyle-2 { -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #FFCB05; -} - -div.cbi-value:hover { - background: #FFF4BE; -} - -div.cbi-value:last-child { - border: none; -} - -.cbi-value-title { - float: left; - width: 40%; -} - -div.cbi-value-field { - width: 58%; - margin: 0.25em 0 0.25em 40%; -} - -div.cbi-value-description { - font-size: 90%; -} - -div.cbi-value-field > div.cbi-value-description { - display: none; -} - -div.cbi-value:hover div.cbi-value-field > div.cbi-value-description { - display: block; - color: #ffffff; - background-color: #FFCB05; -} - -option:active, -option:before, -option:after, -option:focus, -option:hover { - color: #ffffff; - background-color: #EEBA00; - background: url(images/bgoption.png); -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - margin: 0.5em 0; - padding: 0 0.25em; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border: 1px dotted #FFCB05; - padding-bottom: 0; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #FF0000; -} - -td.cbi-value-error { - border-color: red !important; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red !important; - background-color: #FFCCCC; -} - -.cbi-section-error { - color: red; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -ul.cbi-apply { - font-size: 90%; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a { - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #FF0000; - background-color: #FFFFFF; - padding: 0.5em; -} - -#memorybar { - width:200px; - height:8px; - border:1px solid #bbb; - background-color:red -} - -#memfree, #membuffers, #memcached { - float:right; - border:1px solid #bbb; - height:6px; -} - -#memfree { - background-color:green; -} - -#membuffers { - background-color:yellow; -} - -#memcached { - background-color:orange; -} - - -/* obligatory IE6 Voodoo Code */ -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div.menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.mainmenu div.hover ul, -* html div.mainmenu div li.hover ul, -* html div.mainmenu div li li.hover ul, -* html div.mainmenu div li li li.hover ul, -* html div.mainmenu div li li li li.hover ul { - display: block !important; - margin-left: 3em; -} - -* html div.mainmenu div.hover ul { - margin-left: 0; -} - -* html div.mainmenu .hover ul ul, -* html div.mainmenu .hover ul ul ul, -* html div.mainmenu .hover ul ul ul ul, -* html div.mainmenu .hover ul ul ul ul ul { - display: none !important; -} - -* html div.mainmenu li { - height: 1em !important; - width: 10em !important; -} - -* html .mainmenu { - height: 1.8em; -} - -* html div.cbi-value-description { - margin-left: 40%; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/bgoption.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/bgoption.png deleted file mode 100644 index 6fd1e2f..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/bgoption.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/favicon.ico b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/favicon.ico deleted file mode 100644 index 7247cfa..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/favicon.ico and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-back.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-back.gif deleted file mode 100644 index 21fe02b..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-back.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-left.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-left.gif deleted file mode 100644 index a3258cc..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-left.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-right.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-right.gif deleted file mode 100644 index 93d0291..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/header-right.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/logo.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/logo.gif deleted file mode 100644 index ff00d6d..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/logo.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/main-back.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/main-back.png deleted file mode 100644 index 34aca44..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/main-back.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/schriftzug.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/schriftzug.gif deleted file mode 100644 index 82607d5..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk-bno/images/schriftzug.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/cascade.css deleted file mode 100644 index 3507777..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/cascade.css +++ /dev/null @@ -1,726 +0,0 @@ -* { - margin: 0; - padding: 0; -} - -body { - background-color: #ffffff; - color: #ffffff; - font-family: Verdana, Arial, sans-serif; - font-size: 100%; - line-height: 100%; - background-image: url(images/main-back.png); - background-repeat: repeat-x; - background-position: left bottom; - } -#all { - margin: 0px; - padding: 0px; - min-height: 800px; -} - -code { - font-family: monospace; - white-space: pre; -} - -a:link, a:visited { - color:#000000; - font-weight:bold; - text-decoration:none; - } -a:hover { - color:#333333; - font-weight:bold; - } - -/* Custom*/ - #wrapper -{ - width: 95%; - color: #333333; - margin-left: auto; - margin-right: auto; -/* background-image: url(images/corner-left.gif); */ -/* background-repeat: no-repeat; */ -/* background-position: left bottom; */ - background-color: #FffdF4; - min-width: 710px; - min-height: 710px; -} -#main { - clear: both; - width: 100%; - margin: 0; - padding: 0; - color: #333333; -/* background-image: url(images/corner-right.gif); */ -/* background-repeat: no-repeat; */ -/* background-position: right bottom; */ - min-height: 710px; -} - -div#maincontent ul { - margin-left: 2em; -} - -.warning { - color: red !important; - font-weight: bold; -} - -.clear { - clear: both; - height: 1px; -} - -.hidden { - display: none; -} - -.error { - color: #ff0000; -} - -#header -{ - padding: 0px; - height: 100px; -} -#headerleft -{ - height: 100px; - background-color: #FFFfff; - background-image: url(images/header-left.gif); - background-repeat: no-repeat; - background-position: left top; -} -#headerright -{ - height: 100px; - background-color: #FFfffF; - - margin-left: 5px; - background-image: url(images/header-right.gif); - background-repeat: no-repeat; - background-position: right top; -} - -#headerback -{ - margin-right: 5px; - height: 100px; - background-color: #FFfffF; - background-image: url(images/header-back.gif); - background-repeat: repeat-x; - background-position: left top; -} -#schriftzug { - font-size : 1.5em; - text-align:left; - margin-bottom: 7px; - margin-top: 7px; - float:left; - width: 450px; -} - -#schriftzug a:hover{ - background-color:transparent; -} -#logo{ - margin-top: 5px; - float:right; - width: 115px; -} - -.pathbar { - display: none; -} - -.menubar { - width: 100%; - min-height: 1.8em; - background: #ffffff; - color: #000000; - border-top:0.4em solid #DC0067; -} - -.mainmenu { - float: left; - width: auto; - min-height: 1.8em; - background: #ffffff; - color: #000000; -} -.modemenu li { - border-top:0.3em solid #DC0067; - margin-left: 0.3em; - margin-top: -0.3em; -} -.mainmenu div { - float: left; - border-top:0.3em solid #DC0067; - margin-right: 0.3em; - margin-top: -0.3em; -} -.mainmenu div.preactive { - border-top: 0.3em solid #FFCB05; - margin-top: -0.2em; -} - -.mainmenu li { - white-space: nowrap; -} - -.mainmenu div ul { - display: none; - position: absolute; - background: #ffffff; - color: #000000; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - list-style-type: none; -} - -.mainmenu ul li:hover > ul, -.mainmenu div:hover > ul { - display: block; -} - -.mainmenu ul li > ul { - left: 100%; - margin-top: -1.8em; - border-width: 1px; -} - -.modemenu a, -.mainmenu a { - display: block; - padding: 0.2em; - color: #000000; - text-decoration: none; - font-size: 70%; - font-weight: bold; -} - - -.modemenu .active a { - color: #000000; - font-weight: bold; - border-top:0.3em solid #FFCB05; - margin-top: -0.2em; -} -.mainmenu .active a{ - color: #000000; - font-weight: bold; - border-top:0.2em solid #FFCB05; -} -.mainmenu li > span:active { - background-color: #FFE990; -} - -.mainmenu li:hover > span > a, -.mainmenu div:hover > a { -color: #ffffff; -background-color: #FFCB05; -} - - -.modemenu a:focus, -.mainmenu a:focus { - color: #000000; -} - -.mainmenu a:hover, -.modemenu a:hover { -color: #ffffff; -background-color: #FFCB05; -} - -.mainmenu div.preactive > a { - color: #DC0067; - font-weight: bold; -} -.mainmenu div.preactive > a:hover, -.mainmenu div.preactive > a:focus { - color: #ffffff; - font-weight: bold; -} - -.modemenu ul { - width: auto; - background: #000000; - color: #ffffff; - list-style-type: none; -} - -.modemenu li { - float: right; - -} - -#maincontent { - clear: both; - width: 98%; - margin: 0 auto; - padding: 0.5em; - background: #FFF4BE; - color: #000000; - font-size: 80%; - border-top:1px solid #D2A800; -} - -#maincontent h2 { - margin: 0.25em 0 0.5em 0; - font-size: 150%; - font-weight: normal; -} - -#maincontent h3 { - margin: 0.5em 0; - font-size: 120%; - font-weight: normal; - text-decoration: underline; -} - -#maincontent p { - margin-bottom: 1em; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #D2A800; - background-color: #FFE990; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - height: 1.5em; - font-size: 90%; - color: #555555; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -input[type=submit], -input[type=reset], -input[type=image], -label { - cursor: pointer; -} - -select, -input, -textarea { - background: #FffdF4; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #FFF4BE; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table.smalltext { -background-color: #FFCB05; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { -background-color: #FFE990; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -.cbi-rowstyle-1 { - background-color: #FFF4BE; -} - -.cbi-rowstyle-2 { -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #FFCB05; -} - -div.cbi-value:hover { - background: #FFF4BE; -} - -div.cbi-value:last-child { - border: none; -} - -.cbi-value-title { - float: left; - width: 40%; -} - -div.cbi-value-field { - width: 58%; - margin: 0.25em 0 0.25em 40%; -} - -div.cbi-value-description { - font-size: 90%; -} - -div.cbi-value-field > div.cbi-value-description { - display: none; -} - -div.cbi-value:hover div.cbi-value-field > div.cbi-value-description { - display: block; - color: #ffffff; - background-color: #FFCB05; -} - -option:active, -option:before, -option:after, -option:focus, -option:hover { - color: #ffffff; - background-color: #EEBA00; - background: url(images/bgoption.png); -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - margin: 0.5em 0; - padding: 0 0.25em; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border: 1px dotted #FFCB05; - padding-bottom: 0; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #FF0000; -} - -td.cbi-value-error { - border-color: red !important; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red !important; - background-color: #FFCCCC; -} - -.cbi-section-error { - color: red; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -ul.cbi-apply { - font-size: 90%; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a { - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #FF0000; - background-color: #FFFFFF; - padding: 0.5em; -} - -#memorybar { - width:200px; - height:8px; - border:1px solid #bbb; - background-color:red -} - -#memfree, #membuffers, #memcached { - float:right; - border:1px solid #bbb; - height:6px; -} - -#memfree { - background-color:green; -} - -#membuffers { - background-color:yellow; -} - -#memcached { - background-color:orange; -} - - -/* obligatory IE6 Voodoo Code */ -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div.menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.mainmenu div.hover ul, -* html div.mainmenu div li.hover ul, -* html div.mainmenu div li li.hover ul, -* html div.mainmenu div li li li.hover ul, -* html div.mainmenu div li li li li.hover ul { - display: block !important; - margin-left: 3em; -} - -* html div.mainmenu div.hover ul { - margin-left: 0; -} - -* html div.mainmenu .hover ul ul, -* html div.mainmenu .hover ul ul ul, -* html div.mainmenu .hover ul ul ul ul, -* html div.mainmenu .hover ul ul ul ul ul { - display: none !important; -} - -* html div.mainmenu li { - height: 1em !important; - width: 10em !important; -} - -* html .mainmenu { - height: 1.8em; -} - -* html div.cbi-value-description { - margin-left: 40%; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/bgoption.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/bgoption.png deleted file mode 100644 index 6fd1e2f..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/bgoption.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/favicon.ico b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/favicon.ico deleted file mode 100644 index f785830..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/favicon.ico and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-back.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-back.gif deleted file mode 100644 index 21fe02b..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-back.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-left.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-left.gif deleted file mode 100644 index a3258cc..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-left.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-right.gif b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-right.gif deleted file mode 100644 index 93d0291..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/header-right.gif and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/logo.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/logo.png deleted file mode 100644 index 0beeb2f..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/logo.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/main-back.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/main-back.png deleted file mode 100644 index 34aca44..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/main-back.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/schriftzug.png b/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/schriftzug.png deleted file mode 100644 index 5b37223..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/freifunk/images/schriftzug.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/cascade.css deleted file mode 100644 index a26e662..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/cascade.css +++ /dev/null @@ -1,790 +0,0 @@ -@charset "utf-8"; - -@media all { - -html, -body { - background-color: #4a6b7c; - color: #ffffff; -} - -body { - font-family: Verdana, Arial, sans-serif; - font-size: 101%; - line-height: 100%; -} - -* { - margin: 0; - padding: 0; -} - -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; -} - -.warning { - color: red; - background-color: white; - font-weight: bold; -} - -.clear { - clear: both; -} - -.skiplink, -.navigation, -.hidden { - position: absolute; - left: -1000px; - top: -1000px; - width: 0px; - height: 0px; - overflow: hidden; - display: inline; -} - -.error { - color: #ff0000; - background-color: white; -} - -#header { - background-color: #557788; - color: #ffffff; - text-align: right; - padding: 0.5em; -} - -#header h1 { - display: inline; -} - -#header p { - display: inline; -} - -#header h1, -#header p { - font-size: 70%; - font-weight: normal; - line-height: 160%; - text-align: right; -} - -ul.dropdowns { - float: left; - margin: 0; - padding: 0; - width: auto; - list-style: none; -} - -html>body ul.dropdowns { - position: relative; -} - -ul.dropdowns li, -ul.dropdowns ul { - margin: 0; - padding: 0; - list-style: none; -} - -ul.dropdowns li { - float: left; - position: relative; - white-space: nowrap; -} - -ul.dropdowns li ul { - position: absolute; - z-index: 1000; - top: auto; - min-width: 10em; -} - -ul.dropdowns li li { - float: none; - position: relative; -} - -ul.dropdowns li a { - display: block; -} - -ul.dropdowns ul li ul { - top: 0; -} - -ul.dropdowns li ul, -ul.dropdowns li.over ul ul, -ul.dropdowns li.focus ul ul, -ul.dropdowns li:hover ul ul, -ul.dropdowns li.over ul ul ul, -ul.dropdowns li.focus ul ul ul, -ul.dropdowns li:hover ul ul ul, -ul.dropdowns li.over ul ul ul ul, -ul.dropdowns li.focus ul ul ul ul, -ul.dropdowns li:hover ul ul ul ul { - left: -3000px; -} - -ul.dropdowns li.over ul, -ul.dropdowns li.focus ul, -ul.dropdowns li:hover ul { - left: 0; -} - -ul.dropdowns ul li.over ul, -ul.dropdowns ul li.focus ul, -ul.dropdowns ul li:hover ul, -ul.dropdowns ul ul li.over ul, -ul.dropdowns ul ul li.focus ul, -ul.dropdowns ul ul li:hover ul, -ul.dropdowns ul ul ul li.over ul, -ul.dropdowns ul ul ul li.focus ul, -ul.dropdowns ul ul ul li:hover ul { - left: 100%; -} - -#menubar { - position: relative; - width: 100%; - background: #000000; - color: #ffffff; -} - -#menubar .warning { - color: red; - background-color: #557788; -} - -#menubar ul.dropdowns { - min-height: 1.8em; - background: #000000; - color: #ffffff; -} - -#menubar ul.dropdowns li ul { - background: #000000; - color: #ffffff; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; -} - -#menubar ul.dropdowns ul li ul { - border-width: 1px; -} - -html #menubar a:link, -html #menubar a:visited { - position: relative; - display: block; - padding: 0.5em; - background: #000000; - color: #ffffff; - text-decoration: none; - font-size: 80%; - font-weight: normal; -} - - -html #menubar a:link:hover, -html #menubar a:visited:hover, -html #menubar a:link:active, -html #menubar a:visited:active, -#menubar a:link:focus, -#menubar a:visited:focus { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.active, -html #menubar a:visited.active, -html #menubar a:link.preactive, -html #menubar a:visited.preactive { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.warning, -html #menubar a:visited.warning { - background: #000000; - color: red; - font-weight: bold; -} - -#menubar ul.dropdowns li.over>a, -#menubar ul.dropdowns li.focus>a, -#menubar ul.dropdowns li:hover>a { - font-weight: bold; -} - -.lang_de #submenu_mini_system { min-width: 13.3em; } -* html .lang_de #submenu_mini_system { width: 13.3em; } - -.lang_pt-br #submenu_mini_network { min-width: 14em; } -* html .lang_pt-br #submenu_mini_network { width: 14em; } - -.lang_pt-br #submenu_mini_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_mini_system { width: 11.5em; } - -.lang_ru #submenu_mini_system { min-width: 18em; } -* html .lang_ru #submenu_mini_system { width: 18em; } - -.lang_pt-br #submenu_admin_index { min-width: 11em; } -* html .lang_pt-br #submenu_admin_index { width: 11em; } - -.lang_ru #submenu_admin_index { min-width: 15.5em; } -* html .lang_ru #submenu_admin_index { width: 15.5em; } - -.lang_ru #submenu_admin_status { min-width: 10.5em; } -* html .lang_ru #submenu_admin_status { width: 10.5em; } - -.lang_de #submenu_admin_system { min-width: 13.3em; } -* html .lang_de #submenu_admin_system { width: 13.3em; } - -.lang_fr #submenu_admin_system { min-width: 14.5em; } -* html .lang_fr #submenu_admin_system { width: 14.5em; } - -.lang_pt-br #submenu_admin_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_admin_system { width: 11.5em; } - -.lang_ru #submenu_admin_system { min-width: 18em; } -* html .lang_ru #submenu_admin_system { width: 18em; } - -#submenu_admin_services_chillispot { min-width: 15.5em; } -* html #submenu_admin_services_chillispot { width: 15.5em; } - -#submenu_admin_services_coovachilli { min-width: 15em; } -* html #submenu_admin_services_coovachilli { width: 15em; } - -.lang_ru #submenu_admin_network_routes { min-width: 15.3em; } -* html .lang_ru #submenu_admin_network_routes { width: 15.3em; } - -#submenu_admin_network_firewall { min-width: 14em; } -* html #submenu_admin_network_firewall { width: 14em; } - -.lang_de #submenu_admin_network_firewall { min-width: 16.5em; } -* html .lang_de #submenu_admin_network_firewall { width: 16.5em; } - -.lang_pt-br #submenu_admin_network_firewall { min-width: 15em; } -* html .lang_pt-br #submenu_admin_network_firewall { width: 15em; } - -#modemenu { - width: auto; - background: #000000; - color: #ffffff; - list-style: none; - margin-right: 1px; -} - -#modemenu li { - float: right; - list-style: none; -} - -#savemenu { - float: right; - margin-right: 2em; -} - -.lang_de #submenu_admin_uci { - width: 12em; -} - -.lang_ru #submenu_admin_uci { - width: 11.5em; -} - -#maincontent { - clear: both; - width: 80%; - margin: 0 auto; - padding: 0.5em; - background: #f5f5f5; - color: #000000; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - font-size: 80%; -} - -#maincontent h2 { - margin: 0.25em 0 0.5em 0; - font-size: 150%; - font-weight: normal; -} - -#maincontent h3 { - margin: 0.5em 0; - font-size: 120%; - font-weight: normal; - text-decoration: underline; -} - -#maincontent p { - margin-bottom: 1em; -} - -textarea#syslog { - width: 98%; - min-height: 500px; - border: 3px solid #cccccc; - padding: 5px; - font-family: monospace; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #ffffff; - color: #000000; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - background-color: transparent; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - text-decoration: none !important; - font-weight: bold !important; - color: #555555 !important; - margin: 0.25em !important; - font-size: 100% !important; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -ul.cbi-apply { - font-size: 90%; -} - -input[type=submit], -input[type=reset], -input[type=image] { - cursor: pointer; -} - - -select, -input, -textarea { - background: #eeeeee; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #ffffff; - color: #000000; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table td, -table th { - color: #000000; -} - -table.smalltext { - background: #f5f5f5; - color: #000000; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { - background-color: #bbddee; - color: #000000; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -table.cbi-section-table .cbi-rowstyle-1, -table.cbi-section-table .cbi-rowstyle-1 * { - background-color: #eeeeff; - color: #000000; -} - -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #eeeeff; - color: #555555; -} - -.cbi-rowstyle-2 { - color: #000000; -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-value:hover { - background: #f8f8f8; - color: #000000; -} - -.cbi-value-title { - float: left; - width: 40%; - line-height: 1.8em; -} - -div.cbi-value-field { - width: 58%; - margin-left: 40%; - padding: 0.25em 0; -} - -div.cbi-value-description { - font-size: 90%; - display: inline; -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; - vertical-align: top; -} - -div.cbi-tblsection-create { - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-create .cbi-button { - margin: 0.25em; -} - -input.cbi-section-create-name { - margin-right: -0.25em; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - padding: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border-top: 1px dotted #bbbbbb; - border-left: 1px dotted #bbbbbb; - border-right: 1px dotted #bbbbbb; - border-bottom: none; - padding-bottom: 0; -} - -.cbi-section-node table div { - padding-bottom: 0; - border-bottom: none; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #ff0000; - background-color: #ffffff; -} - -td.cbi-value-error { - border-color: red; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red; - background-color: #ffcccc; -} - -.cbi-section-error { - color: red; - background-color: white; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a:link, -.luci a:visited { - background-color: transparent; - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #ff0000; - background-color: #ffffff; - color: #000000; - padding: 0.5em; -} - -#memorybar { - width: 200px; - height: 8px; - border: 1px solid #bbb; - color: black; - background-color: red; -} - -#memfree, #membuffers, #memcached { - float: right; - border: 1px solid #bbb; - height: 6px; -} - -#memfree { - background-color: green; - color: black; -} - -#membuffers { - background-color: yellow; - color: black; -} - -#memcached { - background-color: #ffa500; - color: black; -} - -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie6.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie6.css deleted file mode 100644 index 1c95185..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie6.css +++ /dev/null @@ -1,77 +0,0 @@ -/* obligatory IE6 Voodoo Code */ - -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div#menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html ul.dropdowns li ul { - width: 10em; -} - -* html ul.dropdowns li li { - clear: both; - float: left; -} - -* html ul.dropdowns li li { - width: 100%; -} - -* html ul.dropdowns li li a { - height: 1%; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.cbi-value-description { - width: auto !important; -} - -* html div.cbi-value-field { - margin-left: 0 !important; - width: 100% !important; -} - -* html .cbi-input-text, -* html .cbi-input-user, -* html .cbi-input-select, -* html .cbi-input-password { - width: 50% !important; -} - -* html .cbi-input-user, -* html .cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; -} - -* html .cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -* html table.cbi-section-table td .cbi-input-text, -* html table.cbi-section-table td .cbi-input-select { - width: 100% !important; -} - -* html div.cbi-page-actions { - text-align: right !important; -} - -* html div.cbi-value-field input, -* html div.cbi-value-field select { - font-size: 90% !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie7.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie7.css deleted file mode 100644 index 67ed9fb..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt-light/ie7.css +++ /dev/null @@ -1,20 +0,0 @@ -div.cbi-value-field { - margin-left: 0 !important; -} - -.cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -table.cbi-section-table td .cbi-input-text, -table.cbi-section-table td .cbi-input-select { - width: 95% !important; -} - -.cbi-input-user, -.cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; - width: 18.5em !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/bg.jpg b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/bg.jpg deleted file mode 100644 index dece957..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/bg.jpg and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/cascade.css deleted file mode 100644 index 8aea909..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/cascade.css +++ /dev/null @@ -1,803 +0,0 @@ -@charset "utf-8"; - -@media all { - -html, -body { - background-color: #4a6b7c; - background-image: url(bg.jpg); - background-position: bottom center; - background-attachment: fixed; - background-repeat: repeat-x; - color: #ffffff; -} - -body { - font-family: Verdana, Arial, sans-serif; - font-size: 101%; - line-height: 100%; -} - -* { - margin: 0; - padding: 0; -} - -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; -} - -.warning { - color: red; - background-color: white; - font-weight: bold; -} - -.clear { - clear: both; -} - -.skiplink, -.navigation, -.hidden { - position: absolute; - left: -1000px; - top: -1000px; - width: 0px; - height: 0px; - overflow: hidden; - display: inline; -} - -.error { - color: #ff0000; - background-color: white; -} - -#header { - min-height: 98px; - background-image: url(header.png); - background-repeat: no-repeat; - background-position: left center; - background-color: #557788; - color: #ffffff; - text-align: right; -} - -#header h1 { - padding: 1em 1em 0 1em; -} - -#header p { - padding: 0 1em 1em 1em; -} - -#header h1, -#header p { - font-size: 70%; - font-weight: normal; - line-height: 160%; - text-align: right; -} - -ul.dropdowns { - float: left; - margin: 0; - padding: 0; - width: auto; - list-style: none; -} - -html>body ul.dropdowns { - position: relative; -} - -ul.dropdowns li, -ul.dropdowns ul { - margin: 0; - padding: 0; - list-style: none; -} - -ul.dropdowns li { - float: left; - position: relative; - white-space: nowrap; -} - -ul.dropdowns li ul { - position: absolute; - z-index: 1000; - top: auto; - min-width: 10em; -} - -ul.dropdowns li li { - float: none; - position: relative; -} - -ul.dropdowns li a { - display: block; -} - -ul.dropdowns ul li ul { - top: 0; -} - -ul.dropdowns li ul, -ul.dropdowns li.over ul ul, -ul.dropdowns li.focus ul ul, -ul.dropdowns li:hover ul ul, -ul.dropdowns li.over ul ul ul, -ul.dropdowns li.focus ul ul ul, -ul.dropdowns li:hover ul ul ul, -ul.dropdowns li.over ul ul ul ul, -ul.dropdowns li.focus ul ul ul ul, -ul.dropdowns li:hover ul ul ul ul { - left: -3000px; -} - -ul.dropdowns li.over ul, -ul.dropdowns li.focus ul, -ul.dropdowns li:hover ul { - left: 0; -} - -ul.dropdowns ul li.over ul, -ul.dropdowns ul li.focus ul, -ul.dropdowns ul li:hover ul, -ul.dropdowns ul ul li.over ul, -ul.dropdowns ul ul li.focus ul, -ul.dropdowns ul ul li:hover ul, -ul.dropdowns ul ul ul li.over ul, -ul.dropdowns ul ul ul li.focus ul, -ul.dropdowns ul ul ul li:hover ul { - left: 100%; -} - -#menubar { - position: relative; - width: 100%; - background: #000000; - color: #ffffff; -} - -#menubar .warning { - color: red; - background-color: #557788; -} - -#menubar ul.dropdowns { - min-height: 1.8em; - background: #000000; - color: #ffffff; -} - -#menubar ul.dropdowns li ul { - background: #000000; - color: #ffffff; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; -} - -#menubar ul.dropdowns ul li ul { - border-width: 1px; -} - -html #menubar a:link, -html #menubar a:visited { - position: relative; - display: block; - padding: 0.5em; - background: #000000; - color: #ffffff; - text-decoration: none; - font-size: 80%; - font-weight: normal; -} - - -html #menubar a:link:hover, -html #menubar a:visited:hover, -html #menubar a:link:active, -html #menubar a:visited:active, -#menubar a:link:focus, -#menubar a:visited:focus { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.active, -html #menubar a:visited.active, -html #menubar a:link.preactive, -html #menubar a:visited.preactive { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.warning, -html #menubar a:visited.warning { - background: #000000; - color: red; - font-weight: bold; -} - -#menubar ul.dropdowns li.over>a, -#menubar ul.dropdowns li.focus>a, -#menubar ul.dropdowns li:hover>a { - font-weight: bold; -} - -.lang_de #submenu_mini_system { min-width: 13.3em; } -* html .lang_de #submenu_mini_system { width: 13.3em; } - -.lang_pt-br #submenu_mini_network { min-width: 14em; } -* html .lang_pt-br #submenu_mini_network { width: 14em; } - -.lang_pt-br #submenu_mini_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_mini_system { width: 11.5em; } - -.lang_ru #submenu_mini_system { min-width: 18em; } -* html .lang_ru #submenu_mini_system { width: 18em; } - -.lang_pt-br #submenu_admin_index { min-width: 11em; } -* html .lang_pt-br #submenu_admin_index { width: 11em; } - -.lang_ru #submenu_admin_index { min-width: 15.5em; } -* html .lang_ru #submenu_admin_index { width: 15.5em; } - -.lang_ru #submenu_admin_status { min-width: 10.5em; } -* html .lang_ru #submenu_admin_status { width: 10.5em; } - -.lang_de #submenu_admin_system { min-width: 13.3em; } -* html .lang_de #submenu_admin_system { width: 13.3em; } - -.lang_fr #submenu_admin_system { min-width: 14.5em; } -* html .lang_fr #submenu_admin_system { width: 14.5em; } - -.lang_pt-br #submenu_admin_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_admin_system { width: 11.5em; } - -.lang_ru #submenu_admin_system { min-width: 18em; } -* html .lang_ru #submenu_admin_system { width: 18em; } - -#submenu_admin_services_chillispot { min-width: 15.5em; } -* html #submenu_admin_services_chillispot { width: 15.5em; } - -#submenu_admin_services_coovachilli { min-width: 15em; } -* html #submenu_admin_services_coovachilli { width: 15em; } - -.lang_ru #submenu_admin_network_routes { min-width: 15.3em; } -* html .lang_ru #submenu_admin_network_routes { width: 15.3em; } - -#submenu_admin_network_firewall { min-width: 14em; } -* html #submenu_admin_network_firewall { width: 14em; } - -.lang_de #submenu_admin_network_firewall { min-width: 16.5em; } -* html .lang_de #submenu_admin_network_firewall { width: 16.5em; } - -.lang_pt-br #submenu_admin_network_firewall { min-width: 15em; } -* html .lang_pt-br #submenu_admin_network_firewall { width: 15em; } - -#modemenu { - width: auto; - background: #000000; - color: #ffffff; - list-style: none; - margin-right: 1px; -} - -#modemenu li { - float: right; - list-style: none; -} - -#savemenu { - float: right; - margin-right: 2em; -} - -.lang_de #submenu_admin_uci { - width: 12em; -} - -.lang_ru #submenu_admin_uci { - width: 11.5em; -} - -textarea#syslog { - width: 98%; - min-height: 500px; - border: 3px solid #cccccc; - padding: 5px; - font-family: monospace; -} - -#maincontent { - clear: both; - width: 80%; - margin: 0 auto; - padding: 0.5em; - background: #f5f5f5; - color: #000000; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - font-size: 80%; -} - -#maincontent h2 { - font-size: 150%; - font-family: Trebuchet MS, Verdana, sans-serif; - font-weight: bold; - margin: 0.25em 0 0.7em 0; - border-bottom: 1px solid; - padding-top: 10px; - padding-bottom: 4px; -} - -#maincontent h3 { - margin: 0.5em 0 1.1em 0; - font-size: 125%; - font-weight: bold; - font-style: italic; - font-family: Trebuchet MS, Verdana, sans-serif; - color: #27408B; -} - -#maincontent p { - margin-bottom: 1em; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #ffffff; - color: #000000; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - background-color: transparent; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - text-decoration: none !important; - font-weight: bold !important; - color: #555555 !important; - margin: 0.25em !important; - font-size: 100% !important; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -ul.cbi-apply { - font-size: 90%; -} - -input[type=submit], -input[type=reset], -input[type=image] { - cursor: pointer; -} - - -select, -input, -textarea { - background: #eeeeee; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #ffffff; - color: #000000; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table td, -table th { - color: #000000; -} - -table.smalltext { - background: #f5f5f5; - color: #000000; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { - background-color: #bbddee; - color: #000000; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -table.cbi-section-table .cbi-rowstyle-1, -table.cbi-section-table .cbi-rowstyle-1 * { - background-color: #eeeeff; - color: #000000; -} - -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #eeeeff; - color: #555555; -} - -.cbi-rowstyle-2 { - color: #000000; -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-value:hover { - background: #f8f8f8; - color: #000000; -} - -.cbi-value-title { - float: left; - width: 40%; - line-height: 1.8em; -} - -div.cbi-value-field { - width: 58%; - margin-left: 40%; - padding: 0.25em 0; -} - -div.cbi-value-description { - font-size: 90%; - display: inline; -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; - vertical-align: top; -} - -div.cbi-tblsection-create { - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-create .cbi-button { - margin: 0.25em; -} - -input.cbi-section-create-name { - margin-right: -0.25em; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - padding: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border-top: 1px dotted #bbbbbb; - border-left: 1px dotted #bbbbbb; - border-right: 1px dotted #bbbbbb; - border-bottom: none; - padding-bottom: 0; -} - -.cbi-section-node table div { - padding-bottom: 0; - border-bottom: none; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #ff0000; - background-color: #ffffff; -} - -td.cbi-value-error { - border-color: red; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red; - background-color: #ffcccc; -} - -.cbi-section-error { - color: red; - background-color: white; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a:link, -.luci a:visited { - background-color: transparent; - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #ff0000; - background-color: #ffffff; - color: #000000; - padding: 0.5em; -} - -#memorybar { - width: 200px; - height: 8px; - border: 1px solid #bbb; - color: black; - background-color: red; -} - -#memfree, #membuffers, #memcached { - float: right; - border: 1px solid #bbb; - height: 6px; -} - -#memfree { - background-color: green; - color: black; -} - -#membuffers { - background-color: yellow; - color: black; -} - -#memcached { - background-color: #ffa500; - color: black; -} - -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/dashboard.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/dashboard.css deleted file mode 100644 index ba9691e..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/dashboard.css +++ /dev/null @@ -1,99 +0,0 @@ -@charset "utf-8"; - -@media all { - -div.dashicon { - float: left; -} - -div.dashicon a { - background-image: url(icons/default.png); - background-repeat: no-repeat; - background-position: top; - display: block; - width: 70px; - padding-top: 70px; - color: #000000; - text-decoration: none; - text-align: center; - margin: 2em; - font-weight: bold; -} - -div.di_network a { - background-image: url(icons/network.png); -} - -div.di_luci a { - background-image: url(icons/desktop.png); -} - -div.di_index a { - background-image: url(icons/overview.png); -} - -div.di_logout a { - background-image: url(icons/logout.png); -} - -div.di_freifunk a { - background-image: url(icons/freifunk.png); -} - -div.di_status a { - background-image: url(icons/status.png); -} - -div.di_system a { - background-image: url(icons/system.png); -} - -div.di_syslog a { - background-image: url(icons/shell.png); -} - -div.di_ntpc a { - background-image: url(icons/datetime.png); -} - -div.di_leds a { - background-image: url(icons/lightbulb.png); -} - -div.di_reboot a { - background-image: url(icons/restart.png); -} - -div.di_passwd a { - background-image: url(icons/login.png); -} - -div.di_statistics a { - background-image: url(icons/stats.png); -} - -div.di_packages a { - background-image: url(icons/package.png); -} - -div.di_sshkeys a { - background-image: url(icons/key.png); -} - -div.di_upgrade a { - background-image: url(icons/flash.png); -} - -div.di_services a { - background-image: url(icons/worker.png); -} - -div.di_backup a { - background-image: url(icons/switch.png); -} - -div.di_fstab a { - background-image: url(icons/harddisk.png); -} - -} \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/header.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/header.png deleted file mode 100644 index 5a7c9a1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/header.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/COPYING.oxygen b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/COPYING.oxygen deleted file mode 100644 index c87ac56..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/COPYING.oxygen +++ /dev/null @@ -1,48 +0,0 @@ -The Oxygen Icon Theme - Copyright (C) 2007 David Vignoni - Copyright (C) 2007 Johann Ollivier Lapeyre - Copyright (C) 2007 Kenneth Wimer - Copyright (C) 2007 Nuno Fernades Pinheiro - Copyright (C) 2007 Riccardo Iaconelli - Copyright (C) 2007 David Miller - -and others - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library. If not, see . - -Clarification: - - The GNU Lesser General Public License or LGPL is written for - software libraries in the first place. We expressly want the LGPL to - be valid for this artwork library too. - - KDE Oxygen theme icons is a special kind of software library, it is an - artwork library, it's elements can be used in a Graphical User Interface, or - GUI. - - Source code, for this library means: - - where they exist, SVG; - - otherwise, if applicable, the multi-layered formats xcf or psd, or - otherwise png. - - The LGPL in some sections obliges you to make the files carry - notices. With images this is in some cases impossible or hardly useful. - - With this library a notice is placed at a prominent place in the directory - containing the elements. You may follow this practice. - - The exception in section 5 of the GNU Lesser General Public License covers - the use of elements of this art library in a GUI. - - kde-artists [at] kde.org diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/datetime.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/datetime.png deleted file mode 100644 index 641653c..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/datetime.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/default.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/default.png deleted file mode 100644 index ffe97ae..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/default.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/desktop.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/desktop.png deleted file mode 100644 index 2e8c720..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/desktop.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/flash.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/flash.png deleted file mode 100644 index 7e9dc78..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/flash.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/freifunk.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/freifunk.png deleted file mode 100644 index 04d30a7..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/freifunk.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/harddisk.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/harddisk.png deleted file mode 100644 index 68351d1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/harddisk.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/key.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/key.png deleted file mode 100644 index 1ebfaa4..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/key.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/lightbulb.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/lightbulb.png deleted file mode 100644 index 3a6755b..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/lightbulb.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/login.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/login.png deleted file mode 100644 index 8e881ba..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/login.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/logout.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/logout.png deleted file mode 100644 index 9f44fd0..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/logout.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/network.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/network.png deleted file mode 100644 index ee80334..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/network.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/overview.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/overview.png deleted file mode 100644 index 0f3edc1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/overview.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/package.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/package.png deleted file mode 100644 index 1f7b537..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/package.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/restart.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/restart.png deleted file mode 100644 index b46fd7f..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/restart.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/services.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/services.png deleted file mode 100644 index 54e17dd..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/services.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/shell.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/shell.png deleted file mode 100644 index 8e2f3c1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/shell.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/stats.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/stats.png deleted file mode 100644 index 860b717..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/stats.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/status.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/status.png deleted file mode 100644 index 89e570e..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/status.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/switch.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/switch.png deleted file mode 100644 index e1b7473..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/switch.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/system.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/system.png deleted file mode 100644 index 9ea5cec..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/system.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/worker.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/worker.png deleted file mode 100644 index 54e17dd..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/icons/worker.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie6.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie6.css deleted file mode 100644 index 1c95185..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie6.css +++ /dev/null @@ -1,77 +0,0 @@ -/* obligatory IE6 Voodoo Code */ - -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div#menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html ul.dropdowns li ul { - width: 10em; -} - -* html ul.dropdowns li li { - clear: both; - float: left; -} - -* html ul.dropdowns li li { - width: 100%; -} - -* html ul.dropdowns li li a { - height: 1%; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.cbi-value-description { - width: auto !important; -} - -* html div.cbi-value-field { - margin-left: 0 !important; - width: 100% !important; -} - -* html .cbi-input-text, -* html .cbi-input-user, -* html .cbi-input-select, -* html .cbi-input-password { - width: 50% !important; -} - -* html .cbi-input-user, -* html .cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; -} - -* html .cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -* html table.cbi-section-table td .cbi-input-text, -* html table.cbi-section-table td .cbi-input-select { - width: 100% !important; -} - -* html div.cbi-page-actions { - text-align: right !important; -} - -* html div.cbi-value-field input, -* html div.cbi-value-field select { - font-size: 90% !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie7.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie7.css deleted file mode 100644 index 67ed9fb..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org-oxygen/ie7.css +++ /dev/null @@ -1,20 +0,0 @@ -div.cbi-value-field { - margin-left: 0 !important; -} - -.cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -table.cbi-section-table td .cbi-input-text, -table.cbi-section-table td .cbi-input-select { - width: 95% !important; -} - -.cbi-input-user, -.cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; - width: 18.5em !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/bg.jpg b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/bg.jpg deleted file mode 100644 index dece957..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/bg.jpg and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/cascade.css deleted file mode 100644 index 90081a6..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/cascade.css +++ /dev/null @@ -1,804 +0,0 @@ -@charset "utf-8"; - -@media all { - -html { - min-height: 100%; - height: auto; -} - -body { - color: #ffffff; - background-color: #4a6b7c; - background-image: url(bg.jpg); - background-position: bottom center; - background-repeat: repeat-x; - font-family: Verdana, Arial, sans-serif; - font-size: 101%; - line-height: 100%; - padding-bottom: 1.5em; -} - -* { - margin: 0; - padding: 0; -} - -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; -} - -.warning { - color: red; - background-color: white; - font-weight: bold; -} - -.clear { - clear: both; -} - -.skiplink, -.navigation, -.hidden { - position: absolute; - left: -1000px; - top: -1000px; - width: 0px; - height: 0px; - overflow: hidden; - display: inline; -} - -.error { - color: #ff0000; - background-color: white; -} - -#header { - min-height: 98px; - background-image: url(header.png); - background-repeat: no-repeat; - background-position: left center; - background-color: #557788; - color: #ffffff; - text-align: right; -} - -#header h1 { - padding: 1em 1em 0 1em; -} - -#header p { - padding: 0 1em 1em 1em; -} - -#header h1, -#header p { - font-size: 70%; - font-weight: normal; - line-height: 160%; - text-align: right; -} - -ul.dropdowns { - float: left; - margin: 0; - padding: 0; - width: auto; - list-style: none; -} - -html>body ul.dropdowns { - position: relative; -} - -ul.dropdowns li, -ul.dropdowns ul { - margin: 0; - padding: 0; - list-style: none; -} - -ul.dropdowns li { - float: left; - position: relative; - white-space: nowrap; -} - -ul.dropdowns li ul { - position: absolute; - z-index: 1000; - top: auto; - min-width: 10em; -} - -ul.dropdowns li li { - float: none; - position: relative; -} - -ul.dropdowns li a { - display: block; -} - -ul.dropdowns ul li ul { - top: 0; -} - -ul.dropdowns li ul, -ul.dropdowns li.over ul ul, -ul.dropdowns li.focus ul ul, -ul.dropdowns li:hover ul ul, -ul.dropdowns li.over ul ul ul, -ul.dropdowns li.focus ul ul ul, -ul.dropdowns li:hover ul ul ul, -ul.dropdowns li.over ul ul ul ul, -ul.dropdowns li.focus ul ul ul ul, -ul.dropdowns li:hover ul ul ul ul { - left: -3000px; -} - -ul.dropdowns li.over ul, -ul.dropdowns li.focus ul, -ul.dropdowns li:hover ul { - left: 0; -} - -ul.dropdowns ul li.over ul, -ul.dropdowns ul li.focus ul, -ul.dropdowns ul li:hover ul, -ul.dropdowns ul ul li.over ul, -ul.dropdowns ul ul li.focus ul, -ul.dropdowns ul ul li:hover ul, -ul.dropdowns ul ul ul li.over ul, -ul.dropdowns ul ul ul li.focus ul, -ul.dropdowns ul ul ul li:hover ul { - left: 100%; -} - -#menubar { - position: relative; - width: 100%; - background: #000000; - color: #ffffff; -} - -#menubar .warning { - color: red; - background-color: #557788; -} - -#menubar ul.dropdowns { - min-height: 1.8em; - background: #000000; - color: #ffffff; -} - -#menubar ul.dropdowns li ul { - background: #000000; - color: #ffffff; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; -} - -#menubar ul.dropdowns ul li ul { - border-width: 1px; -} - -html #menubar a:link, -html #menubar a:visited { - position: relative; - display: block; - padding: 0.5em; - background: #000000; - color: #ffffff; - text-decoration: none; - font-size: 80%; - font-weight: normal; -} - - -html #menubar a:link:hover, -html #menubar a:visited:hover, -html #menubar a:link:active, -html #menubar a:visited:active, -#menubar a:link:focus, -#menubar a:visited:focus { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.active, -html #menubar a:visited.active, -html #menubar a:link.preactive, -html #menubar a:visited.preactive { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html #menubar a:link.warning, -html #menubar a:visited.warning { - background: #000000; - color: red; - font-weight: bold; -} - -#menubar ul.dropdowns li.over>a, -#menubar ul.dropdowns li.focus>a, -#menubar ul.dropdowns li:hover>a { - font-weight: bold; -} - -.lang_de #submenu_mini_system { min-width: 13.3em; } -* html .lang_de #submenu_mini_system { width: 13.3em; } - -.lang_pt-br #submenu_mini_network { min-width: 14em; } -* html .lang_pt-br #submenu_mini_network { width: 14em; } - -.lang_pt-br #submenu_mini_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_mini_system { width: 11.5em; } - -.lang_ru #submenu_mini_system { min-width: 18em; } -* html .lang_ru #submenu_mini_system { width: 18em; } - -.lang_pt-br #submenu_admin_index { min-width: 11em; } -* html .lang_pt-br #submenu_admin_index { width: 11em; } - -.lang_ru #submenu_admin_index { min-width: 15.5em; } -* html .lang_ru #submenu_admin_index { width: 15.5em; } - -.lang_ru #submenu_admin_status { min-width: 10.5em; } -* html .lang_ru #submenu_admin_status { width: 10.5em; } - -.lang_de #submenu_admin_system { min-width: 13.3em; } -* html .lang_de #submenu_admin_system { width: 13.3em; } - -.lang_fr #submenu_admin_system { min-width: 14.5em; } -* html .lang_fr #submenu_admin_system { width: 14.5em; } - -.lang_pt-br #submenu_admin_system { min-width: 11.5em; } -* html .lang_pt-br #submenu_admin_system { width: 11.5em; } - -.lang_ru #submenu_admin_system { min-width: 18em; } -* html .lang_ru #submenu_admin_system { width: 18em; } - -#submenu_admin_services_chillispot { min-width: 15.5em; } -* html #submenu_admin_services_chillispot { width: 15.5em; } - -#submenu_admin_services_coovachilli { min-width: 15em; } -* html #submenu_admin_services_coovachilli { width: 15em; } - -.lang_ru #submenu_admin_network_routes { min-width: 15.3em; } -* html .lang_ru #submenu_admin_network_routes { width: 15.3em; } - -#submenu_admin_network_firewall { min-width: 14em; } -* html #submenu_admin_network_firewall { width: 14em; } - -.lang_de #submenu_admin_network_firewall { min-width: 16.5em; } -* html .lang_de #submenu_admin_network_firewall { width: 16.5em; } - -.lang_pt-br #submenu_admin_network_firewall { min-width: 15em; } -* html .lang_pt-br #submenu_admin_network_firewall { width: 15em; } - -#modemenu { - width: auto; - background: #000000; - color: #ffffff; - list-style: none; - margin-right: 1px; -} - -#modemenu li { - float: right; - list-style: none; -} - -#savemenu { - float: right; - margin-right: 2em; -} - -.lang_de #submenu_admin_uci { - width: 12em; -} - -.lang_ru #submenu_admin_uci { - width: 11.5em; -} - -textarea#syslog { - width: 98%; - min-height: 500px; - border: 3px solid #cccccc; - padding: 5px; - font-family: monospace; -} - -#maincontent { - clear: both; - width: 80%; - margin: 0 auto; - padding: 0.5em; - background: #f5f5f5; - color: #000000; - border-width: 0 1px 1px 1px; - border-style: solid; - border-color: #444444; - font-size: 80%; -} - -#maincontent h2 { - font-size: 150%; - font-family: Trebuchet MS, Verdana, sans-serif; - font-weight: bold; - margin: 0.25em 0 0.7em 0; - border-bottom: 1px solid; - padding-top: 10px; - padding-bottom: 4px; -} - -#maincontent h3 { - margin: 0.5em 0 1.1em 0; - font-size: 125%; - font-weight: bold; - font-style: italic; - font-family: Trebuchet MS, Verdana, sans-serif; - color: #27408B; -} - -#maincontent p { - margin-bottom: 1em; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #ffffff; - color: #000000; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - background-color: transparent; - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - text-decoration: none !important; - font-weight: bold !important; - color: #555555 !important; - margin: 0.25em !important; - font-size: 100% !important; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -ul.cbi-apply { - font-size: 90%; -} - -input[type=submit], -input[type=reset], -input[type=image] { - cursor: pointer; -} - - -select, -input, -textarea { - background: #eeeeee; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #ffffff; - color: #000000; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - text-indent: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table td, -table th { - color: #000000; -} - -table.smalltext { - background: #f5f5f5; - color: #000000; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { - background-color: #bbddee; - color: #000000; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -table.cbi-section-table .cbi-rowstyle-1, -table.cbi-section-table .cbi-rowstyle-1 * { - background-color: #eeeeff; - color: #000000; -} - -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #eeeeff; - color: #555555; -} - -.cbi-rowstyle-2 { - color: #000000; -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-value:hover { - background: #f8f8f8; - color: #000000; -} - -.cbi-value-title { - float: left; - width: 40%; - line-height: 1.8em; -} - -div.cbi-value-field { - width: 58%; - margin-left: 40%; - padding: 0.25em 0; -} - -div.cbi-value-description { - font-size: 90%; - display: inline; -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; - vertical-align: top; -} - -div.cbi-tblsection-create { - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-create .cbi-button { - margin: 0.25em; -} - -input.cbi-section-create-name { - margin-right: -0.25em; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - padding: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border-top: 1px dotted #bbbbbb; - border-left: 1px dotted #bbbbbb; - border-right: 1px dotted #bbbbbb; - border-bottom: none; - padding-bottom: 0; -} - -.cbi-section-node table div { - padding-bottom: 0; - border-bottom: none; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #ff0000; - background-color: #ffffff; -} - -td.cbi-value-error { - border-color: red; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red; - background-color: #ffcccc; -} - -.cbi-section-error { - color: red; - background-color: white; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; -} - -.luci a:link, -.luci a:visited { - background-color: transparent; - color: #666666; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #ff0000; - background-color: #ffffff; - color: #000000; - padding: 0.5em; -} - -#memorybar { - width: 200px; - height: 8px; - border: 1px solid #bbb; - color: black; - background-color: red; -} - -#memfree, #membuffers, #memcached { - float: right; - border: 1px solid #bbb; - height: 6px; -} - -#memfree { - background-color: green; - color: black; -} - -#membuffers { - background-color: yellow; - color: black; -} - -#memcached { - background-color: #ffa500; - color: black; -} - -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/header.png b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/header.png deleted file mode 100644 index 5a7c9a1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/header.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie6.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie6.css deleted file mode 100644 index 1c95185..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie6.css +++ /dev/null @@ -1,77 +0,0 @@ -/* obligatory IE6 Voodoo Code */ - -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div#menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html ul.dropdowns li ul { - width: 10em; -} - -* html ul.dropdowns li li { - clear: both; - float: left; -} - -* html ul.dropdowns li li { - width: 100%; -} - -* html ul.dropdowns li li a { - height: 1%; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.cbi-value-description { - width: auto !important; -} - -* html div.cbi-value-field { - margin-left: 0 !important; - width: 100% !important; -} - -* html .cbi-input-text, -* html .cbi-input-user, -* html .cbi-input-select, -* html .cbi-input-password { - width: 50% !important; -} - -* html .cbi-input-user, -* html .cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; -} - -* html .cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -* html table.cbi-section-table td .cbi-input-text, -* html table.cbi-section-table td .cbi-input-select { - width: 100% !important; -} - -* html div.cbi-page-actions { - text-align: right !important; -} - -* html div.cbi-value-field input, -* html div.cbi-value-field select { - font-size: 90% !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie7.css b/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie7.css deleted file mode 100644 index 67ed9fb..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/openwrt.org/ie7.css +++ /dev/null @@ -1,20 +0,0 @@ -div.cbi-value-field { - margin-left: 0 !important; -} - -.cbi-section legend { - background-color: #ffffff; - color: #555555; -} - -table.cbi-section-table td .cbi-input-text, -table.cbi-section-table td .cbi-input-select { - width: 95% !important; -} - -.cbi-input-user, -.cbi-input-password { - text-indent: 0 !important; - padding-left: 1.5em !important; - width: 18.5em !important; -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/bg.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/bg.png deleted file mode 100644 index cfcb575..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/bg.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/cascade.css b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/cascade.css deleted file mode 100644 index c1b19f7..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/cascade.css +++ /dev/null @@ -1,660 +0,0 @@ -@charset "utf-8"; - -@media all { - -html, body { - height: 100%; -} - -body { - font-family: Verdana, Arial, sans-serif; - font-size: 101%; - line-height: 100%; - background: #dddddd; -} - -div#screen { - min-height: 100%; -} - -* { - margin: 0; - padding: 0; -} - -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; -} - -.warning { - color: red; - background-color: white; - font-weight: bold; -} - -.clear { - clear: both; -} - -.skiplink, -.navigation, -.hidden { - position: absolute; - left: -1000px; - top: -1000px; - width: 0px; - height: 0px; - overflow: hidden; - display: inline; -} - -.error { - color: #ff0000; - background-color: white; -} - -#header { - min-height: 98px; - background-image: url(flukso.png); - background-repeat: no-repeat; - background-position: 12% center; - background-color: #dddddd; - color: #ffffff; - text-align: right; -} - -#header h1 { - padding: 1em 1em 0 1em; -} - -#header p { - padding: 0 1em 1em 1em; -} - -#header h1, -#header p { - font-size: 70%; - font-weight: normal; - line-height: 160%; - text-align: right; -} - -.menubar { - background: #000000; - background: rgba(100, 100, 100, 0.8); - color: #ffffff; - width: 80%; - font-size: 0.8em; - - margin: 0.5em auto; - - padding: 0.4em; - padding-left: 0.5em; - padding-right: 0.5em; - - border-radius: 0.8em; - -khtml-border-radius: 0.8em; - -moz-border-radius: 0.8em; - -webkit-border-radius:0.8em; - -opera-border-radius: 0.8em; -} - -.menubar .warning { - color: red; - background-color: #557788; -} - -html .menubar a:link, -html .menubar a:visited { - color: #ffffff; - text-decoration: none; - font-weight: bold; -} - -html .menubar a.menulink { - margin-left: 1em; -} - - -html .menubar a:link:hover, -html .menubar a:visited:hover, -html .menubar a:link:active, -html .menubar a:visited:active, -.menubar a:link:focus, -.menubar a:visited:focus { -} - -html .menubar a:link.active, -html .menubar a:visited.active, -html .menubar a:link.preactive, -html .menubar a:visited.preactive { - background: #000000; - color: #ffff00; - font-weight: bold; -} - -html .menubar a:link.warning, -html .menubar a:visited.warning { - background: #000000; - color: red; - font-weight: bold; -} - -.lang_de #submenu_admin_uci { - width: 12em; -} - -.lang_ru #submenu_admin_uci { - width: 11.5em; -} - -#maincontent { - clear: both; - width: 80%; - margin: 0 auto; - padding: 0.5em; - background: #f5f5f5; - background: rgba(245, 245, 245, 0.9); - color: #000000; - border-width: 1px solid #444444; - font-size: 80%; - - border-radius: 1em; - -khtml-border-radius: 1em; - -moz-border-radius: 1em; - -webkit-border-radius: 1em; - -opera-border-radius: 1em; -} - -#maincontent h2 { - margin: 0.25em 0 0.5em 0; - font-size: 150%; - font-weight: normal; -} - -#maincontent h3 { - margin: 0.5em 0; - font-size: 120%; - font-weight: normal; - text-decoration: underline; -} - -#maincontent p { - margin-bottom: 1em; -} - -textarea#syslog { - width: 98%; - min-height: 500px; - border: 3px solid #cccccc; - padding: 5px; - font-family: monospace; -} - -.cbi-section { - margin-bottom: 0.5em; - padding: 0.5em 1em; - border: 1px dotted #555555; - background-color: #ffffff; - background-color: rgba(255, 255, 255, 0.8); - color: #000000; -} - -.cbi-section legend { - font-size: 110%; - font-weight: bold; - height: 1em; - padding: 0 0.25em; - background-color: transparent; - color: #555555; -} - -*+html .cbi-section legend { - background-color: #ffffff; - background-color: rgba(255, 255, 255, 0.8); - color: #555555; -} - -* html .cbi-section legend { - background-color: #ffffff; - background-color: rgba(255, 255, 255, 0.8); - color: #555555; -} - -.cbi-section h2 { - margin: 0em 0 0.5em -0.5em !important; -} - -.cbi-section h3 { - height: 1.5em; - font-size: 90%; - background-color: #ffffff; - background-color: rgba(255, 255, 255, 0.8); - color: #555555; -} - -.cbi-section-descr { - margin-bottom: 0.5em; - font-size: 95%; -} - -.cbi-title-ref { - color: inherit; - text-decoration: none; - padding-right: 18px; - background: url('../resources/cbi/link.gif') no-repeat scroll right center; - background-color: inherit; -} - -ul.cbi-apply { - font-size: 90%; -} - -input[type=submit], -input[type=reset], -input[type=image] { - cursor: pointer; -} - - -select, -input, -textarea { - background: #eeeeee; - color: #000000; - border-width: 1px; - border-color: #000000; -} - -input[type=image] { - border: none; -} - -input:focus, -input:hover, -select:focus, -select:hover, -textarea:focus, -textarea:hover { - background-color: #ffffff; - color: #000000; -} - -select, -input[type=text], -input[type=password] { - width: 20em; -} - -td select, -td input[type=text], -td input[type=password] { - width: 99%; -} - -input.cbi-input-user { - background: url('../resources/cbi/user.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-password { - background: url('../resources/cbi/key.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-find { - background: url('../resources/cbi/find.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-reload { - background: url('../resources/cbi/reload.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; -} - -input.cbi-input-add, -input.cbi-button-add { - background: url('../resources/cbi/add.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-fieldadd, -input.cbi-button-fieldadd { - background: url(../resources/cbi/fieldadd.gif) no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-reset, -input.cbi-button-reset { - background: url('../resources/cbi/reset.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-save, -input.cbi-button-save { - background: url('../resources/cbi/save.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-apply, -input.cbi-button-apply { - background: url('../resources/cbi/apply.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -input.cbi-input-remove, -div.cbi-section-remove input { - background: url('../resources/cbi/remove.gif') no-repeat scroll 1px center; - background-color: inherit; - color: #000000; - padding-left: 17px; - padding-right: 1px; -} - -div.cbi-section-remove input { - border-bottom: none; -} - -textarea { - margin-left: -1px; - margin-bottom: 0.5em; -} - -form > div > input[type=submit], -form > div > input[type=reset] { - float: right; - margin-left: 0.5em; -} - -table.smalltext { - background: #f5f5f5; - color: #000000; - border-top: 1px solid #666666; - border-right: 1px solid #666666; - border-bottom: 1px solid #666666; - font-size: 90%; - width: 80%; - margin-left: auto; - margin-right: auto; - border-collapse: collapse; -} - -table.smalltext tr:hover td { - background-color: #bbddee; - color: #000000; -} - -table.smalltext tr th { - padding: 0 0.25em; - border-left: 1px solid #666666; - text-align: left; -} - -table.smalltext tr td { - padding: 0 0.25em; - border-top: 1px solid #666666; - border-left: 1px solid #666666; -} - -table.cbi-section-table .cbi-rowstyle-1, -table.cbi-section-table .cbi-rowstyle-1 * { - background-color: #eeeeff; - color: #000000; -} - -.cbi-section .cbi-rowstyle-1 h3 { - background-color: #eeeeff; - color: #555555; -} - -.cbi-rowstyle-2 { -} - -div.cbi-value { - clear: left; - vertical-align: middle; - padding-left: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-value:hover { - background: #f8f8f8; - color: #000000; -} - -.cbi-value-title { - float: left; - width: 40%; -} - -div.cbi-value-field { - width: 58%; - margin-left: 40%; - padding: 0.25em 0; -} - -div.cbi-value-description { - font-size: 90%; - display: inline; -} - -div.cbi-section-create { - clear: left; - white-space: nowrap; -} - -div.cbi-map-descr { - margin-bottom: 1em; -} - -div.cbi-optionals { - padding: 0.25em; - border-bottom: 1px dotted #bbbbbb; -} - -div.cbi-section-remove { - float: right; -} - -.cbi-section-node { - clear: both; - border-top: 1px dotted #bbbbbb; - border-left: 1px dotted #bbbbbb; - border-right: 1px dotted #bbbbbb; - border-bottom: none; - padding-bottom: 0; -} - -.cbi-section-node table div { - padding-bottom: 0; - border-bottom: none; -} - -.cbi-section-node div.cbi-section-table-row { - margin: 0.25em; -} - -table.cbi-section-table { - width: 100%; - font-size: 95%; -} - -table.cbi-section-table th, -table.cbi-section-table td { - text-align: center; -} - -tr.cbi-section-table-descr th { - font-weight: normal; - font-size: 90%; -} - -td.cbi-section-table-optionals { - text-align: left !important; - padding-top: 1em; -} - -.cbi-value-helpicon img { - vertical-align: bottom; -} - -div.cbi-error { - font-size: 95%; - font-weight: bold; - color: #ff0000; - background-color: #ffffff; -} - -td.cbi-value-error { - border-color: red; -} - -.cbi-value-error input, -.cbi-value-error select { - color: red; - background-color: #ffcccc; -} - -.cbi-section-error { - color: red; - background-color: white; - font-size: 95%; - border: 1px dotted red; - margin: 3px; - padding: 3px; -} - -.right { - text-align: right; -} - -.luci { - position: fixed; - bottom: 0; - left: 0; - text-align: right; - color: #ffffff; -} - -.luci a:link, -.luci a:visited { - background-color: transparent; - color: #ffffff; - text-decoration: none; - font-size: 70%; -} - -.inline { - display: inline; -} - -.error500 { - white-space: normal; - border: 1px dotted #ff0000; - background-color: #ffffff; - color: #000000; - padding: 0.5em; -} - -#memorybar { - width: 200px; - height: 8px; - border: 1px solid #bbb; - color: black; - background-color: red; -} - -#memfree, #membuffers, #memcached { - float: right; - border: 1px solid #bbb; - height: 6px; -} - -#memfree { - background-color: green; - color: black; -} - -#membuffers { - background-color: yellow; - color: black; -} - -#memcached { - background-color: #ffa500; - color: black; -} - - -/* obligatory IE6 Voodoo Code */ - -* html body { - padding-left: 50% !important; -} - -* html div#header { - margin-left: -100% !important; -} - -* html div.menubar { - margin-left: -100% !important; - width: 200% !important; -} - -* html div#maincontent { - margin-left: -80% !important; - width: 160% !important; -} - -* html div.cbi-value-description { - margin-left: 40%; -} - -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/dashboard.css b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/dashboard.css deleted file mode 100644 index b8b3097..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/dashboard.css +++ /dev/null @@ -1,31 +0,0 @@ -@charset "utf-8"; - -@media all { - -div.dashicon { - float: left; -} - -div.dashicon a { - background-image: url(icons/default.png); - background-repeat: no-repeat; - background-position: top; - display: block; - width: 70px; - padding-top: 70px; - color: #000000; - text-decoration: none; - text-align: center; - margin: 2em; - font-weight: bold; -} - -div.di_network a { - background-image: url(icons/network.png); -} - -div.di_wifi a { - background-image: url(icons/wifi.png); -} - -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/flukso.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/flukso.png deleted file mode 100755 index 1e419fe..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/flukso.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/footer.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/footer.png deleted file mode 100644 index ea0dc78..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/footer.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/header.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/header.png deleted file mode 100644 index 5a7c9a1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/header.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/COPYING.oxygen b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/COPYING.oxygen deleted file mode 100644 index c87ac56..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/COPYING.oxygen +++ /dev/null @@ -1,48 +0,0 @@ -The Oxygen Icon Theme - Copyright (C) 2007 David Vignoni - Copyright (C) 2007 Johann Ollivier Lapeyre - Copyright (C) 2007 Kenneth Wimer - Copyright (C) 2007 Nuno Fernades Pinheiro - Copyright (C) 2007 Riccardo Iaconelli - Copyright (C) 2007 David Miller - -and others - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library. If not, see . - -Clarification: - - The GNU Lesser General Public License or LGPL is written for - software libraries in the first place. We expressly want the LGPL to - be valid for this artwork library too. - - KDE Oxygen theme icons is a special kind of software library, it is an - artwork library, it's elements can be used in a Graphical User Interface, or - GUI. - - Source code, for this library means: - - where they exist, SVG; - - otherwise, if applicable, the multi-layered formats xcf or psd, or - otherwise png. - - The LGPL in some sections obliges you to make the files carry - notices. With images this is in some cases impossible or hardly useful. - - With this library a notice is placed at a prominent place in the directory - containing the elements. You may follow this practice. - - The exception in section 5 of the GNU Lesser General Public License covers - the use of elements of this art library in a GUI. - - kde-artists [at] kde.org diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/datetime.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/datetime.png deleted file mode 100644 index 641653c..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/datetime.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/default.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/default.png deleted file mode 100644 index ffe97ae..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/default.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/desktop.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/desktop.png deleted file mode 100644 index 2e8c720..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/desktop.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/flash.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/flash.png deleted file mode 100644 index 7e9dc78..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/flash.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/freifunk.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/freifunk.png deleted file mode 100644 index 04d30a7..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/freifunk.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/harddisk.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/harddisk.png deleted file mode 100644 index 68351d1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/harddisk.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/key.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/key.png deleted file mode 100644 index 1ebfaa4..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/key.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/lightbulb.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/lightbulb.png deleted file mode 100644 index 3a6755b..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/lightbulb.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/login.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/login.png deleted file mode 100644 index 8e881ba..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/login.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/logout.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/logout.png deleted file mode 100644 index 9f44fd0..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/logout.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/network.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/network.png deleted file mode 100644 index ee80334..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/network.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/overview.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/overview.png deleted file mode 100644 index 0f3edc1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/overview.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/package.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/package.png deleted file mode 100644 index 1f7b537..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/package.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/restart.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/restart.png deleted file mode 100644 index b46fd7f..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/restart.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/services.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/services.png deleted file mode 100644 index 54e17dd..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/services.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/shell.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/shell.png deleted file mode 100644 index 8e2f3c1..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/shell.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/stats.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/stats.png deleted file mode 100644 index 860b717..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/stats.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/status.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/status.png deleted file mode 100644 index 89e570e..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/status.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/switch.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/switch.png deleted file mode 100644 index e1b7473..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/switch.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/system.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/system.png deleted file mode 100644 index 9ea5cec..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/system.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wifi.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wifi.png deleted file mode 100644 index 7c17e8d..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wifi.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wireless.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wireless.png deleted file mode 100644 index f35dace..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/wireless.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/worker.png b/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/worker.png deleted file mode 100644 index 54e17dd..0000000 Binary files a/mote/v1/openwrt/package/luci/host/www/luci-static/oxygen/icons/worker.png and /dev/null differ diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/Dropdowns.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/Dropdowns.js deleted file mode 100644 index ff2f0e6..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/Dropdowns.js +++ /dev/null @@ -1,120 +0,0 @@ -/* -Copyright (C) 2008 Alina Friedrichsen - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. -*/ - -function initDropdowns() { - var aSelects = XHTML1.getElementsByTagName("select"); - var isIE6 = false /*@cc_on || @_jscript_version < 5.7 @*/; - - function showPlaceholder(sel) { - if( ! sel._ph ) { - var box = sel.getBoundingClientRect(); - sel._dm = sel.currentStyle.display; - sel._ph = document.createElement('input'); - sel.parentNode.insertBefore(sel._ph, sel); - sel._ph.style.width = ( box.right - box.left ) + 'px'; - sel._ph.style.height = ( box.bottom - box.top ) + 'px'; - sel._ph.style.margin = sel.currentStyle.margin; - } - - sel._ph.value = sel.options[sel.selectedIndex].text; - sel._ph.style.display = sel._dm; - sel.style.display = 'none'; - } - - function hidePlaceholder(sel) { - if( sel._ph ) sel._ph.style.display = 'none'; - sel.style.display = sel._dm; - } - - function hideSelects() { - for(var i = 0; i < aSelects.length; i++) { - showPlaceholder(aSelects[i]); - } - } - - function showSelects() { - for(var i = 0; i < aSelects.length; i++) { - hidePlaceholder(aSelects[i]); - } - } - - function onmouseover(evt) { - XHTML1.addClass(evt.currentTarget, "over"); - if( isIE6 ) hideSelects(); - } - - function onmouseout(evt) { - XHTML1.removeClass(evt.currentTarget, "over"); - if( isIE6 ) showSelects(); - } - - function onfocus(evt) { - for(var element = evt.currentTarget; element; element = element.parentNode) { - if(XHTML1.isElement(element, "li")) { - XHTML1.addClass(element, "focus"); - } - } - if( isIE6 ) hideSelects(); - } - - function onblur(evt) { - for(var element = evt.currentTarget; element; element = element.parentNode) { - if(XHTML1.isElement(element, "li")) { - XHTML1.removeClass(element, "focus"); - } - } - if( isIE6 ) showSelects(); - } - - if(document.all) { - var liElements = XHTML1.getElementsByTagName("li"); - for(var i = 0; i < liElements.length; i++) { - var li = liElements[i]; - for(var element = li.parentNode; element; element = element.parentNode) { - if(XHTML1.isElement(element, "ul") && XHTML1.containsClass(element, "dropdowns")) { - XHTML1.addEventListener(li, "mouseover", onmouseover); - XHTML1.addEventListener(li, "mouseout", onmouseout); - break; - } - } - } - } - - var aElements = XHTML1.getElementsByTagName("a"); - for(var i = 0; i < aElements.length; i++) { - var a = aElements[i]; - for(var element = a.parentNode; element; element = element.parentNode) { - if(XHTML1.isElement(element, "ul") && XHTML1.containsClass(element, "dropdowns")) { - XHTML1.addEventListener(a, "focus", onfocus); - XHTML1.addEventListener(a, "blur", onblur); - break; - } - } - } -} - -if(XHTML1.isDOMSupported()) { - XHTML1.addEventListener(window, "load", initDropdowns); -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/VarType.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/VarType.js deleted file mode 100644 index d466810..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/VarType.js +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright (C) 2008 Alina Friedrichsen - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. -*/ - -function VarType() { -} - -VarType.isNull = function(obj) { - if(typeof obj == "undefined") return true; - if(typeof obj == "object" && (!obj)) return true; - return false; -}; - -VarType.toFloat = function(value) { - value = Number(value); - return value; -}; - -VarType.toDecimal = function(value) { - value = Number(value); - if(!isFinite(value)) value = 0.0; - return value; -}; - -VarType.toInt = function(value) { - value = Number(value); - if(!isFinite(value)) value = 0.0; - value = Math.floor(value); - return value; -}; - -VarType.toUInt = function(value) { - value = Number(value); - if(!isFinite(value)) value = 0.0; - else if(value < 0.0) value = 0.0; - value = Math.floor(value); - return value; -}; - -VarType.toStr = function(value) { - if(VarType.isNull(value)) value = ""; - value = String(value); - return value; -}; - -VarType.toBool = function(value) { - value = Boolean(value); - return value; -}; - -VarType.needObject = function(obj) { - if(typeof obj != "object" || (!obj)) throw new TypeError(); -}; - -VarType.needInstanceOf = function(obj, type) { - if(!(obj instanceof type)) throw new TypeError(); -}; - -VarType.needFunction = function(obj) { - if(typeof obj != "function") throw new TypeError(); -}; - -VarType.needNode = function(obj, type) { - VarType.needObject(obj); - if(VarType.isNull(obj.nodeType)) throw new TypeError(); - if(!VarType.isNull(type)) { - type = VarType.toInt(type); - if(obj.nodeType != type) throw new TypeError(); - } -}; diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/XHTML1.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/XHTML1.js deleted file mode 100644 index a7d4f7d..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/XHTML1.js +++ /dev/null @@ -1,271 +0,0 @@ -/* -Copyright (C) 2007, 2008 Alina Friedrichsen - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. -*/ - -var XMLNS_XMLNS = "http://www.w3.org/2000/xmlns/"; -var XMLNS_XML = "http://www.w3.org/XML/1998/namespace"; -var XMLNS_XHTML = "http://www.w3.org/1999/xhtml"; - -function W3CDOM_Event(currentTarget) { - VarType.needObject(currentTarget); - this.currentTarget = currentTarget; - this.preventDefault = function() { window.event.returnValue = false; }; - return this; -} - -function XHTML1() { -} - -XHTML1.isDOMSupported = function() { - if(!document.getElementById) return false; - if(!(window.addEventListener || window.attachEvent)) return false; - return true; -}; - -XHTML1.isXHTML = function() { - if(document.documentElement.nodeName == "HTML") return false; - return true; -}; - -XHTML1.addEventListener = function(target, type, listener) { - VarType.needObject(target); - type = VarType.toStr(type); - VarType.needFunction(listener); - - if(target.addEventListener) { - target.addEventListener(type, listener, false); - } - else if(target.attachEvent) { - target.attachEvent("on" + type, function() { listener(new W3CDOM_Event(target)); } ); - } -}; - -XHTML1.createElement = function(tagName) { - tagName = VarType.toStr(tagName); - - if(XHTML1.isXHTML()) { - return document.createElementNS(XMLNS_XHTML, tagName.toLowerCase()); - } - - return document.createElement(tagName.toUpperCase()); -}; - -XHTML1.getElementsByTagName = function(tagName) { - tagName = VarType.toStr(tagName); - - if(XHTML1.isXHTML()) { - return document.getElementsByTagNameNS(XMLNS_XHTML, tagName.toLowerCase()); - } - - return document.getElementsByTagName(tagName.toUpperCase()); -}; - -XHTML1.isElement = function(node, tagName) { - VarType.needNode(node); - tagName = VarType.toStr(tagName); - - if(node.nodeType == 1) { - if(XHTML1.isXHTML()) { - if(node.namespaceURI == XMLNS_XHTML) { - if(node.localName == tagName.toLowerCase()) return true; - } - } else { - if(node.nodeName == tagName.toUpperCase()) return true; - } - } - - return false; -}; - -XHTML1.getAttribute = function(element, name) { - VarType.needNode(element, 1); - name = VarType.toStr(name); - - name = name.toLowerCase(); - - if(XHTML1.isXHTML()) { - return element.getAttributeNS(null, name); - } - - if(name == "class") { - return element.className; - } - - return element.getAttribute(name); -}; - -XHTML1.setAttribute = function(element, name, value) { - VarType.needNode(element, 1); - name = VarType.toStr(name); - value = VarType.toStr(value); - - name = name.toLowerCase(); - - if(XHTML1.isXHTML()) { - element.setAttributeNS(null, name, value); - return; - } - - if(name == "class") { - element.className = value; - return; - } - - element.setAttribute(name, value); -}; - -XHTML1.removeAttribute = function(element, name) { - VarType.needNode(element, 1); - name = VarType.toStr(name); - - name = name.toLowerCase(); - - if(XHTML1.isXHTML()) { - element.removeAttributeNS(null, name); - return; - } - - if(name == "class") { - element.className = ""; - return; - } - - element.removeAttribute(name); -}; - -XHTML1.containsClass = function(element, className) { - VarType.needNode(element, 1); - className = VarType.toStr(className).replace(/^\s+/g, "").replace(/\s+$/g, ""); - - var classString = XHTML1.getAttribute(element, "class").replace(/\s+/g, " ").replace(/^\s+/g, "").replace(/\s+$/g, ""); - var classArray = classString.split(" "); - for(var i = 0; i < classArray.length; i++) { - if(classArray[i] == className) return true; - } - - return false; -}; - -XHTML1.addClass = function(element, className) { - VarType.needNode(element, 1); - className = VarType.toStr(className).replace(/^\s+/g, "").replace(/\s+$/g, ""); - - var classString = XHTML1.getAttribute(element, "class").replace(/\s+/g, " ").replace(/^\s+/g, "").replace(/\s+$/g, ""); - var classArray = classString.split(" "); - classString = ""; - for(var i = 0; i < classArray.length; i++) { - if(classArray[i] != className) { - if(classString == "") classString = classArray[i]; - else classString += " " + classArray[i]; - } - } - - if(classString == "") classString = className; - else classString += " " + className; - - XHTML1.setAttribute(element, "class", classString); -}; - -XHTML1.removeClass = function(element, className) { - VarType.needNode(element, 1); - className = VarType.toStr(className).replace(/^\s+/g, "").replace(/\s+$/g, ""); - - var classString = XHTML1.getAttribute(element, "class").replace(/\s+/g, " ").replace(/^\s+/g, "").replace(/\s+$/g, ""); - var classArray = classString.split(" "); - classString = ""; - for(var i = 0; i < classArray.length; i++) { - if(classArray[i] != className) { - if(classString == "") classString = classArray[i]; - else classString += " " + classArray[i]; - } - } - - XHTML1.setAttribute(element, "class", classString); -}; - -XHTML1.removeAllChildren = function(node) { - VarType.needNode(node); - - while(node.lastChild) { - node.removeChild(node.lastChild); - } -}; - -XHTML1.getTextContent = function(node) { - VarType.needNode(node); - - if(typeof node.textContent != "undefined") { - return node.textContent; - } - - switch(node.nodeType) { - case 1: - case 2: - case 5: - case 6: - case 11: - var textContent = ""; - for(node = node.firstChild; node; node = node.nextSibling) { - if(node.nodeType == 7) continue; - if(node.nodeType == 8) continue; - textContent += VarType.toStr(XHTML1.getTextContent(node)); - } - return textContent; - case 3: - case 4: - case 7: - case 8: - return node.nodeValue; - } - - return null; -}; - -XHTML1.setTextContent = function(node, value) { - VarType.needNode(node); - value = VarType.toStr(value); - - if(typeof node.textContent != "undefined") { - node.textContent = value; - } - - switch(node.nodeType) { - case 1: - case 2: - case 5: - case 6: - case 11: - XHTML1.removeAllChildren(node); - if(value != "") { - node.appendChild(document.createTextNode(value)); - } - break; - case 3: - case 4: - case 7: - case 8: - node.nodeValue = value; - break; - } -}; diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/cbi.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/cbi.js deleted file mode 100644 index 77c59e5..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/cbi.js +++ /dev/null @@ -1,221 +0,0 @@ -/* - LuCI - Lua Configuration Interface - - Copyright 2008 Steven Barth - Copyright 2008 Jo-Philipp Wich - - 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 - - $Id$ -*/ - -var cbi_d = []; - -function cbi_d_add(field, dep, next) { - var obj = document.getElementById(field); - if (obj) { - var entry - for (var i=0; i"){var d="/"+a.tagName,e;while((e=a.nextSibling)&&e.tagName!=d){e.removeNode()}if(e){e.removeNode()}}a.parentNode.replaceChild(c,a);return c},initElement:function(a){a=this.q(a);a.getContext=function(){if(this.l){return this.l}return this.l=new K(this)};a.attachEvent("onpropertychange",V);a.attachEvent("onresize", -W);var b=a.attributes;if(b.width&&b.width.specified){a.style.width=b.width.nodeValue+"px"}else{a.width=a.clientWidth}if(b.height&&b.height.specified){a.style.height=b.height.nodeValue+"px"}else{a.height=a.clientHeight}return a}};function V(a){var b=a.srcElement;switch(a.propertyName){case "width":b.style.width=b.attributes.width.nodeValue+"px";b.getContext().clearRect();break;case "height":b.style.height=b.attributes.height.nodeValue+"px";b.getContext().clearRect();break}}function W(a){var b=a.srcElement; -if(b.firstChild){b.firstChild.style.width=b.clientWidth+"px";b.firstChild.style.height=b.clientHeight+"px"}}Q.init();var R=[];for(var E=0;E<16;E++){for(var F=0;F<16;F++){R[E*16+F]=E.toString(16)+F.toString(16)}}function J(){return[[1,0,0],[0,1,0],[0,0,1]]}function G(a,b){var c=J();for(var d=0;d<3;d++){for(var e=0;e<3;e++){var g=0;for(var h=0;h<3;h++){g+=a[d][h]*b[h][e]}c[d][e]=g}}return c}function N(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit= -a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.d=a.d;b.e=a.e}function O(a){var b,c=1;a=String(a);if(a.substring(0,3)=="rgb"){var d=a.indexOf("(",3),e=a.indexOf(")",d+1),g=a.substring(d+1,e).split(",");b="#";for(var h=0;h<3;h++){b+=R[Number(g[h])]}if(g.length==4&&a.substr(3,1)=="a"){c=g[3]}}else{b=a}return[b,c]}function S(a){switch(a){case "butt":return"flat";case "round":return"round"; -case "square":default:return"square"}}function K(a){this.a=J();this.m=[];this.k=[];this.c=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=m*1;this.globalAlpha=1;this.canvas=a;var b=a.ownerDocument.createElement("div");b.style.width=a.clientWidth+"px";b.style.height=a.clientHeight+"px";b.style.overflow="hidden";b.style.position="absolute";a.appendChild(b);this.j=b;this.d=1;this.e=1}var j=K.prototype;j.clearRect=function(){this.j.innerHTML= -"";this.c=[]};j.beginPath=function(){this.c=[]};j.moveTo=function(a,b){this.c.push({type:"moveTo",x:a,y:b});this.f=a;this.g=b};j.lineTo=function(a,b){this.c.push({type:"lineTo",x:a,y:b});this.f=a;this.g=b};j.bezierCurveTo=function(a,b,c,d,e,g){this.c.push({type:"bezierCurveTo",cp1x:a,cp1y:b,cp2x:c,cp2y:d,x:e,y:g});this.f=e;this.g=g};j.quadraticCurveTo=function(a,b,c,d){var e=this.f+0.6666666666666666*(a-this.f),g=this.g+0.6666666666666666*(b-this.g),h=e+(c-this.f)/3,l=g+(d-this.g)/3;this.bezierCurveTo(e, -g,h,l,c,d)};j.arc=function(a,b,c,d,e,g){c*=m;var h=g?"at":"wa",l=a+M(d)*c-A,n=b+L(d)*c-A,o=a+M(e)*c-A,f=b+L(e)*c-A;if(l==o&&!g){l+=0.125}this.c.push({type:h,x:a,y:b,radius:c,xStart:l,yStart:n,xEnd:o,yEnd:f})};j.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath()};j.strokeRect=function(a,b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.stroke()};j.fillRect=function(a, -b,c,d){this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.closePath();this.fill()};j.createLinearGradient=function(a,b,c,d){var e=new H("gradient");return e};j.createRadialGradient=function(a,b,c,d,e,g){var h=new H("gradientradial");h.n=c;h.o=g;h.i.x=a;h.i.y=b;return h};j.drawImage=function(a,b){var c,d,e,g,h,l,n,o,f=a.runtimeStyle.width,k=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var q=a.width,r=a.height;a.runtimeStyle.width= -f;a.runtimeStyle.height=k;if(arguments.length==3){c=arguments[1];d=arguments[2];h=(l=0);n=(e=q);o=(g=r)}else if(arguments.length==5){c=arguments[1];d=arguments[2];e=arguments[3];g=arguments[4];h=(l=0);n=q;o=r}else if(arguments.length==9){h=arguments[1];l=arguments[2];n=arguments[3];o=arguments[4];c=arguments[5];d=arguments[6];e=arguments[7];g=arguments[8]}else{throw"Invalid number of arguments";}var s=this.b(c,d),t=[],v=10,w=10;t.push(" ','","");this.j.insertAdjacentHTML("BeforeEnd",t.join(""))};j.stroke=function(a){var b=[],c=O(a?this.fillStyle:this.strokeStyle),d=c[0],e=c[1]*this.globalAlpha,g=10,h=10;b.push("n.x){n.x=k.x}if(l.y== -null||k.yn.y){n.y=k.y}}}b.push(' ">');if(typeof this.fillStyle=="object"){var v={x:"50%",y:"50%"},w=n.x-l.x,x=n.y-l.y,p=w>x?w:x;v.x=i(this.fillStyle.i.x/w*100+50)+"%";v.y=i(this.fillStyle.i.y/x*100+50)+"%";var y=[];if(this.fillStyle.p=="gradientradial"){var z=this.fillStyle.n/p*100,B=this.fillStyle.o/p*100-z}else{var z=0,B=100}var C={offset:null,color:null},D={offset:null,color:null};this.fillStyle.h.sort(function(T,U){return T.offset-U.offset});for(var o=0;oC.offset||C.offset==null){C.offset=u.offset;C.color=u.color}if(u.offset')}else if(a){b.push('')}else{b.push("')}b.push("");this.j.insertAdjacentHTML("beforeEnd",b.join(""));this.c=[]};j.fill=function(){this.stroke(true)};j.closePath=function(){this.c.push({type:"close"})};j.b=function(a,b){return{x:m*(a*this.a[0][0]+b*this.a[1][0]+this.a[2][0])-A,y:m*(a*this.a[0][1]+b*this.a[1][1]+this.a[2][1])-A}};j.save=function(){var a={};N(this,a); -this.k.push(a);this.m.push(this.a);this.a=G(J(),this.a)};j.restore=function(){N(this.k.pop(),this);this.a=this.m.pop()};j.translate=function(a,b){var c=[[1,0,0],[0,1,0],[a,b,1]];this.a=G(c,this.a)};j.rotate=function(a){var b=M(a),c=L(a),d=[[b,c,0],[-c,b,0],[0,0,1]];this.a=G(d,this.a)};j.scale=function(a,b){this.d*=a;this.e*=b;var c=[[a,0,0],[0,b,0],[0,0,1]];this.a=G(c,this.a)};j.clip=function(){};j.arcTo=function(){};j.createPattern=function(){return new P};function H(a){this.p=a;this.n=0;this.o= -0;this.h=[];this.i={x:0,y:0}}H.prototype.addColorStop=function(a,b){b=O(b);this.h.push({offset:1-a,color:b})};function P(){}G_vmlCanvasManager=Q;CanvasRenderingContext2D=K;CanvasGradient=H;CanvasPattern=P})()}; diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/GraphRPC.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/GraphRPC.js deleted file mode 100644 index 712d8b1..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/GraphRPC.js +++ /dev/null @@ -1,204 +0,0 @@ -function Graph(container, id, options, transform, legend) { - if( !options ) options = { }; - - this.id = id; - this.cols = 100; - this.type = "line"; - this.options = options; - this.transform = transform; - this.dataset = {}; - this.legend = legend; - this.lastvalue = {}; - - var name = (options.instanceNames && options.instanceNames[id]) - ? options.instanceNames[id] : id; - var graph = document.createElement('div'); - var label = document.createElement('h2'); - label.innerHTML = options.title - ? options.title.replace("%s", name) : name; - - container.appendChild( label ); - container.appendChild( graph ); - - this.canvas = document.createElement('canvas'); - graph.appendChild( this.canvas ); - - this.canvas.id = id; - this.canvas.width = ( options.width || graph.offsetWidth - 20 ); - this.canvas.height = ( options.height || 300 ); -} - -Graph.prototype.addDataset = function(name, ds) { - if( !this.layout ) { - this.layout = new PlotKit.Layout( this.type, this.options ); - } - - if( !ds ) { - ds = new Array(); - for( var i = 0; i < this.cols; i++ ) - ds[i] = new Array( i, 0 ); - } - - this.dataset[name] = ds; - this.layout.addDataset(name, ds); -} - -Graph.prototype.updateDataset = function(name, value) { - if( this.dataset[name] ) { - var ds = this.dataset[name]; - - for( var i = 1; i < this.cols; i++ ) - ds[i-1][1] = ds[i][1]; - - value = Math.abs( parseFloat(value) || 0 ); - - if( this.transform ) { - var orgvalue = value; - value = (this.lastvalue[name]) ? this.transform(value, this.lastvalue[name]) : 0; - this.lastvalue[name] = orgvalue; - } - - ds[this.cols-1][1] = value; - this.layout.addDataset(name, ds); - } -} - -Graph.prototype.draw = function( options ) { - if( this.layout ) { - this.plotter = new PlotKit.CanvasRenderer( - this.canvas, this.layout, this.options || options || {} - ); - - this.layout.evaluate(); - this.plotter.render(); - - legend_opt = { - "legendStyle": 'li' - }; - - legend = new LegendRenderer(this.legend, this.layout, legend_opt); - legend.render(); - } -} - -Graph.prototype.redraw = function() { - if( this.layout && this.plotter ) { - this.layout.evaluate(); - this.plotter.clear(); - this.plotter.render(); - } -} - - -function GraphRPC(container, uri, action, interval, datasources, options, transform, legend) { - this.ds = datasources; - this.uri = uri - this.action = action; - this.options = options || { }; - this.container = container; - this.transform = transform; - this.proxy = new MochiKit.JsonRpc.JsonRpcProxy(uri, [action]); - this.graphs = new Object(); - this.legend = legend; - - this.requestData(); - - if( interval ) { - var self = this; - window.setInterval(function(){self.requestData()}, interval); - } -} - -GraphRPC.prototype.requestData = function() { - var r = this.proxy[this.action](); var self = this; - r.addCallback(function(r){ self.dispatchResponse(r) }); - r.addErrback(function(e){ throw('Error: ' + e) }); -} - -GraphRPC.prototype.dispatchResponse = function(response) { - var instances; - if( this.options.instances ) { - instances = this.options.instances; - } - else { - instances = new Array(); - for( var instance in response ) { - instances[instances.length] = instance; - } - } - - for( var j = 0; j < instances.length; j++ ) { - var instance = instances[j]; - - if( this.options.separateDS ) { - for( var i = 0; i < this.ds.length; i += 2 ) { - var name = this.ds[i+1] || this.ds[i]; - var gid = instance + '-' + name; - var otle = this.options.title || instance; - - if( !this.graphs[gid] ) { - this.options.title = otle.replace('%s', instance) + ': ' + name; - this.graphs[gid] = new Graph( - this.container, gid, this.options, this.transform, this.legend - ); - - this.graphs[gid].addDataset(name); - this.graphs[gid].draw(); - this.options.title = otle; - } - else - { - var datum = null; - if (typeof (this.ds[i]) == "function") { - datum = this.ds[i]( - instance ? response[instance] : response - ); - } else { - datum = instance - ? response[instance][this.ds[i]] - : response[this.ds[i]] - } - this.graphs[gid].updateDataset( - name, datum - ); - this.graphs[gid].redraw(); - } - } - } - else { - var gid = instance || 'livegraph'; - if( !this.graphs[gid] ) { - this.graphs[gid] = new Graph( - this.container, gid, this.options, this.transform, this.legend - ); - - for( var i = 0; i < this.ds.length; i += 2 ) { - var name = this.ds[i+1] || this.ds[i]; - this.graphs[gid].addDataset(name); - } - - this.graphs[gid].draw(); - } - else { - for( var i = 0; i < this.ds.length; i += 2 ) { - var name = this.ds[i+1] || this.ds[i]; - var datum = null; - if (typeof (this.ds[i]) == "function") { - datum = this.ds[i]( - instance ? response[instance] : response - ); - } else { - datum = instance - ? response[instance][this.ds[i]] - : response[this.ds[i]] - } - this.graphs[gid].updateDataset( - name, datum - ); - } - - this.graphs[gid].redraw(); - } - } - } -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/JsonRpc.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/JsonRpc.js deleted file mode 100644 index f1723ec..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/JsonRpc.js +++ /dev/null @@ -1,220 +0,0 @@ -/* MochiKit.JsonRpc */ - -if (typeof(dojo) != 'undefined') { - dojo.provide("MochiKit.JsonRpc"); - dojo.require("MochiKit.Base"); - dojo.require("MochiKit.DOM"); - dojo.require("MochiKit.Async"); -} - -if (typeof(JSAN) != 'undefined') { - JSAN.use("MochiKit.Base", []); - JSAN.use("MochiKit.DOM", []); - JSAN.use("MochiKit.Async", []); -} - -try { - if (typeof(MochiKit.Base) == 'undefined' || - typeof(MochiKit.DOM) == 'undefined' || - typeof(MochiKit.Async) == 'undefined') { - throw ""; - } -} catch (e) { - throw "MochiKit.JsonRpc depends on MochiKit.Base, MochiKit.DOM and MochiKit.Async"; -} - -if (typeof(MochiKit.JsonRpc) == 'undefined') { - MochiKit.JsonRpc = {}; -} - -MochiKit.JsonRpc.NAME = "MochiKit.JsonRpc"; -MochiKit.JsonRpc.VERSION = "0.90"; - -MochiKit.JsonRpc.__repr__ = function () { - return "[" + this.NAME + " " + this.VERSION + "]"; -} - -MochiKit.JsonRpc.toString = function () { - return this.__repr__(); -} - -MochiKit.JsonRpc.JsonRpcError = function (message) { - this.message = message; - this.name = 'JsonRpcError'; -} - -MochiKit.JsonRpc.JsonRpcError.prototype = new Error(); -MochiKit.JsonRpc.JsonRpcError.prototype.repr = function () { - return 'JsonRpcError(' + this.message + ')'; -} - -MochiKit.JsonRpc.JsonRpcError.prototype.toString = function () { - return this.repr(); -} - -MochiKit.JsonRpc.jsonObject = function (o) { - var attrs=[]; - for(attr in o){ - if(typeof o[attr] != "function"){ - attrs.push('"' + attr + '": ' + json(o[attr])); - } - } - return "{" + attrs.join(", ") + "}"; -} - -MochiKit.JsonRpc.isObject = function (o) { - return true; -} - -MochiKit.JsonRpc.jsonArray = function (o) { - return "[" + MochiKit.Base.map(json, o).join(", ") + "]"; -} - -var MB = MochiKit.Base - -MochiKit.JsonRpc.jsonRegistry = new MochiKit.Base.AdapterRegistry(); -MochiKit.JsonRpc.jsonRegistry.register('arrayLike',MB.isArrayLike,MochiKit.JsonRpc.jsonArray); -MochiKit.JsonRpc.jsonRegistry.register("string", MB.typeMatcher("string"), MB.reprString); -MochiKit.JsonRpc.jsonRegistry.register("numbers", MB.typeMatcher("number", "boolean"), MB.reprNumber); -MochiKit.JsonRpc.jsonRegistry.register("undefined", MB.isUndefined, MB.reprUndefined); -MochiKit.JsonRpc.jsonRegistry.register("null", MB.isNull, MB.reprNull); -MochiKit.JsonRpc.jsonRegistry.register("objectLike", MochiKit.JsonRpc.isObject, MochiKit.JsonRpc.jsonObject); - -MochiKit.JsonRpc.json = function (o) { - try { - if (typeof(o.__json__) == 'function') { - return o.__json__(); - } else if (typeof(o.json) == 'function' && o.json != arguments.callee) { - return o.json(); - } - return jsonRegistry.match(o); - } catch (e) { - if (typeof(o.NAME) == 'string' && ( - o.toString == Function.prototype.toString || - o.toString == Object.prototype.toString - )) { - return o.NAME; - } - return o; - } - -} - - -MochiKit.JsonRpc.JsonRpcCall = function (method,params) { - this.method = method; - this.params = params; - this.id = '0'; -} - -MochiKit.JsonRpc.JsonRpcProxy = function (url,methNames) { - MochiKit.Base.bindMethods(this); - this.url = url; - if (methNames) { - MochiKit.Base.map(this._proxyMethod,methNames); - } -} - -update(MochiKit.JsonRpc.JsonRpcProxy.prototype, { - 'call': function () { - var arglist = MochiKit.Base.map(null,arguments) - var methname = arglist.shift() - log(arglist); - var callobj = new MochiKit.JsonRpc.JsonRpcCall(methname,arglist); - var callstr = json(callobj); - var req = MochiKit.Async.getXMLHttpRequest(); - req.open("POST",this.url,true); - req.setRequestHeader("Content-Type","text/plain"); - req.setRequestHeader("Content-Length",callstr.length); - var d = MochiKit.Async.sendXMLHttpRequest(req,callstr); - d.addCallback(MochiKit.Async.evalJSONRequest); - d.addCallback(this._extractResult); - - return d - }, - 'addSingleMethod': function (methName) { - if (methName) { - this._proxyMethod(methName); - } - }, - 'addMethods': function (methNames) { - if (methNames) { - MochiKit.Base.map(this._proxyMethod,methNames); - } - }, - '_extractResult': function (resp) { - if (!resp.error){ - return resp.result; - } else { - throw new MochiKit.JsonRpc.JsonRpcError(resp.error); - } - }, - '_proxyMethod': function (methname) { - this[methname] = MochiKit.Base.partial(this.call,methname); - } -}); - -MochiKit.JsonRpc.DomObjectFromJson = function (){ - var retval = false; - if (arguments.length == 1) { - var arg = arguments[0]; - if (typeof(arg) == 'string'){ - retval = MochiKit.DOM.SPAN(null,arg); - } else { - var objrepr = arguments[0]; - var elem = document.createElement(objrepr[0]); - var attrs = objrepr[1]; - if (attrs) { - MochiKit.DOM.updateNodeAttributes(elem, attrs); - } - if (objrepr.length >= 3){ - var extraobj = objrepr[2] - for (var i=0;i - For use under the BSD license. - -*/ - -try { - if (typeof(MochiKit.Base) == 'undefined' || - typeof(MochiKit.DOM) == 'undefined' || - typeof(MochiKit.Color) == 'undefined' || - typeof(MochiKit.Format) == 'undefined' || - typeof(PlotKit.Layout) == 'undefined' || - typeof(PlotKit.Base) == 'undefined') - { - throw ""; - } -} -catch (e) { - throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}" -} - -if (typeof(PlotKit.LegendRenderer) == 'undefined') { - PlotKit.LegendRenderer = {}; -} - -PlotKit.LegendRenderer = function(element, layout, options) { - if (arguments.length > 0) - this.__init__(element, layout, options); -}; - - -PlotKit.LegendRenderer.NAME = "PlotKit.LegendRenderer"; -PlotKit.LegendRenderer.VERSION = PlotKit.VERSION; - -PlotKit.LegendRenderer.__repr__ = function() { - return "[" + this.NAME + " " + this.VERSION + "]"; -}; - -PlotKit.LegendRenderer.toString = function() { - return this.__repr__(); -} - -PlotKit.LegendRenderer.prototype.__init__ = function(element, layout, -options) { - var isNil = MochiKit.Base.isUndefinedOrNull; - var Color = MochiKit.Color.Color; - - this.options = { - "colorScheme": PlotKit.Base.palette(PlotKit.Base.baseColors() -[0]), - "legendStyle": "table", - "tableColumns": 1 - }; - MochiKit.Base.update(this.options, options ? options : {}); - - this.layout = layout; - this.element = MochiKit.DOM.getElement(element); - // --- check whether everything is ok before we return - - if (isNil(this.element)) - throw "CRILegend() - passed legend is not found"; -}; - -PlotKit.LegendRenderer.prototype.render = function() { - var colorScheme = this.options.colorScheme; - var setNames = PlotKit.Base.keys(this.layout.datasets); - - MochiKit.DOM.updateNodeAttributes(this.element, - {"style": - {"margin":"0" - ,"padding":"0" - } - }); - - - var ul = null; - if (this.options.legendStyle == "table") - ul = this._renderListTable(colorScheme, setNames); - else - ul = this._renderList(colorScheme, setNames); - MochiKit.DOM.appendChildNodes(this.element, ul); - -}; - -PlotKit.LegendRenderer.prototype._renderList = function(colorScheme, -setNames) { - var ul = document.createElement("ul"); - ul.style.listStyle="none"; - ul.style.margin="0"; - ul.style.padding="0"; - - var colorCount = colorScheme.length; - var setCount = setNames.length; - - for (var i = 0; i < setCount; i++) { - var setName = setNames[i]; - var color = colorScheme[i%colorCount]; - var le = this._renderElement(setName, color.toRGBString()); - ul.appendChild(le); - } - - return ul; -}; - -PlotKit.LegendRenderer.prototype._renderElement = function(title, -color) { - var le = MochiKit.DOM.createDOM("li"); - le.style.listStyle="none"; - le.style.margin="0 0 5px 0"; - le.style.padding="0"; - - var box = MochiKit.DOM.createDOM("div"); - box.style.backgroundColor=color; - box.style.width="2em"; - box.style.height=".9em"; - box.style.border="1px solid black"; - box.style.margin="0 5px 0 0"; - box.style.padding="0"; - box.style.float="left"; - box.style.cssFloat="left"; - box.style.clear="left"; - box.style.cssClear="left"; - - var span = MochiKit.DOM.createDOM("span"); - MochiKit.DOM.appendChildNodes(span, -document.createTextNode(title)); - - MochiKit.DOM.appendChildNodes(le, box, span); - - return le; -}; - -PlotKit.LegendRenderer.prototype._renderListTable = -function(colorScheme, setNames) { - var tabhead = THEAD(null); - var tabfoot = TFOOT(null); - - var tabbody = partial(TBODY, null); - var i = 0; - var colorcount = colorScheme.length; - var tabrow; - var columns = this.options.tableColumns; - for (var label in setNames) - { - var legendcolor = colorScheme[i%colorcount]; - var legendbox = DIV({'class': 'legendbox', 'className': -'legendbox'}); - legendbox.style.width = "10px"; - legendbox.style.height = "10px"; - legendbox.style.backgroundColor = legendcolor.toHexString(); - legendbox.style.borderWidth = "1px"; - legendbox.style.borderStyle = "solid"; - legendbox.style.borderColor = "#000000"; - var boxcell = TD(null, legendbox); - - var labelcell = TD({'class': 'legendlabel', 'className': -'legendlabel'}, setNames[i]); - labelcell.style.font = 'normal 10pt arial'; - - if (!(i % columns)) - { - tabrow = partial(TR, null); - } - tabrow = partial(tabrow, boxcell, labelcell); - if (i % columns) - { - tabrow = tabrow(null); - tabbody = partial(tabbody, tabrow); - } - i++; - } - if ((setNames % columns)) - { - tabrow = tabrow(TD(null), TD(null)); - tabbody = partial(tabbody, tabrow); - } - tabbody = tabbody(null); - - tab = TABLE({'class': 'legendcontainer', 'className': -'legendcontainer'}, tabhead, tabfoot, tabbody); - tab.style.marginTop = '1em'; - tab.style.marginLeft = '1.5em'; - tab.style.marginBottom = '1em'; - tab.style.borderWidth = '1px'; - tab.style.borderStyle = 'solid'; - tab.style.borderColor = '#000000'; - - return tab; -}; - -// Namespace Iniitialisation - -PlotKit.Legend = {} -PlotKit.Legend.LegendRenderer = PlotKit.LegendRenderer; - - -PlotKit.Legend.EXPORT = [ - "LegendRenderer" -]; - -PlotKit.Legend.EXPORT_OK = [ - "LegendRenderer" -]; - -PlotKit.Legend.__new__ = function() { - var m = MochiKit.Base; - - m.nameFunctions(this); - - this.EXPORT_TAGS = { - ":common": this.EXPORT, - ":all": m.concat(this.EXPORT, this.EXPORT_OK) - }; -}; - -PlotKit.Legend.__new__(); -MochiKit.Base._exportSymbols(this, PlotKit.Legend); \ No newline at end of file diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/MochiKit.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/MochiKit.js deleted file mode 100644 index c023c1e..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/MochiKit.js +++ /dev/null @@ -1,4800 +0,0 @@ -/*** - - MochiKit.MochiKit 1.3.1 : PACKED VERSION - - THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please - diff against the source tree, not this file. - - See for documentation, downloads, license, etc. - - (c) 2005 Bob Ippolito. All rights Reserved. - -***/ - -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.Base"); -} -if(typeof (MochiKit)=="undefined"){ -MochiKit={}; -} -if(typeof (MochiKit.Base)=="undefined"){ -MochiKit.Base={}; -} -MochiKit.Base.VERSION="1.3.1"; -MochiKit.Base.NAME="MochiKit.Base"; -MochiKit.Base.update=function(_1,_2){ -if(_1===null){ -_1={}; -} -for(var i=1;i=0;i--){ -_12.unshift(o[i]); -} -}else{ -res.push(o); -} -} -return res; -},extend:function(_13,obj,_15){ -if(!_15){ -_15=0; -} -if(obj){ -var l=obj.length; -if(typeof (l)!="number"){ -if(typeof (MochiKit.Iter)!="undefined"){ -obj=MochiKit.Iter.list(obj); -l=obj.length; -}else{ -throw new TypeError("Argument not an array-like and MochiKit.Iter not present"); -} -} -if(!_13){ -_13=[]; -} -for(var i=_15;i>b; -},zrshift:function(a,b){ -return a>>>b; -},eq:function(a,b){ -return a==b; -},ne:function(a,b){ -return a!=b; -},gt:function(a,b){ -return a>b; -},ge:function(a,b){ -return a>=b; -},lt:function(a,b){ -return al){ -_41=l; -} -} -_40=[]; -for(i=0;i<_41;i++){ -var _42=[]; -for(var j=1;j0){ -_57=m.concat(me.im_preargs,_57); -} -var _52=me.im_self; -if(!_52){ -_52=this; -} -return me.im_func.apply(_52,_57); -}; -_56.im_self=_55; -_56.im_func=_53; -_56.im_preargs=_54; -return _56; -},bindMethods:function(_58){ -var _59=MochiKit.Base.bind; -for(var k in _58){ -var _60=_58[k]; -if(typeof (_60)=="function"){ -_58[k]=_59(_60,_58); -} -} -},registerComparator:function(_61,_62,_63,_64){ -MochiKit.Base.comparatorRegistry.register(_61,_62,_63,_64); -},_primitives:{"boolean":true,"string":true,"number":true},compare:function(a,b){ -if(a==b){ -return 0; -} -var _65=(typeof (a)=="undefined"||a===null); -var _66=(typeof (b)=="undefined"||b===null); -if(_65&&_66){ -return 0; -}else{ -if(_65){ -return -1; -}else{ -if(_66){ -return 1; -} -} -} -var m=MochiKit.Base; -var _67=m._primitives; -if(!(typeof (a) in _67&&typeof (b) in _67)){ -try{ -return m.comparatorRegistry.match(a,b); -} -catch(e){ -if(e!=m.NotFound){ -throw e; -} -} -} -if(ab){ -return 1; -} -} -var _68=m.repr; -throw new TypeError(_68(a)+" and "+_68(b)+" can not be compared"); -},compareDateLike:function(a,b){ -return MochiKit.Base.compare(a.getTime(),b.getTime()); -},compareArrayLike:function(a,b){ -var _69=MochiKit.Base.compare; -var _70=a.length; -var _71=0; -if(_70>b.length){ -_71=1; -_70=b.length; -}else{ -if(_700))){ -var kv=MochiKit.DOM.formContents(_113); -_113=kv[0]; -_114=kv[1]; -}else{ -if(arguments.length==1){ -var o=_113; -_113=[]; -_114=[]; -for(var k in o){ -var v=o[k]; -if(typeof (v)!="function"){ -_113.push(k); -_114.push(v); -} -} -} -} -var rval=[]; -var len=Math.min(_113.length,_114.length); -var _118=MochiKit.Base.urlEncode; -for(var i=0;i=stop){ -throw self.StopIteration; -} -_147+=step; -return rval; -}}; -},imap:function(fun,p,q){ -var m=MochiKit.Base; -var self=MochiKit.Iter; -var _151=m.map(self.iter,m.extend(null,arguments,1)); -var map=m.map; -var next=self.next; -return {repr:function(){ -return "imap(...)"; -},toString:m.forwardCall("repr"),next:function(){ -return fun.apply(this,map(next,_151)); -}}; -},applymap:function(fun,seq,self){ -seq=MochiKit.Iter.iter(seq); -var m=MochiKit.Base; -return {repr:function(){ -return "applymap(...)"; -},toString:m.forwardCall("repr"),next:function(){ -return fun.apply(self,seq.next()); -}}; -},chain:function(p,q){ -var self=MochiKit.Iter; -var m=MochiKit.Base; -if(arguments.length==1){ -return self.iter(arguments[0]); -} -var _153=m.map(self.iter,arguments); -return {repr:function(){ -return "chain(...)"; -},toString:m.forwardCall("repr"),next:function(){ -while(_153.length>1){ -try{ -return _153[0].next(); -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -_153.shift(); -} -} -if(_153.length==1){ -var arg=_153.shift(); -this.next=m.bind("next",arg); -return this.next(); -} -throw self.StopIteration; -}}; -},takewhile:function(pred,seq){ -var self=MochiKit.Iter; -seq=self.iter(seq); -return {repr:function(){ -return "takewhile(...)"; -},toString:MochiKit.Base.forwardCall("repr"),next:function(){ -var rval=seq.next(); -if(!pred(rval)){ -this.next=function(){ -throw self.StopIteration; -}; -this.next(); -} -return rval; -}}; -},dropwhile:function(pred,seq){ -seq=MochiKit.Iter.iter(seq); -var m=MochiKit.Base; -var bind=m.bind; -return {"repr":function(){ -return "dropwhile(...)"; -},"toString":m.forwardCall("repr"),"next":function(){ -while(true){ -var rval=seq.next(); -if(!pred(rval)){ -break; -} -} -this.next=bind("next",seq); -return rval; -}}; -},_tee:function(_155,sync,_157){ -sync.pos[_155]=-1; -var m=MochiKit.Base; -var _158=m.listMin; -return {repr:function(){ -return "tee("+_155+", ...)"; -},toString:m.forwardCall("repr"),next:function(){ -var rval; -var i=sync.pos[_155]; -if(i==sync.max){ -rval=_157.next(); -sync.deque.push(rval); -sync.max+=1; -sync.pos[_155]+=1; -}else{ -rval=sync.deque[i-sync.min]; -sync.pos[_155]+=1; -if(i==sync.min&&_158(sync.pos)!=sync.min){ -sync.min+=1; -sync.deque.shift(); -} -} -return rval; -}}; -},tee:function(_159,n){ -var rval=[]; -var sync={"pos":[],"deque":[],"max":-1,"min":-1}; -if(arguments.length==1){ -n=2; -} -var self=MochiKit.Iter; -_159=self.iter(_159); -var _tee=self._tee; -for(var i=0;i0&&_165>=stop)||(step<0&&_165<=stop)){ -throw MochiKit.Iter.StopIteration; -} -var rval=_165; -_165+=step; -return rval; -},repr:function(){ -return "range("+[_165,stop,step].join(", ")+")"; -},toString:MochiKit.Base.forwardCall("repr")}; -},sum:function(_166,_167){ -var x=_167||0; -var self=MochiKit.Iter; -_166=self.iter(_166); -try{ -while(true){ -x+=_166.next(); -} -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -} -return x; -},exhaust:function(_168){ -var self=MochiKit.Iter; -_168=self.iter(_168); -try{ -while(true){ -_168.next(); -} -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -} -},forEach:function(_169,func,self){ -var m=MochiKit.Base; -if(arguments.length>2){ -func=m.bind(func,self); -} -if(m.isArrayLike(_169)){ -try{ -for(var i=0;i<_169.length;i++){ -func(_169[i]); -} -} -catch(e){ -if(e!=MochiKit.Iter.StopIteration){ -throw e; -} -} -}else{ -self=MochiKit.Iter; -self.exhaust(self.imap(func,_169)); -} -},every:function(_171,func){ -var self=MochiKit.Iter; -try{ -self.ifilterfalse(func,_171).next(); -return false; -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -return true; -} -},sorted:function(_172,cmp){ -var rval=MochiKit.Iter.list(_172); -if(arguments.length==1){ -cmp=MochiKit.Base.compare; -} -rval.sort(cmp); -return rval; -},reversed:function(_173){ -var rval=MochiKit.Iter.list(_173); -rval.reverse(); -return rval; -},some:function(_174,func){ -var self=MochiKit.Iter; -try{ -self.ifilter(func,_174).next(); -return true; -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -return false; -} -},iextend:function(lst,_175){ -if(MochiKit.Base.isArrayLike(_175)){ -for(var i=0;i<_175.length;i++){ -lst.push(_175[i]); -} -}else{ -var self=MochiKit.Iter; -_175=self.iter(_175); -try{ -while(true){ -lst.push(_175.next()); -} -} -catch(e){ -if(e!=self.StopIteration){ -throw e; -} -} -} -return lst; -},groupby:function(_176,_177){ -var m=MochiKit.Base; -var self=MochiKit.Iter; -if(arguments.length<2){ -_177=m.operator.identity; -} -_176=self.iter(_176); -var pk=undefined; -var k=undefined; -var v; -function fetch(){ -v=_176.next(); -k=_177(v); -} -function eat(){ -var ret=v; -v=undefined; -return ret; -} -var _180=true; -return {repr:function(){ -return "groupby(...)"; -},next:function(){ -while(k==pk){ -fetch(); -if(_180){ -_180=false; -break; -} -} -pk=k; -return [k,{next:function(){ -if(v==undefined){ -fetch(); -} -if(k!=pk){ -throw self.StopIteration; -} -return eat(); -}}]; -}}; -},groupby_as_array:function(_181,_182){ -var m=MochiKit.Base; -var self=MochiKit.Iter; -if(arguments.length<2){ -_182=m.operator.identity; -} -_181=self.iter(_181); -var _183=[]; -var _184=true; -var _185; -while(true){ -try{ -var _186=_181.next(); -var key=_182(_186); -} -catch(e){ -if(e==self.StopIteration){ -break; -} -throw e; -} -if(_184||key!=_185){ -var _187=[]; -_183.push([key,_187]); -} -_187.push(_186); -_184=false; -_185=key; -} -return _183; -},arrayLikeIter:function(_188){ -var i=0; -return {repr:function(){ -return "arrayLikeIter(...)"; -},toString:MochiKit.Base.forwardCall("repr"),next:function(){ -if(i>=_188.length){ -throw MochiKit.Iter.StopIteration; -} -return _188[i++]; -}}; -},hasIterateNext:function(_189){ -return (_189&&typeof (_189.iterateNext)=="function"); -},iterateNextIter:function(_190){ -return {repr:function(){ -return "iterateNextIter(...)"; -},toString:MochiKit.Base.forwardCall("repr"),next:function(){ -var rval=_190.iterateNext(); -if(rval===null||rval===undefined){ -throw MochiKit.Iter.StopIteration; -} -return rval; -}}; -}}); -MochiKit.Iter.EXPORT_OK=["iteratorRegistry","arrayLikeIter","hasIterateNext","iterateNextIter",]; -MochiKit.Iter.EXPORT=["StopIteration","registerIteratorFactory","iter","count","cycle","repeat","next","izip","ifilter","ifilterfalse","islice","imap","applymap","chain","takewhile","dropwhile","tee","list","reduce","range","sum","exhaust","forEach","every","sorted","reversed","some","iextend","groupby","groupby_as_array"]; -MochiKit.Iter.__new__=function(){ -var m=MochiKit.Base; -this.StopIteration=new m.NamedError("StopIteration"); -this.iteratorRegistry=new m.AdapterRegistry(); -this.registerIteratorFactory("arrayLike",m.isArrayLike,this.arrayLikeIter); -this.registerIteratorFactory("iterateNext",this.hasIterateNext,this.iterateNextIter); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -m.nameFunctions(this); -}; -MochiKit.Iter.__new__(); -if(!MochiKit.__compat__){ -reduce=MochiKit.Iter.reduce; -} -MochiKit.Base._exportSymbols(this,MochiKit.Iter); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.Logging"); -dojo.require("MochiKit.Base"); -} -if(typeof (JSAN)!="undefined"){ -JSAN.use("MochiKit.Base",[]); -} -try{ -if(typeof (MochiKit.Base)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "MochiKit.Logging depends on MochiKit.Base!"; -} -if(typeof (MochiKit.Logging)=="undefined"){ -MochiKit.Logging={}; -} -MochiKit.Logging.NAME="MochiKit.Logging"; -MochiKit.Logging.VERSION="1.3.1"; -MochiKit.Logging.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.Logging.toString=function(){ -return this.__repr__(); -}; -MochiKit.Logging.EXPORT=["LogLevel","LogMessage","Logger","alertListener","logger","log","logError","logDebug","logFatal","logWarning"]; -MochiKit.Logging.EXPORT_OK=["logLevelAtLeast","isLogMessage","compareLogMessage"]; -MochiKit.Logging.LogMessage=function(num,_192,info){ -this.num=num; -this.level=_192; -this.info=info; -this.timestamp=new Date(); -}; -MochiKit.Logging.LogMessage.prototype={repr:function(){ -var m=MochiKit.Base; -return "LogMessage("+m.map(m.repr,[this.num,this.level,this.info]).join(", ")+")"; -},toString:MochiKit.Base.forwardCall("repr")}; -MochiKit.Base.update(MochiKit.Logging,{logLevelAtLeast:function(_194){ -var self=MochiKit.Logging; -if(typeof (_194)=="string"){ -_194=self.LogLevel[_194]; -} -return function(msg){ -var _196=msg.level; -if(typeof (_196)=="string"){ -_196=self.LogLevel[_196]; -} -return _196>=_194; -}; -},isLogMessage:function(){ -var _197=MochiKit.Logging.LogMessage; -for(var i=0;i=0&&this._messages.length>this.maxSize){ -this._messages.shift(); -} -},getMessages:function(_206){ -var _207=0; -if(!(typeof (_206)=="undefined"||_206===null)){ -_207=Math.max(0,this._messages.length-_206); -} -return this._messages.slice(_207); -},getMessageText:function(_208){ -if(typeof (_208)=="undefined"||_208===null){ -_208=30; -} -var _209=this.getMessages(_208); -if(_209.length){ -var lst=map(function(m){ -return "\n ["+m.num+"] "+m.level+": "+m.info.join(" "); -},_209); -lst.unshift("LAST "+_209.length+" MESSAGES:"); -return lst.join(""); -} -return ""; -},debuggingBookmarklet:function(_210){ -if(typeof (MochiKit.LoggingPane)=="undefined"){ -alert(this.getMessageText()); -}else{ -MochiKit.LoggingPane.createLoggingPane(_210||false); -} -}}; -MochiKit.Logging.__new__=function(){ -this.LogLevel={ERROR:40,FATAL:50,WARNING:30,INFO:20,DEBUG:10}; -var m=MochiKit.Base; -m.registerComparator("LogMessage",this.isLogMessage,this.compareLogMessage); -var _211=m.partial; -var _212=this.Logger; -var _213=_212.prototype.baseLog; -m.update(this.Logger.prototype,{debug:_211(_213,"DEBUG"),log:_211(_213,"INFO"),error:_211(_213,"ERROR"),fatal:_211(_213,"FATAL"),warning:_211(_213,"WARNING")}); -var self=this; -var _214=function(name){ -return function(){ -self.logger[name].apply(self.logger,arguments); -}; -}; -this.log=_214("log"); -this.logError=_214("error"); -this.logDebug=_214("debug"); -this.logFatal=_214("fatal"); -this.logWarning=_214("warning"); -this.logger=new _212(); -this.logger.useNativeConsole=true; -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -m.nameFunctions(this); -}; -if(typeof (printfire)=="undefined"&&typeof (document)!="undefined"&&document.createEvent&&typeof (dispatchEvent)!="undefined"){ -printfire=function(){ -printfire.args=arguments; -var ev=document.createEvent("Events"); -ev.initEvent("printfire",false,true); -dispatchEvent(ev); -}; -} -MochiKit.Logging.__new__(); -MochiKit.Base._exportSymbols(this,MochiKit.Logging); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.DateTime"); -} -if(typeof (MochiKit)=="undefined"){ -MochiKit={}; -} -if(typeof (MochiKit.DateTime)=="undefined"){ -MochiKit.DateTime={}; -} -MochiKit.DateTime.NAME="MochiKit.DateTime"; -MochiKit.DateTime.VERSION="1.3.1"; -MochiKit.DateTime.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.DateTime.toString=function(){ -return this.__repr__(); -}; -MochiKit.DateTime.isoDate=function(str){ -str=str+""; -if(typeof (str)!="string"||str.length===0){ -return null; -} -var iso=str.split("-"); -if(iso.length===0){ -return null; -} -return new Date(iso[0],iso[1]-1,iso[2]); -}; -MochiKit.DateTime._isoRegexp=/(\d{4,})(?:-(\d{1,2})(?:-(\d{1,2})(?:[T ](\d{1,2}):(\d{1,2})(?::(\d{1,2})(?:\.(\d+))?)?(?:(Z)|([+-])(\d{1,2})(?::(\d{1,2}))?)?)?)?)?/; -MochiKit.DateTime.isoTimestamp=function(str){ -str=str+""; -if(typeof (str)!="string"||str.length===0){ -return null; -} -var res=str.match(MochiKit.DateTime._isoRegexp); -if(typeof (res)=="undefined"||res===null){ -return null; -} -var year,month,day,hour,min,sec,msec; -year=parseInt(res[1],10); -if(typeof (res[2])=="undefined"||res[2]===""){ -return new Date(year); -} -month=parseInt(res[2],10)-1; -day=parseInt(res[3],10); -if(typeof (res[4])=="undefined"||res[4]===""){ -return new Date(year,month,day); -} -hour=parseInt(res[4],10); -min=parseInt(res[5],10); -sec=(typeof (res[6])!="undefined"&&res[6]!=="")?parseInt(res[6],10):0; -if(typeof (res[7])!="undefined"&&res[7]!==""){ -msec=Math.round(1000*parseFloat("0."+res[7])); -}else{ -msec=0; -} -if((typeof (res[8])=="undefined"||res[8]==="")&&(typeof (res[9])=="undefined"||res[9]==="")){ -return new Date(year,month,day,hour,min,sec,msec); -} -var ofs; -if(typeof (res[9])!="undefined"&&res[9]!==""){ -ofs=parseInt(res[10],10)*3600000; -if(typeof (res[11])!="undefined"&&res[11]!==""){ -ofs+=parseInt(res[11],10)*60000; -} -if(res[9]=="-"){ -ofs=-ofs; -} -}else{ -ofs=0; -} -return new Date(Date.UTC(year,month,day,hour,min,sec,msec)-ofs); -}; -MochiKit.DateTime.toISOTime=function(date,_221){ -if(typeof (date)=="undefined"||date===null){ -return null; -} -var hh=date.getHours(); -var mm=date.getMinutes(); -var ss=date.getSeconds(); -var lst=[((_221&&(hh<10))?"0"+hh:hh),((mm<10)?"0"+mm:mm),((ss<10)?"0"+ss:ss)]; -return lst.join(":"); -}; -MochiKit.DateTime.toISOTimestamp=function(date,_225){ -if(typeof (date)=="undefined"||date===null){ -return null; -} -var sep=_225?"T":" "; -var foot=_225?"Z":""; -if(_225){ -date=new Date(date.getTime()+(date.getTimezoneOffset()*60000)); -} -return MochiKit.DateTime.toISODate(date)+sep+MochiKit.DateTime.toISOTime(date,_225)+foot; -}; -MochiKit.DateTime.toISODate=function(date){ -if(typeof (date)=="undefined"||date===null){ -return null; -} -var _228=MochiKit.DateTime._padTwo; -return [date.getFullYear(),_228(date.getMonth()+1),_228(date.getDate())].join("-"); -}; -MochiKit.DateTime.americanDate=function(d){ -d=d+""; -if(typeof (d)!="string"||d.length===0){ -return null; -} -var a=d.split("/"); -return new Date(a[2],a[0]-1,a[1]); -}; -MochiKit.DateTime._padTwo=function(n){ -return (n>9)?n:"0"+n; -}; -MochiKit.DateTime.toPaddedAmericanDate=function(d){ -if(typeof (d)=="undefined"||d===null){ -return null; -} -var _230=MochiKit.DateTime._padTwo; -return [_230(d.getMonth()+1),_230(d.getDate()),d.getFullYear()].join("/"); -}; -MochiKit.DateTime.toAmericanDate=function(d){ -if(typeof (d)=="undefined"||d===null){ -return null; -} -return [d.getMonth()+1,d.getDate(),d.getFullYear()].join("/"); -}; -MochiKit.DateTime.EXPORT=["isoDate","isoTimestamp","toISOTime","toISOTimestamp","toISODate","americanDate","toPaddedAmericanDate","toAmericanDate"]; -MochiKit.DateTime.EXPORT_OK=[]; -MochiKit.DateTime.EXPORT_TAGS={":common":MochiKit.DateTime.EXPORT,":all":MochiKit.DateTime.EXPORT}; -MochiKit.DateTime.__new__=function(){ -var base=this.NAME+"."; -for(var k in this){ -var o=this[k]; -if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){ -try{ -o.NAME=base+k; -} -catch(e){ -} -} -} -}; -MochiKit.DateTime.__new__(); -if(typeof (MochiKit.Base)!="undefined"){ -MochiKit.Base._exportSymbols(this,MochiKit.DateTime); -}else{ -(function(_231,_232){ -if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){ -var all=_232.EXPORT_TAGS[":all"]; -for(var i=0;i_240){ -var i=_246.length-_240; -res=fmt.separator+_246.substring(i,_246.length)+res; -_246=_246.substring(0,i); -} -} -res=_246+res; -if(_238>0){ -while(frac.length<_241){ -frac=frac+"0"; -} -res=res+fmt.decimal+frac; -} -return _242+res+_243; -}; -}; -MochiKit.Format.numberFormatter=function(_248,_249,_250){ -if(typeof (_249)=="undefined"){ -_249=""; -} -var _251=_248.match(/((?:[0#]+,)?[0#]+)(?:\.([0#]+))?(%)?/); -if(!_251){ -throw TypeError("Invalid pattern"); -} -var _252=_248.substr(0,_251.index); -var _253=_248.substr(_251.index+_251[0].length); -if(_252.search(/-/)==-1){ -_252=_252+"-"; -} -var _254=_251[1]; -var frac=(typeof (_251[2])=="string"&&_251[2]!="")?_251[2]:""; -var _255=(typeof (_251[3])=="string"&&_251[3]!=""); -var tmp=_254.split(/,/); -var _257; -if(typeof (_250)=="undefined"){ -_250="default"; -} -if(tmp.length==1){ -_257=null; -}else{ -_257=tmp[1].length; -} -var _258=_254.length-_254.replace(/0/g,"").length; -var _259=frac.length-frac.replace(/0/g,"").length; -var _260=frac.length; -var rval=MochiKit.Format._numberFormatter(_249,_252,_253,_250,_255,_260,_258,_257,_259); -var m=MochiKit.Base; -if(m){ -var fn=arguments.callee; -var args=m.concat(arguments); -rval.repr=function(){ -return [self.NAME,"(",map(m.repr,args).join(", "),")"].join(""); -}; -} -return rval; -}; -MochiKit.Format.formatLocale=function(_262){ -if(typeof (_262)=="undefined"||_262===null){ -_262="default"; -} -if(typeof (_262)=="string"){ -var rval=MochiKit.Format.LOCALE[_262]; -if(typeof (rval)=="string"){ -rval=arguments.callee(rval); -MochiKit.Format.LOCALE[_262]=rval; -} -return rval; -}else{ -return _262; -} -}; -MochiKit.Format.twoDigitAverage=function(_263,_264){ -if(_264){ -var res=_263/_264; -if(!isNaN(res)){ -return MochiKit.Format.twoDigitFloat(_263/_264); -} -} -return "0"; -}; -MochiKit.Format.twoDigitFloat=function(_265){ -var sign=(_265<0?"-":""); -var s=Math.floor(Math.abs(_265)*100).toString(); -if(s=="0"){ -return s; -} -if(s.length<3){ -while(s.charAt(s.length-1)=="0"){ -s=s.substring(0,s.length-1); -} -return sign+"0."+s; -} -var head=sign+s.substring(0,s.length-2); -var tail=s.substring(s.length-2,s.length); -if(tail=="00"){ -return head; -}else{ -if(tail.charAt(1)=="0"){ -return head+"."+tail.charAt(0); -}else{ -return head+"."+tail; -} -} -}; -MochiKit.Format.lstrip=function(str,_270){ -str=str+""; -if(typeof (str)!="string"){ -return null; -} -if(!_270){ -return str.replace(/^\s+/,""); -}else{ -return str.replace(new RegExp("^["+_270+"]+"),""); -} -}; -MochiKit.Format.rstrip=function(str,_271){ -str=str+""; -if(typeof (str)!="string"){ -return null; -} -if(!_271){ -return str.replace(/\s+$/,""); -}else{ -return str.replace(new RegExp("["+_271+"]+$"),""); -} -}; -MochiKit.Format.strip=function(str,_272){ -var self=MochiKit.Format; -return self.rstrip(self.lstrip(str,_272),_272); -}; -MochiKit.Format.truncToFixed=function(_273,_274){ -_273=Math.floor(_273*Math.pow(10,_274)); -var res=(_273*Math.pow(10,-_274)).toFixed(_274); -if(res.charAt(0)=="."){ -res="0"+res; -} -return res; -}; -MochiKit.Format.roundToFixed=function(_275,_276){ -return MochiKit.Format.truncToFixed(_275+0.5*Math.pow(10,-_276),_276); -}; -MochiKit.Format.percentFormat=function(_277){ -return MochiKit.Format.twoDigitFloat(100*_277)+"%"; -}; -MochiKit.Format.EXPORT=["truncToFixed","roundToFixed","numberFormatter","formatLocale","twoDigitAverage","twoDigitFloat","percentFormat","lstrip","rstrip","strip"]; -MochiKit.Format.LOCALE={en_US:{separator:",",decimal:".",percent:"%"},de_DE:{separator:".",decimal:",",percent:"%"},fr_FR:{separator:" ",decimal:",",percent:"%"},"default":"en_US"}; -MochiKit.Format.EXPORT_OK=[]; -MochiKit.Format.EXPORT_TAGS={":all":MochiKit.Format.EXPORT,":common":MochiKit.Format.EXPORT}; -MochiKit.Format.__new__=function(){ -var base=this.NAME+"."; -var k,v,o; -for(k in this.LOCALE){ -o=this.LOCALE[k]; -if(typeof (o)=="object"){ -o.repr=function(){ -return this.NAME; -}; -o.NAME=base+"LOCALE."+k; -} -} -for(k in this){ -o=this[k]; -if(typeof (o)=="function"&&typeof (o.NAME)=="undefined"){ -try{ -o.NAME=base+k; -} -catch(e){ -} -} -} -}; -MochiKit.Format.__new__(); -if(typeof (MochiKit.Base)!="undefined"){ -MochiKit.Base._exportSymbols(this,MochiKit.Format); -}else{ -(function(_278,_279){ -if((typeof (JSAN)=="undefined"&&typeof (dojo)=="undefined")||(typeof (MochiKit.__compat__)=="boolean"&&MochiKit.__compat__)){ -var all=_279.EXPORT_TAGS[":all"]; -for(var i=0;i=0)){ -this._fire(); -} -},_continue:function(res){ -this._resback(res); -this._unpause(); -},_resback:function(res){ -this.fired=((res instanceof Error)?1:0); -this.results[this.fired]=res; -this._fire(); -},_check:function(){ -if(this.fired!=-1){ -if(!this.silentlyCancelled){ -throw new MochiKit.Async.AlreadyCalledError(this); -} -this.silentlyCancelled=false; -return; -} -},callback:function(res){ -this._check(); -if(res instanceof MochiKit.Async.Deferred){ -throw new Error("Deferred instances can only be chained if they are the result of a callback"); -} -this._resback(res); -},errback:function(res){ -this._check(); -var self=MochiKit.Async; -if(res instanceof self.Deferred){ -throw new Error("Deferred instances can only be chained if they are the result of a callback"); -} -if(!(res instanceof Error)){ -res=new self.GenericError(res); -} -this._resback(res); -},addBoth:function(fn){ -if(arguments.length>1){ -fn=MochiKit.Base.partial.apply(null,arguments); -} -return this.addCallbacks(fn,fn); -},addCallback:function(fn){ -if(arguments.length>1){ -fn=MochiKit.Base.partial.apply(null,arguments); -} -return this.addCallbacks(fn,null); -},addErrback:function(fn){ -if(arguments.length>1){ -fn=MochiKit.Base.partial.apply(null,arguments); -} -return this.addCallbacks(null,fn); -},addCallbacks:function(cb,eb){ -if(this.chained){ -throw new Error("Chained Deferreds can not be re-used"); -} -this.chain.push([cb,eb]); -if(this.fired>=0){ -this._fire(); -} -return this; -},_fire:function(){ -var _284=this.chain; -var _285=this.fired; -var res=this.results[_285]; -var self=this; -var cb=null; -while(_284.length>0&&this.paused===0){ -var pair=_284.shift(); -var f=pair[_285]; -if(f===null){ -continue; -} -try{ -res=f(res); -_285=((res instanceof Error)?1:0); -if(res instanceof MochiKit.Async.Deferred){ -cb=function(res){ -self._continue(res); -}; -this._pause(); -} -} -catch(err){ -_285=1; -if(!(err instanceof Error)){ -err=new MochiKit.Async.GenericError(err); -} -res=err; -} -} -this.fired=_285; -this.results[_285]=res; -if(cb&&this.paused){ -res.addBoth(cb); -res.chained=true; -} -}}; -MochiKit.Base.update(MochiKit.Async,{evalJSONRequest:function(){ -return eval("("+arguments[0].responseText+")"); -},succeed:function(_287){ -var d=new MochiKit.Async.Deferred(); -d.callback.apply(d,arguments); -return d; -},fail:function(_288){ -var d=new MochiKit.Async.Deferred(); -d.errback.apply(d,arguments); -return d; -},getXMLHttpRequest:function(){ -var self=arguments.callee; -if(!self.XMLHttpRequest){ -var _289=[function(){ -return new XMLHttpRequest(); -},function(){ -return new ActiveXObject("Msxml2.XMLHTTP"); -},function(){ -return new ActiveXObject("Microsoft.XMLHTTP"); -},function(){ -return new ActiveXObject("Msxml2.XMLHTTP.4.0"); -},function(){ -throw new MochiKit.Async.BrowserComplianceError("Browser does not support XMLHttpRequest"); -}]; -for(var i=0;i<_289.length;i++){ -var func=_289[i]; -try{ -self.XMLHttpRequest=func; -return func(); -} -catch(e){ -} -} -} -return self.XMLHttpRequest(); -},_nothing:function(){ -},_xhr_onreadystatechange:function(d){ -if(this.readyState==4){ -try{ -this.onreadystatechange=null; -} -catch(e){ -try{ -this.onreadystatechange=MochiKit.Async._nothing; -} -catch(e){ -} -} -var _290=null; -try{ -_290=this.status; -if(!_290&&MochiKit.Base.isNotEmpty(this.responseText)){ -_290=304; -} -} -catch(e){ -} -if(_290==200||_290==304){ -d.callback(this); -}else{ -var err=new MochiKit.Async.XMLHttpRequestError(this,"Request failed"); -if(err.number){ -d.errback(err); -}else{ -d.errback(err); -} -} -} -},_xhr_canceller:function(req){ -try{ -req.onreadystatechange=null; -} -catch(e){ -try{ -req.onreadystatechange=MochiKit.Async._nothing; -} -catch(e){ -} -} -req.abort(); -},sendXMLHttpRequest:function(req,_293){ -if(typeof (_293)=="undefined"||_293===null){ -_293=""; -} -var m=MochiKit.Base; -var self=MochiKit.Async; -var d=new self.Deferred(m.partial(self._xhr_canceller,req)); -try{ -req.onreadystatechange=m.bind(self._xhr_onreadystatechange,req,d); -req.send(_293); -} -catch(e){ -try{ -req.onreadystatechange=null; -} -catch(ignore){ -} -d.errback(e); -} -return d; -},doSimpleXMLHttpRequest:function(url){ -var self=MochiKit.Async; -var req=self.getXMLHttpRequest(); -if(arguments.length>1){ -var m=MochiKit.Base; -var qs=m.queryString.apply(null,m.extend(null,arguments,1)); -if(qs){ -url+="?"+qs; -} -} -req.open("GET",url,true); -return self.sendXMLHttpRequest(req); -},loadJSONDoc:function(url){ -var self=MochiKit.Async; -var d=self.doSimpleXMLHttpRequest.apply(self,arguments); -d=d.addCallback(self.evalJSONRequest); -return d; -},wait:function(_296,_297){ -var d=new MochiKit.Async.Deferred(); -var m=MochiKit.Base; -if(typeof (_297)!="undefined"){ -d.addCallback(function(){ -return _297; -}); -} -var _298=setTimeout(m.bind("callback",d),Math.floor(_296*1000)); -d.canceller=function(){ -try{ -clearTimeout(_298); -} -catch(e){ -} -}; -return d; -},callLater:function(_299,func){ -var m=MochiKit.Base; -var _300=m.partial.apply(m,m.extend(null,arguments,1)); -return MochiKit.Async.wait(_299).addCallback(function(res){ -return _300(); -}); -}}); -MochiKit.Async.DeferredLock=function(){ -this.waiting=[]; -this.locked=false; -this.id=this._nextId(); -}; -MochiKit.Async.DeferredLock.prototype={__class__:MochiKit.Async.DeferredLock,acquire:function(){ -d=new MochiKit.Async.Deferred(); -if(this.locked){ -this.waiting.push(d); -}else{ -this.locked=true; -d.callback(this); -} -return d; -},release:function(){ -if(!this.locked){ -throw TypeError("Tried to release an unlocked DeferredLock"); -} -this.locked=false; -if(this.waiting.length>0){ -this.locked=true; -this.waiting.shift().callback(this); -} -},_nextId:MochiKit.Base.counter(),repr:function(){ -var _301; -if(this.locked){ -_301="locked, "+this.waiting.length+" waiting"; -}else{ -_301="unlocked"; -} -return "DeferredLock("+this.id+", "+_301+")"; -},toString:MochiKit.Base.forwardCall("repr")}; -MochiKit.Async.DeferredList=function(list,_303,_304,_305,_306){ -this.list=list; -this.resultList=new Array(this.list.length); -this.chain=[]; -this.id=this._nextId(); -this.fired=-1; -this.paused=0; -this.results=[null,null]; -this.canceller=_306; -this.silentlyCancelled=false; -if(this.list.length===0&&!_303){ -this.callback(this.resultList); -} -this.finishedCount=0; -this.fireOnOneCallback=_303; -this.fireOnOneErrback=_304; -this.consumeErrors=_305; -var _307=0; -MochiKit.Base.map(MochiKit.Base.bind(function(d){ -d.addCallback(MochiKit.Base.bind(this._cbDeferred,this),_307,true); -d.addErrback(MochiKit.Base.bind(this._cbDeferred,this),_307,false); -_307+=1; -},this),this.list); -}; -MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,MochiKit.Async.Deferred.prototype); -MochiKit.Base.update(MochiKit.Async.DeferredList.prototype,{_cbDeferred:function(_308,_309,_310){ -this.resultList[_308]=[_309,_310]; -this.finishedCount+=1; -if(this.fired!==0){ -if(_309&&this.fireOnOneCallback){ -this.callback([_308,_310]); -}else{ -if(!_309&&this.fireOnOneErrback){ -this.errback(_310); -}else{ -if(this.finishedCount==this.list.length){ -this.callback(this.resultList); -} -} -} -} -if(!_309&&this.consumeErrors){ -_310=null; -} -return _310; -}}); -MochiKit.Async.gatherResults=function(_311){ -var d=new MochiKit.Async.DeferredList(_311,false,true,false); -d.addCallback(function(_312){ -var ret=[]; -for(var i=0;i<_312.length;i++){ -ret.push(_312[i][1]); -} -return ret; -}); -return d; -}; -MochiKit.Async.maybeDeferred=function(func){ -var self=MochiKit.Async; -var _313; -try{ -var r=func.apply(null,MochiKit.Base.extend([],arguments,1)); -if(r instanceof self.Deferred){ -_313=r; -}else{ -if(r instanceof Error){ -_313=self.fail(r); -}else{ -_313=self.succeed(r); -} -} -} -catch(e){ -_313=self.fail(e); -} -return _313; -}; -MochiKit.Async.EXPORT=["AlreadyCalledError","CancelledError","BrowserComplianceError","GenericError","XMLHttpRequestError","Deferred","succeed","fail","getXMLHttpRequest","doSimpleXMLHttpRequest","loadJSONDoc","wait","callLater","sendXMLHttpRequest","DeferredLock","DeferredList","gatherResults","maybeDeferred"]; -MochiKit.Async.EXPORT_OK=["evalJSONRequest"]; -MochiKit.Async.__new__=function(){ -var m=MochiKit.Base; -var ne=m.partial(m._newNamedError,this); -ne("AlreadyCalledError",function(_316){ -this.deferred=_316; -}); -ne("CancelledError",function(_317){ -this.deferred=_317; -}); -ne("BrowserComplianceError",function(msg){ -this.message=msg; -}); -ne("GenericError",function(msg){ -this.message=msg; -}); -ne("XMLHttpRequestError",function(req,msg){ -this.req=req; -this.message=msg; -try{ -this.number=req.status; -} -catch(e){ -} -}); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -m.nameFunctions(this); -}; -MochiKit.Async.__new__(); -MochiKit.Base._exportSymbols(this,MochiKit.Async); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.DOM"); -dojo.require("MochiKit.Iter"); -} -if(typeof (JSAN)!="undefined"){ -JSAN.use("MochiKit.Iter",[]); -} -try{ -if(typeof (MochiKit.Iter)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "MochiKit.DOM depends on MochiKit.Iter!"; -} -if(typeof (MochiKit.DOM)=="undefined"){ -MochiKit.DOM={}; -} -MochiKit.DOM.NAME="MochiKit.DOM"; -MochiKit.DOM.VERSION="1.3.1"; -MochiKit.DOM.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.DOM.toString=function(){ -return this.__repr__(); -}; -MochiKit.DOM.EXPORT=["formContents","currentWindow","currentDocument","withWindow","withDocument","registerDOMConverter","coerceToDOM","createDOM","createDOMFunc","getNodeAttribute","setNodeAttribute","updateNodeAttributes","appendChildNodes","replaceChildNodes","removeElement","swapDOM","BUTTON","TT","PRE","H1","H2","H3","BR","CANVAS","HR","LABEL","TEXTAREA","FORM","STRONG","SELECT","OPTION","OPTGROUP","LEGEND","FIELDSET","P","UL","OL","LI","TD","TR","THEAD","TBODY","TFOOT","TABLE","TH","INPUT","SPAN","A","DIV","IMG","getElement","$","computedStyle","getElementsByTagAndClassName","addToCallStack","addLoadEvent","focusOnLoad","setElementClass","toggleElementClass","addElementClass","removeElementClass","swapElementClass","hasElementClass","escapeHTML","toHTML","emitHTML","setDisplayForElement","hideElement","showElement","scrapeText","elementDimensions","elementPosition","setElementDimensions","setElementPosition","getViewportDimensions","setOpacity"]; -MochiKit.DOM.EXPORT_OK=["domConverters"]; -MochiKit.DOM.Dimensions=function(w,h){ -this.w=w; -this.h=h; -}; -MochiKit.DOM.Dimensions.prototype.repr=function(){ -var repr=MochiKit.Base.repr; -return "{w: "+repr(this.w)+", h: "+repr(this.h)+"}"; -}; -MochiKit.DOM.Coordinates=function(x,y){ -this.x=x; -this.y=y; -}; -MochiKit.DOM.Coordinates.prototype.repr=function(){ -var repr=MochiKit.Base.repr; -return "{x: "+repr(this.x)+", y: "+repr(this.y)+"}"; -}; -MochiKit.DOM.Coordinates.prototype.toString=function(){ -return this.repr(); -}; -MochiKit.Base.update(MochiKit.DOM,{setOpacity:function(elem,o){ -elem=MochiKit.DOM.getElement(elem); -MochiKit.DOM.updateNodeAttributes(elem,{"style":{"opacity":o,"-moz-opacity":o,"-khtml-opacity":o,"filter":" alpha(opacity="+(o*100)+")"}}); -},getViewportDimensions:function(){ -var d=new MochiKit.DOM.Dimensions(); -var w=MochiKit.DOM._window; -var b=MochiKit.DOM._document.body; -if(w.innerWidth){ -d.w=w.innerWidth; -d.h=w.innerHeight; -}else{ -if(b.parentElement.clientWidth){ -d.w=b.parentElement.clientWidth; -d.h=b.parentElement.clientHeight; -}else{ -if(b&&b.clientWidth){ -d.w=b.clientWidth; -d.h=b.clientHeight; -} -} -} -return d; -},elementDimensions:function(elem){ -var self=MochiKit.DOM; -if(typeof (elem.w)=="number"||typeof (elem.h)=="number"){ -return new self.Dimensions(elem.w||0,elem.h||0); -} -elem=self.getElement(elem); -if(!elem){ -return undefined; -} -if(self.computedStyle(elem,"display")!="none"){ -return new self.Dimensions(elem.offsetWidth||0,elem.offsetHeight||0); -} -var s=elem.style; -var _322=s.visibility; -var _323=s.position; -s.visibility="hidden"; -s.position="absolute"; -s.display=""; -var _324=elem.offsetWidth; -var _325=elem.offsetHeight; -s.display="none"; -s.position=_323; -s.visibility=_322; -return new self.Dimensions(_324,_325); -},elementPosition:function(elem,_326){ -var self=MochiKit.DOM; -elem=self.getElement(elem); -if(!elem){ -return undefined; -} -var c=new self.Coordinates(0,0); -if(elem.x&&elem.y){ -c.x+=elem.x||0; -c.y+=elem.y||0; -return c; -}else{ -if(elem.parentNode===null||self.computedStyle(elem,"display")=="none"){ -return undefined; -} -} -var box=null; -var _329=null; -var d=MochiKit.DOM._document; -var de=d.documentElement; -var b=d.body; -if(elem.getBoundingClientRect){ -box=elem.getBoundingClientRect(); -c.x+=box.left+(de.scrollLeft||b.scrollLeft)-(de.clientLeft||b.clientLeft); -c.y+=box.top+(de.scrollTop||b.scrollTop)-(de.clientTop||b.clientTop); -}else{ -if(d.getBoxObjectFor){ -box=d.getBoxObjectFor(elem); -c.x+=box.x; -c.y+=box.y; -}else{ -if(elem.offsetParent){ -c.x+=elem.offsetLeft; -c.y+=elem.offsetTop; -_329=elem.offsetParent; -if(_329!=elem){ -while(_329){ -c.x+=_329.offsetLeft; -c.y+=_329.offsetTop; -_329=_329.offsetParent; -} -} -var ua=navigator.userAgent.toLowerCase(); -if((typeof (opera)!="undefined"&&parseFloat(opera.version())<9)||(ua.indexOf("safari")!=-1&&self.computedStyle(elem,"position")=="absolute")){ -c.x-=b.offsetLeft; -c.y-=b.offsetTop; -} -} -} -} -if(typeof (_326)!="undefined"){ -_326=arguments.callee(_326); -if(_326){ -c.x-=(_326.x||0); -c.y-=(_326.y||0); -} -} -if(elem.parentNode){ -_329=elem.parentNode; -}else{ -_329=null; -} -while(_329&&_329.tagName!="BODY"&&_329.tagName!="HTML"){ -c.x-=_329.scrollLeft; -c.y-=_329.scrollTop; -if(_329.parentNode){ -_329=_329.parentNode; -}else{ -_329=null; -} -} -return c; -},setElementDimensions:function(elem,_332,_333){ -elem=MochiKit.DOM.getElement(elem); -if(typeof (_333)=="undefined"){ -_333="px"; -} -MochiKit.DOM.updateNodeAttributes(elem,{"style":{"width":_332.w+_333,"height":_332.h+_333}}); -},setElementPosition:function(elem,_334,_335){ -elem=MochiKit.DOM.getElement(elem); -if(typeof (_335)=="undefined"){ -_335="px"; -} -MochiKit.DOM.updateNodeAttributes(elem,{"style":{"left":_334.x+_335,"top":_334.y+_335}}); -},currentWindow:function(){ -return MochiKit.DOM._window; -},currentDocument:function(){ -return MochiKit.DOM._document; -},withWindow:function(win,func){ -var self=MochiKit.DOM; -var _337=self._document; -var _338=self._win; -var rval; -try{ -self._window=win; -self._document=win.document; -rval=func(); -} -catch(e){ -self._window=_338; -self._document=_337; -throw e; -} -self._window=_338; -self._document=_337; -return rval; -},formContents:function(elem){ -var _339=[]; -var _340=[]; -var m=MochiKit.Base; -var self=MochiKit.DOM; -if(typeof (elem)=="undefined"||elem===null){ -elem=self._document; -}else{ -elem=self.getElement(elem); -} -m.nodeWalk(elem,function(elem){ -var name=elem.name; -if(m.isNotEmpty(name)){ -var _341=elem.nodeName; -if(_341=="INPUT"&&(elem.type=="radio"||elem.type=="checkbox")&&!elem.checked){ -return null; -} -if(_341=="SELECT"){ -if(elem.selectedIndex>=0){ -var opt=elem.options[elem.selectedIndex]; -_339.push(name); -_340.push((opt.value)?opt.value:opt.text); -return null; -} -_339.push(name); -_340.push(""); -return null; -} -if(_341=="FORM"||_341=="P"||_341=="SPAN"||_341=="DIV"){ -return elem.childNodes; -} -_339.push(name); -_340.push(elem.value||""); -return null; -} -return elem.childNodes; -}); -return [_339,_340]; -},withDocument:function(doc,func){ -var self=MochiKit.DOM; -var _344=self._document; -var rval; -try{ -self._document=doc; -rval=func(); -} -catch(e){ -self._document=_344; -throw e; -} -self._document=_344; -return rval; -},registerDOMConverter:function(name,_345,wrap,_346){ -MochiKit.DOM.domConverters.register(name,_345,wrap,_346); -},coerceToDOM:function(node,ctx){ -var im=MochiKit.Iter; -var self=MochiKit.DOM; -var iter=im.iter; -var _350=im.repeat; -var imap=im.imap; -var _352=self.domConverters; -var _353=self.coerceToDOM; -var _354=MochiKit.Base.NotFound; -while(true){ -if(typeof (node)=="undefined"||node===null){ -return null; -} -if(typeof (node.nodeType)!="undefined"&&node.nodeType>0){ -return node; -} -if(typeof (node)=="number"||typeof (node)=="boolean"){ -node=node.toString(); -} -if(typeof (node)=="string"){ -return self._document.createTextNode(node); -} -if(typeof (node.toDOM)=="function"){ -node=node.toDOM(ctx); -continue; -} -if(typeof (node)=="function"){ -node=node(ctx); -continue; -} -var _355=null; -try{ -_355=iter(node); -} -catch(e){ -} -if(_355){ -return imap(_353,_355,_350(ctx)); -} -try{ -node=_352.match(node,ctx); -continue; -} -catch(e){ -if(e!=_354){ -throw e; -} -} -return self._document.createTextNode(node.toString()); -} -return undefined; -},setNodeAttribute:function(node,attr,_357){ -var o={}; -o[attr]=_357; -try{ -return MochiKit.DOM.updateNodeAttributes(node,o); -} -catch(e){ -} -return null; -},getNodeAttribute:function(node,attr){ -var self=MochiKit.DOM; -var _358=self.attributeArray.renames[attr]; -node=self.getElement(node); -try{ -if(_358){ -return node[_358]; -} -return node.getAttribute(attr); -} -catch(e){ -} -return null; -},updateNodeAttributes:function(node,_359){ -var elem=node; -var self=MochiKit.DOM; -if(typeof (node)=="string"){ -elem=self.getElement(node); -} -if(_359){ -var _360=MochiKit.Base.updatetree; -if(self.attributeArray.compliant){ -for(var k in _359){ -var v=_359[k]; -if(typeof (v)=="object"&&typeof (elem[k])=="object"){ -_360(elem[k],v); -}else{ -if(k.substring(0,2)=="on"){ -if(typeof (v)=="string"){ -v=new Function(v); -} -elem[k]=v; -}else{ -elem.setAttribute(k,v); -} -} -} -}else{ -var _361=self.attributeArray.renames; -for(k in _359){ -v=_359[k]; -var _362=_361[k]; -if(k=="style"&&typeof (v)=="string"){ -elem.style.cssText=v; -}else{ -if(typeof (_362)=="string"){ -elem[_362]=v; -}else{ -if(typeof (elem[k])=="object"&&typeof (v)=="object"){ -_360(elem[k],v); -}else{ -if(k.substring(0,2)=="on"){ -if(typeof (v)=="string"){ -v=new Function(v); -} -elem[k]=v; -}else{ -elem.setAttribute(k,v); -} -} -} -} -} -} -} -return elem; -},appendChildNodes:function(node){ -var elem=node; -var self=MochiKit.DOM; -if(typeof (node)=="string"){ -elem=self.getElement(node); -} -var _363=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; -var _364=MochiKit.Base.concat; -while(_363.length){ -var n=_363.shift(); -if(typeof (n)=="undefined"||n===null){ -}else{ -if(typeof (n.nodeType)=="number"){ -elem.appendChild(n); -}else{ -_363=_364(n,_363); -} -} -} -return elem; -},replaceChildNodes:function(node){ -var elem=node; -var self=MochiKit.DOM; -if(typeof (node)=="string"){ -elem=self.getElement(node); -arguments[0]=elem; -} -var _365; -while((_365=elem.firstChild)){ -elem.removeChild(_365); -} -if(arguments.length<2){ -return elem; -}else{ -return self.appendChildNodes.apply(this,arguments); -} -},createDOM:function(name,_366){ -var elem; -var self=MochiKit.DOM; -var m=MochiKit.Base; -if(typeof (_366)=="string"||typeof (_366)=="number"){ -var args=m.extend([name,null],arguments,1); -return arguments.callee.apply(this,args); -} -if(typeof (name)=="string"){ -if(_366&&"name" in _366&&!self.attributeArray.compliant){ -name=("<"+name+" name=\""+self.escapeHTML(_366.name)+"\">"); -} -elem=self._document.createElement(name); -}else{ -elem=name; -} -if(_366){ -self.updateNodeAttributes(elem,_366); -} -if(arguments.length<=2){ -return elem; -}else{ -var args=m.extend([elem],arguments,2); -return self.appendChildNodes.apply(this,args); -} -},createDOMFunc:function(){ -var m=MochiKit.Base; -return m.partial.apply(this,m.extend([MochiKit.DOM.createDOM],arguments)); -},swapDOM:function(dest,src){ -var self=MochiKit.DOM; -dest=self.getElement(dest); -var _369=dest.parentNode; -if(src){ -src=self.getElement(src); -_369.replaceChild(src,dest); -}else{ -_369.removeChild(dest); -} -return src; -},getElement:function(id){ -var self=MochiKit.DOM; -if(arguments.length==1){ -return ((typeof (id)=="string")?self._document.getElementById(id):id); -}else{ -return MochiKit.Base.map(self.getElement,arguments); -} -},computedStyle:function(_371,_372,_373){ -if(arguments.length==2){ -_373=_372; -} -var self=MochiKit.DOM; -var el=self.getElement(_371); -var _375=self._document; -if(!el||el==_375){ -return undefined; -} -if(el.currentStyle){ -return el.currentStyle[_372]; -} -if(typeof (_375.defaultView)=="undefined"){ -return undefined; -} -if(_375.defaultView===null){ -return undefined; -} -var _376=_375.defaultView.getComputedStyle(el,null); -if(typeof (_376)=="undefined"||_376===null){ -return undefined; -} -return _376.getPropertyValue(_373); -},getElementsByTagAndClassName:function(_377,_378,_379){ -var self=MochiKit.DOM; -if(typeof (_377)=="undefined"||_377===null){ -_377="*"; -} -if(typeof (_379)=="undefined"||_379===null){ -_379=self._document; -} -_379=self.getElement(_379); -var _380=(_379.getElementsByTagName(_377)||self._document.all); -if(typeof (_378)=="undefined"||_378===null){ -return MochiKit.Base.extend(null,_380); -} -var _381=[]; -for(var i=0;i<_380.length;i++){ -var _382=_380[i]; -var _383=_382.className.split(" "); -for(var j=0;j<_383.length;j++){ -if(_383[j]==_378){ -_381.push(_382); -break; -} -} -} -return _381; -},_newCallStack:function(path,once){ -var rval=function(){ -var _386=arguments.callee.callStack; -for(var i=0;i<_386.length;i++){ -if(_386[i].apply(this,arguments)===false){ -break; -} -} -if(once){ -try{ -this[path]=null; -} -catch(e){ -} -} -}; -rval.callStack=[]; -return rval; -},addToCallStack:function(_387,path,func,once){ -var self=MochiKit.DOM; -var _388=_387[path]; -var _389=_388; -if(!(typeof (_388)=="function"&&typeof (_388.callStack)=="object"&&_388.callStack!==null)){ -_389=self._newCallStack(path,once); -if(typeof (_388)=="function"){ -_389.callStack.push(_388); -} -_387[path]=_389; -} -_389.callStack.push(func); -},addLoadEvent:function(func){ -var self=MochiKit.DOM; -self.addToCallStack(self._window,"onload",func,true); -},focusOnLoad:function(_390){ -var self=MochiKit.DOM; -self.addLoadEvent(function(){ -_390=self.getElement(_390); -if(_390){ -_390.focus(); -} -}); -},setElementClass:function(_391,_392){ -var self=MochiKit.DOM; -var obj=self.getElement(_391); -if(self.attributeArray.compliant){ -obj.setAttribute("class",_392); -}else{ -obj.setAttribute("className",_392); -} -},toggleElementClass:function(_393){ -var self=MochiKit.DOM; -for(var i=1;i/g,">"); -},toHTML:function(dom){ -return MochiKit.DOM.emitHTML(dom).join(""); -},emitHTML:function(dom,lst){ -if(typeof (lst)=="undefined"||lst===null){ -lst=[]; -} -var _409=[dom]; -var self=MochiKit.DOM; -var _410=self.escapeHTML; -var _411=self.attributeArray; -while(_409.length){ -dom=_409.pop(); -if(typeof (dom)=="string"){ -lst.push(dom); -}else{ -if(dom.nodeType==1){ -lst.push("<"+dom.nodeName.toLowerCase()); -var _412=[]; -var _413=_411(dom); -for(var i=0;i<_413.length;i++){ -var a=_413[i]; -_412.push([" ",a.name,"=\"",_410(a.value),"\""]); -} -_412.sort(); -for(i=0;i<_412.length;i++){ -var _414=_412[i]; -for(var j=0;j<_414.length;j++){ -lst.push(_414[j]); -} -} -if(dom.hasChildNodes()){ -lst.push(">"); -_409.push(""); -var _415=dom.childNodes; -for(i=_415.length-1;i>=0;i--){ -_409.push(_415[i]); -} -}else{ -lst.push("/>"); -} -}else{ -if(dom.nodeType==3){ -lst.push(_410(dom.nodeValue)); -} -} -} -} -return lst; -},setDisplayForElement:function(_416,_417){ -var m=MochiKit.Base; -var _418=m.extend(null,arguments,1); -MochiKit.Iter.forEach(m.filter(null,m.map(MochiKit.DOM.getElement,_418)),function(_417){ -_417.style.display=_416; -}); -},scrapeText:function(node,_419){ -var rval=[]; -(function(node){ -var cn=node.childNodes; -if(cn){ -for(var i=0;i0){ -var _424=m.filter; -_423=function(node){ -return _424(_423.ignoreAttrFilter,node.attributes); -}; -_423.ignoreAttr={}; -MochiKit.Iter.forEach(_422.attributes,function(a){ -_423.ignoreAttr[a.name]=a.value; -}); -_423.ignoreAttrFilter=function(a){ -return (_423.ignoreAttr[a.name]!=a.value); -}; -_423.compliant=false; -_423.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor"}; -}else{ -_423=function(node){ -return node.attributes; -}; -_423.compliant=true; -_423.renames={}; -} -this.attributeArray=_423; -var _425=this.createDOMFunc; -this.UL=_425("ul"); -this.OL=_425("ol"); -this.LI=_425("li"); -this.TD=_425("td"); -this.TR=_425("tr"); -this.TBODY=_425("tbody"); -this.THEAD=_425("thead"); -this.TFOOT=_425("tfoot"); -this.TABLE=_425("table"); -this.TH=_425("th"); -this.INPUT=_425("input"); -this.SPAN=_425("span"); -this.A=_425("a"); -this.DIV=_425("div"); -this.IMG=_425("img"); -this.BUTTON=_425("button"); -this.TT=_425("tt"); -this.PRE=_425("pre"); -this.H1=_425("h1"); -this.H2=_425("h2"); -this.H3=_425("h3"); -this.BR=_425("br"); -this.HR=_425("hr"); -this.LABEL=_425("label"); -this.TEXTAREA=_425("textarea"); -this.FORM=_425("form"); -this.P=_425("p"); -this.SELECT=_425("select"); -this.OPTION=_425("option"); -this.OPTGROUP=_425("optgroup"); -this.LEGEND=_425("legend"); -this.FIELDSET=_425("fieldset"); -this.STRONG=_425("strong"); -this.CANVAS=_425("canvas"); -this.hideElement=m.partial(this.setDisplayForElement,"none"); -this.showElement=m.partial(this.setDisplayForElement,"block"); -this.removeElement=this.swapDOM; -this.$=this.getElement; -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -m.nameFunctions(this); -}}); -MochiKit.DOM.__new__(((typeof (window)=="undefined")?this:window)); -if(!MochiKit.__compat__){ -withWindow=MochiKit.DOM.withWindow; -withDocument=MochiKit.DOM.withDocument; -} -MochiKit.Base._exportSymbols(this,MochiKit.DOM); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.LoggingPane"); -dojo.require("MochiKit.Logging"); -dojo.require("MochiKit.Base"); -} -if(typeof (JSAN)!="undefined"){ -JSAN.use("MochiKit.Logging",[]); -JSAN.use("MochiKit.Base",[]); -} -try{ -if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.Logging)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "MochiKit.LoggingPane depends on MochiKit.Base and MochiKit.Logging!"; -} -if(typeof (MochiKit.LoggingPane)=="undefined"){ -MochiKit.LoggingPane={}; -} -MochiKit.LoggingPane.NAME="MochiKit.LoggingPane"; -MochiKit.LoggingPane.VERSION="1.3.1"; -MochiKit.LoggingPane.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.LoggingPane.toString=function(){ -return this.__repr__(); -}; -MochiKit.LoggingPane.createLoggingPane=function(_426){ -var m=MochiKit.LoggingPane; -_426=!(!_426); -if(m._loggingPane&&m._loggingPane.inline!=_426){ -m._loggingPane.closePane(); -m._loggingPane=null; -} -if(!m._loggingPane||m._loggingPane.closed){ -m._loggingPane=new m.LoggingPane(_426,MochiKit.Logging.logger); -} -return m._loggingPane; -}; -MochiKit.LoggingPane.LoggingPane=function(_427,_428){ -if(typeof (_428)=="undefined"||_428===null){ -_428=MochiKit.Logging.logger; -} -this.logger=_428; -var _429=MochiKit.Base.update; -var _430=MochiKit.Base.updatetree; -var bind=MochiKit.Base.bind; -var _431=MochiKit.Base.clone; -var win=window; -var uid="_MochiKit_LoggingPane"; -if(typeof (MochiKit.DOM)!="undefined"){ -win=MochiKit.DOM.currentWindow(); -} -if(!_427){ -var url=win.location.href.split("?")[0].replace(/[:\/.><&]/g,"_"); -var name=uid+"_"+url; -var nwin=win.open("",name,"dependent,resizable,height=200"); -if(!nwin){ -alert("Not able to open debugging window due to pop-up blocking."); -return undefined; -} -nwin.document.write(""+"[MochiKit.LoggingPane]"+""); -nwin.document.close(); -nwin.document.title+=" "+win.document.title; -win=nwin; -} -var doc=win.document; -this.doc=doc; -var _434=doc.getElementById(uid); -var _435=!!_434; -if(_434&&typeof (_434.loggingPane)!="undefined"){ -_434.loggingPane.logger=this.logger; -_434.loggingPane.buildAndApplyFilter(); -return _434.loggingPane; -} -if(_435){ -var _436; -while((_436=_434.firstChild)){ -_434.removeChild(_436); -} -}else{ -_434=doc.createElement("div"); -_434.id=uid; -} -_434.loggingPane=this; -var _437=doc.createElement("input"); -var _438=doc.createElement("input"); -var _439=doc.createElement("button"); -var _440=doc.createElement("button"); -var _441=doc.createElement("button"); -var _442=doc.createElement("button"); -var _443=doc.createElement("div"); -var _444=doc.createElement("div"); -var _445=uid+"_Listener"; -this.colorTable=_431(this.colorTable); -var _446=[]; -var _447=null; -var _448=function(msg){ -var _449=msg.level; -if(typeof (_449)=="number"){ -_449=MochiKit.Logging.LogLevel[_449]; -} -return _449; -}; -var _450=function(msg){ -return msg.info.join(" "); -}; -var _451=bind(function(msg){ -var _452=_448(msg); -var text=_450(msg); -var c=this.colorTable[_452]; -var p=doc.createElement("span"); -p.className="MochiKit-LogMessage MochiKit-LogLevel-"+_452; -p.style.cssText="margin: 0px; white-space: -moz-pre-wrap; white-space: -o-pre-wrap; white-space: pre-wrap; white-space: pre-line; word-wrap: break-word; wrap-option: emergency; color: "+c; -p.appendChild(doc.createTextNode(_452+": "+text)); -_444.appendChild(p); -_444.appendChild(doc.createElement("br")); -if(_443.offsetHeight>_443.scrollHeight){ -_443.scrollTop=0; -}else{ -_443.scrollTop=_443.scrollHeight; -} -},this); -var _454=function(msg){ -_446[_446.length]=msg; -_451(msg); -}; -var _455=function(){ -var _456,infore; -try{ -_456=new RegExp(_437.value); -infore=new RegExp(_438.value); -} -catch(e){ -logDebug("Error in filter regex: "+e.message); -return null; -} -return function(msg){ -return (_456.test(_448(msg))&&infore.test(_450(msg))); -}; -}; -var _457=function(){ -while(_444.firstChild){ -_444.removeChild(_444.firstChild); -} -}; -var _458=function(){ -_446=[]; -_457(); -}; -var _459=bind(function(){ -if(this.closed){ -return; -} -this.closed=true; -if(MochiKit.LoggingPane._loggingPane==this){ -MochiKit.LoggingPane._loggingPane=null; -} -this.logger.removeListener(_445); -_434.loggingPane=null; -if(_427){ -_434.parentNode.removeChild(_434); -}else{ -this.win.close(); -} -},this); -var _460=function(){ -_457(); -for(var i=0;i<_446.length;i++){ -var msg=_446[i]; -if(_447===null||_447(msg)){ -_451(msg); -} -} -}; -this.buildAndApplyFilter=function(){ -_447=_455(); -_460(); -this.logger.removeListener(_445); -this.logger.addListener(_445,_447,_454); -}; -var _461=bind(function(){ -_446=this.logger.getMessages(); -_460(); -},this); -var _462=bind(function(_463){ -_463=_463||window.event; -key=_463.which||_463.keyCode; -if(key==13){ -this.buildAndApplyFilter(); -} -},this); -var _464="display: block; z-index: 1000; left: 0px; bottom: 0px; position: fixed; width: 100%; background-color: white; font: "+this.logFont; -if(_427){ -_464+="; height: 10em; border-top: 2px solid black"; -}else{ -_464+="; height: 100%;"; -} -_434.style.cssText=_464; -if(!_435){ -doc.body.appendChild(_434); -} -_464={"cssText":"width: 33%; display: inline; font: "+this.logFont}; -_430(_437,{"value":"FATAL|ERROR|WARNING|INFO|DEBUG","onkeypress":_462,"style":_464}); -_434.appendChild(_437); -_430(_438,{"value":".*","onkeypress":_462,"style":_464}); -_434.appendChild(_438); -_464="width: 8%; display:inline; font: "+this.logFont; -_439.appendChild(doc.createTextNode("Filter")); -_439.onclick=bind("buildAndApplyFilter",this); -_439.style.cssText=_464; -_434.appendChild(_439); -_440.appendChild(doc.createTextNode("Load")); -_440.onclick=_461; -_440.style.cssText=_464; -_434.appendChild(_440); -_441.appendChild(doc.createTextNode("Clear")); -_441.onclick=_458; -_441.style.cssText=_464; -_434.appendChild(_441); -_442.appendChild(doc.createTextNode("Close")); -_442.onclick=_459; -_442.style.cssText=_464; -_434.appendChild(_442); -_443.style.cssText="overflow: auto; width: 100%"; -_444.style.cssText="width: 100%; height: "+(_427?"8em":"100%"); -_443.appendChild(_444); -_434.appendChild(_443); -this.buildAndApplyFilter(); -_461(); -if(_427){ -this.win=undefined; -}else{ -this.win=win; -} -this.inline=_427; -this.closePane=_459; -this.closed=false; -return this; -}; -MochiKit.LoggingPane.LoggingPane.prototype={"logFont":"8pt Verdana,sans-serif","colorTable":{"ERROR":"red","FATAL":"darkred","WARNING":"blue","INFO":"black","DEBUG":"green"}}; -MochiKit.LoggingPane.EXPORT_OK=["LoggingPane"]; -MochiKit.LoggingPane.EXPORT=["createLoggingPane"]; -MochiKit.LoggingPane.__new__=function(){ -this.EXPORT_TAGS={":common":this.EXPORT,":all":MochiKit.Base.concat(this.EXPORT,this.EXPORT_OK)}; -MochiKit.Base.nameFunctions(this); -MochiKit.LoggingPane._loggingPane=null; -}; -MochiKit.LoggingPane.__new__(); -MochiKit.Base._exportSymbols(this,MochiKit.LoggingPane); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.Color"); -dojo.require("MochiKit.Base"); -} -if(typeof (JSAN)!="undefined"){ -JSAN.use("MochiKit.Base",[]); -} -try{ -if(typeof (MochiKit.Base)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "MochiKit.Color depends on MochiKit.Base"; -} -if(typeof (MochiKit.Color)=="undefined"){ -MochiKit.Color={}; -} -MochiKit.Color.NAME="MochiKit.Color"; -MochiKit.Color.VERSION="1.3.1"; -MochiKit.Color.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.Color.toString=function(){ -return this.__repr__(); -}; -MochiKit.Color.Color=function(red,_466,blue,_468){ -if(typeof (_468)=="undefined"||_468===null){ -_468=1; -} -this.rgb={r:red,g:_466,b:blue,a:_468}; -}; -MochiKit.Color.Color.prototype={__class__:MochiKit.Color.Color,colorWithAlpha:function(_469){ -var rgb=this.rgb; -var m=MochiKit.Color; -return m.Color.fromRGB(rgb.r,rgb.g,rgb.b,_469); -},colorWithHue:function(hue){ -var hsl=this.asHSL(); -hsl.h=hue; -var m=MochiKit.Color; -return m.Color.fromHSL(hsl); -},colorWithSaturation:function(_473){ -var hsl=this.asHSL(); -hsl.s=_473; -var m=MochiKit.Color; -return m.Color.fromHSL(hsl); -},colorWithLightness:function(_474){ -var hsl=this.asHSL(); -hsl.l=_474; -var m=MochiKit.Color; -return m.Color.fromHSL(hsl); -},darkerColorWithLevel:function(_475){ -var hsl=this.asHSL(); -hsl.l=Math.max(hsl.l-_475,0); -var m=MochiKit.Color; -return m.Color.fromHSL(hsl); -},lighterColorWithLevel:function(_476){ -var hsl=this.asHSL(); -hsl.l=Math.min(hsl.l+_476,1); -var m=MochiKit.Color; -return m.Color.fromHSL(hsl); -},blendedColor:function(_477,_478){ -if(typeof (_478)=="undefined"||_478===null){ -_478=0.5; -} -var sf=1-_478; -var s=this.rgb; -var d=_477.rgb; -var df=_478; -return MochiKit.Color.Color.fromRGB((s.r*sf)+(d.r*df),(s.g*sf)+(d.g*df),(s.b*sf)+(d.b*df),(s.a*sf)+(d.a*df)); -},compareRGB:function(_481){ -var a=this.asRGB(); -var b=_481.asRGB(); -return MochiKit.Base.compare([a.r,a.g,a.b,a.a],[b.r,b.g,b.b,b.a]); -},isLight:function(){ -return this.asHSL().b>0.5; -},isDark:function(){ -return (!this.isLight()); -},toHSLString:function(){ -var c=this.asHSL(); -var ccc=MochiKit.Color.clampColorComponent; -var rval=this._hslString; -if(!rval){ -var mid=(ccc(c.h,360).toFixed(0)+","+ccc(c.s,100).toPrecision(4)+"%"+","+ccc(c.l,100).toPrecision(4)+"%"); -var a=c.a; -if(a>=1){ -a=1; -rval="hsl("+mid+")"; -}else{ -if(a<=0){ -a=0; -} -rval="hsla("+mid+","+a+")"; -} -this._hslString=rval; -} -return rval; -},toRGBString:function(){ -var c=this.rgb; -var ccc=MochiKit.Color.clampColorComponent; -var rval=this._rgbString; -if(!rval){ -var mid=(ccc(c.r,255).toFixed(0)+","+ccc(c.g,255).toFixed(0)+","+ccc(c.b,255).toFixed(0)); -if(c.a!=1){ -rval="rgba("+mid+","+c.a+")"; -}else{ -rval="rgb("+mid+")"; -} -this._rgbString=rval; -} -return rval; -},asRGB:function(){ -return MochiKit.Base.clone(this.rgb); -},toHexString:function(){ -var m=MochiKit.Color; -var c=this.rgb; -var ccc=MochiKit.Color.clampColorComponent; -var rval=this._hexString; -if(!rval){ -rval=("#"+m.toColorPart(ccc(c.r,255))+m.toColorPart(ccc(c.g,255))+m.toColorPart(ccc(c.b,255))); -this._hexString=rval; -} -return rval; -},asHSV:function(){ -var hsv=this.hsv; -var c=this.rgb; -if(typeof (hsv)=="undefined"||hsv===null){ -hsv=MochiKit.Color.rgbToHSV(this.rgb); -this.hsv=hsv; -} -return MochiKit.Base.clone(hsv); -},asHSL:function(){ -var hsl=this.hsl; -var c=this.rgb; -if(typeof (hsl)=="undefined"||hsl===null){ -hsl=MochiKit.Color.rgbToHSL(this.rgb); -this.hsl=hsl; -} -return MochiKit.Base.clone(hsl); -},toString:function(){ -return this.toRGBString(); -},repr:function(){ -var c=this.rgb; -var col=[c.r,c.g,c.b,c.a]; -return this.__class__.NAME+"("+col.join(", ")+")"; -}}; -MochiKit.Base.update(MochiKit.Color.Color,{fromRGB:function(red,_486,blue,_487){ -var _488=MochiKit.Color.Color; -if(arguments.length==1){ -var rgb=red; -red=rgb.r; -_486=rgb.g; -blue=rgb.b; -if(typeof (rgb.a)=="undefined"){ -_487=undefined; -}else{ -_487=rgb.a; -} -} -return new _488(red,_486,blue,_487); -},fromHSL:function(hue,_489,_490,_491){ -var m=MochiKit.Color; -return m.Color.fromRGB(m.hslToRGB.apply(m,arguments)); -},fromHSV:function(hue,_492,_493,_494){ -var m=MochiKit.Color; -return m.Color.fromRGB(m.hsvToRGB.apply(m,arguments)); -},fromName:function(name){ -var _495=MochiKit.Color.Color; -if(name.charAt(0)=="\""){ -name=name.substr(1,name.length-2); -} -var _496=_495._namedColors[name.toLowerCase()]; -if(typeof (_496)=="string"){ -return _495.fromHexString(_496); -}else{ -if(name=="transparent"){ -return _495.transparentColor(); -} -} -return null; -},fromString:function(_497){ -var self=MochiKit.Color.Color; -var _498=_497.substr(0,3); -if(_498=="rgb"){ -return self.fromRGBString(_497); -}else{ -if(_498=="hsl"){ -return self.fromHSLString(_497); -}else{ -if(_497.charAt(0)=="#"){ -return self.fromHexString(_497); -} -} -} -return self.fromName(_497); -},fromHexString:function(_499){ -if(_499.charAt(0)=="#"){ -_499=_499.substring(1); -} -var _500=[]; -var i,hex; -if(_499.length==3){ -for(i=0;i<3;i++){ -hex=_499.substr(i,1); -_500.push(parseInt(hex+hex,16)/255); -} -}else{ -for(i=0;i<6;i+=2){ -hex=_499.substr(i,2); -_500.push(parseInt(hex,16)/255); -} -} -var _501=MochiKit.Color.Color; -return _501.fromRGB.apply(_501,_500); -},_fromColorString:function(pre,_503,_504,_505){ -if(_505.indexOf(pre)===0){ -_505=_505.substring(_505.indexOf("(",3)+1,_505.length-1); -} -var _506=_505.split(/\s*,\s*/); -var _507=[]; -for(var i=0;i<_506.length;i++){ -var c=_506[i]; -var val; -var _508=c.substring(c.length-3); -if(c.charAt(c.length-1)=="%"){ -val=0.01*parseFloat(c.substring(0,c.length-1)); -}else{ -if(_508=="deg"){ -val=parseFloat(c)/360; -}else{ -if(_508=="rad"){ -val=parseFloat(c)/(Math.PI*2); -}else{ -val=_504[i]*parseFloat(c); -} -} -} -_507.push(val); -} -return this[_503].apply(this,_507); -},fromComputedStyle:function(elem,_509,_510){ -var d=MochiKit.DOM; -var cls=MochiKit.Color.Color; -for(elem=d.getElement(elem);elem;elem=elem.parentNode){ -var _511=d.computedStyle.apply(d,arguments); -if(!_511){ -continue; -} -var _512=cls.fromString(_511); -if(!_512){ -break; -} -if(_512.asRGB().a>0){ -return _512; -} -} -return null; -},fromBackground:function(elem){ -var cls=MochiKit.Color.Color; -return cls.fromComputedStyle(elem,"backgroundColor","background-color")||cls.whiteColor(); -},fromText:function(elem){ -var cls=MochiKit.Color.Color; -return cls.fromComputedStyle(elem,"color","color")||cls.blackColor(); -},namedColors:function(){ -return MochiKit.Base.clone(MochiKit.Color.Color._namedColors); -}}); -MochiKit.Base.update(MochiKit.Color,{clampColorComponent:function(v,_513){ -v*=_513; -if(v<0){ -return 0; -}else{ -if(v>_513){ -return _513; -}else{ -return v; -} -} -},_hslValue:function(n1,n2,hue){ -if(hue>6){ -hue-=6; -}else{ -if(hue<0){ -hue+=6; -} -} -var val; -if(hue<1){ -val=n1+(n2-n1)*hue; -}else{ -if(hue<3){ -val=n2; -}else{ -if(hue<4){ -val=n1+(n2-n1)*(4-hue); -}else{ -val=n1; -} -} -} -return val; -},hsvToRGB:function(hue,_516,_517,_518){ -if(arguments.length==1){ -var hsv=hue; -hue=hsv.h; -_516=hsv.s; -_517=hsv.v; -_518=hsv.a; -} -var red; -var _519; -var blue; -if(_516===0){ -red=0; -_519=0; -blue=0; -}else{ -var i=Math.floor(hue*6); -var f=(hue*6)-i; -var p=_517*(1-_516); -var q=_517*(1-(_516*f)); -var t=_517*(1-(_516*(1-f))); -switch(i){ -case 1: -red=q; -_519=_517; -blue=p; -break; -case 2: -red=p; -_519=_517; -blue=t; -break; -case 3: -red=p; -_519=q; -blue=_517; -break; -case 4: -red=t; -_519=p; -blue=_517; -break; -case 5: -red=_517; -_519=p; -blue=q; -break; -case 6: -case 0: -red=_517; -_519=t; -blue=p; -break; -} -} -return {r:red,g:_519,b:blue,a:_518}; -},hslToRGB:function(hue,_521,_522,_523){ -if(arguments.length==1){ -var hsl=hue; -hue=hsl.h; -_521=hsl.s; -_522=hsl.l; -_523=hsl.a; -} -var red; -var _524; -var blue; -if(_521===0){ -red=_522; -_524=_522; -blue=_522; -}else{ -var m2; -if(_522<=0.5){ -m2=_522*(1+_521); -}else{ -m2=_522+_521-(_522*_521); -} -var m1=(2*_522)-m2; -var f=MochiKit.Color._hslValue; -var h6=hue*6; -red=f(m1,m2,h6+2); -_524=f(m1,m2,h6); -blue=f(m1,m2,h6-2); -} -return {r:red,g:_524,b:blue,a:_523}; -},rgbToHSV:function(red,_528,blue,_529){ -if(arguments.length==1){ -var rgb=red; -red=rgb.r; -_528=rgb.g; -blue=rgb.b; -_529=rgb.a; -} -var max=Math.max(Math.max(red,_528),blue); -var min=Math.min(Math.min(red,_528),blue); -var hue; -var _532; -var _533=max; -if(min==max){ -hue=0; -_532=0; -}else{ -var _534=(max-min); -_532=_534/max; -if(red==max){ -hue=(_528-blue)/_534; -}else{ -if(_528==max){ -hue=2+((blue-red)/_534); -}else{ -hue=4+((red-_528)/_534); -} -} -hue/=6; -if(hue<0){ -hue+=1; -} -if(hue>1){ -hue-=1; -} -} -return {h:hue,s:_532,v:_533,a:_529}; -},rgbToHSL:function(red,_535,blue,_536){ -if(arguments.length==1){ -var rgb=red; -red=rgb.r; -_535=rgb.g; -blue=rgb.b; -_536=rgb.a; -} -var max=Math.max(red,Math.max(_535,blue)); -var min=Math.min(red,Math.min(_535,blue)); -var hue; -var _537; -var _538=(max+min)/2; -var _539=max-min; -if(_539===0){ -hue=0; -_537=0; -}else{ -if(_538<=0.5){ -_537=_539/(max+min); -}else{ -_537=_539/(2-max-min); -} -if(red==max){ -hue=(_535-blue)/_539; -}else{ -if(_535==max){ -hue=2+((blue-red)/_539); -}else{ -hue=4+((red-_535)/_539); -} -} -hue/=6; -if(hue<0){ -hue+=1; -} -if(hue>1){ -hue-=1; -} -} -return {h:hue,s:_537,l:_538,a:_536}; -},toColorPart:function(num){ -num=Math.round(num); -var _540=num.toString(16); -if(num<16){ -return "0"+_540; -} -return _540; -},__new__:function(){ -var m=MochiKit.Base; -this.Color.fromRGBString=m.bind(this.Color._fromColorString,this.Color,"rgb","fromRGB",[1/255,1/255,1/255,1]); -this.Color.fromHSLString=m.bind(this.Color._fromColorString,this.Color,"hsl","fromHSL",[1/360,0.01,0.01,1]); -var _541=1/3; -var _542={black:[0,0,0],blue:[0,0,1],brown:[0.6,0.4,0.2],cyan:[0,1,1],darkGray:[_541,_541,_541],gray:[0.5,0.5,0.5],green:[0,1,0],lightGray:[2*_541,2*_541,2*_541],magenta:[1,0,1],orange:[1,0.5,0],purple:[0.5,0,0.5],red:[1,0,0],transparent:[0,0,0,0],white:[1,1,1],yellow:[1,1,0]}; -var _543=function(name,r,g,b,a){ -var rval=this.fromRGB(r,g,b,a); -this[name]=function(){ -return rval; -}; -return rval; -}; -for(var k in _542){ -var name=k+"Color"; -var _545=m.concat([_543,this.Color,name],_542[k]); -this.Color[name]=m.bind.apply(null,_545); -} -var _546=function(){ -for(var i=0;i1){ -var src=MochiKit.DOM.getElement(arguments[0]); -var sig=arguments[1]; -var obj=arguments[2]; -var func=arguments[3]; -for(var i=_562.length-1;i>=0;i--){ -var o=_562[i]; -if(o[0]===src&&o[1]===sig&&o[4]===obj&&o[5]===func){ -self._disconnect(o); -_562.splice(i,1); -return true; -} -} -}else{ -var idx=m.findIdentical(_562,_561); -if(idx>=0){ -self._disconnect(_561); -_562.splice(idx,1); -return true; -} -} -return false; -},disconnectAll:function(src,sig){ -src=MochiKit.DOM.getElement(src); -var m=MochiKit.Base; -var _563=m.flattenArguments(m.extend(null,arguments,1)); -var self=MochiKit.Signal; -var _564=self._disconnect; -var _565=self._observers; -if(_563.length===0){ -for(var i=_565.length-1;i>=0;i--){ -var _566=_565[i]; -if(_566[0]===src){ -_564(_566); -_565.splice(i,1); -} -} -}else{ -var sigs={}; -for(var i=0;i<_563.length;i++){ -sigs[_563[i]]=true; -} -for(var i=_565.length-1;i>=0;i--){ -var _566=_565[i]; -if(_566[0]===src&&_566[1] in sigs){ -_564(_566); -_565.splice(i,1); -} -} -} -},signal:function(src,sig){ -var _568=MochiKit.Signal._observers; -src=MochiKit.DOM.getElement(src); -var args=MochiKit.Base.extend(null,arguments,2); -var _569=[]; -for(var i=0;i<_568.length;i++){ -var _570=_568[i]; -if(_570[0]===src&&_570[1]===sig){ -try{ -_570[2].apply(src,args); -} -catch(e){ -_569.push(e); -} -} -} -if(_569.length==1){ -throw _569[0]; -}else{ -if(_569.length>1){ -var e=new Error("Multiple errors thrown in handling 'sig', see errors property"); -e.errors=_569; -throw e; -} -} -}}); -MochiKit.Signal.EXPORT_OK=[]; -MochiKit.Signal.EXPORT=["connect","disconnect","signal","disconnectAll"]; -MochiKit.Signal.__new__=function(win){ -var m=MochiKit.Base; -this._document=document; -this._window=win; -try{ -this.connect(window,"onunload",this._unloadCache); -} -catch(e){ -} -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -m.nameFunctions(this); -}; -MochiKit.Signal.__new__(this); -if(!MochiKit.__compat__){ -connect=MochiKit.Signal.connect; -disconnect=MochiKit.Signal.disconnect; -disconnectAll=MochiKit.Signal.disconnectAll; -signal=MochiKit.Signal.signal; -} -MochiKit.Base._exportSymbols(this,MochiKit.Signal); -if(typeof (dojo)!="undefined"){ -dojo.provide("MochiKit.Visual"); -dojo.require("MochiKit.Base"); -dojo.require("MochiKit.DOM"); -dojo.require("MochiKit.Color"); -} -if(typeof (JSAN)!="undefined"){ -JSAN.use("MochiKit.Base",[]); -JSAN.use("MochiKit.DOM",[]); -JSAN.use("MochiKit.Color",[]); -} -try{ -if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "MochiKit.Visual depends on MochiKit.Base, MochiKit.DOM and MochiKit.Color!"; -} -if(typeof (MochiKit.Visual)=="undefined"){ -MochiKit.Visual={}; -} -MochiKit.Visual.NAME="MochiKit.Visual"; -MochiKit.Visual.VERSION="1.3.1"; -MochiKit.Visual.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -MochiKit.Visual.toString=function(){ -return this.__repr__(); -}; -MochiKit.Visual._RoundCorners=function(e,_571){ -e=MochiKit.DOM.getElement(e); -this._setOptions(_571); -if(this.options.__unstable__wrapElement){ -e=this._doWrap(e); -} -var _572=this.options.color; -var C=MochiKit.Color.Color; -if(this.options.color=="fromElement"){ -_572=C.fromBackground(e); -}else{ -if(!(_572 instanceof C)){ -_572=C.fromString(_572); -} -} -this.isTransparent=(_572.asRGB().a<=0); -var _574=this.options.bgColor; -if(this.options.bgColor=="fromParent"){ -_574=C.fromBackground(e.offsetParent); -}else{ -if(!(_574 instanceof C)){ -_574=C.fromString(_574); -} -} -this._roundCornersImpl(e,_572,_574); -}; -MochiKit.Visual._RoundCorners.prototype={_doWrap:function(e){ -var _575=e.parentNode; -var doc=MochiKit.DOM.currentDocument(); -if(typeof (doc.defaultView)=="undefined"||doc.defaultView===null){ -return e; -} -var _576=doc.defaultView.getComputedStyle(e,null); -if(typeof (_576)=="undefined"||_576===null){ -return e; -} -var _577=MochiKit.DOM.DIV({"style":{display:"block",marginTop:_576.getPropertyValue("padding-top"),marginRight:_576.getPropertyValue("padding-right"),marginBottom:_576.getPropertyValue("padding-bottom"),marginLeft:_576.getPropertyValue("padding-left"),padding:"0px"}}); -_577.innerHTML=e.innerHTML; -e.innerHTML=""; -e.appendChild(_577); -return e; -},_roundCornersImpl:function(e,_578,_579){ -if(this.options.border){ -this._renderBorder(e,_579); -} -if(this._isTopRounded()){ -this._roundTopCorners(e,_578,_579); -} -if(this._isBottomRounded()){ -this._roundBottomCorners(e,_578,_579); -} -},_renderBorder:function(el,_580){ -var _581="1px solid "+this._borderColor(_580); -var _582="border-left: "+_581; -var _583="border-right: "+_581; -var _584="style='"+_582+";"+_583+"'"; -el.innerHTML="
"+el.innerHTML+"
"; -},_roundTopCorners:function(el,_585,_586){ -var _587=this._createCorner(_586); -for(var i=0;i=0;i--){ -_590.appendChild(this._createCornerSlice(_588,_589,i,"bottom")); -} -el.style.paddingBottom=0; -el.appendChild(_590); -},_createCorner:function(_591){ -var dom=MochiKit.DOM; -return dom.DIV({style:{backgroundColor:_591.toString()}}); -},_createCornerSlice:function(_592,_593,n,_594){ -var _595=MochiKit.DOM.SPAN(); -var _596=_595.style; -_596.backgroundColor=_592.toString(); -_596.display="block"; -_596.height="1px"; -_596.overflow="hidden"; -_596.fontSize="1px"; -var _597=this._borderColor(_592,_593); -if(this.options.border&&n===0){ -_596.borderTopStyle="solid"; -_596.borderTopWidth="1px"; -_596.borderLeftWidth="0px"; -_596.borderRightWidth="0px"; -_596.borderBottomWidth="0px"; -_596.height="0px"; -_596.borderColor=_597.toString(); -}else{ -if(_597){ -_596.borderColor=_597.toString(); -_596.borderStyle="solid"; -_596.borderWidth="0px 1px"; -} -} -if(!this.options.compact&&(n==(this.options.numSlices-1))){ -_596.height="2px"; -} -this._setMargin(_595,n,_594); -this._setBorder(_595,n,_594); -return _595; -},_setOptions:function(_598){ -this.options={corners:"all",color:"fromElement",bgColor:"fromParent",blend:true,border:false,compact:false,__unstable__wrapElement:false}; -MochiKit.Base.update(this.options,_598); -this.options.numSlices=(this.options.compact?2:4); -},_whichSideTop:function(){ -var _599=this.options.corners; -if(this._hasString(_599,"all","top")){ -return ""; -} -var _600=(_599.indexOf("tl")!=-1); -var _601=(_599.indexOf("tr")!=-1); -if(_600&&_601){ -return ""; -} -if(_600){ -return "left"; -} -if(_601){ -return "right"; -} -return ""; -},_whichSideBottom:function(){ -var _602=this.options.corners; -if(this._hasString(_602,"all","bottom")){ -return ""; -} -var _603=(_602.indexOf("bl")!=-1); -var _604=(_602.indexOf("br")!=-1); -if(_603&&_604){ -return ""; -} -if(_603){ -return "left"; -} -if(_604){ -return "right"; -} -return ""; -},_borderColor:function(_605,_606){ -if(_605=="transparent"){ -return _606; -}else{ -if(this.options.border){ -return this.options.border; -}else{ -if(this.options.blend){ -return _606.blendedColor(_605); -} -} -} -return ""; -},_setMargin:function(el,n,_607){ -var _608=this._marginSize(n)+"px"; -var _609=(_607=="top"?this._whichSideTop():this._whichSideBottom()); -var _610=el.style; -if(_609=="left"){ -_610.marginLeft=_608; -_610.marginRight="0px"; -}else{ -if(_609=="right"){ -_610.marginRight=_608; -_610.marginLeft="0px"; -}else{ -_610.marginLeft=_608; -_610.marginRight=_608; -} -} -},_setBorder:function(el,n,_611){ -var _612=this._borderSize(n)+"px"; -var _613=(_611=="top"?this._whichSideTop():this._whichSideBottom()); -var _614=el.style; -if(_613=="left"){ -_614.borderLeftWidth=_612; -_614.borderRightWidth="0px"; -}else{ -if(_613=="right"){ -_614.borderRightWidth=_612; -_614.borderLeftWidth="0px"; -}else{ -_614.borderLeftWidth=_612; -_614.borderRightWidth=_612; -} -} -},_marginSize:function(n){ -if(this.isTransparent){ -return 0; -} -var o=this.options; -if(o.compact&&o.blend){ -var _615=[1,0]; -return _615[n]; -}else{ -if(o.compact){ -var _616=[2,1]; -return _616[n]; -}else{ -if(o.blend){ -var _617=[3,2,1,0]; -return _617[n]; -}else{ -var _618=[5,3,2,1]; -return _618[n]; -} -} -} -},_borderSize:function(n){ -var o=this.options; -var _619; -if(o.compact&&(o.blend||this.isTransparent)){ -return 1; -}else{ -if(o.compact){ -_619=[1,0]; -}else{ -if(o.blend){ -_619=[2,1,1,1]; -}else{ -if(o.border){ -_619=[0,2,0,0]; -}else{ -if(this.isTransparent){ -_619=[5,3,2,1]; -}else{ -return 0; -} -} -} -} -} -return _619[n]; -},_hasString:function(str){ -for(var i=1;i"); -} -} -})(); -} diff --git a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/PlotKit.js b/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/PlotKit.js deleted file mode 100644 index 363042a..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci-static/resources/livestats/PlotKit.js +++ /dev/null @@ -1,2177 +0,0 @@ -/*** - - PlotKit.PlotKit 0.9.1 : PACKED VERSION - - THIS FILE IS AUTOMATICALLY GENERATED. If creating patches, please - diff against the source tree, not this file. - - For more information, . - - Copyright (c) 2006. Alastair Tse. - -***/ - -try{ -if(typeof (MochiKit.Base)=="undefined"||typeof (MochiKit.DOM)=="undefined"||typeof (MochiKit.Color)=="undefined"||typeof (MochiKit.Format)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format}"; -} -MochiKit.Base.update(MochiKit.Color.Color.prototype,{asFillColor:function(){ -return this.lighterColorWithLevel(0.3); -},asStrokeColor:function(){ -return this.darkerColorWithLevel(0.1); -},asPointColor:function(){ -return this.lighterColorWithLevel(0.1); -}}); -if(typeof (PlotKit)=="undefined"){ -PlotKit={}; -} -PlotKit.NAME="PlotKit"; -PlotKit.VERSION="0.8"; -PlotKit.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.toString=function(){ -return this.__repr__(); -}; -if(typeof (PlotKit.Base)=="undefined"){ -PlotKit.Base={}; -} -PlotKit.Base.NAME="PlotKit.Base"; -PlotKit.Base.VERSION=PlotKit.VERSION; -PlotKit.Base.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.Base.toString=function(){ -return this.__repr__(); -}; -PlotKit.Base.usingPrototype=function(){ -try{ -return (typeof (Object.extend)=="function"); -} -catch(e){ -return false; -} -}; -MochiKit.Base.update(PlotKit.Base,{roundInterval:function(_1,_2,_3){ -var _4=MochiKit.Format.roundToFixed; -var _5=_1/_2; -return parseFloat(_4(_5,_3)); -},collapse:function(_6){ -var m=MochiKit.Base; -var _8=new Array(); -for(var i=0;i<_6.length;i++){ -_8=m.concat(_8,_6[i]); -} -if(PlotKit.Base.usingPrototype()){ -delete _8.extend; -delete _8.from; -delete _8.inspect; -} -return _8; -},uniq:function(_10){ -var m=MochiKit.Base; -if(!m.isArrayLike(_10)||(_10.length<1)){ -return new Array(); -} -var _11=new Array(); -var _12=_10[0]; -_11.push(_10[0]); -for(var i=1;i<_10.length;i++){ -if(m.compare(_10[i],_12)!=0){ -_12=_10[i]; -_11.push(_10[i]); -} -} -return _11; -},colorScheme:function(){ -var mb=MochiKit.Base; -var mc=MochiKit.Color; -var _15=["red","orange","yellow","green","cyan","blue","purple","magenta"]; -var _16=function(_17){ -return mc.Color[_17+"Color"](); -}; -return mb.map(_16,_15); -},baseDarkPrimaryColors:function(){ -var _18=MochiKit.Color.Color.fromHexString; -return [_18("#ad3f40"),_18("#ddac2c"),_18("#dfdd0c"),_18("#5276c4"),_18("#739c5a")]; -},basePrimaryColors:function(){ -var _19=MochiKit.Color.Color.fromHexString; -return [_19("#d24c4d"),_19("#f2b32f"),_19("#ece90e"),_19("#5d83da"),_19("#78a15d")]; -},baseBlueColors:function(){ -var _20=MochiKit.Color.Color.fromHexString; -return [_20("#4b6b94"),_20("#5d81b4"),_20("#acbad2")]; -},palette:function(_21,_22,_23,_24){ -var _25=MochiKit.Base.isUndefinedOrNull; -var _26=new Array(); -if(_25(_24)){ -_24=0.1; -} -if(_25(_23)){ -_23=0.4; -} -if(_25(_22)){ -_22=-0.2; -} -var _27=_22; -while(_27<=_23){ -_26.push(_27); -_27+=_24; -} -var _28=function(_29,_30){ -return _29.lighterColorWithLevel(_30); -}; -return MochiKit.Base.map(partial(_28,_21),_26); -},excanvasSupported:function(){ -if(/MSIE/.test(navigator.userAgent)&&!window.opera){ -return true; -} -return false; -},findPosX:function(obj){ -var _32=0; -if(obj.offsetParent){ -while(obj.offsetParent){ -_32+=obj.offsetLeft; -obj=obj.offsetParent; -} -}else{ -if(obj.x){ -_32+=obj.x; -} -} -return _32; -},findPosY:function(obj){ -var _33=0; -if(obj.offsetParent){ -while(obj.offsetParent){ -_33+=obj.offsetTop; -obj=obj.offsetParent; -} -}else{ -if(obj.y){ -_33+=obj.y; -} -} -return _33; -},isFuncLike:function(obj){ -return (typeof (obj)=="function"); -}}); -PlotKit.Base.map=function(fn,lst){ -if(PlotKit.Base.usingPrototype()){ -var _36=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_36.push(fn(lst[x])); -} -return _36; -}else{ -return MochiKit.Base.map(fn,lst); -} -}; -PlotKit.Base.items=function(lst){ -if(PlotKit.Base.usingPrototype()){ -var _38=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_38.push([x,lst[x]]); -} -return _38; -}else{ -return MochiKit.Base.items(lst); -} -}; -PlotKit.Base.keys=function(lst){ -if(PlotKit.Base.usingPrototype()){ -var _39=[]; -for(var x in lst){ -if(typeof (lst[x])=="function"){ -continue; -} -_39.push(x); -} -return _39; -}else{ -return MochiKit.Base.keys(lst); -} -}; -PlotKit.Base.baseColors=function(){ -var _40=MochiKit.Color.Color.fromHexString; -return [_40("#476fb2"),_40("#be2c2b"),_40("#85b730"),_40("#734a99"),_40("#26a1c5"),_40("#fb8707"),_40("#000000")]; -}; -PlotKit.Base.officeBaseStyle={"axisLineWidth":2,"axisLabelColor":Color.grayColor(),"axisLineColor":Color.whiteColor(),"padding":{top:5,bottom:10,left:30,right:30}}; -MochiKit.Base.update(PlotKit.Base,{officeBlue:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"backgroundColor":PlotKit.Base.baseColors()[0].lighterColorWithLevel(0.45)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officeRed:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),"backgroundColor":PlotKit.Base.baseColors()[1].lighterColorWithLevel(0.5)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officeGreen:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[2]),"backgroundColor":PlotKit.Base.baseColors()[2].lighterColorWithLevel(0.5)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officePurple:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[3]),"backgroundColor":PlotKit.Base.baseColors()[3].lighterColorWithLevel(0.5)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officeCyan:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[4]),"backgroundColor":PlotKit.Base.baseColors()[4].lighterColorWithLevel(0.5)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officeOrange:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[5]),"backgroundColor":PlotKit.Base.baseColors()[5].lighterColorWithLevel(0.4)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -},officeBlack:function(){ -var r={"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[6],0,0.6),"backgroundColor":PlotKit.Base.baseColors()[6].lighterColorWithLevel(0.9)}; -MochiKit.Base.update(r,PlotKit.Base.officeBaseStyle); -return r; -}}); -PlotKit.Base.EXPORT=["baseColors","collapse","colorScheme","findPosX","findPosY","officeBaseStyle","officeBlue","officeRed","officeGreen","officePurple","officeCyan","officeOrange","officeBlack","roundInterval","uniq","isFuncLike","excanvasSupported"]; -PlotKit.Base.EXPORT_OK=[]; -PlotKit.Base.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.Base.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.Base); -try{ -if(typeof (PlotKit.Base)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "PlotKit.Layout depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Base"; -} -if(typeof (PlotKit.Layout)=="undefined"){ -PlotKit.Layout={}; -} -PlotKit.Layout.NAME="PlotKit.Layout"; -PlotKit.Layout.VERSION=PlotKit.VERSION; -PlotKit.Layout.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.Layout.toString=function(){ -return this.__repr__(); -}; -PlotKit.Layout.valid_styles=["bar","line","pie","point"]; -PlotKit.Layout=function(_42,_43){ -this.options={"barWidthFillFraction":0.75,"barOrientation":"vertical","xOriginIsZero":true,"yOriginIsZero":true,"xAxis":null,"yAxis":null,"xTicks":null,"yTicks":null,"xNumberOfTicks":10,"yNumberOfTicks":5,"xTickPrecision":1,"yTickPrecision":1,"pieRadius":0.4}; -this.style=_42; -MochiKit.Base.update(this.options,_43?_43:{}); -if(!MochiKit.Base.isUndefinedOrNull(this.options.xAxis)){ -this.minxval=this.options.xAxis[0]; -this.maxxval=this.options.xAxis[1]; -this.xscale=this.maxxval-this.minxval; -}else{ -this.minxval=0; -this.maxxval=null; -this.xscale=null; -} -if(!MochiKit.Base.isUndefinedOrNull(this.options.yAxis)){ -this.minyval=this.options.yAxis[0]; -this.maxyval=this.options.yAxis[1]; -this.yscale=this.maxyval-this.minyval; -}else{ -this.minyval=0; -this.maxyval=null; -this.yscale=null; -} -this.bars=new Array(); -this.points=new Array(); -this.slices=new Array(); -this.xticks=new Array(); -this.yticks=new Array(); -this.datasets=new Array(); -this.minxdelta=0; -this.xrange=1; -this.yrange=1; -this.hitTestCache={x2maxy:null}; -}; -PlotKit.Layout.prototype.addDataset=function(_44,_45){ -this.datasets[_44]=_45; -}; -PlotKit.Layout.prototype.removeDataset=function(_46,_47){ -delete this.datasets[_46]; -}; -PlotKit.Layout.prototype.addDatasetFromTable=function(_48,_49,_50,_51,_52){ -var _53=MochiKit.Base.isUndefinedOrNull; -var _54=MochiKit.DOM.scrapeText; -var _55=MochiKit.Format.strip; -if(_53(_50)){ -_50=0; -} -if(_53(_51)){ -_51=1; -} -if(_53(_52)){ -_52=-1; -} -var _56=_49.tBodies[0].rows; -var _57=new Array(); -var _58=new Array(); -if(!_53(_56)){ -for(var i=0;i<_56.length;i++){ -_57.push([parseFloat(_55(_54(_56[i].cells[_50]))),parseFloat(_55(_54(_56[i].cells[_51])))]); -if(_52>=0){ -_58.push({v:parseFloat(_55(_54(_56[i].cells[_50]))),label:_55(_54(_56[i].cells[_52]))}); -} -} -this.addDataset(_48,_57); -if(_52>=0){ -this.options.xTicks=_58; -} -return true; -} -return false; -}; -PlotKit.Layout.prototype.evaluate=function(){ -this._evaluateLimits(); -this._evaluateScales(); -if(this.style=="bar"){ -if(this.options.barOrientation=="horizontal"){ -this._evaluateHorizBarCharts(); -}else{ -this._evaluateBarCharts(); -} -this._evaluateBarTicks(); -}else{ -if(this.style=="line"){ -this._evaluateLineCharts(); -this._evaluateLineTicks(); -}else{ -if(this.style=="pie"){ -this._evaluatePieCharts(); -this._evaluatePieTicks(); -} -} -} -}; -PlotKit.Layout.prototype.hitTest=function(x,y){ -var f=MochiKit.Format.twoDigitFloat; -if((this.style=="bar")&&this.bars&&(this.bars.length>0)){ -for(var i=0;i=bar.x)&&(x<=bar.x+bar.w)&&(y>=bar.y)&&(y-bar.y<=bar.h)){ -return bar; -} -} -}else{ -if(this.style=="line"){ -if(this.hitTestCache.x2maxy==null){ -this._regenerateHitTestCache(); -} -var _62=x/this.xscale; -var _63=this.hitTestCache.xvalues; -var _64=null; -var _65=null; -for(var i=1;i<_63.length;i++){ -if(_63[i]>_62){ -_64=_63[i-1]; -_65=_63[i]; -break; -} -} -if((_64!=null)){ -var _66=this.hitTestCache.x2maxy[_64]; -var _67=this.hitTestCache.x2maxy[_65]; -var _68=(1-y)/this.yscale; -var _69=(_67-_66)/(_65-_64); -var _70=_66+_69*(_62-_64); -if(_70>=_68){ -var obj={xval:_62,yval:_68,xafter:_65,yafter:_67,xbefore:_64,ybefore:_66,yprojected:_70}; -return obj; -} -} -}else{ -if(this.style=="pie"){ -var _71=Math.sqrt((y-0.5)*(y-0.5)+(x-0.5)*(x-0.5)); -if(_71>this.options.pieRadius){ -return null; -} -var _72=Math.atan2(y-0.5,x-0.5)-Math.PI/2; -for(var i=0;i=_72){ -return _73; -} -} -} -} -} -return null; -}; -PlotKit.Layout.prototype.rectForX=function(x){ -return null; -}; -PlotKit.Layout.prototype.angleRangeForX=function(x){ -return null; -}; -PlotKit.Layout.prototype._evaluateLimits=function(){ -var map=PlotKit.Base.map; -var _75=PlotKit.Base.items; -var _76=MochiKit.Base.itemgetter; -var _77=PlotKit.Base.collapse; -var _78=MochiKit.Base.listMin; -var _79=MochiKit.Base.listMax; -var _80=MochiKit.Base.isUndefinedOrNull; -var all=_77(map(_76(1),_75(this.datasets))); -if(_80(this.options.xAxis)){ -if(this.options.xOriginIsZero){ -this.minxval=0; -}else{ -this.minxval=_78(map(parseFloat,map(_76(0),all))); -} -this.maxxval=_79(map(parseFloat,map(_76(0),all))); -}else{ -this.minxval=this.options.xAxis[0]; -this.maxxval=this.options.xAxis[1]; -this.xscale=this.maxval-this.minxval; -} -if(_80(this.options.yAxis)){ -if(this.options.yOriginIsZero){ -this.minyval=0; -}else{ -this.minyval=_78(map(parseFloat,map(_76(1),all))); -} -this.maxyval=_79(map(parseFloat,map(_76(1),all))); -}else{ -this.minyval=this.options.yAxis[0]; -this.maxyval=this.options.yAxis[1]; -this.yscale=this.maxyval-this.minyval; -} -}; -PlotKit.Layout.prototype._evaluateScales=function(){ -var _82=MochiKit.Base.isUndefinedOrNull; -this.xrange=this.maxxval-this.minxval; -if(this.xrange==0){ -this.xscale=1; -}else{ -this.xscale=1/this.xrange; -} -this.yrange=this.maxyval-this.minyval; -if(this.yrange==0){ -this.yscale=1; -}else{ -this.yscale=1/this.yrange; -} -}; -PlotKit.Layout.prototype._uniqueXValues=function(){ -var _83=PlotKit.Base.collapse; -var map=PlotKit.Base.map; -var _84=PlotKit.Base.uniq; -var _85=MochiKit.Base.itemgetter; -var _86=PlotKit.Base.items; -var _87=map(parseFloat,map(_85(0),_83(map(_85(1),_86(this.datasets))))); -_87.sort(MochiKit.Base.compare); -return _84(_87); -}; -PlotKit.Layout.prototype._evaluateBarCharts=function(){ -var _88=PlotKit.Base.items; -var _89=_88(this.datasets).length; -var _90=10000000; -var _91=this._uniqueXValues(); -for(var i=1;i<_91.length;i++){ -_90=Math.min(Math.abs(_91[i]-_91[i-1]),_90); -} -var _92=0; -var _93=0; -var _94=0; -if(_91.length==1){ -_90=1; -this.xscale=1; -this.minxval=_91[0]; -_92=1*this.options.barWidthFillFraction; -_93=_92/_89; -_94=(1-this.options.barWidthFillFraction)/2; -}else{ -if(this.xrange==1){ -this.xscale=0.5; -}else{ -if(this.xrange==2){ -this.xscale=1/3; -}else{ -this.xscale=(1-_90/this.xrange)/this.xrange; -} -} -_92=_90*this.xscale*this.options.barWidthFillFraction; -_93=_92/_89; -_94=_90*this.xscale*(1-this.options.barWidthFillFraction)/2; -} -this.minxdelta=_90; -this.bars=new Array(); -var i=0; -for(var _95 in this.datasets){ -var _96=this.datasets[_95]; -if(PlotKit.Base.isFuncLike(_96)){ -continue; -} -for(var j=0;j<_96.length;j++){ -var _98=_96[j]; -var _99={x:((parseFloat(_98[0])-this.minxval)*this.xscale)+(i*_93)+_94,y:1-((parseFloat(_98[1])-this.minyval)*this.yscale),w:_93,h:((parseFloat(_98[1])-this.minyval)*this.yscale),xval:parseFloat(_98[0]),yval:parseFloat(_98[1]),name:_95}; -if((_99.x>=0)&&(_99.x<=1)&&(_99.y>=0)&&(_99.y<=1)){ -this.bars.push(_99); -} -} -i++; -} -}; -PlotKit.Layout.prototype._evaluateHorizBarCharts=function(){ -var _100=PlotKit.Base.items; -var _101=_100(this.datasets).length; -var _102=10000000; -var _103=this._uniqueXValues(); -for(var i=1;i<_103.length;i++){ -_102=Math.min(Math.abs(_103[i]-_103[i-1]),_102); -} -var _104=0; -var _105=0; -var _106=0; -if(_103.length==1){ -_102=1; -this.xscale=1; -this.minxval=_103[0]; -_104=1*this.options.barWidthFillFraction; -_105=_104/_101; -_106=(1-this.options.barWidthFillFraction)/2; -}else{ -this.xscale=(1-_102/this.xrange)/this.xrange; -_104=_102*this.xscale*this.options.barWidthFillFraction; -_105=_104/_101; -_106=_102*this.xscale*(1-this.options.barWidthFillFraction)/2; -} -this.minxdelta=_102; -this.bars=new Array(); -var i=0; -for(var _107 in this.datasets){ -var _108=this.datasets[_107]; -if(PlotKit.Base.isFuncLike(_108)){ -continue; -} -for(var j=0;j<_108.length;j++){ -var item=_108[j]; -var rect={y:((parseFloat(item[0])-this.minxval)*this.xscale)+(i*_105)+_106,x:0,h:_105,w:((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_107}; -if(rect.y<=0){ -rect.y=0; -} -if(rect.y>=1){ -rect.y=1; -} -if((rect.x>=0)&&(rect.x<=1)){ -this.bars.push(rect); -} -} -i++; -} -}; -PlotKit.Layout.prototype._evaluateLineCharts=function(){ -var _111=PlotKit.Base.items; -var _112=_111(this.datasets).length; -this.points=new Array(); -var i=0; -for(var _113 in this.datasets){ -var _114=this.datasets[_113]; -if(PlotKit.Base.isFuncLike(_114)){ -continue; -} -_114.sort(function(a,b){ -return compare(parseFloat(a[0]),parseFloat(b[0])); -}); -for(var j=0;j<_114.length;j++){ -var item=_114[j]; -var _117={x:((parseFloat(item[0])-this.minxval)*this.xscale),y:1-((parseFloat(item[1])-this.minyval)*this.yscale),xval:parseFloat(item[0]),yval:parseFloat(item[1]),name:_113}; -if(_117.y<=0){ -_117.y=0; -} -if(_117.y>=1){ -_117.y=1; -} -if((_117.x>=0)&&(_117.x<=1)){ -this.points.push(_117); -} -} -i++; -} -}; -PlotKit.Layout.prototype._evaluatePieCharts=function(){ -var _118=PlotKit.Base.items; -var sum=MochiKit.Iter.sum; -var _120=MochiKit.Base.itemgetter; -var _121=_118(this.datasets).length; -var _122=_118(this.datasets)[0][1]; -var _123=sum(map(_120(1),_122)); -this.slices=new Array(); -var _124=0; -for(var i=0;i<_122.length;i++){ -var _125=_122[i][1]/_123; -var _126=_124*Math.PI*2; -var _127=(_124+_125)*Math.PI*2; -var _128={fraction:_125,xval:_122[i][0],yval:_122[i][1],startAngle:_126,endAngle:_127}; -if(_122[i][1]!=0){ -this.slices.push(_128); -} -_124+=_125; -} -}; -PlotKit.Layout.prototype._evaluateLineTicksForXAxis=function(){ -var _129=MochiKit.Base.isUndefinedOrNull; -if(this.options.xTicks){ -this.xticks=new Array(); -var _130=function(tick){ -var _132=tick.label; -if(_129(_132)){ -_132=tick.v.toString(); -} -var pos=this.xscale*(tick.v-this.minxval); -if((pos>=0)&&(pos<=1)){ -this.xticks.push([pos,_132]); -} -}; -MochiKit.Iter.forEach(this.options.xTicks,bind(_130,this)); -}else{ -if(this.options.xNumberOfTicks){ -var _134=this._uniqueXValues(); -var _135=this.xrange/this.options.xNumberOfTicks; -var _136=0; -this.xticks=new Array(); -for(var i=0;i<=_134.length;i++){ -if((_134[i]-this.minxval)>=(_136*_135)){ -var pos=this.xscale*(_134[i]-this.minxval); -if((pos>1)||(pos<0)){ -continue; -} -this.xticks.push([pos,_134[i]]); -_136++; -} -if(_136>this.options.xNumberOfTicks){ -break; -} -} -} -} -}; -PlotKit.Layout.prototype._evaluateLineTicksForYAxis=function(){ -var _137=MochiKit.Base.isUndefinedOrNull; -if(this.options.yTicks){ -this.yticks=new Array(); -var _138=function(tick){ -var _139=tick.label; -if(_137(_139)){ -_139=tick.v.toString(); -} -var pos=1-(this.yscale*(tick.v-this.minyval)); -if((pos>=0)&&(pos<=1)){ -this.yticks.push([pos,_139]); -} -}; -MochiKit.Iter.forEach(this.options.yTicks,bind(_138,this)); -}else{ -if(this.options.yNumberOfTicks){ -this.yticks=new Array(); -var _140=PlotKit.Base.roundInterval; -var prec=this.options.yTickPrecision; -var _142=_140(this.yrange,this.options.yNumberOfTicks,prec); -for(var i=0;i<=this.options.yNumberOfTicks;i++){ -var yval=this.minyval+(i*_142); -var pos=1-((yval-this.minyval)*this.yscale); -if((pos>1)||(pos<0)){ -continue; -} -this.yticks.push([pos,MochiKit.Format.roundToFixed(yval,prec)]); -} -} -} -}; -PlotKit.Layout.prototype._evaluateLineTicks=function(){ -this._evaluateLineTicksForXAxis(); -this._evaluateLineTicksForYAxis(); -}; -PlotKit.Layout.prototype._evaluateBarTicks=function(){ -this._evaluateLineTicks(); -var _144=function(tick){ -return [tick[0]+(this.minxdelta*this.xscale)/2,tick[1]]; -}; -this.xticks=MochiKit.Base.map(bind(_144,this),this.xticks); -if(this.options.barOrientation=="horizontal"){ -var _145=this.xticks; -this.xticks=this.yticks; -this.yticks=_145; -var _146=function(tick){ -return [1-tick[0],tick[1]]; -}; -this.xticks=MochiKit.Base.map(_146,this.xticks); -} -}; -PlotKit.Layout.prototype._evaluatePieTicks=function(){ -var _147=MochiKit.Base.isUndefinedOrNull; -var _148=MochiKit.Format.numberFormatter("#%"); -this.xticks=new Array(); -if(this.options.xTicks){ -var _149=new Array(); -for(var i=0;i0){ -this.__init__(_158,_159,_160); -} -}; -PlotKit.CanvasRenderer.prototype.__init__=function(_161,_162,_163){ -var _164=MochiKit.Base.isUndefinedOrNull; -var _165=MochiKit.Color.Color; -this.options={"drawBackground":true,"backgroundColor":_165.whiteColor(),"padding":{left:30,right:30,top:5,bottom:10},"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[0]),"strokeColor":_165.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":_165.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":_165.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"pieRadius":0.4,"enableEvents":true}; -MochiKit.Base.update(this.options,_163?_163:{}); -this.layout=_162; -this.element=MochiKit.DOM.getElement(_161); -this.container=this.element.parentNode; -this.isIE=PlotKit.Base.excanvasSupported(); -if(this.isIE&&!_164(G_vmlCanvasManager)){ -this.IEDelay=0.5; -this.maxTries=5; -this.renderDelay=null; -this.clearDelay=null; -this.element=G_vmlCanvasManager.initElement(this.element); -} -this.height=this.element.height; -this.width=this.element.width; -if(_164(this.element)){ -throw "CanvasRenderer() - passed canvas is not found"; -} -if(!this.isIE&&!(PlotKit.CanvasRenderer.isSupported(this.element))){ -throw "CanvasRenderer() - Canvas is not supported."; -} -if(_164(this.container)||(this.container.nodeName.toLowerCase()!="div")){ -throw "CanvasRenderer() - needs to be enclosed in
"; -} -this.xlabels=new Array(); -this.ylabels=new Array(); -this.isFirstRender=true; -this.area={x:this.options.padding.left,y:this.options.padding.top,w:this.width-this.options.padding.left-this.options.padding.right,h:this.height-this.options.padding.top-this.options.padding.bottom}; -MochiKit.DOM.updateNodeAttributes(this.container,{"style":{"position":"relative","width":this.width+"px"}}); -}; -PlotKit.CanvasRenderer.prototype.render=function(){ -if(this.isIE){ -try{ -if(this.renderDelay){ -this.renderDelay.cancel(); -this.renderDelay=null; -} -var _166=this.element.getContext("2d"); -} -catch(e){ -this.isFirstRender=false; -if(this.maxTries-->0){ -this.renderDelay=MochiKit.Async.wait(this.IEDelay); -this.renderDelay.addCallback(bind(this.render,this)); -} -return; -} -} -if(this.options.drawBackground){ -this._renderBackground(); -} -if(this.layout.style=="bar"){ -this._renderBarChart(); -this._renderBarAxis(); -}else{ -if(this.layout.style=="pie"){ -this._renderPieChart(); -this._renderPieAxis(); -}else{ -if(this.layout.style=="line"){ -this._renderLineChart(); -this._renderLineAxis(); -} -} -} -}; -PlotKit.CanvasRenderer.prototype._renderBarChartWrap=function(data,_168){ -var _169=this.element.getContext("2d"); -var _170=this.options.colorScheme.length; -var _171=this.options.colorScheme; -var _172=MochiKit.Base.keys(this.layout.datasets); -var _173=_172.length; -for(var i=0;i<_173;i++){ -var _174=_172[i]; -var _175=_171[i%_170]; -_169.save(); -_169.fillStyle=_175.toRGBString(); -if(this.options.strokeColor){ -_169.strokeStyle=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_169.strokeStyle=_175[this.options.strokeColorTransform]().toRGBString(); -} -} -_169.lineWidth=this.options.strokeWidth; -var _176=function(obj){ -if(obj.name==_174){ -_168(_169,obj); -} -}; -MochiKit.Iter.forEach(data,bind(_176,this)); -_169.restore(); -} -}; -PlotKit.CanvasRenderer.prototype._renderBarChart=function(){ -var bind=MochiKit.Base.bind; -var _178=function(_179,bar){ -var x=this.area.w*bar.x+this.area.x; -var y=this.area.h*bar.y+this.area.y; -var w=this.area.w*bar.w; -var h=this.area.h*bar.h; -if((w<1)||(h<1)){ -return; -} -if(this.options.shouldFill){ -_179.fillRect(x,y,w,h); -} -if(this.options.shouldStroke){ -_179.strokeRect(x,y,w,h); -} -}; -this._renderBarChartWrap(this.layout.bars,bind(_178,this)); -}; -PlotKit.CanvasRenderer.prototype._renderLineChart=function(){ -var _182=this.element.getContext("2d"); -var _183=this.options.colorScheme.length; -var _184=this.options.colorScheme; -var _185=MochiKit.Base.keys(this.layout.datasets); -var _186=_185.length; -var bind=MochiKit.Base.bind; -var _187=MochiKit.Base.partial; -for(var i=0;i<_186;i++){ -var _188=_185[i]; -var _189=_184[i%_183]; -var _190=this.options.strokeColorTransform; -_182.save(); -_182.fillStyle=_189.toRGBString(); -if(this.options.strokeColor){ -_182.strokeStyle=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_182.strokeStyle=_189[_190]().toRGBString(); -} -} -_182.lineWidth=this.options.strokeWidth; -var _191=function(ctx){ -ctx.beginPath(); -ctx.moveTo(this.area.x,this.area.y+this.area.h); -var _193=function(ctx_,_195){ -if(_195.name==_188){ -ctx_.lineTo(this.area.w*_195.x+this.area.x,this.area.h*_195.y+this.area.y); -} -}; -MochiKit.Iter.forEach(this.layout.points,_187(_193,ctx),this); -ctx.lineTo(this.area.w+this.area.x,this.area.h+this.area.y); -ctx.lineTo(this.area.x,this.area.y+this.area.h); -ctx.closePath(); -}; -if(this.options.shouldFill){ -bind(_191,this)(_182); -_182.fill(); -} -if(this.options.shouldStroke){ -bind(_191,this)(_182); -_182.stroke(); -} -_182.restore(); -} -}; -PlotKit.CanvasRenderer.prototype._renderPieChart=function(){ -var _196=this.element.getContext("2d"); -var _197=this.options.colorScheme.length; -var _198=this.layout.slices; -var _199=this.area.x+this.area.w*0.5; -var _200=this.area.y+this.area.h*0.5; -var _201=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); -if(this.isIE){ -_199=parseInt(_199); -_200=parseInt(_200); -_201=parseInt(_201); -} -for(var i=0;i<_198.length;i++){ -var _202=this.options.colorScheme[i%_197]; -_196.save(); -_196.fillStyle=_202.toRGBString(); -var _203=function(){ -_196.beginPath(); -_196.moveTo(_199,_200); -_196.arc(_199,_200,_201,_198[i].startAngle-Math.PI/2,_198[i].endAngle-Math.PI/2,false); -_196.lineTo(_199,_200); -_196.closePath(); -}; -if(Math.abs(_198[i].startAngle-_198[i].endAngle)>0.001){ -if(this.options.shouldFill){ -_203(); -_196.fill(); -} -if(this.options.shouldStroke){ -_203(); -_196.lineWidth=this.options.strokeWidth; -if(this.options.strokeColor){ -_196.strokeStyle=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_196.strokeStyle=_202[this.options.strokeColorTransform]().toRGBString(); -} -} -_196.stroke(); -} -} -_196.restore(); -} -}; -PlotKit.CanvasRenderer.prototype._renderBarAxis=function(){ -this._renderAxis(); -}; -PlotKit.CanvasRenderer.prototype._renderLineAxis=function(){ -this._renderAxis(); -}; -PlotKit.CanvasRenderer.prototype._renderAxis=function(){ -if(!this.options.drawXAxis&&!this.options.drawYAxis){ -return; -} -var _204=this.element.getContext("2d"); -var _205={"style":{"position":"absolute","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}}; -_204.save(); -_204.strokeStyle=this.options.axisLineColor.toRGBString(); -_204.lineWidth=this.options.axisLineWidth; -if(this.options.drawYAxis){ -if(this.layout.yticks){ -var _206=function(tick){ -if(typeof (tick)=="function"){ -return; -} -var x=this.area.x; -var y=this.area.y+tick[0]*this.area.h; -_204.beginPath(); -_204.moveTo(x,y); -_204.lineTo(x-this.options.axisTickSize,y); -_204.closePath(); -_204.stroke(); -var _207=DIV(_205,tick[1]); -_207.style.top=(y-this.options.axisLabelFontSize)+"px"; -_207.style.left=(x-this.options.padding.left-this.options.axisTickSize)+"px"; -_207.style.textAlign="right"; -_207.style.width=(this.options.padding.left-this.options.axisTickSize*2)+"px"; -MochiKit.DOM.appendChildNodes(this.container,_207); -this.ylabels.push(_207); -}; -MochiKit.Iter.forEach(this.layout.yticks,bind(_206,this)); -} -_204.beginPath(); -_204.moveTo(this.area.x,this.area.y); -_204.lineTo(this.area.x,this.area.y+this.area.h); -_204.closePath(); -_204.stroke(); -} -if(this.options.drawXAxis){ -if(this.layout.xticks){ -var _206=function(tick){ -if(typeof (dataset)=="function"){ -return; -} -var x=this.area.x+tick[0]*this.area.w; -var y=this.area.y+this.area.h; -_204.beginPath(); -_204.moveTo(x,y); -_204.lineTo(x,y+this.options.axisTickSize); -_204.closePath(); -_204.stroke(); -var _208=DIV(_205,tick[1]); -_208.style.top=(y+this.options.axisTickSize)+"px"; -_208.style.left=(x-this.options.axisLabelWidth/2)+"px"; -_208.style.textAlign="center"; -_208.style.width=this.options.axisLabelWidth+"px"; -MochiKit.DOM.appendChildNodes(this.container,_208); -this.xlabels.push(_208); -}; -MochiKit.Iter.forEach(this.layout.xticks,bind(_206,this)); -} -_204.beginPath(); -_204.moveTo(this.area.x,this.area.y+this.area.h); -_204.lineTo(this.area.x+this.area.w,this.area.y+this.area.h); -_204.closePath(); -_204.stroke(); -} -_204.restore(); -}; -PlotKit.CanvasRenderer.prototype._renderPieAxis=function(){ -if(!this.options.drawXAxis){ -return; -} -if(this.layout.xticks){ -var _209=new Array(); -for(var i=0;iMath.PI*2){ -_216=_216-Math.PI*2; -}else{ -if(_216<0){ -_216=_216+Math.PI*2; -} -} -var _217=_210+Math.sin(_216)*(_212+10); -var _218=_211-Math.cos(_216)*(_212+10); -var _219={"position":"absolute","zIndex":11,"width":_213+"px","fontSize":this.options.axisLabelFontSize+"px","overflow":"hidden","color":this.options.axisLabelColor.toHexString()}; -if(_216<=Math.PI*0.5){ -_219["textAlign"]="left"; -_219["verticalAlign"]="top"; -_219["left"]=_217+"px"; -_219["top"]=(_218-this.options.axisLabelFontSize)+"px"; -}else{ -if((_216>Math.PI*0.5)&&(_216<=Math.PI)){ -_219["textAlign"]="left"; -_219["verticalAlign"]="bottom"; -_219["left"]=_217+"px"; -_219["top"]=_218+"px"; -}else{ -if((_216>Math.PI)&&(_216<=Math.PI*1.5)){ -_219["textAlign"]="right"; -_219["verticalAlign"]="bottom"; -_219["left"]=(_217-_213)+"px"; -_219["top"]=_218+"px"; -}else{ -_219["textAlign"]="right"; -_219["verticalAlign"]="bottom"; -_219["left"]=(_217-_213)+"px"; -_219["top"]=(_218-this.options.axisLabelFontSize)+"px"; -} -} -} -var _220=DIV({"style":_219},this.layout.xticks[i][1]); -this.xlabels.push(_220); -MochiKit.DOM.appendChildNodes(this.container,_220); -} -} -}; -PlotKit.CanvasRenderer.prototype._renderBackground=function(){ -var _221=this.element.getContext("2d"); -_221.save(); -_221.fillStyle=this.options.backgroundColor.toRGBString(); -_221.fillRect(0,0,this.width,this.height); -_221.restore(); -}; -PlotKit.CanvasRenderer.prototype.clear=function(){ -if(this.isIE){ -try{ -if(this.clearDelay){ -this.clearDelay.cancel(); -this.clearDelay=null; -} -var _222=this.element.getContext("2d"); -} -catch(e){ -this.isFirstRender=false; -this.clearDelay=MochiKit.Async.wait(this.IEDelay); -this.clearDelay.addCallback(bind(this.clear,this)); -return; -} -} -var _222=this.element.getContext("2d"); -_222.clearRect(0,0,this.width,this.height); -MochiKit.Iter.forEach(this.xlabels,MochiKit.DOM.removeElement); -MochiKit.Iter.forEach(this.ylabels,MochiKit.DOM.removeElement); -this.xlabels=new Array(); -this.ylabels=new Array(); -}; -PlotKit.CanvasRenderer.prototype._initialiseEvents=function(){ -var _223=MochiKit.Signal.connect; -var bind=MochiKit.Base.bind; -_223(this.element,"onclick",bind(this.onclick,this)); -}; -PlotKit.CanvasRenderer.prototype._resolveObject=function(e){ -var x=(e.mouse().page.x-PlotKit.Base.findPosX(this.element)-this.area.x)/this.area.w; -var y=(e.mouse().page.y-PlotKit.Base.findPosY(this.element)-this.area.y)/this.area.h; -var _225=this.layout.hitTest(x,y); -if(_225){ -return _225; -} -return null; -}; -PlotKit.CanvasRenderer.prototype._createEventObject=function(_226,e){ -if(_226==null){ -return null; -} -e.chart=_226; -return e; -}; -PlotKit.CanvasRenderer.prototype.onclick=function(e){ -var _227=this._resolveObject(e); -var _228=this._createEventObject(_227,e); -if(_228!=null){ -MochiKit.Signal.signal(this,"onclick",_228); -} -}; -PlotKit.CanvasRenderer.prototype.onmouseover=function(e){ -var _229=this._resolveObject(e); -var _230=this._createEventObject(_229,e); -if(_230!=null){ -signal(this,"onmouseover",_230); -} -}; -PlotKit.CanvasRenderer.prototype.onmouseout=function(e){ -var _231=this._resolveObject(e); -var _232=this._createEventObject(_231,e); -if(_232==null){ -signal(this,"onmouseout",e); -}else{ -signal(this,"onmouseout",_232); -} -}; -PlotKit.CanvasRenderer.prototype.onmousemove=function(e){ -var _233=this._resolveObject(e); -var _234=this._createEventObject(_233,e); -if((_233==null)&&(this.event_isinside==null)){ -return; -} -if((_233!=null)&&(this.event_isinside==null)){ -signal(this,"onmouseover",_234); -} -if((_233==null)&&(this.event_isinside!=null)){ -signal(this,"onmouseout",_234); -} -if((_233!=null)&&(this.event_isinside!=null)){ -signal(this,"onmousemove",_234); -} -this.event_isinside=_233; -}; -PlotKit.CanvasRenderer.isSupported=function(_235){ -var _236=null; -try{ -if(MochiKit.Base.isUndefinedOrNull(_235)){ -_236=MochiKit.DOM.CANVAS({}); -}else{ -_236=MochiKit.DOM.getElement(_235); -} -var _237=_236.getContext("2d"); -} -catch(e){ -var ie=navigator.appVersion.match(/MSIE (\d\.\d)/); -var _239=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1); -if((!ie)||(ie[1]<6)||(_239)){ -return false; -} -return true; -} -return true; -}; -PlotKit.Canvas={}; -PlotKit.Canvas.CanvasRenderer=PlotKit.CanvasRenderer; -PlotKit.Canvas.EXPORT=["CanvasRenderer"]; -PlotKit.Canvas.EXPORT_OK=["CanvasRenderer"]; -PlotKit.Canvas.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.Canvas.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.Canvas); -try{ -if(typeof (PlotKit.Layout)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "PlotKit depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.Layout"; -} -PlotKit.SVGRenderer=function(_240,_241,_242){ -if(arguments.length>0){ -this.__init__(_240,_241,_242); -} -}; -PlotKit.SVGRenderer.NAME="PlotKit.SVGRenderer"; -PlotKit.SVGRenderer.VERSION=PlotKit.VERSION; -PlotKit.SVGRenderer.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.SVGRenderer.toString=function(){ -return this.__repr__(); -}; -PlotKit.SVGRenderer.SVGNS="http://www.w3.org/2000/svg"; -PlotKit.SVGRenderer.prototype.__init__=function(_243,_244,_245){ -var _246=MochiKit.Base.isUndefinedOrNull; -this.options={"drawBackground":true,"backgroundColor":Color.whiteColor(),"padding":{left:30,right:30,top:5,bottom:10},"colorScheme":PlotKit.Base.palette(PlotKit.Base.baseColors()[1]),"strokeColor":Color.whiteColor(),"strokeColorTransform":"asStrokeColor","strokeWidth":0.5,"shouldFill":true,"shouldStroke":true,"drawXAxis":true,"drawYAxis":true,"axisLineColor":Color.blackColor(),"axisLineWidth":0.5,"axisTickSize":3,"axisLabelColor":Color.blackColor(),"axisLabelFont":"Arial","axisLabelFontSize":9,"axisLabelWidth":50,"axisLabelUseDiv":true,"pieRadius":0.4,"enableEvents":true}; -MochiKit.Base.update(this.options,_245?_245:{}); -this.layout=_244; -this.element=MochiKit.DOM.getElement(_243); -this.container=this.element.parentNode; -this.height=parseInt(this.element.getAttribute("height")); -this.width=parseInt(this.element.getAttribute("width")); -this.document=document; -this.root=this.element; -try{ -this.document=this.element.getSVGDocument(); -this.root=_246(this.document.documentElement)?this.element:this.document.documentElement; -} -catch(e){ -} -this.element.style.zIndex=1; -if(_246(this.element)){ -throw "SVGRenderer() - passed SVG object is not found"; -} -if(_246(this.container)||this.container.nodeName.toLowerCase()!="div"){ -throw "SVGRenderer() - No DIV's around the SVG."; -} -this.xlabels=new Array(); -this.ylabels=new Array(); -this.defs=this.createSVGElement("defs"); -this.area={x:this.options.padding.left,y:this.options.padding.top,w:this.width-this.options.padding.left-this.options.padding.right,h:this.height-this.options.padding.top-this.options.padding.bottom}; -MochiKit.DOM.updateNodeAttributes(this.container,{"style":{"position":"relative","width":this.width+"px"}}); -}; -PlotKit.SVGRenderer.prototype.render=function(){ -if(this.options.drawBackground){ -this._renderBackground(); -} -if(this.layout.style=="bar"){ -this._renderBarChart(); -this._renderBarAxis(); -}else{ -if(this.layout.style=="pie"){ -this._renderPieChart(); -this._renderPieAxis(); -}else{ -if(this.layout.style=="line"){ -this._renderLineChart(); -this._renderLineAxis(); -} -} -} -}; -PlotKit.SVGRenderer.prototype._renderBarOrLine=function(data,_247,_248,_249){ -var _250=this.options.colorScheme.length; -var _251=this.options.colorScheme; -var _252=MochiKit.Base.keys(this.layout.datasets); -var _253=_252.length; -for(var i=0;i<_253;i++){ -var _254=_252[i]; -var _255=new Array(); -var _256=_251[i%_250]; -if(this.options.shouldFill){ -_255["fill"]=_256.toRGBString(); -}else{ -_255["fill"]="none"; -} -if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ -if(this.options.strokeColor){ -_255["stroke"]=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_255["stroke"]=_256[this.options.strokeColorTransform]().toRGBString(); -} -} -_255["strokeWidth"]=this.options.strokeWidth; -} -if(_248){ -_248(_255); -} -var _257=function(obj){ -if(obj.name==_254){ -_247(_255,obj); -} -}; -MochiKit.Iter.forEach(data,bind(_257,this)); -if(_249){ -_249(_255); -} -} -}; -PlotKit.SVGRenderer.prototype._renderBarChart=function(){ -var bind=MochiKit.Base.bind; -var _258=function(_259,bar){ -var x=this.area.w*bar.x+this.area.x; -var y=this.area.h*bar.y+this.area.y; -var w=this.area.w*bar.w; -var h=this.area.h*bar.h; -this._drawRect(x,y,w,h,_259); -}; -this._renderBarOrLine(this.layout.bars,bind(_258,this)); -}; -PlotKit.SVGRenderer.prototype._renderLineChart=function(){ -var bind=MochiKit.Base.bind; -var _260=function(_261,_262){ -this._tempPointsBuffer+=(this.area.w*_262.x+this.area.x)+","+(this.area.h*_262.y+this.area.y)+" "; -}; -var _263=function(_264){ -this._tempPointsBuffer=""; -this._tempPointsBuffer+=(this.area.x)+","+(this.area.y+this.area.h)+" "; -}; -var _265=function(_266){ -this._tempPointsBuffer+=(this.area.w+this.area.x)+","+(this.area.h+this.area.y); -_266["points"]=this._tempPointsBuffer; -var elem=this.createSVGElement("polygon",_266); -this.root.appendChild(elem); -}; -this._renderBarOrLine(this.layout.points,bind(_260,this),bind(_263,this),bind(_265,this)); -}; -PlotKit.SVGRenderer.prototype._renderPieChart=function(){ -var _268=this.options.colorScheme.length; -var _269=this.layout.slices; -var _270=this.area.x+this.area.w*0.5; -var _271=this.area.y+this.area.h*0.5; -var _272=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); -if(_269.length==1&&(Math.abs(_269[0].startAngle)-Math.abs(_269[0].endAngle)<0.1)){ -var _273={"cx":_270,"cy":_271,"r":_272}; -var _274=this.options.colorScheme[0]; -if(this.options.shouldFill){ -_273["fill"]=_274.toRGBString(); -}else{ -_273["fill"]="none"; -} -if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ -if(this.options.strokeColor){ -_273["stroke"]=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_273["stroke"]=_274[this.options.strokeColorTransform]().toRGBString(); -} -} -_273["style"]="stroke-width: "+this.options.strokeWidth; -} -this.root.appendChild(this.createSVGElement("circle",_273)); -return; -} -for(var i=0;i<_269.length;i++){ -var _273=new Array(); -var _274=this.options.colorScheme[i%_268]; -if(this.options.shouldFill){ -_273["fill"]=_274.toRGBString(); -}else{ -_273["fill"]="none"; -} -if(this.options.shouldStroke&&(this.options.strokeColor||this.options.strokeColorTransform)){ -if(this.options.strokeColor){ -_273["stroke"]=this.options.strokeColor.toRGBString(); -}else{ -if(this.options.strokeColorTransform){ -_273["stroke"]=_274[this.options.strokeColorTransform]().toRGBString(); -} -} -_273["style"]="stroke-width:"+this.options.strokeWidth; -} -var _275=0; -if(Math.abs(_269[i].endAngle-_269[i].startAngle)>Math.PI){ -_275=1; -} -var x1=Math.cos(_269[i].startAngle-Math.PI/2)*_272; -var y1=Math.sin(_269[i].startAngle-Math.PI/2)*_272; -var x2=Math.cos(_269[i].endAngle-Math.PI/2)*_272; -var y2=Math.sin(_269[i].endAngle-Math.PI/2)*_272; -var rx=x2-x1; -var ry=y2-y1; -var _282="M"+_270+","+_271+" "; -_282+="l"+x1+","+y1+" "; -_282+="a"+_272+","+_272+" 0 "+_275+",1 "+rx+","+ry+" z"; -_273["d"]=_282; -var elem=this.createSVGElement("path",_273); -this.root.appendChild(elem); -} -}; -PlotKit.SVGRenderer.prototype._renderBarAxis=function(){ -this._renderAxis(); -}; -PlotKit.SVGRenderer.prototype._renderLineAxis=function(){ -this._renderAxis(); -}; -PlotKit.SVGRenderer.prototype._renderAxis=function(){ -if(!this.options.drawXAxis&&!this.options.drawYAxis){ -return; -} -var _283={"style":{"position":"absolute","textAlign":"center","fontSize":this.options.axisLabelFontSize+"px","zIndex":10,"color":this.options.axisLabelColor.toRGBString(),"width":this.options.axisLabelWidth+"px","overflow":"hidden"}}; -var _284={"stroke":this.options.axisLineColor.toRGBString(),"strokeWidth":this.options.axisLineWidth}; -if(this.options.drawYAxis){ -if(this.layout.yticks){ -var _285=function(tick){ -var x=this.area.x; -var y=this.area.y+tick[0]*this.area.h; -this._drawLine(x,y,x-3,y,_284); -if(this.options.axisLabelUseDiv){ -var _286=DIV(_283,tick[1]); -_286.style.top=(y-this.options.axisLabelFontSize)+"px"; -_286.style.left=(x-this.options.padding.left+this.options.axisTickSize)+"px"; -_286.style.textAlign="left"; -_286.style.width=(this.options.padding.left-3)+"px"; -MochiKit.DOM.appendChildNodes(this.container,_286); -this.ylabels.push(_286); -}else{ -var _287={y:y+3,x:(x-this.options.padding.left+3),width:(this.options.padding.left-this.options.axisTickSize)+"px",height:(this.options.axisLabelFontSize+3)+"px",fontFamily:"Arial",fontSize:this.options.axisLabelFontSize+"px",fill:this.options.axisLabelColor.toRGBString()}; -var _286=this.createSVGElement("text",_287); -_286.appendChild(this.document.createTextNode(tick[1])); -this.root.appendChild(_286); -} -}; -MochiKit.Iter.forEach(this.layout.yticks,bind(_285,this)); -} -this._drawLine(this.area.x,this.area.y,this.area.x,this.area.y+this.area.h,_284); -} -if(this.options.drawXAxis){ -if(this.layout.xticks){ -var _285=function(tick){ -var x=this.area.x+tick[0]*this.area.w; -var y=this.area.y+this.area.h; -this._drawLine(x,y,x,y+this.options.axisTickSize,_284); -if(this.options.axisLabelUseDiv){ -var _288=DIV(_283,tick[1]); -_288.style.top=(y+this.options.axisTickSize)+"px"; -_288.style.left=(x-this.options.axisLabelWidth/2)+"px"; -_288.style.textAlign="center"; -_288.style.width=this.options.axisLabelWidth+"px"; -MochiKit.DOM.appendChildNodes(this.container,_288); -this.xlabels.push(_288); -}else{ -var _289={y:(y+this.options.axisTickSize+this.options.axisLabelFontSize),x:x-3,width:this.options.axisLabelWidth+"px",height:(this.options.axisLabelFontSize+3)+"px",fontFamily:"Arial",fontSize:this.options.axisLabelFontSize+"px",fill:this.options.axisLabelColor.toRGBString(),textAnchor:"middle"}; -var _288=this.createSVGElement("text",_289); -_288.appendChild(this.document.createTextNode(tick[1])); -this.root.appendChild(_288); -} -}; -MochiKit.Iter.forEach(this.layout.xticks,bind(_285,this)); -} -this._drawLine(this.area.x,this.area.y+this.area.h,this.area.x+this.area.w,this.area.y+this.area.h,_284); -} -}; -PlotKit.SVGRenderer.prototype._renderPieAxis=function(){ -if(this.layout.xticks){ -var _290=new Array(); -for(var i=0;iMath.PI*2){ -_297=_297-Math.PI*2; -}else{ -if(_297<0){ -_297=_297+Math.PI*2; -} -} -var _298=_291+Math.sin(_297)*(_293+10); -var _299=_292-Math.cos(_297)*(_293+10); -var _300={"position":"absolute","zIndex":11,"width":_294+"px","fontSize":this.options.axisLabelFontSize+"px","overflow":"hidden","color":this.options.axisLabelColor.toHexString()}; -var _301={"width":_294+"px","fontSize":this.options.axisLabelFontSize+"px","height":(this.options.axisLabelFontSize+3)+"px","fill":this.options.axisLabelColor.toRGBString()}; -if(_297<=Math.PI*0.5){ -MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"top","left":_298+"px","top":(_299-this.options.axisLabelFontSize)+"px"}); -MochiKit.Base.update(_301,{"x":_298,"y":(_299-this.options.axisLabelFontSize),"textAnchor":"left"}); -}else{ -if((_297>Math.PI*0.5)&&(_297<=Math.PI)){ -MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); -MochiKit.Base.update(_301,{"textAnchor":"left","x":_298,"y":_299}); -}else{ -if((_297>Math.PI)&&(_297<=Math.PI*1.5)){ -MochiKit.Base.update(_300,{"textAlign":"right","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); -MochiKit.Base.update(_301,{"textAnchor":"right","x":_298-_294,"y":_299}); -}else{ -MochiKit.Base.update(_300,{"textAlign":"left","verticalAlign":"bottom","left":_298+"px","top":_299+"px"}); -MochiKit.Base.update(_301,{"textAnchor":"left","x":_298-_294,"y":_299-this.options.axisLabelFontSize}); -} -} -} -if(this.options.axisLabelUseDiv){ -var _302=DIV({"style":_300},this.layout.xticks[i][1]); -this.xlabels.push(_302); -MochiKit.DOM.appendChildNodes(this.container,_302); -}else{ -var _302=this.createSVGElement("text",_301); -_302.appendChild(this.document.createTextNode(this.layout.xticks[i][1])); -this.root.appendChild(_302); -} -} -} -}; -PlotKit.SVGRenderer.prototype._renderBackground=function(){ -var opts={"stroke":"none","fill":this.options.backgroundColor.toRGBString()}; -this._drawRect(0,0,this.width,this.height,opts); -}; -PlotKit.SVGRenderer.prototype._drawRect=function(x,y,w,h,_304){ -var _305={x:x+"px",y:y+"px",width:w+"px",height:h+"px"}; -if(_304){ -MochiKit.Base.update(_305,_304); -} -var elem=this.createSVGElement("rect",_305); -this.root.appendChild(elem); -}; -PlotKit.SVGRenderer.prototype._drawLine=function(x1,y1,x2,y2,_306){ -var _307={x1:x1+"px",y1:y1+"px",x2:x2+"px",y2:y2+"px"}; -if(_306){ -MochiKit.Base.update(_307,_306); -} -var elem=this.createSVGElement("line",_307); -this.root.appendChild(elem); -}; -PlotKit.SVGRenderer.prototype.clear=function(){ -while(this.element.firstChild){ -this.element.removeChild(this.element.firstChild); -} -if(this.options.axisLabelUseDiv){ -for(var i=0;i=6)&&(!_313)){ -var _314=_312["width"]?_312["width"]:"100"; -var _315=_312["height"]?_312["height"]:"100"; -var eid=_312["id"]?_312["id"]:"notunique"; -var html=""; -var _318=document.createElement(html); -var _319=_318.getSVGDocument().createElementNS(PlotKit.SVGRenderer.SVGNS,"svg"); -_319.setAttribute("width",_314); -_319.setAttribute("height",_315); -_318.getSVGDocument().appendChild(_319); -return _318; -}else{ -return PlotKit.SVGRenderer.prototype.createSVGElement("svg",_312); -} -}; -PlotKit.SVGRenderer.isSupported=function(){ -var _320=(navigator.userAgent.toLowerCase().indexOf("opera")!=-1); -var _321=navigator.appVersion.match(/MSIE (\d\.\d)/); -var _322=navigator.userAgent.match(/AppleWebKit\/(\d+)/); -var _323=navigator.userAgent.match(/Opera\/(\d*\.\d*)/); -var _324=navigator.userAgent.match(/rv:(\d*\.\d*).*Gecko/); -var _325="http://www.w3.org/TR/SVG11/feature#SVG"; -if(_321&&(_321[1]>=6)&&!_320){ -return document.implementation.hasFeature(_325,"1.1"); -} -if(_323&&(_323[1]>8.9)){ -return true; -} -if(_324&&(_324>1.7)){ -return true; -} -return false; -}; -PlotKit.SVG={}; -PlotKit.SVG.SVGRenderer=PlotKit.SVGRenderer; -PlotKit.SVG.EXPORT=["SVGRenderer"]; -PlotKit.SVG.EXPORT_OK=["SVGRenderer"]; -PlotKit.SVG.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.SVG.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.SVG); -try{ -if(typeof (PlotKit.CanvasRenderer)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "SweetCanvas depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, Canvas}"; -} -if(typeof (PlotKit.SweetCanvasRenderer)=="undefined"){ -PlotKit.SweetCanvasRenderer={}; -} -PlotKit.SweetCanvasRenderer=function(_326,_327,_328){ -if(arguments.length>0){ -this.__init__(_326,_327,_328); -} -}; -PlotKit.SweetCanvasRenderer.NAME="PlotKit.SweetCanvasRenderer"; -PlotKit.SweetCanvasRenderer.VERSION=PlotKit.VERSION; -PlotKit.SweetCanvasRenderer.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.SweetCanvasRenderer.toString=function(){ -return this.__repr__(); -}; -PlotKit.SweetCanvasRenderer.prototype=new PlotKit.CanvasRenderer(); -PlotKit.SweetCanvasRenderer.prototype.constructor=PlotKit.SweetCanvasRenderer; -PlotKit.SweetCanvasRenderer.__super__=PlotKit.CanvasRenderer.prototype; -PlotKit.SweetCanvasRenderer.prototype.__init__=function(el,_330,opts){ -var _331=PlotKit.Base.officeBlue(); -MochiKit.Base.update(_331,opts); -PlotKit.SweetCanvasRenderer.__super__.__init__.call(this,el,_330,_331); -}; -PlotKit.SweetCanvasRenderer.prototype._renderBarChart=function(){ -var bind=MochiKit.Base.bind; -var _332=Color.blackColor().colorWithAlpha(0.1).toRGBString(); -var _333=function(_334,x,y,w,h){ -_334.fillStyle=_332; -_334.fillRect(x-2,y-2,w+4,h+2); -_334.fillStyle=_332; -_334.fillRect(x-1,y-1,w+2,h+1); -}; -var _335=this.options.colorScheme.length; -var _336=this.options.colorScheme; -var _337=PlotKit.Base.keys(this.layout.datasets); -var _338=_337.length; -var _339=function(name){ -for(var i=0;i<_338;i++){ -if(name==_337[i]){ -return _336[i%_335]; -} -} -return _336[0]; -}; -var _340=function(_341,bar){ -var x=this.area.w*bar.x+this.area.x; -var y=this.area.h*bar.y+this.area.y; -var w=this.area.w*bar.w; -var h=this.area.h*bar.h; -if((w<1)||(h<1)){ -return; -} -_341.save(); -_341.shadowBlur=5; -_341.shadowColor=Color.fromHexString("#888888").toRGBString(); -if(this.isIE){ -_341.save(); -_341.fillStyle="#cccccc"; -_341.fillRect(x-2,y-2,w+4,h+2); -_341.restore(); -}else{ -_333(_341,x,y,w,h); -} -if(this.options.shouldFill){ -_341.fillStyle=_339(bar.name).toRGBString(); -_341.fillRect(x,y,w,h); -} -_341.shadowBlur=0; -_341.strokeStyle=Color.whiteColor().toRGBString(); -_341.lineWidth=2; -if(this.options.shouldStroke){ -_341.strokeRect(x,y,w,h); -} -_341.restore(); -}; -this._renderBarChartWrap(this.layout.bars,bind(_340,this)); -}; -PlotKit.SweetCanvasRenderer.prototype._renderLineChart=function(){ -var _342=this.element.getContext("2d"); -var _343=this.options.colorScheme.length; -var _344=this.options.colorScheme; -var _345=PlotKit.Base.keys(this.layout.datasets); -var _346=_345.length; -var bind=MochiKit.Base.bind; -for(var i=0;i<_346;i++){ -var _347=_345[i]; -var _348=_344[i%_343]; -var _349=this.options.strokeColorTransform; -_342.save(); -var _350=function(ctx){ -ctx.beginPath(); -ctx.moveTo(this.area.x,this.area.y+this.area.h); -var _351=function(ctx_,_352){ -if(_352.name==_347){ -ctx_.lineTo(this.area.w*_352.x+this.area.x,this.area.h*_352.y+this.area.y); -} -}; -MochiKit.Iter.forEach(this.layout.points,partial(_351,ctx),this); -ctx.lineTo(this.area.w+this.area.x,this.area.h+this.area.y); -ctx.lineTo(this.area.x,this.area.y+this.area.h); -ctx.closePath(); -}; -if(this.options.shouldFill){ -_342.save(); -if(this.isIE){ -_342.fillStyle="#cccccc"; -}else{ -_342.fillStyle=Color.blackColor().colorWithAlpha(0.2).toRGBString(); -} -_342.translate(-1,-2); -bind(_350,this)(_342); -if(this.options.shouldFill){ -_342.fill(); -} -_342.restore(); -} -_342.shadowBlur=5; -_342.shadowColor=Color.fromHexString("#888888").toRGBString(); -_342.fillStyle=_348.toRGBString(); -_342.lineWidth=2; -_342.strokeStyle=Color.whiteColor().toRGBString(); -if(this.options.shouldFill){ -bind(_350,this)(_342); -_342.fill(); -} -if(this.options.shouldStroke){ -bind(_350,this)(_342); -_342.stroke(); -} -_342.restore(); -} -}; -PlotKit.SweetCanvasRenderer.prototype._renderPieChart=function(){ -var _353=this.element.getContext("2d"); -var _354=this.options.colorScheme.length; -var _355=this.layout.slices; -var _356=this.area.x+this.area.w*0.5; -var _357=this.area.y+this.area.h*0.5; -var _358=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); -if(this.isIE){ -_356=parseInt(_356); -_357=parseInt(_357); -_358=parseInt(_358); -} -if(!this.isIE){ -_353.save(); -var _359=Color.blackColor().colorWithAlpha(0.2); -_353.fillStyle=_359.toRGBString(); -_353.shadowBlur=5; -_353.shadowColor=Color.fromHexString("#888888").toRGBString(); -_353.translate(1,1); -_353.beginPath(); -_353.moveTo(_356,_357); -_353.arc(_356,_357,_358+2,0,Math.PI*2,false); -_353.closePath(); -_353.fill(); -_353.restore(); -} -_353.save(); -_353.strokeStyle=Color.whiteColor().toRGBString(); -_353.lineWidth=2; -for(var i=0;i<_355.length;i++){ -var _360=this.options.colorScheme[i%_354]; -_353.fillStyle=_360.toRGBString(); -var _361=function(){ -_353.beginPath(); -_353.moveTo(_356,_357); -_353.arc(_356,_357,_358,_355[i].startAngle-Math.PI/2,_355[i].endAngle-Math.PI/2,false); -_353.lineTo(_356,_357); -_353.closePath(); -}; -if(Math.abs(_355[i].startAngle-_355[i].endAngle)>0.0001){ -if(this.options.shouldFill){ -_361(); -_353.fill(); -} -if(this.options.shouldStroke){ -_361(); -_353.stroke(); -} -} -} -_353.restore(); -}; -PlotKit.SweetCanvasRenderer.prototype._renderBackground=function(){ -var _362=this.element.getContext("2d"); -if(this.layout.style=="bar"||this.layout.style=="line"){ -_362.save(); -_362.fillStyle=this.options.backgroundColor.toRGBString(); -_362.fillRect(this.area.x,this.area.y,this.area.w,this.area.h); -_362.strokeStyle=this.options.axisLineColor.toRGBString(); -_362.lineWidth=1; -var _363=this.layout.yticks; -var _364=false; -if(this.layout.style=="bar"&&this.layout.options.barOrientation=="horizontal"){ -_363=this.layout.xticks; -_364=true; -} -for(var i=0;i<_363.length;i++){ -var x1=0; -var y1=0; -var x2=0; -var y2=0; -if(_364){ -x1=_363[i][0]*this.area.w+this.area.x; -y1=this.area.y; -x2=x1; -y2=y1+this.area.h; -}else{ -x1=this.area.x; -y1=_363[i][0]*this.area.h+this.area.y; -x2=x1+this.area.w; -y2=y1; -} -_362.beginPath(); -_362.moveTo(x1,y1); -_362.lineTo(x2,y2); -_362.closePath(); -_362.stroke(); -} -_362.restore(); -}else{ -PlotKit.SweetCanvasRenderer.__super__._renderBackground.call(this); -} -}; -PlotKit.SweetCanvas={}; -PlotKit.SweetCanvas.SweetCanvasRenderer=PlotKit.SweetCanvasRenderer; -PlotKit.SweetCanvas.EXPORT=["SweetCanvasRenderer"]; -PlotKit.SweetCanvas.EXPORT_OK=["SweetCanvasRenderer"]; -PlotKit.SweetCanvas.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.SweetCanvas.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.SweetCanvas); -try{ -if(typeof (PlotKit.SVGRenderer)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "SweetSVG depends on MochiKit.{Base,Color,DOM,Format} and PlotKit.{Layout, SVG}"; -} -if(typeof (PlotKit.SweetSVGRenderer)=="undefined"){ -PlotKit.SweetSVGRenderer={}; -} -PlotKit.SweetSVGRenderer=function(_365,_366,_367){ -if(arguments.length>0){ -this.__init__(_365,_366,_367); -} -}; -PlotKit.SweetSVGRenderer.NAME="PlotKit.SweetSVGRenderer"; -PlotKit.SweetSVGRenderer.VERSION=PlotKit.VERSION; -PlotKit.SweetSVGRenderer.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.SweetSVGRenderer.toString=function(){ -return this.__repr__(); -}; -PlotKit.SweetSVGRenderer.prototype=new PlotKit.SVGRenderer(); -PlotKit.SweetSVGRenderer.prototype.constructor=PlotKit.SweetSVGRenderer; -PlotKit.SweetSVGRenderer.__super__=PlotKit.SVGRenderer.prototype; -PlotKit.SweetSVGRenderer.prototype.__init__=function(_368,_369,_370){ -var _371=PlotKit.Base.officeBlue(); -MochiKit.Base.update(_371,_370); -PlotKit.SweetSVGRenderer.__super__.__init__.call(this,_368,_369,_371); -}; -PlotKit.SweetSVGRenderer.prototype._addDropShadowFilter=function(){ -var _372=this.createSVGElement("filter",{x:0,y:0,"id":"dropShadow"}); -var _373=this.createSVGElement("feOffset",{"in":"SourceGraphic","dx":0,"dy":0,"result":"topCopy"}); -var blur=this.createSVGElement("feGaussianBlur",{"in":"SourceAlpha","StdDeviation":2,"result":"shadow"}); -var _375=this.createSVGElement("feOffset",{"in":"shadow","dx":-1,"dy":-2,"result":"movedShadow"}); -var _376=this.createSVGElement("feMerge"); -var _377=this.createSVGElement("feMergeNode",{"in":"topCopy"}); -var _378=this.createSVGElement("feMergeNode",{"in":"movedShadow"}); -_376.appendChild(_377); -_376.appendChild(_378); -_372.appendChild(_373); -_372.appendChild(blur); -_372.appendChild(_375); -_372.appendChild(_376); -this.defs.appendChild(_372); -}; -PlotKit.SweetSVGRenderer.prototype._renderBarChart=function(){ -var bind=MochiKit.Base.bind; -var _379=Color.blackColor().toRGBString(); -var _380="fill:"+_379+";fill-opacity:0.15"; -var _381="stroke-width: 2.0; stroke:"+Color.whiteColor().toRGBString(); -var _382=function(_383,bar){ -var x=this.area.w*bar.x+this.area.x; -var y=this.area.h*bar.y+this.area.y; -var w=this.area.w*bar.w; -var h=this.area.h*bar.h; -if((w<1)||(h<1)){ -return; -} -_383["style"]=_381; -this._drawRect(x-2,y-1,w+4,h+2,{"style":_380}); -this._drawRect(x,y,w,h,_383); -}; -this._renderBarOrLine(this.layout.bars,bind(_382,this)); -}; -PlotKit.SweetSVGRenderer.prototype._renderLineChart=function(){ -var bind=MochiKit.Base.bind; -var _384=Color.blackColor().toRGBString(); -var _385="fill:"+_384+";fill-opacity:0.15"; -var _386="stroke-width: 2.0; stroke:"+Color.whiteColor().toRGBString(); -var _387=function(_388,_389){ -this._tempPointsBuffer+=(this.area.w*_389.x+this.area.x)+","+(this.area.h*_389.y+this.area.y)+" "; -}; -var _390=function(_391){ -this._tempPointsBuffer=""; -this._tempPointsBuffer+=(this.area.x)+","+(this.area.y+this.area.h)+" "; -}; -var _392=function(_393){ -this._tempPointsBuffer+=(this.area.w+this.area.x)+","+(this.area.h+this.area.y); -_393["points"]=this._tempPointsBuffer; -_393["stroke"]="none"; -_393["transform"]="translate(-2, -1)"; -_393["style"]=_385; -var _394=this.createSVGElement("polygon",_393); -this.root.appendChild(_394); -_393["transform"]=""; -_393["style"]=_386; -var elem=this.createSVGElement("polygon",_393); -this.root.appendChild(elem); -}; -this._renderBarOrLine(this.layout.points,bind(_387,this),bind(_390,this),bind(_392,this)); -}; -PlotKit.SweetSVGRenderer.prototype._renderPieChart=function(){ -var _395=this.area.x+this.area.w*0.5; -var _396=this.area.y+this.area.h*0.5; -var _397=Color.blackColor().toRGBString(); -var _398=Math.min(this.area.w*this.options.pieRadius,this.area.h*this.options.pieRadius); -var _399="fill:"+_397+";fill-opacity:0.15"; -var _400=this.createSVGElement("circle",{"style":_399,"cx":_395+1,"cy":_396+1,"r":_398+1}); -this.root.appendChild(_400); -PlotKit.SweetSVGRenderer.__super__._renderPieChart.call(this); -}; -PlotKit.SweetSVGRenderer.prototype._renderBackground=function(){ -var _401={"fill":this.options.backgroundColor.toRGBString(),"stroke":"none"}; -if(this.layout.style=="bar"||this.layout.style=="line"){ -this._drawRect(this.area.x,this.area.y,this.area.w,this.area.h,_401); -var _402=this.layout.yticks; -var _403=false; -if(this.layout.style=="bar"&&this.layout.options.barOrientation=="horizontal"){ -_402=this.layout.xticks; -_403=true; -} -for(var i=0;i<_402.length;i++){ -var x=0; -var y=0; -var w=0; -var h=0; -if(_403){ -x=_402[i][0]*this.area.w+this.area.x; -y=this.area.y; -w=1; -h=this.area.w; -}else{ -x=this.area.x; -y=_402[i][0]*this.area.h+this.area.y; -w=this.area.w; -h=1; -} -this._drawRect(x,y,w,h,{"fill":this.options.axisLineColor.toRGBString()}); -} -}else{ -PlotKit.SweetSVGRenderer.__super__._renderBackground.call(this); -} -}; -PlotKit.SweetSVG={}; -PlotKit.SweetSVG.SweetSVGRenderer=PlotKit.SweetSVGRenderer; -PlotKit.SweetSVG.EXPORT=["SweetSVGRenderer"]; -PlotKit.SweetSVG.EXPORT_OK=["SweetSVGRenderer"]; -PlotKit.SweetSVG.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.SweetSVG.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.SweetSVG); -try{ -if(typeof (PlotKit.CanvasRenderer)=="undefined"){ -throw ""; -} -} -catch(e){ -throw "PlotKit.EasyPlot depends on all of PlotKit's components"; -} -if(typeof (PlotKit.EasyPlot)=="undefined"){ -PlotKit.EasyPlot={}; -} -PlotKit.EasyPlot.NAME="PlotKit.EasyPlot"; -PlotKit.EasyPlot.VERSION=PlotKit.VERSION; -PlotKit.EasyPlot.__repr__=function(){ -return "["+this.NAME+" "+this.VERSION+"]"; -}; -PlotKit.EasyPlot.toString=function(){ -return this.__repr__(); -}; -PlotKit.EasyPlot=function(_404,_405,_406,_407){ -this.layout=new Layout(_404,_405); -this.divElem=_406; -this.width=parseInt(_406.getAttribute("width")); -this.height=parseInt(_406.getAttribute("height")); -this.deferredCount=0; -if(this.width<1){ -this.width=this.divElem.width?this.divElem.width:300; -} -if(this.height<1){ -this.height=this.divElem.height?this.divElem.height:300; -} -if(isArrayLike(_407)){ -for(var i=0;i<_407.length;i++){ -if(typeof (_407[i])=="string"){ -this.deferredCount++; -var d=MochiKit.Async.doSimpleXMLHttpRequest(_407[i]); -d.addCallback(MochiKit.Base.bind(PlotKit.EasyPlot.onDataLoaded,this)); -}else{ -if(isArrayLike(_407[i])){ -this.layout.addDataset("data-"+i,_407[i]); -} -} -} -}else{ -if(!isUndefinedOrNull(_407)){ -throw "Passed datasources are not Array like"; -} -} -if(CanvasRenderer.isSupported()){ -this.element=CANVAS({"id":this.divElem.getAttribute("id")+"-canvas","width":this.width,"height":this.height},""); -this.divElem.appendChild(this.element); -this.renderer=new SweetCanvasRenderer(this.element,this.layout,_405); -}else{ -if(SVGRenderer.isSupported()){ -this.element=SVGRenderer.SVG({"id":this.divElem.getAttribute("id")+"-svg","width":this.width,"height":this.height,"version":"1.1","baseProfile":"full"},""); -this.divElem.appendChild(this.element); -this.renderer=new SweetSVGRenderer(this.element,this.layout,_405); -} -} -if((this.deferredCount==0)&&(PlotKit.Base.keys(this.layout.datasets).length>0)){ -this.layout.evaluate(); -this.renderer.clear(); -this.renderer.render(); -} -}; -PlotKit.EasyPlot.onDataLoaded=function(_409){ -var _410=new Array(); -var _411=_409.responseText.split("\n"); -for(var i=0;i<_411.length;i++){ -var _412=MochiKit.Format.strip(_411[i]); -if((_412.length>1)&&(_412.charAt(0)!="#")){ -_410.push(_412.split(",")); -} -} -this.layout.addDataset("data-ajax-"+this.deferredCount,_410); -this.deferredCount--; -if((this.deferredCount==0)&&(PlotKit.Base.keys(this.layout.datasets).length>0)){ -this.layout.evaluate(); -this.renderer.clear(); -this.renderer.render(); -} -}; -PlotKit.EasyPlot.prototype.reload=function(){ -this.layout.evaluate(); -this.renderer.clear(); -this.renderer.render(); -}; -PlotKit.EasyPlotModule={}; -PlotKit.EasyPlotModule.EasyPlot=PlotKit.EasyPlot; -PlotKit.EasyPlotModule.EXPORT=["EasyPlot"]; -PlotKit.EasyPlotModule.EXPORT_OK=[]; -PlotKit.EasyPlotModule.__new__=function(){ -var m=MochiKit.Base; -m.nameFunctions(this); -this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; -}; -PlotKit.EasyPlotModule.__new__(); -MochiKit.Base._exportSymbols(this,PlotKit.EasyPlotModule); - - diff --git a/mote/v1/openwrt/package/luci/host/www/luci/splash/index.html b/mote/v1/openwrt/package/luci/host/www/luci/splash/index.html deleted file mode 100644 index 5257312..0000000 --- a/mote/v1/openwrt/package/luci/host/www/luci/splash/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - -Flukso Configuration Interface - -