pvl/verkko/hosts.py
changeset 11 d1e17bd498e7
parent 10 513eb70e54f2
child 12 7ffb92a57092
equal deleted inserted replaced
10:513eb70e54f2 11:d1e17bd498e7
   116             ('Hostname',    'name',     False,      False   ),
   116             ('Hostname',    'name',     False,      False   ),
   117             ('Seen',        'seen',     False,      False   ),
   117             ('Seen',        'seen',     False,      False   ),
   118         )
   118         )
   119 
   119 
   120         def url (**opts) :
   120         def url (**opts) :
   121             args = dict(filters)
   121             args = dict()
       
   122 
       
   123             if filters :
       
   124                 args.update(filters)
       
   125 
   122             args.update(opts)
   126             args.update(opts)
   123 
   127 
   124             return self.url(**args)
   128             return self.url(**args)
   125 
   129 
   126         table = html.table(
   130         table = html.table(
   145                     )
   149                     )
   146                 ) if filters is not False else None
   150                 ) if filters is not False else None
   147             ),
   151             ),
   148             html.tbody(
   152             html.tbody(
   149                 html.tr(class_=('alternate' if i % 2 else None), id=host.id)(
   153                 html.tr(class_=('alternate' if i % 2 else None), id=host.id)(
   150                     html.td(class_='id')(
   154                     html.th(
   151                         html.a(href=self.url(ItemHandler, id=host.id))(
   155                         html.a(href=self.url(ItemHandler, id=host.id))(
   152                             '#' #host['rowid'])
   156                             '#' #host['rowid'])
   153                         )
   157                         )
   154                     ),
   158                     ),
   155                     html.td(class_='ip')(
   159                     html.td(class_='ip')(