<%! from baruwa.lib.filters import totals from baruwa.lib.cluster import host_status %>

${_("Todays stats")}

  ${_("Processed")} ${c.baruwa_totals.total|totals}
${_("Clean")} ${c.baruwa_totals.clean|totals}
${_("High scoring spam")} ${c.baruwa_totals.highspam|totals}
${_("Low scoring spam")} ${c.baruwa_totals.lowspam|totals}
${_("Virus infected")} ${c.baruwa_totals.virii|totals}
${_("Policy blocked")} ${c.baruwa_totals.infected|totals}
  ${_("Inbound queues")} ${h.link_to(c.baruwa_inbound, url('mailq-status-directed', queue='inbound'))}
  ${_("Outbound queues")} ${h.link_to(c.baruwa_outbound, url('mailq-status-directed', queue='outbound'))}

${_('Graph')}

% if c.baruwa_totals.total: graph % else:
${_('Not enough data available to generate graph.')}
% endif
% if c.user.is_superadmin:

${_('Scanner node status')}

% if not c.servers:
${_('No active scanning nodes found')}
% endif: % for server in c.servers:
${h.portable_img('imgs/active.png', _('OK'), title=_('OK')) + h.literal(' ') + h.link_to(server.hostname, url('server-status', serverid=server.id)) if host_status(server.hostname) else h.portable_img('imgs/inactive.png', _('FAULTY'), title=_('FAULTY')) + h.literal(' ') + h.link_to(server.hostname, url('server-status', serverid=server.id))}
% endfor % endif
<%def name="title()">\ ${_('Status :: Global status')} <%def name="heading()">\ ${_('Status :: Global status')} <%def name="headers()">\ <%def name="localscripts()">\ <%inherit file="/base.html"/>