MCPcopy Create free account
hub / github.com/ddserver/ddserver / get_index

Function get_index

ddserver/interface/pages/index.py:56–70  ·  view source on GitHub ↗

Display the index page.

(db,
              templates,
              session)

Source from the content-addressed store, hash-verified

54 templates = 'ddserver.interface.template:TemplateManager',
55 session = 'ddserver.interface.session:SessionManager')
56def 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

Callers

nothing calls this directly

Calls 1

get_statisticsFunction · 0.85

Tested by

no test coverage detected