From: Michael Tremer Date: Tue, 11 Nov 2025 20:35:34 +0000 (+0000) Subject: legacy-gateway-latency4: Reverse the graph X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7f3877c03b1374a727cc880fe2590125bbaded;p=telemetry.git legacy-gateway-latency4: Reverse the graph Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/legacy-gateway-latency4.c b/src/daemon/graphs/legacy-gateway-latency4.c index f7d66c3..82ba30f 100644 --- a/src/daemon/graphs/legacy-gateway-latency4.c +++ b/src/daemon/graphs/legacy-gateway-latency4.c @@ -37,12 +37,12 @@ static int legacy_gateway_latency4_render(td_ctx* ctx, td_graph* graph, if (r < 0) return r; - // Header - PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum")); + PRINT_EMPTY_LINE(args); // Draw a horizontal line of the average - DRAW_LINE(args, 1, FIELD_AVERAGE("latency"), NULL, - COLOR_WITH_ALPHA(COLOR_LATENCY, COLOR_OPACITY_25P), DASHED); + DRAW_LINE_WITH_LABEL(args, 1, FIELD_AVERAGE("latency"), NULL, + COLOR_WITH_ALPHA(COLOR_LATENCY, COLOR_OPACITY_25P), DASHED, _("Average Latency")); + PRINT_EOL(args); // Draw the stddev area DRAW_STDDEV(args, "latency", "stddev", NULL, COLOR_LATENCY); @@ -51,7 +51,8 @@ static int legacy_gateway_latency4_render(td_ctx* ctx, td_graph* graph, DRAW_LINE_WITH_LABEL(args, 1, "latency", NULL, COLOR_LATENCY, 0, _("Latency")); PRINT_CAMM(args, "latency", NULL, SECONDS_HIGHRES); - PRINT_EMPTY_LINE(args); + // Header + PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum")); return 0; } @@ -62,6 +63,9 @@ const td_graph_impl legacy_gateway_latency4_graph = { .title = legacy_gateway_latency4_title, .vlabel = td_graph_vlabel_seconds, + // Flags + .flags = TELEMETRY_GRAPH_REVERSE, + // Limits .lower_limit = 0, .upper_limit = LONG_MAX,