#!/usr/bin/env perl use warnings; use diagnostics; use lib "../../lib"; use HotSaNICparser; # read global settings # $MODNAME=lc HotSaNICparser::get_module_name(); %CONFIG=HotSaNICparser::get_config("../.."); $IMAGEFORMAT=$CONFIG{"IMAGEFORMAT"}; $REFRESH=$CONFIG{"REFRESH"}; $REFRESH=0 if !defined $REFRESH; # read module-specific settings # undef %DESCR; foreach (HotSaNICparser::read_settings(".")) { ($var,$value)=HotSaNICparser::parse_line($_); if ($var eq "DEV") { ($dev,undef,undef,$descr)=split(/,/,$value); $dev =~ s/SNMP:(.*?):.*:(.*?)/$1:$2/; $dev =~ s/RRCP:(.*?):.*:(.*?)/$1:$2/; $DESCR{$dev}=$descr; $dev =~ s/\//-/g; } } @DIAGRAMS=("hour","6h","day","week","month","year"); @TIMES=("6h","week"); # build time-based .html files # foreach $time (@TIMES) { open (FILE,">index/$time.html"); print FILE "\n"; if ($REFRESH > 0) { print FILE "
\n"; } print FILE "\n\n"; foreach $dev (keys %DESCR) { $descr=$DESCR{$dev}; $dev =~ s/\//-/g; ($page=$dev) =~ s/[.:]/_/g; print FILE " \n"; } print FILE "
",$dev,"
",$descr,"
\n\n\n"; close FILE; } # build device-based .html files and complete index # open (IDXFILE,">idxdata"); print IDXFILE "0##
",$MODNAME,"
0##
6 hours
0##
week
0##
0## \n"; $nn=0; foreach $dev (sort keys %DESCR) { $nn++; $descr=$DESCR{$dev}; ($page=$dev) =~ s/[.:]/_/g; $page =~ s/\//-/g; print IDXFILE $nn,"##
",$nn,"##
",$dev,"
",$descr,"
\n"; # build device-based .html # open (FILE,">index/$page.html"); print FILE "\n"; if ($REFRESH > 0) { print FILE "
\n"; } print FILE "\n"; foreach $diagram (@DIAGRAMS) { print FILE "
\n"; } print FILE "\n\n"; close FILE; } close IDXFILE;
WebSVN - hotsanic - Blame - Rev 25 - /trunk/modules/traffic/makeindex.pl
Català-Valencià - Catalan
Česky - Cesky
Dansk - Dansk
Dutch - Dutch
English - English
Finnish - Finnish
Français - Francais
Deutsch - German
עברית - Hebrew
Magyar - Hungarian
Bahasa Indonesia - Indonesian
Italiano - Italian
日本語 - Japanese
한국어 - Korean
Norsk - Norwegian
Polski - Polish
Português - Portuguese
Português - Brazilian Portuguese
Русский - Russian
中文 - Simplified Chinese
Slovenčina - Slovak
Slovenčina - Slovenian
Español - Spanish
Svenska - Swedish
中文 - Traditional Chinese
Türkçe - Turkish
Oëzbekcha - Uzbek
hotsanic
Subversion Repositories:
banderdyn
centos.prosek.czf
crusader
czf4bfu
czf4bfu.prosek.czf
czfcentos
czfgmap
discover
fedora.prosek.czf
freenet-router
ftth
getonlineclouds
hotsanic
internet.prosek.czf
is
mapstats
meteolinger
netmap
qos
sedlo
sedlo.prosek.czf
switches
vbtobb
vlubnt
weathermap
weatherstats
websvn
wifidashboard
wifimon
www.prosek.czf
xenstats
[
/
] [
trunk/
] [
modules/
] [
traffic/
] [
makeindex.pl
] - Blame information for rev
25
Line No.
Rev
Author
Line
Powered by
WebSVN
2.2.1