pvl/verkko/hosts.py
changeset 17 29f0cf9220e0
parent 16 51509b5ce1c0
child 19 4e2e26f4d058
equal deleted inserted replaced
16:51509b5ce1c0 17:29f0cf9220e0
   127         'ip':       Host.ip,
   127         'ip':       Host.ip,
   128         'mac':      Host.mac,
   128         'mac':      Host.mac,
   129         'name':     Host.name,
   129         'name':     Host.name,
   130         'seen':     Host.last_seen,
   130         'seen':     Host.last_seen,
   131         'state':    Host.state,
   131         'state':    Host.state,
       
   132         'count':    Host.count,
   132     }
   133     }
   133 
   134 
   134     HOST_SORT = Host.last_seen.desc()
   135     HOST_SORT = Host.last_seen.desc()
   135 
   136 
   136     def query (self) :
   137     def query (self) :
   266                 ('Hostname',    host.name),
   267                 ('Hostname',    host.name),
   267                 ('DNS',         host.dns()),
   268                 ('DNS',         host.dns()),
   268                 ('First seen',  host.first_seen),
   269                 ('First seen',  host.first_seen),
   269                 ('Last seen',   host.last_seen),
   270                 ('Last seen',   host.last_seen),
   270                 ('Last state',  host.render_state()),
   271                 ('Last state',  host.render_state()),
       
   272                 ('Total messages',      host.count),
   271         )
   273         )
   272 
   274 
   273         return (
   275         return (
   274             html.h2('Host'),
   276             html.h2('Host'),
   275             html.dl(
   277             html.dl(