[% PROCESS _header.tt %]
[% PROCESS _message.tt %]
[% PROCESS _sounds.tt %]
[% SET empty = 0 %]
[% SET empty = 1 UNLESS host_stats %]
<div class="flexcol">
  <div class="flexrow justify-between">
    <div class="flexcol">
      [% PROCESS _infobox.tt %]
      <div class="flex gap-x-1">
        [% PROCESS _status_filter.tt small_button = 1 %]
        [% PROCESS _json_export.tt %]
      </div>
    </div>

    <div class="flexcol">
      <div class="card min-w-[420px]">
        <div class="head">
          <h3><a href='extinfo.cgi?type=4'>Monitoring Performance</a></h3>
        </div>
        <div class="body">
          <table>
            <tr>
              <th><a href='extinfo.cgi?type=4'>Service Check Execution Time</a></th>
              <td><a href='extinfo.cgi?type=4'>[% sprintf('%.2f',stats.services_execution_time_min) %] / [% sprintf('%.2f',stats.services_execution_time_max) %] / [% sprintf('%.3f',stats.services_execution_time_avg) %] sec</a></td>
            </tr>
            <tr>
              <th><a href='extinfo.cgi?type=4'>Service Check Latency</a></th>
              <td><a href='extinfo.cgi?type=4'>[% sprintf('%.2f',stats.services_latency_min) %] / [% sprintf('%.2f',stats.services_latency_max) %] / [% sprintf('%.3f',stats.services_latency_avg) %] sec</a></td>
            </tr>
            <tr>
              <th><a href='extinfo.cgi?type=4'>Host Check Execution Time</a></th>
              <td><a href='extinfo.cgi?type=4'>[% sprintf('%.2f',stats.hosts_execution_time_min) %] / [% sprintf('%.2f',stats.hosts_execution_time_max) %] / [% sprintf('%.3f',stats.hosts_execution_time_avg) %] sec</a></td>
            </tr>
            <tr>
              <th><a href='extinfo.cgi?type=4'>Host Check Latency</a></th>
              <td><a href='extinfo.cgi?type=4'>[% sprintf('%.2f',stats.hosts_latency_min) %] / [% sprintf('%.2f',stats.hosts_latency_max) %] / [% sprintf('%.3f',stats.hosts_latency_avg) %] sec</a></td>
            </tr>
            <tr>
              <th><a href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 131072 }) %]'># Active Host / Service Checks</a></th>
              <td><a href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 131072 }) %]'>[% IF !empty %][% host_stats.total_active %][% ELSE %]0[% END %]</a> / <a href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 131072 }) %]'>[% IF !empty %][% service_stats.total_active %][% ELSE %]0[% END %]</a>
            </td>
            </tr>
            <tr>
              <th><a href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 65536 }) %]'># Passive Host / Service Checks</a></th>
              <td><a href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 65536 }) %]'>[% IF !empty %][% host_stats.total_passive %][% ELSE %]0[% END %]</a> / <a href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 65536 }) %]'>[% IF !empty %][% service_stats.total_passive %][% ELSE %]0[% END %]</a></td>
            </tr>
          </table>
        </div>
      </div>
    </div>
  </div>

  <div class="flexrow justify-between">
    <div class="card min-w-[420px] h-auto overflow-hidden">
      <div class="head">
        <h3>Network Outages</h3>
      </div>
      <table>
        <tr>
          <th class="p-0 hoverable"><a class="block w-full p-2" href='outages.cgi'>[% host_stats.outages %] Outages</a></th>
        </tr>
        [% IF !empty && host_stats.outages > 0 %]
        <tr>
          <td class="p-0 importantProblem h-8"><a class="block w-full p-2 itemblock" href='outages.cgi'>[% host_stats.outages %] Blocking Outages</a></td>
        </tr>
        [% END %]
      </table>
    </div>

    <div class="card min-w-[420px] overflow-hidden">
      <div class="head">
        <h3><a href='extinfo.cgi?type=4'>Network Health</a></h3>
      </div>
      <div class="body">
        <div class="progressbar">
          [% IF empty || (host_stats.total-host_stats.pending) == 0 %]
            [% host_health = 0 %]
          [% ELSE %]
            [% host_health = host_stats.up / (host_stats.total-host_stats.pending) * 100 %]
          [% END %]
          [% host_health = sprintf('%i', host_health) %]
          [% host_perc   = host_health %]
          [% IF host_perc >= 90 %]
            [% host_health_cls = 'UP' %]
          [% ELSIF host_perc >= 75 %]
            [% host_health_cls = 'WARNING' %]
          [% ELSIF host_perc >= 5 %]
            [% host_health_cls = 'DOWN' %]
          [% ELSE %]
            [% host_health_cls = 'DOWN' %]
            [% host_perc = 5 %]
          [% END %]
          [% IF host_stats.total == 0 %]
            [% host_health_cls = 'UP' %]
          [% END %]
          <div class="description"><span>Host Health</span></div>
          <div class="bar"><div style="width:[% host_perc %]%" class="[% host_health_cls %]"></div></div>
          <div class="percent"><span>[% host_health %]%</span></div>
        </div>
        <div class="progressbar mt-1">
          [% IF empty || (service_stats.total-service_stats.pending) == 0 %]
            [% service_health = 0 %]
          [% ELSE %]
            [% service_health = service_stats.ok / (service_stats.total-service_stats.pending) * 100 %]
          [% END %]
          [% service_health = sprintf('%i', service_health) %]
          [% service_perc   = service_health %]
          [% IF service_health >= 90 %]
            [% service_health_cls = 'OK' %]
          [% ELSIF service_health >= 75 %]
            [% service_health_cls = 'WARNING' %]
          [% ELSIF service_health >= 5 %]
            [% service_health_cls = 'CRITICAL' %]
          [% ELSE %]
            [% service_health_cls = 'CRITICAL' %]
            [% service_perc = 5 %]
          [% END %]
          [% IF service_stats.total == 0 %]
            [% service_health_cls = 'UP' %]
          [% END %]
          <div class="description"><span>Service Health</span></div>
          <div class="bar"><div style="width:[% service_perc %]%" class="[% service_health_cls %]"></div></div>
          <div class="percent"><span>[% service_health %]%</span></div>
        </div>
      </div>
    </div>
  </div>

  <div class="card overflow-hidden">
    <div class="head">
      <h3>Hosts</h3>
    </div>
    <table>
      <tr>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 2 }) %]'>[% host_stats.up          %] Up</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4 }) %]'>[% host_stats.down        %] Down</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8 }) %]'>[% host_stats.unreachable %] Unreachable</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 1 }) %]'>[% host_stats.pending     %] Pending</a></th>
      </tr>
      <tr>
        <td class="p-0 align-top">
          [% IF !empty && host_stats.up_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 2, hostprops => 1 }) %]">[% host_stats.up_and_scheduled %] Scheduled</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && host_stats.up_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 2, hostprops => 131088 }) %]">[% host_stats.up_and_disabled_active %] Disabled</a>[% END %]
          [% ELSE %]
            [% IF !empty && host_stats.up_and_disabled_active + host_stats.up_and_disabled_passive> 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 2, hostprops => 16 }) %]">[% host_stats.up_and_disabled_active + host_stats.up_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && host_stats.down_and_unhandled > 0 %]<a class="itemblock importantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 10 }) %]">[% host_stats.down_and_unhandled %] Unhandled Problems</a>[% END %]
          [% IF !empty && host_stats.down_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 1 }) %]">[% host_stats.down_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && host_stats.down_and_ack > 0       %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 4 }) %]">[% host_stats.down_and_ack %] Acknowledged</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && host_stats.down_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 131088 }) %]">[% host_stats.down_and_disabled_active %] Disabled</a>[% END %]
            [% IF !empty && host_stats.down_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 65552 }) %]">[% host_stats.down_and_disabled_passive %] Passive</a>[% END %]
          [% ELSE %]
            [% IF !empty && host_stats.down_and_disabled_active + host_stats.down_and_disabled_passive> 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 4, hostprops => 16 }) %]">[% host_stats.down_and_disabled_active + host_stats.down_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && host_stats.unreachable_and_unhandled > 0 %]<a class="itemblock importantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 10 }) %]">[% host_stats.unreachable_and_unhandled %] Unhandled Problems</a>[% END %]
          [% IF !empty && host_stats.unreachable_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 1 }) %]">[% host_stats.unreachable_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && host_stats.unreachable_and_ack > 0       %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 4 }) %]">[% host_stats.unreachable_and_ack %] Acknowledged</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && host_stats.unreachable_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 131088 }) %]">[% host_stats.unreachable_and_disabled_active %] Disabled</a>[% END %]
            [% IF !empty && host_stats.unreachable_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 65552 }) %]">[% host_stats.unreachable_and_disabled_passive %] Passive</a>[% END %]
          [% ELSE %]
            [% IF !empty && host_stats.unreachable_and_disabled_active + host_stats.unreachable_and_disabled_passive> 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 8, hostprops => 16 }) %]">[% host_stats.unreachable_and_disabled_active + host_stats.unreachable_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && host_stats.pending_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 1, hostprops => 1 }) %]">[% host_stats.pending_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && host_stats.pending_and_disabled > 0  %]<a class="itemblock unimportantProblem" href="[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hoststatustypes => 1, hostprops => 16 }) %]">[% host_stats.pending_and_disabled %] Disabled</a>[% END %]
        </td>
      </tr>
    </table>
  </div>

  <div class="card overflow-hidden">
    <div class="head">
      <h3>Services</h3>
    </div>
    <table>
      <tr>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 2 })  %]'>[% service_stats.ok       %] OK</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4 })  %]'>[% service_stats.warning  %] Warning</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8 })  %]'>[% service_stats.unknown  %] Unknown</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16 }) %]'>[% service_stats.critical %] Critical</a></th>
        <th class="p-0 hoverable"><a class="block w-48 p-2" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 1 })  %]'>[% service_stats.pending  %] Pending</a></th>
      </tr>
      <tr>
        <td class="p-0 align-top">
          [% IF !empty && service_stats.ok_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 2, serviceprops => 1 }) %]'>[% service_stats.ok_and_scheduled %] Scheduled</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && service_stats.ok_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 2, serviceprops => 131088 }) %]'>[% service_stats.ok_and_disabled_active %] Disabled</a>[% END %]
          [% ELSE %]
            [% IF !empty && service_stats.ok_and_disabled_active + service_stats.ok_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 2, serviceprops => 16 }) %]'>[% service_stats.ok_and_disabled_active + service_stats.ok_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && service_stats.warning_and_unhandled > 0 %]<a class="itemblock importantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, hoststatustypes => 3, serviceprops => 10 }) %]'>[% service_stats.warning_and_unhandled %] Unhandled Problems</a>[% END %]
          [% IF !empty && service_stats.warning_on_down_host > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, hoststatustypes => 12 }) %]'>[% service_stats.warning_on_down_host %] on Problem Hosts</a>[% END %]
          [% IF !empty && service_stats.warning_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, serviceprops => 1 }) %]'>[% service_stats.warning_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && service_stats.warning_and_ack > 0       %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, serviceprops => 4 }) %]'>[% service_stats.warning_and_ack %] Acknowledged</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && service_stats.warning_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, serviceprops => 131088 }) %]'>[% service_stats.warning_and_disabled_active %] Disabled</a>[% END %]
            [% IF !empty && service_stats.warning_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, serviceprops => 65552 }) %]'>[% service_stats.warning_and_disabled_passive %] Passive</a>[% END %]
          [% ELSE %]
            [% IF !empty && service_stats.warning_and_disabled_active + service_stats.warning_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 4, serviceprops => 16 }) %]'>[% service_stats.warning_and_disabled_active + service_stats.warning_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && service_stats.unknown_and_unhandled > 0 %]<a class="itemblock importantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, hoststatustypes => 3, serviceprops => 10 }) %]'>[% service_stats.unknown_and_unhandled %] Unhandled Problems</a>[% END %]
          [% IF !empty && service_stats.unknown_on_down_host > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, hoststatustypes => 12 }) %]'>[% service_stats.unknown_on_down_host %] on Problem Hosts</a>[% END %]
          [% IF !empty && service_stats.unknown_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, serviceprops => 1 }) %]'>[% service_stats.unknown_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && service_stats.unknown_and_ack > 0       %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, serviceprops => 4 }) %]'>[% service_stats.unknown_and_ack %] Acknowledged</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && service_stats.unknown_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, serviceprops => 131088 }) %]'>[% service_stats.unknown_and_disabled_active %] Disabled</a>[% END %]
            [% IF !empty && service_stats.unknown_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, serviceprops => 65552 }) %]'>[% service_stats.unknown_and_disabled_passive %] Passive</a>[% END %]
          [% ELSE %]
            [% IF !empty && service_stats.unknown_and_disabled_active + service_stats.unknown_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 8, serviceprops => 16 }) %]'>[% service_stats.unknown_and_disabled_active + service_stats.unknown_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && service_stats.critical_and_unhandled > 0 %]<a class="itemblock importantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, hoststatustypes => 3, serviceprops => 10 }) %]'>[% service_stats.critical_and_unhandled %] Unhandled Problems</a>[% END %]
          [% IF !empty && service_stats.critical_on_down_host > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, hoststatustypes => 12 }) %]'>[% service_stats.critical_on_down_host %] on Problem Hosts</a>[% END %]
          [% IF !empty && service_stats.critical_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, serviceprops => 1 }) %]'>[% service_stats.critical_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && service_stats.critical_and_ack > 0       %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, serviceprops => 4 }) %]'>[% service_stats.critical_and_ack %] Acknowledged</a>[% END %]
          [% IF strict_passive_mode %]
            [% IF !empty && service_stats.critical_and_disabled_active > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, serviceprops => 131088 }) %]'>[% service_stats.critical_and_disabled_active %] Disabled</a>[% END %]
            [% IF !empty && service_stats.critical_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, serviceprops => 65552 }) %]'>[% service_stats.critical_and_disabled_passive %] Passive</a>[% END %]
          [% ELSE %]
            [% IF !empty && service_stats.critical_and_disabled_active + service_stats.critical_and_disabled_passive > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 16, serviceprops => 16 }) %]'>[% service_stats.critical_and_disabled_active + service_stats.critical_and_disabled_passive %] Disabled</a>[% END %]
          [% END %]
        </td>
        <td class="p-0 pl-px align-top">
          [% IF !empty && service_stats.pending_and_scheduled > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 1, serviceprops => 1 }) %]'>[% service_stats.pending_and_scheduled %] Scheduled</a>[% END %]
          [% IF !empty && service_stats.pending_and_disabled > 0  %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", servicestatustypes => 1, serviceprops => 16 }) %]'>[% service_stats.pending_and_disabled %] Disabled</a>[% END %]
        </td>
      </tr>
    </table>
  </div>

  <div class="card overflow-hidden">
    <div class="head">
      <h3>Monitoring Features</h3>
    </div>
    <table>
      <tr>
        <th class="p-2 w-48 hoverable text-center">Active Checks</th>
        <th class="p-2 w-48 hoverable text-center">Passive Checks</th>
        <th class="p-2 w-48 hoverable text-center">Notifications</th>
        <th class="p-2 w-48 hoverable text-center">Event Handlers</th>
        <th class="p-2 w-48 hoverable text-center">Flap Detection</th>
      </tr>

      <tr>

        <td class="featureBlock">
          <div class="pl-0">
            <a href='extinfo.cgi?type=0'>
              [% IF pi.keys.size == 0 || pi.execute_service_checks == 1 %]<div class="vbadge ENABLED"><span>Enabled</span></div>
              [% ELSIF pi.execute_service_checks == -1                  %]<div class="vbadge UNKNOWN"><span>Ambiguous</span></div>
              [% ELSE                                                   %]<div class="vbadge DISABLED"><span>Disabled</span></div>
              [% END %]
            </a>

            <div class="w-full">
              [% IF pi.keys.size > 0 && pi.execute_service_checks == 0 %]
                <a href='extinfo.cgi?type=0'><div class="itemblock DISABLED h-full">N/A</div></a>
              [% ELSE %]
                <div class="ENABLED w-full h-full">
                  [% IF empty || service_stats.active_checks_disabled_active + service_stats.active_checks_disabled_passive == 0 %]
                    <div class="itemblock"><span>All Services Enabled</span></div>
                  [% ELSE %]
                    [% IF strict_passive_mode %]
                      [% IF service_stats.active_checks_disabled_active > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 131088 }) %]'>[% service_stats.active_checks_disabled_active %] Services Disabled</a>[% END %]
                      [% IF service_stats.active_checks_disabled_passive > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 65552 }) %]'>[% service_stats.active_checks_disabled_passive %] Services Passive</a>[% END %]
                    [% ELSE %]
                      <a href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 16 }) %]'>[% service_stats.active_checks_disabled_active + service_stats.active_checks_disabled_passive %] Services Disabled</a>
                    [% END %]
                  [% END %]

                  [% IF empty || host_stats.active_checks_disabled_active + host_stats.active_checks_disabled_passive == 0 %]
                    <div class="itemblock"><span>All Hosts Enabled</span></div>
                  [% ELSE %]
                    [% IF strict_passive_mode %]
                      [% IF host_stats.active_checks_disabled_active > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 131088 }) %]'>[% host_stats.active_checks_disabled_active %] Hosts Disabled</a>[% END %]
                      [% IF host_stats.active_checks_disabled_passive > 0 %]<a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 65552 }) %]'>[% host_stats.active_checks_disabled_passive %] Hosts Passive</a>[% END %]
                    [% ELSE %]
                      <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 16 }) %]'>[% host_stats.active_checks_disabled_active + host_stats.active_checks_disabled_passive %] Hosts Disabled</a>
                    [% END %]
                  [% END %]
                </div>
              [% END %]
            </div>
          </div>
        </td>

        <td class="featureBlock">
          <div>
            <a href='extinfo.cgi?type=0'>
              [% IF pi.keys.size == 0 || pi.accept_passive_service_checks == 1 %]<div class="vbadge ENABLED"><span>Enabled</span></div>
              [% ELSIF pi.accept_passive_service_checks == -1                  %]<div class="vbadge UNKNOWN"><span>Ambiguous</span></div>
              [% ELSE                                                          %]<div class="vbadge DISABLED"><span>Disabled</span></div>
              [% END %]
            </a>

            <div class="w-full">
              [% IF pi.keys.size > 0 && pi.accept_passive_service_checks == 0 %]
                <a href='extinfo.cgi?type=0'><div class="itemblock DISABLED h-full">N/A</div></a>
              [% ELSE %]
                <div class="ENABLED w-full h-full">
                  [% IF empty || service_stats.passive_checks_disabled == 0 %]
                    <div class="itemblock"><span>All Services Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 16384 }) %]'>[% service_stats.passive_checks_disabled %] Service Disabled</a>
                  [% END %]
                  [% IF empty || host_stats.passive_checks_disabled == 0 %]
                    <div class="itemblock"><span>All Hosts Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 16384 }) %]'>[% host_stats.passive_checks_disabled %] Host Disabled</a>
                  [% END %]
                </div>
              [% END %]
            </div>
          </div>
        </td>

        <td class="featureBlock">
          <div>
            <a href='extinfo.cgi?type=0'>
              [% IF pi.keys.size == 0 || pi.enable_notifications == 1 %]<div class="vbadge ENABLED"><span>Enabled</span></div>
              [% ELSIF pi.enable_notifications == -1                  %]<div class="vbadge UNKNOWN"><span>Ambiguous</span></div>
              [% ELSE                                                 %]<div class="vbadge DISABLED"><span>Disabled</span></div>
              [% END %]
            </a>

            <div class="w-full">
              [% IF pi.keys.size > 0 && pi.enable_notifications == 0 %]
                <a href='extinfo.cgi?type=0'><div class="itemblock DISABLED h-full">N/A</div></a>
              [% ELSE %]
                <div class="ENABLED w-full h-full">
                  [% IF empty || service_stats.notifications_disabled == 0 %]
                    <div class="itemblock"><span>All Services Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 4096 }) %]'>[% service_stats.notifications_disabled %] Services Disabled</a>
                  [% END %]
                  [% IF empty || host_stats.notifications_disabled == 0 %]
                  <div class="itemblock"><span>All Hosts Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 4096 }) %]'>[% host_stats.notifications_disabled %] Host Disabled</a>
                  [% END %]
                </div>
              [% END %]
            </div>
          </div>
        </td>

        <td class="featureBlock">
          <div>
            <a href='extinfo.cgi?type=0'>
              [% IF pi.keys.size == 0 || pi.enable_event_handlers == 1 %]<div class="vbadge ENABLED"><span>Enabled</span></div>
              [% ELSIF pi.enable_event_handlers == -1                  %]<div class="vbadge UNKNOWN"><span>Ambiguous</span></div>
              [% ELSE                                                  %]<div class="vbadge DISABLED"><span>Disabled</span></div>
              [% END %]
            </a>

            <div class="w-full">
              [% IF pi.keys.size > 0 && pi.enable_event_handlers == 0 %]
                <a href='extinfo.cgi?type=0'><div class="itemblock DISABLED h-full">N/A</div></a>
              [% ELSE %]
                <div class="ENABLED w-full h-full">
                  [% IF empty || service_stats.eventhandler_disabled == 0 %]
                  <div class="itemblock"><span>All Services Enabled</span></div>
                  [% ELSE %]
                  <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 64 }) %]'>[% service_stats.eventhandler_disabled %] Service Disabled</a>
                  [% END %]
                  [% IF empty || host_stats.eventhandler_disabled == 0 %]
                  <div class="itemblock"><span>All Hosts Enabled</span></div>
                  [% ELSE %]
                  <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 64 }) %]'>[% host_stats.eventhandler_disabled %] Hosts Disabled</a>
                  [% END %]
                </div>
              [% END %]
            </div>
          </div>
        </td>

        <td class="featureBlock">
          <div>
            <a href='extinfo.cgi?type=0'>
              [% IF pi.keys.size == 0 || pi.enable_flap_detection == 1 %]<div class="vbadge ENABLED"><span>Enabled</span></div>
              [% ELSIF pi.enable_flap_detection == -1                  %]<div class="vbadge UNKNOWN"><span>Ambiguous</span></div>
              [% ELSE                                                  %]<div class="vbadge DISABLED"><span>Disabled</span></div>
              [% END %]
            </a>

            <div class="w-full">
              [% IF pi.keys.size > 0 && pi.enable_flap_detection == 0 %]
                <a href='extinfo.cgi?type=0'><div class="itemblock DISABLED h-full">N/A</div></a>
              [% ELSE %]
                <div class="ENABLED w-full h-full">
                  [% IF empty || service_stats.flapping_disabled == 0 %]
                    <div class="itemblock"><span>All Services Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 512 }) %]'>[% service_stats.flapping_disabled %] Service Disabled</a>
                  [% END %]
                  [% IF !empty && service_stats.flapping > 0 %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "detail", serviceprops => 1024 }) %]'>[% service_stats.flapping %] Services Flapping</a>
                  [% ELSE %]
                    <div class="itemblock"><span>No Services Flapping</span></div>
                  [% END %]
                  [% IF empty || host_stats.flapping_disabled == 0 %]
                    <div class="itemblock"><span>All Hosts Enabled</span></div>
                  [% ELSE %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 256 }) %]'>[% host_stats.flapping_disabled %] Host Disabled</a>
                  [% END %]
                  [% IF host_stats.flapping %]
                    <a class="itemblock unimportantProblem" href='[% uri_with(c, { _page => "status.cgi", style => "hostdetail", hostprops => 1024 }) %]'>[% host_stats.flapping %] Hosts Flapping</a>
                  [% ELSE %]
                    <div class="itemblock"><span>No Hosts Flapping</span></div>
                  [% END %]
                </div>
              [% END %]
            </div>
          </div>
        </td>

      </tr>
    </table>
  </div>
</div>

[% PROCESS _footer.tt %]
