--- a/pvl/verkko/hosts.py Thu Oct 11 01:11:33 2012 +0300
+++ b/pvl/verkko/hosts.py Thu Oct 11 01:25:05 2012 +0300
@@ -110,11 +110,11 @@
def render_hosts (self, hosts, title=None, filters=False) :
COLS = (
- #title sort filter
- ('IP', 'ip', 'ip' ),
- ('MAC', 'mac', 'mac' ),
- ('Hostname', 'name', False ),
- ('Seen', 'seen', False ),
+ #title sort filter class
+ ('IP', 'ip', 'ip', 'ip' ),
+ ('MAC', 'mac', 'mac', 'mac' ),
+ ('Hostname', 'name', False, False ),
+ ('Seen', 'seen', False, False ),
)
def url (**opts) :
@@ -131,7 +131,7 @@
(
html.th(
html.a(href=url(sort=sort))(title) if sort else (title)
- ) for title, sort, filter in COLS
+ ) for title, sort, filter, class_ in COLS
)
),
html.tr(class_='filter')(
@@ -139,9 +139,9 @@
html.input(type='submit', value=u'\u00BF'),
),
(
- html.td(
+ html.td(class_=class_)(
html.input(type='text', name=filter, value=filters.get(filter)) if filter else None
- ) for title, sort, filter in COLS
+ ) for title, sort, filter, class_ in COLS
)
) if filters is not False else None
),