Display the index page.
(db,
templates,
session)
| 54 | templates = 'ddserver.interface.template:TemplateManager', |
| 55 | session = 'ddserver.interface.session:SessionManager') |
| 56 | def get_index(db, |
| 57 | templates, |
| 58 | session): |
| 59 | ''' Display the index page. ''' |
| 60 | |
| 61 | if session.username: |
| 62 | (users, zones, hosts, userhosts) = get_statistics() |
| 63 | return templates['index.html'](users = users, |
| 64 | zones = zones, |
| 65 | hosts = hosts, |
| 66 | userhosts = userhosts, |
| 67 | current_ip = bottle.request.remote_addr) |
| 68 | |
| 69 | else: |
| 70 | return templates['index.html']() |
| 71 | |
| 72 | |
| 73 |
nothing calls this directly
no test coverage detected