author | Tero Marttila <terom@fixme.fi> |
Tue, 25 Jan 2011 01:28:06 +0200 | |
changeset 32 | 47e977c23ba2 |
parent 22 | 809686edcd4c |
permissions | -rwxr-xr-x |
32
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
1 |
#!/usr/bin/env python |
22 | 2 |
""" |
3 |
Simple test server/environment for WSGI development |
|
4 |
""" |
|
5 |
||
6 |
import werkzeug |
|
7 |
||
32
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
8 |
from rrdweb import wsgi, graph |
22 | 9 |
|
10 |
import logging |
|
11 |
||
12 |
||
13 |
if __name__ == '__main__' : |
|
14 |
logging.basicConfig(format="[%(levelname)5s] %(funcName)25s : %(message)s", level=logging.DEBUG) |
|
15 |
||
16 |
app = wsgi.WSGIApp( |
|
32
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
17 |
rrdpath = 'var/rrd', |
22 | 18 |
tplpath = 'etc/templates', |
32
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
19 |
imgpath = 'var/img', |
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
20 |
|
47e977c23ba2
implement rendering of pmacct rrd graphs, and a dir/top.png feature
Tero Marttila <terom@fixme.fi>
parents:
22
diff
changeset
|
21 |
rrdgraph = graph.pmacct_data, |
22 | 22 |
) |
23 |
||
24 |
# run |
|
25 |
werkzeug.run_simple('localhost', 8081, app, use_reloader=True, use_debugger=True, |
|
26 |
static_files = { |
|
27 |
'/static': 'static/', |
|
28 |
}, |
|
29 |
) |
|
30 |