]> git.ipfire.org Git - oddments/collecty.git/commitdiff
graphs: Include the unit with the macro
authorMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Oct 2025 11:50:35 +0000 (11:50 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Wed, 29 Oct 2025 11:50:35 +0000 (11:50 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graphs/cpufreq.c
src/daemon/graphs/graph.h
src/daemon/graphs/hostapd-station-rate-info.c

index 1b883c6a5c99407b5e7e6b2c64b1927b50488eb7..92891f715cb72a194b70aae8b1cddee20058103a 100644 (file)
@@ -59,7 +59,7 @@ static int cpufreq_render(td_ctx* ctx,
 
                // Draw the line
                DRAW_LINE_WITH_LABEL(args, 1, "freq_cur", object, COLOR_CPU(i), _("CPU Core %ld"));
-               PRINT_CAMM(args, "freq_cur", object, HZ, _("Hz"));
+               PRINT_CAMM(args, "freq_cur", object, HZ);
 
                // Draw the minimum
                DRAW_LINE(args, 2, "freq_min", object, MINIMUM);
index 8cab94c19affc39916d13d4ef2319678bbd7cab9..193d97a61e6264a4501a713f700e4fc0ce687839 100644 (file)
@@ -57,8 +57,8 @@
 #define FLOAT                  "%%14.2lf"
 #define FLOAT_WITH_UNIT "%%10.2lf %3s"
 #define LARGE_FLOAT            "%%14.2lf %%s"
-#define BPS                            "%%9.2lf %%s%3s"
-#define HZ                             "%%10.2lf %%s%2s"
+#define BPS                            "%%9.2lf %%s%3s", _("bps")
+#define HZ                             "%%10.2lf %%s%2s", _("Hz")
 
 // Macro to terminate a line
 #define EOL                            "\\j"
        do { \
                COMPUTE_BITS(args, FIELD_BITS(bytes), object, bytes); \
                DRAW_AREA_WITH_LABEL(args, FIELD_BITS(bytes), object, color, label); \
-               PRINT_CAMM(args, bytes, object, BPS, _("bps")); \
+               PRINT_CAMM(args, bytes, object, BPS); \
        } while (0)
 
 #endif /* TELEMETRY_GRAPHS_GRAPH_H */
index d83d6c14e836dd960e1bb361a4d926c5758df35e..9e02677153faa38dc50119d343dc7c12ab501517 100644 (file)
@@ -48,11 +48,11 @@ static int hostapd_station_rate_info_render(td_ctx* ctx,
 
        // Receive Rate
        DRAW_LINE_WITH_LABEL(args, 2, "rx_rate", object, COLOR_RX, _("Receive Rate"));
-       PRINT_CAMM(args, "rx_rate", object, BPS, _("bps"));
+       PRINT_CAMM(args, "rx_rate", object, BPS);
 
        // Transmit Rate
        DRAW_LINE_WITH_LABEL(args, 2, "tx_rate", object, COLOR_TX, _("Transmit Rate"));
-       PRINT_CAMM(args, "tx_rate", object, BPS, _("bps"));
+       PRINT_CAMM(args, "tx_rate", object, BPS);
 
        return 0;
 }