jablonka.czprosek.czf

hotsanic

Subversion Repositories:
[/] [branches/] [HotSaNIC-0.5.0-pre6/] [modules/] [mailq/] [makeindex.pl] - Blame information for rev 16

 

Line No. Rev Author Line
11simandl#!/usr/bin/env perl
2 
3# $Id: makeindex.pl,v 1.13 2004/05/29 09:43:00 bernisys Exp $
4 
5# include PERL libraries
6use warnings;
7use diagnostics;
8 
9# include HotSaNIC libraries
10use lib "../../lib";
11 
12use HotSaNICparser;
13use HotSaNIChtml;
14 
15 
16(my $VERSION = '$Revision: 1.13 $') =~ s/.*(\d+\.\d+).*/$1/;
17(my $IDENTIFIER = '$Id: makeindex.pl,v 1.13 2004/05/29 09:43:00 bernisys Exp $') =~ s/.*,v (.*) \$/$1/;
18 
19# read global settings
20#
21$MODNAME=lc HotSaNICparser::get_module_name();
22%CONFIG=HotSaNICparser::get_config("../..");
23$IMAGEFORMAT=$CONFIG{IMAGEFORMAT};
24$WEBDIR=$CONFIG{WEBDIR}."/".lc $MODNAME;
25$VARDIR=$CONFIG{VARDIR}."/modules/".lc $MODNAME;
26$REFRESH=$CONFIG{REFRESH};
27$REFRESH=0 if !defined $REFRESH;
28 
29 
30@DIAGRAMS=("hour","6h","day","week","month","year");
31@TIMES=("6h","week");
32 
33# build time-based .html files
34#
35%DESCR=("bytes" => "Bytes in queue", "req" => "Requests in queue");
36foreach $time (@TIMES) {
37 open (FILE,">$WEBDIR/$time.html");
38 print FILE HotSaNIChtml::create_header($MODNAME,$REFRESH,"$time overview page")."<table>\n";
39 
40 foreach $proc (keys %DESCR) {
41 $descr=$DESCR{$proc};
42 ($name = $proc) =~ s/_/:/;
43 ($page=$proc) =~ s/[.:]/_/g;
44 print FILE HotSaNIChtml::create_table_entry($IMAGEFORMAT,$page,$time,$name,$descr,1);
45 }
46 print FILE "</table>\n".HotSaNIChtml::create_footer($MODNAME);
47 close FILE;
48 }
49 
50# build device-based .html files and complete index
51#
52open (IDXFILE,">$VARDIR/idxdata");
53print IDXFILE HotSaNIChtml::create_overview_table_header($MODNAME,join(" ",@TIMES),1);
54$num=0;
55foreach $proc (sort keys %DESCR) {
56 $num++;
57 $description=$DESCR{$proc};
58 ($file=$proc) =~ s/[.:]/_/g;
59 ($name = $proc) =~ s/_/:/;
60 print IDXFILE HotSaNIChtml::create_overview_table_entry($MODNAME,$IMAGEFORMAT,$num,$file,$name,$description);
61 HotSaNIChtml::make_device_page($MODNAME,$WEBDIR,$IMAGEFORMAT,$file,$description,@DIAGRAMS);
62 }
63 
64close IDXFILE;
65 

Powered by WebSVN 2.2.1