Exemplo n.º 1
0
 def index(self, sortkey="host_ui_shortname"):
     allHosts = None
     show_hosts_page = tplE._settings.get("show_hosts_page", True)
     if show_hosts_page:
         allHosts = hosts.getAllHostsData()
         allHosts = sorted(allHosts.iteritems(), key=lambda h: h[1][sortkey])
     tmpl = tplE.env.get_template("hosts.html")
     return tmpl.render(all_hosts=allHosts, show_hosts_page=show_hosts_page, target="World")
Exemplo n.º 2
0
 def index(self, sortkey='host_ui_shortname'):
     allHosts = None
     show_hosts_page = tplE._settings.get('show_hosts_page', True)
     if show_hosts_page:
         allHosts = hosts.getAllHostsData()
         allHosts = sorted(allHosts.iteritems(),
                           key=lambda h: h[1][sortkey])
     tmpl = tplE.env.get_template('hosts.html')
     return tmpl.render(all_hosts=allHosts,
                        show_hosts_page=show_hosts_page,
                        target='World')
Exemplo n.º 3
0
 def raw(self):
     return list(h[1] for h in sorted(hosts.getAllHostsData().iteritems()))
Exemplo n.º 4
0
 def raw(self):
     return list(h[1] for h in sorted(hosts.getAllHostsData().iteritems()))
Exemplo n.º 5
0
 def index(self, sortkey='host_ui_shortname'):
     allHosts = hosts.getAllHostsData()
     allHosts = sorted(allHosts.iteritems(), key = lambda h : h[1][sortkey])
     tmpl = tplE.env.get_template('hosts.html')
     return tmpl.render(all_hosts=allHosts,
                        target='World')
Exemplo n.º 6
0
 def index(self, sortkey='host_ui_shortname'):
     allHosts = hosts.getAllHostsData()
     allHosts = sorted(allHosts.iteritems(), key=lambda h: h[1][sortkey])
     tmpl = tplE.env.get_template('hosts.html')
     return tmpl.render(all_hosts=allHosts, target='World')