luci-app-statistics: fix whitespaces in rrdtool definitions
authorFlorian Eckert <fe@dev.tdt.de>
Mon, 21 Jan 2019 13:05:57 +0000 (14:05 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Mon, 21 Jan 2019 13:42:01 +0000 (14:42 +0100)
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
12 files changed:
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/apcups.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/conntrack.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/curl.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/disk.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/netlink.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/olsrd.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/ping.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/processes.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/sensors.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/splash_leases.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/tcpconns.lua
applications/luci-app-statistics/luasrc/statistics/rrdtool/definitions/uptime.lua

index 9f7a51a868c14104fb23d268fd14249515242cf7..37055f5861576f42f339e68843263bcf6c984fde 100644 (file)
@@ -19,8 +19,7 @@ function rrdargs( graph, plugin, plugin_instance )
                ups_inst[t] = graph.tree:data_instances( plugin, plugin_instance, t )
        end
 
-
-    -- Check if hash table or array is empty or nil-filled
+       -- Check if hash table or array is empty or nil-filled
 
        local function empty( t )
                for _, v in pairs(t) do
@@ -57,8 +56,8 @@ function rrdargs( graph, plugin, plugin_instance )
        end
 
 
-    -- Graph definitions for APC UPS measurements MUST use only 'instances':
-    -- e.g. instances = { voltage = {  "input", "output" } }
+       -- Graph definitions for APC UPS measurements MUST use only 'instances':
+       -- e.g. instances = { voltage = {  "input", "output" } }
 
        local voltagesdc = {
                title = "%H: Voltages on APC UPS - Battery",
index fbc47731ef97f8704c335618a36bdfe9a5b2494d..5212b736e2f2d929b7ff365f72ff604e056ac1a1 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.conntrack",package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
+
        return {
                title = "%H: Conntrack entries",
                vlabel = "Count",
index 89a65a6b5fd37caf166d663e299953b9eb2acd2a..2bbdfb08fb662ec313d17c69c6412667c3a005db 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.curl", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
+
        return {
                title = "%H: cUrl Response Time for #%pi",
                y_min = "0",
index 8aabb7f64e12cbbbb58a7b6340a26317eaa84265..b6f7d6d5f8185fbdbfd32a2413273dd9861e2abe 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.disk", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
+
        return {
                {
                        title = "%H: Disk I/O operations on %pi",
index a612126ed0f5536c3ebd51f366ad91012e2a295d..f485048538a2daaef14aef4da38874a6c130bc9b 100644 (file)
@@ -37,7 +37,6 @@ function rrdargs( graph, plugin, plugin_instance )
                }
        }
 
-
        --
        -- packet diagram
        --
@@ -119,7 +118,6 @@ function rrdargs( graph, plugin, plugin_instance )
                }
        }
 
-
        --
        -- multicast diagram
        --
@@ -144,7 +142,6 @@ function rrdargs( graph, plugin, plugin_instance )
                }
        }
 
-
        --
        -- collision diagram
        --
@@ -169,7 +166,6 @@ function rrdargs( graph, plugin, plugin_instance )
                }
        }
 
-
        --
        -- error diagram
        --
@@ -206,6 +202,5 @@ function rrdargs( graph, plugin, plugin_instance )
                }
        }
 
-
        return { traffic, packets, multicast, collisions, errors }
 end
index a69469568eb5c98edf5cdc55d950e992c98eb05f..481557bb7fbf5fefa5245a9c47f567c6c8e281ce 100644 (file)
@@ -9,18 +9,18 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
        if plugin_instance == "routes" then
 
                g[#g+1] = {
-                       -- diagram data description
+                       -- diagram data description
                        title = "%H: Total amount of OLSR routes", vlabel = "n",
                        number_format = "%5.0lf", data = {
-                               types = { "routes" },
+                               types = { "routes" },
                                options = {
                                        routes = {
                                                color = "ff0000",
                                                title = "Total number of routes"
                                        }
                                }
-                       }
-               }
+                       }
+               }
 
                g[#g+1] = {
                        title = "%H: Average route ETX", vlabel = "ETX", detail = true,
@@ -80,7 +80,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                                number_format = "%5.2lf", detail = true,
                                data = {
                                        types = { "signal_quality" },
-       
+
                                        instances = {
                                                signal_quality = { instances[i], instances[i+1] },
                                        },
@@ -106,7 +106,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                        title= "%H: Total amount of OLSR links", vlabel = "n",
                        number_format = "%5.0lf", data = {
                                instances = { "" },
-                               types = { "links" },
+                               types = { "links" },
                                options = {
                                        links = {
                                                color = "0000ff",
@@ -114,7 +114,7 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                                        }
                                }
                        }
-               }
+               }
 
                g[#g+1] = {
                        title= "%H: Average signal quality", vlabel = "n",
index 6ecdb5c8ad3f233255654fdef672e81baccb5c87..5b575bfff268c394537c811213c0cee3d3e08d86 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.ping", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
+
        return {
                -- Ping roundtrip time
                { title = "%H: ICMP Round Trip Time",
index 62d054597323e05bb751ff4ae88d15577c2c04ab..010ac1cd2ed324f150c361624d724fb2ad5763c9 100644 (file)
@@ -5,8 +5,8 @@ module("luci.statistics.rrdtool.definitions.processes", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
 
-    if  plugin_instance == "" then
-       return {
+       if  plugin_instance == "" then
+               return {
                        title = "%H: Processes",
                        vlabel = "Processes/s",
                        data = {
@@ -26,9 +26,9 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                                        ps_state_zombies  = { color = "ff0000", title = "Zombies" }
                                }
                        }
-       }
-    else
-       return {
+               }
+       else
+               return {
                {
                        title = "%H: CPU time used by %pi",
                        vlabel = "Jiffies",
@@ -113,5 +113,5 @@ function rrdargs( graph, plugin, plugin_instance, dtype )
                        }
                }
        }
-    end
+       end
 end
index f8bddb96e382d6bfabd6d9931f0a56b4c90e6372..b3119234a42467b229e1215c3367ee275610bb20 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.sensors", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance )
+
        return {
                {
                        per_instance = true,
index 65fba5299d434999bd440fdaba3d2f9eed292574..1a192ae6a6070964ac57783b870f5ceeeee83129 100644 (file)
@@ -1,27 +1,26 @@
 -- Copyright 2013 Freifunk Augsburg / Michael Wendland <michael@michiwend.com>
 -- Licensed to the public under the Apache License 2.0.
 
-    
 module("luci.statistics.rrdtool.definitions.splash_leases", package.seeall)
-                                       
+
 function rrdargs( graph, plugin, plugin_instance, dtype )
-                             
-    return {
-        title = "%H: Splash Leases",
-        vlabel = "Active Clients",  
-        y_min = "0",          
-        number_format = "%5.1lf",
-        data = {         
-            sources = {
-                splash_leases = { "leased", "whitelisted", "blacklisted" }
-            },                                
-              
-            options = {
-                splash_leases__leased      = { color = "00CC00", title = "Leased",      overlay = false },
-                splash_leases__whitelisted = { color = "0000FF", title = "Whitelisted", overlay = false },
-                splash_leases__blacklisted = { color = "FF0000", title = "Blacklisted", overlay = false } 
-            }                                                 
-        }    
-    }
 
-end 
+       return {
+               title = "%H: Splash Leases",
+               vlabel = "Active Clients",
+               y_min = "0",
+               number_format = "%5.1lf",
+               data = {
+                       sources = {
+                               splash_leases = { "leased", "whitelisted", "blacklisted" }
+                       },
+
+                       options = {
+                               splash_leases__leased      = { color = "00CC00", title = "Leased",      overlay = false },
+                               splash_leases__whitelisted = { color = "0000FF", title = "Whitelisted", overlay = false },
+                               splash_leases__blacklisted = { color = "FF0000", title = "Blacklisted", overlay = false }
+                       }
+               }
+       }
+
+end
index 50a9470de518a5e71a21e9a29d37ae441944afd4..7e7ed238f4cd69edeeaca1005874eed40723f9ff 100644 (file)
@@ -4,6 +4,7 @@
 module("luci.statistics.rrdtool.definitions.tcpconns", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
+
        return {
                title = "%H: TCP connections to port %pi",
                vlabel = "Connections/s",
index 077ec57e839797ee7fc1f9331d29a9a99c7280a1..a50e78491fa3ac60ab170a5b85782a4d09db6416 100644 (file)
@@ -13,15 +13,14 @@ module("luci.statistics.rrdtool.definitions.uptime", package.seeall)
 
 function rrdargs( graph, plugin, plugin_instance, dtype )
 
-        return {
-                title = "%H: Uptime", vlabel = "seconds",
-                number_format = "%5.0lf%s", data = {
-                        types = { "uptime" },
-                        options = {
-                                uptime = { title = "Uptime %di", noarea = true }
-                        }
-                }
-        }
-
+       return {
+               title = "%H: Uptime", vlabel = "seconds",
+               number_format = "%5.0lf%s", data = {
+                       types = { "uptime" },
+                       options = {
+                               uptime = { title = "Uptime %di", noarea = true }
+                       }
+               }
+       }
 end