From b39d9bf4bb88acd3120098c3a087e47331d1d757 Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Tue, 28 Sep 2021 23:00:42 +0300 Subject: [PATCH] luci-app-statistics: standardise newline usage Fix newline usage in a few graph definitions. Signed-off-by: Hannu Nyman (cherry picked from commit 12b13fe89a9d21560303c963123493268a5017c0) --- .../statistics/rrdtool/definitions/dns.js | 9 +++-- .../statistics/rrdtool/definitions/irq.js | 6 ++- .../statistics/rrdtool/definitions/load.js | 6 ++- .../statistics/rrdtool/definitions/olsrd.js | 38 +++++++++++++------ 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dns.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dns.js index 029471f801..347bd23317 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dns.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/dns.js @@ -11,7 +11,8 @@ return baseclass.extend({ rrdargs: function(graph, host, plugin, plugin_instance, dtype) { var traffic = { - title: "%H: DNS traffic", vlabel: "Bit/s", + title: "%H: DNS traffic", + vlabel: "Bit/s", data: { sources: { @@ -35,7 +36,8 @@ return baseclass.extend({ }; var opcode_query = { - title: "%H: DNS Opcode Query", vlabel: "Queries/s", + title: "%H: DNS Opcode Query", + vlabel: "Queries/s", data: { instances: { dns_opcode: [ "Query" ] @@ -52,7 +54,8 @@ return baseclass.extend({ }; var qtype = { - title: "%H: DNS QType", vlabel: "Queries/s", + title: "%H: DNS QType", + vlabel: "Queries/s", data: { sources: { dns_qtype: [ "" ] }, options: { diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/irq.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/irq.js index 29675f77c3..150bc497f3 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/irq.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/irq.js @@ -8,8 +8,10 @@ return baseclass.extend({ rrdargs: function(graph, host, plugin, plugin_instance, dtype) { return { - title: "%H: Interrupts", vlabel: "Issues/s", - number_format: "%5.0lf", data: { + title: "%H: Interrupts", + vlabel: "Issues/s", + number_format: "%5.0lf", + data: { types: [ "irq" ], options: { irq: { title: "IRQ %di", noarea: true } diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/load.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/load.js index a104691100..f1a8114463 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/load.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/load.js @@ -8,10 +8,12 @@ return baseclass.extend({ rrdargs: function(graph, host, plugin, plugin_instance, dtype) { return { - title: "%H: Load", vlabel: "Load", + title: "%H: Load", + vlabel: "Load", y_min: "0", units_exponent: "0", - number_format: "%5.2lf", data: { + number_format: "%5.2lf", + data: { sources: { load: [ "shortterm", "midterm", "longterm" ] }, diff --git a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/olsrd.js b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/olsrd.js index b311efba36..93cb266dc0 100644 --- a/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/olsrd.js +++ b/applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/olsrd.js @@ -15,8 +15,10 @@ return baseclass.extend({ if (plugin_instance == "routes") { g.push({ /* diagram data description */ - title: "%H: Total amount of OLSR routes", vlabel: "n", - number_format: "%5.0lf", data: { + title: "%H: Total amount of OLSR routes", + vlabel: "n", + number_format: "%5.0lf", + data: { types: [ "routes" ], options: { routes: { @@ -26,8 +28,11 @@ return baseclass.extend({ } } }, { - title: "%H: Average route ETX", vlabel: "ETX", detail: true, - number_format: "%5.1lf", data: { + title: "%H: Average route ETX", + vlabel: "ETX", + detail: true, + number_format: "%5.1lf", + data: { instances: [ "average" ], /* falls es irgendwann mal welche pro ip gibt, wie bei links, dann werden die hier excludiert */ types: [ "route_etx" ], options: { @@ -37,8 +42,11 @@ return baseclass.extend({ } } }, { - title: "%H: Average route metric", vlabel: "metric", detail: true, - number_format: "%5.1lf", data: { + title: "%H: Average route metric", + vlabel: "metric", + detail: true, + number_format: "%5.1lf", + data: { instances: [ "average" ], /* falls es irgendwann mal welche pro ip gibt, wie bei links, dann werden die hier excludiert */ types: [ "route_metric" ], options: { @@ -52,8 +60,10 @@ return baseclass.extend({ else if (plugin_instance == "links") { g.push({ /* diagram data description */ - title: "%H: Total amount of OLSR neighbours", vlabel: "n", - number_format: "%5.0lf", data: { + title: "%H: Total amount of OLSR neighbours", + vlabel: "n", + number_format: "%5.0lf", + data: { instances: [ "" ], types: [ "links" ], options: { @@ -95,8 +105,10 @@ return baseclass.extend({ } else if (plugin_instance == "topology") { g.push({ - title: "%H: Total amount of OLSR links", vlabel: "n", - number_format: "%5.0lf", data: { + title: "%H: Total amount of OLSR links", + vlabel: "n", + number_format: "%5.0lf", + data: { instances: [ "" ], types: [ "links" ], options: { @@ -107,8 +119,10 @@ return baseclass.extend({ } } }, { - title: "%H: Average signal quality", vlabel: "n", - number_format: "%5.2lf", detail: true, + title: "%H: Average signal quality", + vlabel: "n", + number_format: "%5.2lf", + detail: true, data: { instances: [ "average" ], /* exclude possible per-ip stuff */ types: [ "signal_quality" ], -- 2.30.2