From: Michael Tremer Date: Thu, 4 Dec 2025 17:51:01 +0000 (+0000) Subject: graphs: processor: Move the header to the right place X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30ea1067908db085a6cbefefedd03f41eb0e3599;p=collecty.git graphs: processor: Move the header to the right place Signed-off-by: Michael Tremer --- diff --git a/src/daemon/graphs/processor.c b/src/daemon/graphs/processor.c index ce12f15..2d86707 100644 --- a/src/daemon/graphs/processor.c +++ b/src/daemon/graphs/processor.c @@ -64,15 +64,6 @@ static int processor_render(td_ctx* ctx, td_graph* graph, COMPUTE_PERCENTAGE(args, "guest", NULL, "total", NULL); COMPUTE_PERCENTAGE(args, "guest_nice", NULL, "total", NULL); - // Header - PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum")); - - // Show the total usage - PRINT_LABEL(args, _("Total")); - PRINT_CAMM(args, FIELD_PERCENT("usage"), NULL, PERCENTAGE); - - PRINT_EMPTY_LINE(args); - // Draw the stacked background first DRAW_AREA_BACKGROUND(args, FIELD_PERCENT("guest_nice"), NULL, COLOR_GUEST_NICE, 0); DRAW_AREA_BACKGROUND(args, FIELD_PERCENT("guest"), NULL, COLOR_GUEST, STACKED); @@ -121,6 +112,15 @@ static int processor_render(td_ctx* ctx, td_graph* graph, FIELD_PERCENT("user"), NULL, COLOR_USER, STACKED, _("User")); PRINT_CAMM(args, "user", NULL, PERCENTAGE); + PRINT_EMPTY_LINE(args); + + // Show the total usage + PRINT_LABEL(args, _("Total")); + PRINT_CAMM(args, FIELD_PERCENT("usage"), NULL, PERCENTAGE); + + // Header + PRINT_HEADER4(args, _("Current"), _("Average"), _("Minimum"), _("Maximum")); + return 0; }