]> git.ipfire.org Git - telemetry.git/commitdiff
graphs: Add a macro to add headlines
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Apr 2026 14:00:43 +0000 (14:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 3 Apr 2026 14:00:43 +0000 (14:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/daemon/graphs/graph.h

index b3268bf6cd9beb3f069554031e28bfe69f3b7b2e..cd8d2542b88617d5dba40f380383eea804cd6dc5 100644 (file)
@@ -190,6 +190,7 @@ static inline int __DRAW(td_args* args, const char* what, const char* field,
 
 // Add something to the legend of the graph
 #define PRINT_EMPTY_LINE(args)                                                 SCRIPT(args, "COMMENT: \\n")
+#define PRINT_HEADLINE(args, headline)                                 SCRIPT(args, "COMMENT:<b>%s</b>\\n", headline)
 #define PRINT_HEADER(args, label)                                              SCRIPT(args, "COMMENT:" COLUMN, label)
 #define PRINT_LABEL(args, label)                                               SCRIPT(args, "COMMENT: %-31s", label)
 #define PRINT_EMPTY_LABEL(args)                                                        SCRIPT(args, "COMMENT:                                ")