[% USE date %]
[% PROCESS _header.tt %]

    <table border="0" width="100%" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top" width="33%">
        [% PROCESS _infobox.tt %]
        </td>
        <td align="center" valign="middle" width="33%"></td>
        <td align="right" valign="bottom" width="33%">
          [% PROCESS _help.tt topic = "extinfo_7" %]
        </td>
      </tr>
    </table><br>
    <div align="center" class='statusSort'>
      Entries sorted by <b>[% sortkey %]</b>
      [% IF order == 'ASC' %]
      (ascending)
      [% ELSE %]
      (descending)
      [% END %]

      <br>
      [% PROCESS _pager.tt %]
    </div>
    <br>

    <div align="center">
      <table border="0" class='queue'>
        <tr class='queue'>
          <th class='queue'>Host&nbsp;<a href='[% uri_with(c, 'sorttype' => 1, 'sortoption' => 1) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/up.gif' border="0" alt='Sort by host name (ascending)' title='Sort by host name (ascending)'></a><a href='[% uri_with(c, 'sorttype' => 2, 'sortoption' => 1) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/down.gif' border="0" alt='Sort by host name (descending)' title='Sort by host name (descending)'></a></th>
          <th class='queue'>Service&nbsp;<a href='[% uri_with(c, 'sorttype' => 1, 'sortoption' => 2) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/up.gif' border="0" alt='Sort by service name (ascending)' title='Sort by service name (ascending)'></a><a href='[% uri_with(c, 'sorttype' => 2, 'sortoption' => 2) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/down.gif' border="0" alt='Sort by service name (descending)' title='Sort by service name (descending)'></a></th>
          <th class='queue'>Last Check&nbsp;<a href='[% uri_with(c, 'sorttype' => 1, 'sortoption' => 4) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/up.gif' border="0" alt='Sort by last check time (ascending)' title='Sort by last check time (ascending)'></a><a href='[% uri_with(c, 'sorttype' => 2, 'sortoption' => 4) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/down.gif' border="0" alt='Sort by last check time (descending)' title='Sort by last check time (descending)'></a></th>
          <th class='queue'>Next Check&nbsp;<a href='[% uri_with(c, 'sorttype' => 1, 'sortoption' => 7) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/up.gif' border="0" alt='Sort by next check time (ascending)' title='Sort by next check time (ascending)'></a><a href='[% uri_with(c, 'sorttype' => 2, 'sortoption' => 7) %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/down.gif' border="0" alt='Sort by next check time (descending)' title='Sort by next check time (descending)'></a></th>
          <th class='queue'>Type</th>
          <th class='queue'>Active Checks</th>
          <th class='queue'>Actions</th>
        </tr>
        [%  FOREACH q = data %]
        [% SET class = 'queueEven' IF loop.even %]
        [% SET class = 'queueOdd'  IF loop.odd %]
        <tr class='[% class %]'>

          <td class='[% class %]'><a href='extinfo.cgi?type=1&amp;host=[% q.host_name %]'>[% q.host_name | uri %]</a></td>

          [% IF q.description %]
          <td class='[% class %]'><a href='extinfo.cgi?type=2&amp;host=[% q.host_name | uri %]&amp;service=[% q.description | uri %]'>[% q.description %]</a></td>
          [% ELSE %]
          <td class='[% class %]'></td>
          [% END %]

          <td class='[% class %]'>[% date_format(c, q.last_check) %]</td>
          <td class='[% class %]'>[% date_format(c, q.next_check) %]</td>

          [% IF q.check_options == 0 %]
          <td class='[% class %]'>Normal</td>
          [% ELSIF q.check_options == 1 %]
          <td class='[% class %]'>Forced</td>
          [% ELSIF q.check_options == 2 %]
          <td class='[% class %]'>Freshness</td>
          [% ELSIF q.check_options == 4 %]
          <td class='[% class %]'>Orphan</td>
          [% END %]

          [% IF q.active_checks_enabled %]
          <td class='queueENABLED'>ENABLED</td>
          [% ELSE %]
          <td class='queueDISABLED'>DISABLED</td>
          [% END %]

          <td class='[% class %]'>
          [% IF q.description %]
            [% IF q.active_checks_enabled %]
            [% UNLESS c.config.command_disabled.exists('6') %]
            <a href='cmd.cgi?cmd_typ=6&amp;host=[% q.host_name | uri %]&amp;service=[% q.description | uri %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Active Checks Of This Service' title='Disable Active Checks Of This Service' width="20" height="20"></a>
            [% END %]
            [% ELSE %]
            [% UNLESS c.config.command_disabled.exists('5') %]
            <a href='cmd.cgi?cmd_typ=5&amp;host=[% q.host_name | uri %]&amp;service=[% q.description | uri %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Active Checks Of This Service' title='Enable Active Checks Of This Service' width="20" height="20"></a>
            [% END %]
            [% END %]
            [% UNLESS c.config.command_disabled.exists('7') %]
            <a href='cmd.cgi?cmd_typ=7&amp;host=[% q.host_name | uri %]&amp;service=[% q.description | uri %]&amp;force_check'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delay.gif' border="0" alt='Re-schedule This Service Check' title='Re-schedule This Service Check' width="20" height="20"></a>
            [% END %]
          [% ELSE %]
            [% IF q.active_checks_enabled %]
            [% UNLESS c.config.command_disabled.exists('4') %]
            <a href='cmd.cgi?cmd_typ=4&amp;host=[% q.host_name | uri %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Active Checks Of This Host' title='Disable Active Checks Of This Host' width="20" height="20"></a>
            [% END %]
            [% ELSE %]
            [% UNLESS c.config.command_disabled.exists('47') %]
            <a href='cmd.cgi?cmd_typ=47&amp;host=[% q.host_name | uri %]'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Active Checks Of This Host' title='Enable Active Checks Of This Host' width="20" height="20"></a>
            [% END %]
            [% END %]
            [% UNLESS c.config.command_disabled.exists('96') %]
            <a href='cmd.cgi?cmd_typ=96&amp;host=[% q.host_name | uri %]&amp;force_check'><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delay.gif' border="0" alt='Re-schedule This Host Check' title='Re-schedule This Host Check' width="20" height="20"></a>
            [% END %]
          [% END %]
          </td>
        </tr>
        [%  END %]
      </table>

      <br>
      [% PROCESS _pager.tt %]
    </div>

[% PROCESS _footer.tt %]
