luci-mod-dsl: correctness fixes
authorPaul Donald <redacted>
Tue, 26 May 2026 11:54:34 +0000 (14:54 +0300)
committerPaul Donald <redacted>
Wed, 27 May 2026 12:49:47 +0000 (15:49 +0300)
Signed-off-by: Paul Donald <redacted>
modules/luci-mod-dsl/htdocs/luci-static/resources/view/status/dsl/graph.js

index fb87b37de7e86736a57e9d8ebbd9027cf1ce00d7..7a4b0a41ae1632aacdea104702f47f289da98a58 100644 (file)
@@ -113,9 +113,9 @@ let bitsChart = {
        },
        "dataSet" : [
                {
-                       "data" :usBitsData.data,
-                       "color":"YellowGreen",
-                       "title": ("Upstream bits allocation")
+                       "data" : usBitsData.data,
+                       "color": "YellowGreen",
+                       "title": _("Upstream bits allocation")
                },
                {
                        "data" : dsBitsData.data,
@@ -261,7 +261,7 @@ function drawData(config, dataPoints, color) {
        let minY = config.minY;
        let maxY = config.maxY;
        let startX = (dataPoints[0].x  - config.minX) / (config.maxX - config.minX)
-       let startY = (config.minY - config.minY) / (config.maxY - config.minY)
+       let startY = (dataPoints[0].y - config.minY) / (config.maxY - config.minY)
 
        ctx.fillStyle = color;
        ctx.beginPath();
@@ -378,9 +378,9 @@ function drawAxisY(config, minValue, maxValue, step, title) {
        ctx.font = "12px Arial";
        ctx.textAlign = "center";
        ctx.translate(marginX/3, marginY + graphHeight / 2);
-       ctx.rotate(-3.14 /2);
+       ctx.rotate(-Math.PI /2);
        ctx.fillText(title, 0, 0);
-       ctx.rotate(3.14 /2)
+       ctx.rotate(Math.PI /2)
        ctx.translate(-marginX/3,-(marginY + graphHeight / 2));
 }
 
git clone https://git.99rst.org/PROJECT