luci-app-statistics: provide defaul minimal scale for some graphs
authorHannu Nyman <hannu.nyman@iki.fi>
Thu, 29 Dec 2022 10:11:49 +0000 (12:11 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Thu, 29 Dec 2022 10:11:49 +0000 (12:11 +0200)
Avoid cryptic "200m" axis items for really small values by setting
a default minimal y-axis max value for some of the conntrack, cpu,
cpufreq, load and ping graphs (mainly percentages). The axis
automatically scales upward if necessary, so this just provides
a minimal "at least" scale for the y-axis.

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/conntrack.js
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/cpu.js
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/cpufreq.js
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/load.js
applications/luci-app-statistics/htdocs/luci-static/resources/statistics/rrdtool/definitions/ping.js

index 9c54f5c9148fa0d24e57b2eab09cb1195173d9f4..35951dffba59998498e866d2c5c693330369cd21 100644 (file)
@@ -33,6 +33,7 @@ return baseclass.extend({
                        vlabel: "Percent",
                        number_format: "%5.1lf%%",
                        y_min: "0",
+                       y_max: "2",
                        alt_autoscale_max: true,
                        data: {
                                instances: {
index 796b2cc8d4238d815c26977c5cc3b808a1063692..bbd0e476426c06ca1051e3c0877f1cb1c8422b25 100644 (file)
@@ -77,6 +77,7 @@ return baseclass.extend({
                        var percent = {
                                title: title,
                                y_min: "0",
+                               y_max: "2",
                                alt_autoscale_max: true,
                                vlabel: "Percent",
                                number_format: "%5.1lf%%",
@@ -142,6 +143,7 @@ return baseclass.extend({
                        p = {
                                title: title,
                                y_min: "0",
+                               y_max: "2",
                                alt_autoscale_max: true,
                                vlabel: "Percent",
                                number_format: "%5.1lf%%",
index 308d58dacfaeb62020be4e535cba47f570041ed5..a2cc1309e700f64f55e779180c6ebf0c4e701597 100644 (file)
@@ -26,6 +26,8 @@ return baseclass.extend({
                                detail: true,
                                title: "%H: Frequency transitions - core %pi",
                                alt_autoscale: true,
+                               y_min: "0",
+                               y_max: "2",
                                vlabel: "Transitions",
                                number_format: "%3.2lf%s",
                                data: {
index f1a8114463549f4912e2f468fd1eaf011714b22e..f3af09895d750c821c1975356c909a212958e654 100644 (file)
@@ -11,6 +11,7 @@ return baseclass.extend({
                        title: "%H: Load",
                        vlabel: "Load",
                        y_min: "0",
+                       y_max: "0.2",
                        units_exponent: "0",
                        number_format: "%5.2lf",
                        data: {
index 27624828c29d6187dff0c005802c988b9dc54211..335e976794d7bdb1c1cef99847ce611f7f730189 100644 (file)
@@ -28,6 +28,8 @@ return baseclass.extend({
                var droprate = {
                        title: "%H: ICMP Drop Rate",
                        vlabel: "%",
+                       y_min: "0",
+                       y_max: "4",
                        number_format: "%5.2lf %%",
                        data: {
                                types: [ "ping_droprate" ],
@@ -45,6 +47,8 @@ return baseclass.extend({
                var stddev = {
                        title: "%H: ICMP Standard Deviation",
                        vlabel: "ms",
+                       y_min: "0",
+                       y_max: "1",
                        number_format: "%5.1lf ms",
                        data: {
                                types: [ "ping_stddev" ],