Merge pull request #489 from hnyman/remove-bno-theme
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 4 Oct 2015 15:57:45 +0000 (18:57 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 4 Oct 2015 15:57:45 +0000 (18:57 +0300)
themes: remove freifunk-bno theme

29 files changed:
applications/luci-app-statistics/luasrc/controller/luci_statistics/luci_statistics.lua
applications/luci-app-statistics/luasrc/statistics/i18n.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
modules/luci-base/htdocs/luci-static/resources/icons/bridge.png
modules/luci-base/htdocs/luci-static/resources/icons/bridge_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/encryption.png
modules/luci-base/htdocs/luci-static/resources/icons/encryption_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/ethernet.png
modules/luci-base/htdocs/luci-static/resources/icons/ethernet_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/port_down.png
modules/luci-base/htdocs/luci-static/resources/icons/port_up.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-0-25.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-0.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-25-50.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-50-75.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-75-100.png
modules/luci-base/htdocs/luci-static/resources/icons/signal-none.png
modules/luci-base/htdocs/luci-static/resources/icons/switch.png
modules/luci-base/htdocs/luci-static/resources/icons/switch_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/tunnel.png
modules/luci-base/htdocs/luci-static/resources/icons/tunnel_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/vlan.png
modules/luci-base/htdocs/luci-static/resources/icons/vlan_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/wifi.png
modules/luci-base/htdocs/luci-static/resources/icons/wifi_big.png
modules/luci-base/htdocs/luci-static/resources/icons/wifi_big_disabled.png
modules/luci-base/htdocs/luci-static/resources/icons/wifi_disabled.png
modules/luci-mod-admin-full/luasrc/view/admin_status/index.htm
protocols/luci-proto-ipv6/luasrc/model/cbi/admin_network/proto_map.lua

index d0415cd..d9c52ed 100644 (file)
@@ -170,7 +170,7 @@ function statistics_render()
        if #instances == 0 then
                --instances = { graph.tree:plugin_instances( plugin )[1] }
                instances = graph.tree:plugin_instances( plugin )
-               is_index = true
+               is_index = (#instances > 1)
 
        -- index instance requested
        elseif instances[1] == "-" then
index 5a2800d..7877e61 100644 (file)
@@ -26,15 +26,6 @@ function Instance._subst( self, str, val )
        return str
 end
 
-function Instance._translate( self, key, alt )
-       local val = self.i18n.string(key)
-       if val ~= key then
-               return val
-       else
-               return alt
-       end
-end
-
 function Instance.title( self, plugin, pinst, dtype, dinst, user_title )
 
        local title = user_title or
@@ -73,24 +64,17 @@ end
 
 function Instance.ds( self, source )
 
-       local label = source.title or self:_translate(
-               string.format( "stat_ds_%s_%s_%s", source.type, source.instance, source.ds ),
-               self:_translate(
-                       string.format( "stat_ds_%s_%s", source.type, source.instance ),
-                       self:_translate(
-                               string.format( "stat_ds_label_%s__%s", source.type, source.ds ),
-                               self:_translate(
-                                       string.format( "stat_ds_%s", source.type ),
-                                       source.type .. "_" .. source.instance:gsub("[^%w]","_") .. "_" .. source.ds
-                               )
-                       )
-               )
-       )
+       local label = source.title or
+               "dt=%s/di=%s/ds=%s" % {
+                       (source.type     and #source.type     > 0) and source.type     or "(nil)",
+                       (source.instance and #source.instance > 0) and source.instance or "(nil)",
+                       (source.ds       and #source.ds       > 0) and source.ds       or "(nil)"
+               }
 
        return self:_subst( label, {
                dtype = source.type,
                dinst = source.instance,
                dsrc  = source.ds
-       } )
+       } ):gsub(":", "\\:")
 
 end
index b4f2ac1..9e879a4 100644 (file)
@@ -22,11 +22,13 @@ function rrdargs( graph, plugin, plugin_instance )
                        -- special options for single data lines
                        options = {
                                if_octets__tx = {
+                                       title = "Bytes (TX)",
                                        total = true,           -- report total amount of bytes
                                        color = "00ff00"        -- tx is green
                                },
 
                                if_octets__rx = {
+                                       title = "Bytes (RX)",
                                        flip  = true,           -- flip rx line
                                        total = true,           -- report total amount of bytes
                                        color = "0000ff"        -- rx is blue
@@ -59,6 +61,7 @@ function rrdargs( graph, plugin, plugin_instance )
                        options = {
                                -- processed packets (tx DS)
                                if_packets__tx = {
+                                       title   = "Total   (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of bytes
                                        color   = "00ff00"      -- processed tx is green
@@ -66,6 +69,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- processed packets (rx DS)
                                if_packets__rx = {
+                                       title   = "Total   (RX)",
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
                                        total   = true,         -- report total amount of bytes
@@ -74,6 +78,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- dropped packets (tx DS)
                                if_dropped__tx = {
+                                       title   = "Dropped (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of bytes
                                        color   = "660055"      -- dropped tx is ... dunno ;)
@@ -81,14 +86,16 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- dropped packets (rx DS)
                                if_dropped__rx = {
+                                       title   = "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
+                                       color   = "ff00ff"      -- dropped rx is violett
                                },
 
                                -- packet errors (tx DS)
                                if_errors__tx = {
+                                       title   = "Errors  (TX)",
                                        overlay = true,         -- don't summarize
                                        total   = true,         -- report total amount of packets
                                        color   = "ff5500"      -- tx errors are orange
@@ -96,6 +103,7 @@ function rrdargs( graph, plugin, plugin_instance )
 
                                -- packet errors (rx DS)
                                if_errors__rx = {
+                                       title   = "Errors  (RX)",
                                        overlay = true,         -- don't summarize
                                        flip    = true,         -- flip rx line
                                        total   = true,         -- report total amount of packets
@@ -122,6 +130,7 @@ function rrdargs( graph, plugin, plugin_instance )
                        options = {
                                -- multicast packets
                                if_multicast = {
+                                       title = "Packets",
                                        total = true,           -- report total amount of packets
                                        color = "0000ff"        -- multicast is blue
                                }
@@ -146,6 +155,7 @@ function rrdargs( graph, plugin, plugin_instance )
                        options = {
                                -- collision rate
                                if_collisions = {
+                                       title = "Collisions",
                                        total = true,           -- report total amount of packets
                                        color = "ff0000"        -- collsions are red
                                }
@@ -173,15 +183,19 @@ function rrdargs( graph, plugin, plugin_instance )
                        },
 
                        -- special options for single data lines
-                       options = {     -- XXX: fixme (define colors...)
-                               if_tx_errors = {
-                                       total = true
-                               },
-
-                               if_rx_errors = {
-                                       flip  = true,
-                                       total = true
-                               }
+                       options = {
+                               if_tx_errors_aborted_value   = { total = true, color = "ffff00", title = "Aborted   (TX)" },
+                               if_tx_errors_carrier_value   = { total = true, color = "ffcc00", title = "Carrier   (TX)" },
+                               if_tx_errors_fifo_value      = { total = true, color = "ff9900", title = "Fifo      (TX)" },
+                               if_tx_errors_heartbeat_value = { total = true, color = "ff6600", title = "Heartbeat (TX)" },
+                               if_tx_errors_window_value    = { total = true, color = "ff3300", title = "Window    (TX)" },
+
+                               if_rx_errors_length_value    = { flip = true, total = true, color = "ff0000", title = "Length    (RX)" },
+                               if_rx_errors_missed_value    = { flip = true, total = true, color = "ff0033", title = "Missed    (RX)" },
+                               if_rx_errors_over_value      = { flip = true, total = true, color = "ff0066", title = "Over      (RX)" },
+                               if_rx_errors_crc_value       = { flip = true, total = true, color = "ff0099", title = "CRC       (RX)" },
+                               if_rx_errors_fifo_value      = { flip = true, total = true, color = "ff00cc", title = "Fifo      (RX)" },
+                               if_rx_errors_frame_value     = { flip = true, total = true, color = "ff00ff", title = "Frame     (RX)" }
                        }
                }
        }
index 4c163bf..7faadec 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/bridge.png and b/modules/luci-base/htdocs/luci-static/resources/icons/bridge.png differ
index 0f367c5..b3e620b 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/bridge_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/bridge_disabled.png differ
index 41d2ba9..7762833 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/encryption.png and b/modules/luci-base/htdocs/luci-static/resources/icons/encryption.png differ
index f2e05a4..9a8721b 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/encryption_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/encryption_disabled.png differ
index a025381..e3d24f2 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/ethernet.png and b/modules/luci-base/htdocs/luci-static/resources/icons/ethernet.png differ
index 2bb02e4..d8792df 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/ethernet_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/ethernet_disabled.png differ
index 25ea172..5a2b235 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/port_down.png and b/modules/luci-base/htdocs/luci-static/resources/icons/port_down.png differ
index e063037..8105e77 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/port_up.png and b/modules/luci-base/htdocs/luci-static/resources/icons/port_up.png differ
index 2e5dff4..b3a8118 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-0-25.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-0-25.png differ
index 114583a..333b155 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-0.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-0.png differ
index ee8cc4f..b465de3 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-25-50.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-25-50.png differ
index 26bcbf7..cd7bcaf 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-50-75.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-50-75.png differ
index 5cffaa1..f7a3658 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-75-100.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-75-100.png differ
index b77585c..4a11356 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/signal-none.png and b/modules/luci-base/htdocs/luci-static/resources/icons/signal-none.png differ
index 5c99ba5..be99b19 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/switch.png and b/modules/luci-base/htdocs/luci-static/resources/icons/switch.png differ
index b8c84c8..54588d2 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/switch_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/switch_disabled.png differ
index c5a09dd..63eabfe 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/tunnel.png and b/modules/luci-base/htdocs/luci-static/resources/icons/tunnel.png differ
index ad9856c..ca79d81 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/tunnel_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/tunnel_disabled.png differ
index 5c99ba5..be99b19 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/vlan.png and b/modules/luci-base/htdocs/luci-static/resources/icons/vlan.png differ
index b8c84c8..54588d2 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/vlan_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/vlan_disabled.png differ
index 528ce2b..80a23e8 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/wifi.png and b/modules/luci-base/htdocs/luci-static/resources/icons/wifi.png differ
index d73a5e7..9e466ae 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/wifi_big.png and b/modules/luci-base/htdocs/luci-static/resources/icons/wifi_big.png differ
index af93b37..6f9fff3 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/wifi_big_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/wifi_big_disabled.png differ
index 338a34f..e989a2b 100644 (file)
Binary files a/modules/luci-base/htdocs/luci-static/resources/icons/wifi_disabled.png and b/modules/luci-base/htdocs/luci-static/resources/icons/wifi_disabled.png differ
index 07a96b2..a98d790 100644 (file)
@@ -88,7 +88,9 @@
                if has_dsl then
                        local dsl_stat = luci.sys.exec("/etc/init.d/dsl_control lucistat")
                        local dsl_func = loadstring(dsl_stat)
-                       rv.dsl = dsl_func()
+                       if dsl_func then
+                               rv.dsl = dsl_func()
+                       end
                end
 
                luci.http.prepare_content("application/json")
index 2f8108e..37d4ec9 100644 (file)
@@ -50,7 +50,7 @@ ip6prefixlen.datatype    = "range(0,64)"
 
 
 s:taboption("general", Value, "ealen",
-       translate("EA-bits length")).datatype = "range(0,16)"
+       translate("EA-bits length")).datatype = "range(0,48)"
 
 s:taboption("general", Value, "psidlen",
        translate("PSID-bits length")).datatype = "range(0,16)"