cgi_headers.h 6.68 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#ifndef __CGI_HEADERS_H__
	#define __CGI_HEADERS_H__


#define BASENAME "appmon"  //change only this one
#define RRD_FILENAME BASENAME".rrd"
#define CGI_FILENAME BASENAME".cgi"
#define FORM_FILENAME BASENAME"_form.html"
#define TOP_FILENAME BASENAME"_top.html"


static char cgiHour[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<META Http-Equiv=\"Expires\" Content=\"10\">\n\
<META Http-Equiv=\"Refresh\" Content=\"10;url=./appmon.cgi\">\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY>\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (1 hour) </h2>\
<h3> (10 second average) </h3>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmon.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-3600s --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";


static char cgiThree[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<META HTTP-EQUIV=\"Expires\" CONTENT=\"-1\">\n\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY onload=\"timer=setTimeout('move()',10000)\">\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (3 hours)</h2>\
<h3> (1 minute average) </h3>\
<table align=\"center\"><hr>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmon3hours.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-3h --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";

static char cgiDay[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY>\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (1 day)</h2>\
<h3> (5 minute average) </h3>\
<table align=\"center\"><hr>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmonday.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-24h --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";



static char cgiWeek[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY>\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (1 Week)</h2>\
<h3> (30 minute average) </h3>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmonweek.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-7d --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";

static char cgiMonth[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY>\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (1 Month)</h2>\
<h3> (2 hour average) </h3>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmonmonth.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-31d --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";

static char cgiYear[] = "\
#!/usr/bin/rrdcgi\n\
<HTML>\n<HEAD>\n\
<META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\">\n\
<script language=\"JavaScript\">\n\
<!--var time = null\n\
function move() {\n\
window.location = '"CGI_FILENAME"';\n\
} //-->\n\
</script>\n\
<style type=\"text/css\">\n\
<!-- body { background-color: #cccccc; } -->\n\
</style>\n\n\
</HEAD>\n<BODY>\n<center>\n\
<h2>LOBSTER P2P Monitoring: traffic from/to %s (1 Year)</h2>\
<h3> (1 day average) </h3>\
<table align=\"center\"><hr>\
<hd><a href=\"appmon.cgi\">1 hour</a></hd> \
<hd><a href=\"appmon3.cgi\">3 hour</a></hd> \
<hd><a href=\"appmon24.cgi\">1 day</a></hd> \
<hd><a href=\"appmonWeek.cgi\">1 Week</a></hd> \
<hd><a href=\"appmonMonth.cgi\">1 Month</a></hd> \
<hd><a href=\"appmonYear.cgi\">1 Year</a></hd> \
</hr></table>\
<P>\n<RRD::GRAPH\n\
../appmonyear.png\n\
--width 500 --height 300\n\
--imginfo '<IMG SRC=../%s WIDTH=%lu HEIGHT=%lu >'\n\
--end now --start end-1year --lazy\n\
--slope-mode --interlaced --vertical-label \"outbound      Mbit/s      inbound\"\n";

#endif