Hobbit WebPage Question
list James Isolder
I wonder if it would be possible on the All Non Green View to have instead of gifs how long the service has been in that state with the relevant colour. Thanks.
list Henrik Størner
▸
In <user-6bee9a06d6b6@xymon.invalid> James Isolder <user-7de8f896e813@xymon.invalid> writes:
I wonder if it would be possible on the All Non Green View to have instead =
of gifs how long the service has been in that state with the relevant colou=
r.
That information is available if you let your mouse "hover" over the
status icon.
It is possible to change from showing the status icon to showing
the duration of the latest status - I've included a small patch
against 4.3.0-RC1 that does this (on the "All non-green" and the
"Critical systems" pages, and only for red/yellow status). But I
don't think it is something that I would want generally.
Regards,
Henrik
Index: xymongen/pagegen.c
===================================================================
--- xymongen/pagegen.c (revision 6626)
+++ xymongen/pagegen.c (working copy)
@@ -53,6 +53,7 @@
int critonlyreds = 0;
int wantrss = 0;
int nongreencolors = ((1 << COL_RED) | (1 << COL_YELLOW) | (1 << COL_PURPLE));
+int showstatusduration = 1;
/* Format strings for htaccess files */
char *htaccess = NULL;
@@ -471,10 +472,17 @@
do_rss_item(rssoutput, h, e);
}
- fprintf(output, "<IMG SRC=\"%s/%s\" ALT=\"%s\" TITLE=\"%s\" HEIGHT=\"%s\" WIDTH=\"%s\" BORDER=0></A>",
- skin, dotgiffilename(e->color, e->acked, e->oldage),
- htmlalttag, htmlalttag,
- xgetenv("DOTHEIGHT"), xgetenv("DOTWIDTH"));
+ if (showstatusduration && ((e->color == COL_RED) || (e->color == COL_YELLOW)) && (pagetype != PAGE_NORMAL)) {
+ fprintf(output, "<font color=%s>%s</font>", colorname(e->color), e->age);
+ }
+ else {
+ fprintf(output, "<IMG SRC=\"%s/%s\" ALT=\"%s\" TITLE=\"%s\" HEIGHT=\"%s\" WIDTH=\"%s\" BORDER=0>",
+ skin, dotgiffilename(e->color, e->acked, e->oldage),
+ htmlalttag, htmlalttag,
+ xgetenv("DOTHEIGHT"), xgetenv("DOTWIDTH"));
+ }
• + fprintf(output, "</A>");
}
else {
/* Report format output */
list Sebastian Auriol
▸
Henrik Størner <mailto:user-ce4a2c883f75@xymon.invalid> wrote:
In <user-6bee9a06d6b6@xymon.invalid> James Isolder <user-7de8f896e813@xymon.invalid> writes:I wonder if it would be possible on the All Non Green View to have instead = of gifs how long the service has been in that state with the relevant colou= r.That information is available if you let your mouse "hover" over the status icon. It is possible to change from showing the status icon to showing the duration of the latest status - I've included a small patch against 4.3.0-RC1 that does this (on the "All non-green" and the "Critical systems" pages, and only for red/yellow status). But I don't think it is something that I would want generally. Regards, Henrik
Hmm, this display actually looks quite useful (using my imagination)! But ideally it would not be something compiled in, but available via clicking a button, probably using CSS (http://www.thesitewizard.com/javascripts/change-style-sheets.shtml), a bit like it is possible to change the size of text on some news pages by clicking on a couple of buttons on the web page, or other sites where it is possible to change the 'theme' or skin. I imagine this would not be too difficult to do (if the page used CSS already) as all the information already exists in the html. Regards, SebA
list Sebastian Auriol
▸
SebA <mailto:user-7b2156f36779@xymon.invalid> wrote:
Henrik Størner <mailto:user-ce4a2c883f75@xymon.invalid> wrote:In <user-6bee9a06d6b6@xymon.invalid> James Isolder <user-7de8f896e813@xymon.invalid> writes:I wonder if it would be possible on the All Non Green View to have instead = of gifs how long the service has been in that state with the relevant colou= r.That information is available if you let your mouse "hover" over the status icon. It is possible to change from showing the status icon to showing the duration of the latest status - I've included a small patch against 4.3.0-RC1 that does this (on the "All non-green" and the "Critical systems" pages, and only for red/yellow status). But I don't think it is something that I would want generally. Regards, HenrikHmm, this display actually looks quite useful (using my imagination)! But ideally it would not be something compiled in, but available via clicking a button, probably using CSS
(http://www.thesitewizard.com/javascripts/change-style-sheets. shtml), a bit like it is possible to change the size of text on some
▸
news pages by clicking on a couple of buttons on the web page, or
other
sites where it is
possible to change the 'theme' or skin. I imagine this would
not be too
difficult to do (if the page used CSS already) as all the information
already exists in the html.
Regards,
SebAActually, the above link uses JavaScript to make the CSS style you chose saved in a cookie for a day. A simpler version, using just CSS, is given here, although it does not save your preference: http://www.thesitewizard.com/css/switch-alternate-css-styles.shtml It is also not so obvious how to use it (as the buttons are in the browser and not the page), and it is not supported in IE7 or Safari. Regards, SebA
list James Isolder
Ok So I pulled the 430 and applied the patch and installed it on a test server to see what it would looks like how do I now enable the changed status icon. Thanks.
▸
From: user-7b2156f36779@xymon.invalid To: xymon at xymon.com Date: Wed, 26 Jan 2011 14:59:37 +0000 Subject: RE: [xymon] Hobbit WebPage Question Henrik Størner <mailto:user-ce4a2c883f75@xymon.invalid> wrote:In <user-6bee9a06d6b6@xymon.invalid> James Isolder <user-7de8f896e813@xymon.invalid> writes:I wonder if it would be possible on the All Non Green View to have instead = of gifs how long the service has been in that state with the relevant colou= r.That information is available if you let your mouse "hover" over the status icon. > > It is possible to change from showing the status icon to showing the duration of the latest status - I've included a small patch against 4.3.0-RC1 that does this (on the "All non-green" and the"Critical systems" pages, and only for red/yellow status). But I don't think it is something that I would want generally.Regards,HenrikHmm, this display actually looks quite useful (using my imagination)! But ideally it would not be something compiled in, but available via clicking a button, probably using CSS (http://www.thesitewizard.com/javascripts/change-style-sheets.shtml), a bit like it is possible to change the size of text on some news pages by clicking on a couple of buttons on the web page, or other sites where it is possible to change the 'theme' or skin. I imagine this would not be too difficult to do (if the page used CSS already) as all the information already exists in the html. Regards, SebA