Xymon Mailing List Archive search

adding --hffile back to criticalview

2 messages in this thread

list Andy Smith · Tue, 7 Jan 2014 16:25:57 +0000 ·
Hi,

Any chance we could have this patch added please, it restores the --hffile
option so I can have customised headers and footers for my various critical
views..

*** web/criticalview.c.FCS      2012-07-14 17:32:11.000000000 +0100
--- web/criticalview.c  2014-01-05 19:36:19.000000000 +0000
***************
*** 445,450 ****
--- 445,451 ----
        int argi;
        char *envarea = NULL;
        char **critconfig = NULL;
+       char *hffile = "critical";
        int cccount = 0;

        critconfig = (char **)calloc(1, sizeof(char *));
***************
*** 476,481 ****
--- 477,486 ----
                        critconfig = (char **)realloc(critconfig, (1 +
cccount)*sizeof(char *));
                        critconfig[cccount] = NULL;
                }
+               else if (argnmatch(argv[argi], "--hffile=")) {
+                       char *p = strchr(argv[argi], '=');
+                       hffile = strdup(p+1);
+               }
        }

        if (!critconfig[0]) {
***************
*** 546,553 ****
                        }

                        generate_critpage(rbstate[i], hostsonpage[i],
stdout,
!                                         (i == 0) ? (critconfig[1] ?
"critmulti" : "critical") : "divider",
!                                         (critconfig[i+1] == NULL) ?
"critical" : "divider",
                                          partcolor[i], partprio[i]);
                }
        }
--- 551,558 ----
                        }

                        generate_critpage(rbstate[i], hostsonpage[i],
stdout,
!                                         (i == 0) ? (critconfig[1] ?
"critmulti" : hffile) : "divider",
!                                         (critconfig[i+1] == NULL) ?
hffile : "divider",
                                          partcolor[i], partprio[i]);
                }
        }


Thanks
-- 
Andy
list Henrik Størner · Wed, 08 Jan 2014 10:02:37 +0100 ·
quoted from Andy Smith
Den 07-01-2014 17:25, Andy Smith skrev:
Hi,

Any chance we could have this patch added please, it restores the
--hffile option so I can have customised headers and footers for my
various critical views..
Not sure how it went missing, somewhere between 4.3.7 and 4.3.8.

It's in 4.3.13 now.


Regards,
Henrik