[Xymon] adding --hffile back to criticalview

Andy Smith abs at shadymint.com
Tue Jan 7 17:25:57 CET 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140107/fa12492c/attachment.html>


More information about the Xymon mailing list