[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [hobbit] Changing the default 48h,12d,48d,576d period for graph display ?
- To: <hobbit (at) hswn.dk>
- Subject: RE: [hobbit] Changing the default 48h,12d,48d,576d period for graph display ?
- From: "Beau Olivier" <olivier.beau (at) telecomitalia.fr>
- Date: Tue, 6 Mar 2007 17:09:01 +0100
- References: <45CD2D9A.1030804@trantor.org> <001501c74cd4$c4cac7f0$0500a8c0@noip.org> <45CE53CC.6010503@trantor.org> <45CF170C.1050702@hst.nasa.gov> <20070212160443.M63522@shihad.org> <E2B7C293059E7146B7EB8029362BB6040273B977@PTPEVS101BA020.idc.cww.telecomitalia.it> <20070306154559.GA23636@hswn.dk>
- Thread-index: AcdgBpBL9Om5BqV9QRSfJ/zsIuzlvQAAu96Q
- Thread-topic: [hobbit] Changing the default 48h,12d,48d,576d period for graph display ?
Oh that was a quick answer :)
Works fine, thanks !
Olivier
Ps: for those you would to change it too, dont forget to change the legend:
//persecs = 12*24*60*60;
persecs = 7*24*60*60;
//glegend = "Last 12 Days";
glegend = "Last 7 Days";
-----Message d'origine-----
De : Henrik Stoerner [mailto:henrik (at) hswn.dk]
Envoyé : mardi 6 mars 2007 16:46
À : hobbit (at) hswn.dk
Objet : Re: [hobbit] Changing the default 48h,12d,48d,576d period for graph display ?
On Tue, Mar 06, 2007 at 04:40:45PM +0100, Beau Olivier wrote:
>
> I'ld like to change the default period for graph display:
> by default hobbbit displays trends with 4 graphs (48h,12d,48d,576d
> periods)
> -> It is possible change it to 48h,7d,30d,365d for example ?
It isn't configurable, but in the hobbit-4.2.0/web/hobbitgraph.c file near the top of the file you'll find these lines:
#define HOUR_GRAPH "e-48h"
#define DAY_GRAPH "e-12d"
#define WEEK_GRAPH "e-48d"
#define MONTH_GRAPH "e-576d"
Change them to suit you. Then search that same file for the HOUR_GRAPH etc. further down; you'll find 1 place where each is used like this:
period = HOUR_GRAPH;
persecs = 48*60*60;
and you need to change that "persecs" calculation also for all 4 graph types.
Then run "make" (from the hobbit-4.2.0 directory) and "make install"
(or just copy the "web/hobbitgraph.cgi" file to your ~hobbit/server/bin/ directory).
Henrik
To unsubscribe from the hobbit list, send an e-mail to
hobbit-unsubscribe (at) hswn.dk