[% USE date %]
<table border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="top" class='commandPanel'>
      <div class='commandTitle'>Host Commands</div>
      <table border='1' cellpadding="0" cellspacing="0" class="command extCommandPanel">
        <tr>
          <td>
            [% UNLESS c.check_cmd_permissions('host', host.name) %]
            <div align=center class='infoMessage'>Your account does not have permissions to execute commands.</div><br>
            [% ELSE %]
            <table border="0" cellspacing="0" cellpadding="0">
              [% IF use_feature_statusmap %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/status3.gif' border="0" alt='Locate Host On Map' title='Locate Host On Map' width="20" height="20"></td>
                <td class='command'><a href='statusmap.cgi?host=[% host.name | uri %]'>Locate host on map</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('47') || c.config.command_disabled.exists('48') %]
              <tr class='command'>
                [% IF host.checks_enabled %]
                  <td><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"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=48&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable active checks of this host</a></td>
                [% ELSE %]
                  <td><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"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=47&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable active checks of this host</a></td>
                [% END %]
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('96') %]
              <tr class='data'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delay.gif' border="0" alt='Re-schedule Next Host Check' title='Re-schedule Next Host Check' width="20" height="20"></td>
                <td class='command'>
                  <a href='cmd.cgi?cmd_typ=96&amp;host=[% host.name | uri %][% IF host.checks_enabled %]&amp;force_check[% END %]&amp;backend=[% host.peer_key %]'>Re-schedule next check of this host</a>
                  (<a href='cmd.cgi?cmd_typ=96&amp;cmd_mod=2&amp;start_time=[% date.now %]&amp;host=[% host.name | uri %][% IF host.checks_enabled %]&amp;force_check[% END %]&amp;backend=[% host.peer_key %]&amp;referer=[% as_url_arg(short_uri(c, {referer => 'undef'})) %]'> Now </a>)
                </td>
              </tr>
              [% END %]
              [% IF host.accept_passive_checks %]
              [% UNLESS c.config.command_disabled.exists('87') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/passiveonly.gif' border="0" alt='Submit Passive Check Result For This Host' title='Submit Passive Check Result For This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=87&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Submit passive check result for this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('93') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Stop Accepting Passive Checks For This Host' title='Stop Accepting Passive Checks For This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=93&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Stop accepting passive checks for this host</a></td>
              </tr>
              [% END %]
              [% ELSE %]
              [% UNLESS c.config.command_disabled.exists('92') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Start Accepting Passive Checks For This Host' title='Start Accepting Passive Checks For This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=92&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Start accepting passive checks for this host</a></td>
              </tr>
              [% END %]
              [% END %]

              [% UNLESS c.config.command_disabled.exists('101') ||  c.config.command_disabled.exists('102') %]
              <tr class='command'>
                [% IF host.obsess_over_host %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Stop Obsessing Over This Host' title='Stop Obsessing Over This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=102&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Stop obsessing over this host</a></td>
                [% ELSE %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Start Obsessing Over This Host' title='Start Obsessing Over This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=101&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Start obsessing over this host</a></td>
                [% END %]
              </tr>
              [% END %]


              [% IF host.acknowledged || host.state >= 1 %]
              [% UNLESS c.config.command_disabled.exists('33') ||  c.config.command_disabled.exists('51') %]
              <tr class='command'>
                [% IF host.acknowledged %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/noack.gif' border="0" alt='Remove Problem Acknowledgement' title='Remove Problem Acknowledgement' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=51&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Remove problem acknowledgement</a></td>
                [% ELSE %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/ack.gif' border="0" alt='Acknowledge This Host Problem' title='Acknowledge This Host Problem' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=33&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Acknowledge this host problem</a></td>
                [% END %]
              </tr>
              [% END %]
              [% END %]


              [% UNLESS c.config.command_disabled.exists('24') ||  c.config.command_disabled.exists('25') %]
              <tr class='command'>
                [% IF host.notifications_enabled %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Notifications For This Host' title='Disable Notifications For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=25&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable notifications for this host</a></td>
                [% ELSE %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Notifications For This Host' title='Enable Notifications For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=24&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable notifications for this host</a></td>
                [% END %]
              </tr>
              [% END %]

              [% UNLESS c.config.command_disabled.exists('159') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/notify.gif' border="0" alt='Send Custom Notification' title='Send Custom Notification' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=159&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Send custom host notification</a></td>
              </tr>
              [% END %]

              [% IF host.state >= 1 %]
              [% UNLESS c.config.command_disabled.exists('10') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delay.gif' border="0" alt='Delay Next Host Notification' title='Delay Next Host Notification' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=10&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Delay next host notification</a></td>
              </tr>
              [% END %]
              [% END %]

              [% UNLESS c.config.command_disabled.exists('55') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/downtime.gif' border="0" alt='Schedule Downtime For This Host' title='Schedule Downtime For This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=55&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Schedule downtime for this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('86') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/downtime.gif' border="0" alt='Schedule Downtime For All Services On This Host' title='Schedule Downtime For All Services On This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=86&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Schedule downtime for all services on this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('29') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Notifications For All Services On This Host' title='Disable Notifications For All Services On This Host' width="20" height="20"></td>
                <td class='command' nowrap><a href='cmd.cgi?cmd_typ=29&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable notifications for all services on this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('28') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Notifications For All Services On This Host' title='Enable Notifications For All Services On This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=28&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable notifications for all services on this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('17') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/delay.gif' border="0" alt='Schedule A Check Of All Services On This Host' title='Schedule A Check Of All Services On This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=17&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Schedule a check of all services on this host</a></td>
              </tr>
              [% END %]
              [% IF host.modified_attributes_list.size > 0 %]
              [% UNLESS c.config.command_disabled.exists('154') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Reset Modified Attributes Of This Host' title='Reset Modified Attributes Of This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=154&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Reset Modified Attributes</a></td>
              </tr>
              [% END %]
              [% END %]
              [% UNLESS c.config.command_disabled.exists('16') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Checks Of All Services On This Host' title='Disable Checks Of All Services On This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=16&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable checks of all services on this host</a></td>
              </tr>
              [% END %]
              [% UNLESS c.config.command_disabled.exists('15') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Checks Of All Services On This Host' title='Enable Checks Of All Services On This Host' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=15&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable checks of all services on this host</a></td>
              </tr>
              [% END %]
              [% IF enable_shinken_features %]
              [% UNLESS c.config.command_disabled.exists('201') %]
              <tr class='command'>
                <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/ack.gif' border="0" alt='Launch event handler' title='Launch event handler' width="20" height="20"></td>
                <td class='command'><a href='cmd.cgi?cmd_typ=201&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Launch event handler</a></td>
              </tr>
              [% END %]
              [% END %]

              [% UNLESS c.config.command_disabled.exists('43') ||  c.config.command_disabled.exists('44') %]
              <tr class='command'>
                [% IF host.event_handler_enabled %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Event Handler For This Host' title='Disable Event Handler For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=44&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable event handler for this host</a></td>
                [% ELSE %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Event Handler For This Host' title='Enable Event Handler For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=43&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable event handler for this host</a></td>
                [% END %]
              </tr>
              [% END %]

              [% UNLESS c.config.command_disabled.exists('57') ||  c.config.command_disabled.exists('58') %]
              <tr class='command'>
                [% IF host.flap_detection_enabled %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/disabled.gif' border="0" alt='Disable Flap Detection For This Host' title='Disable Flap Detection For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=58&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Disable flap detection for this host</a></td>
                [% ELSE %]
                  <td><img src='[% url_prefix %]thruk/themes/[% theme %]/images/enabled.gif' border="0" alt='Enable Flap Detection For This Host' title='Enable Flap Detection For This Host' width="20" height="20"></td>
                  <td class='command'><a href='cmd.cgi?cmd_typ=57&amp;host=[% host.name | uri %]&amp;backend=[% host.peer_key %]'>Enable flap detection for this host</a></td>
                [% END %]
              </tr>
              [% END %]
            </table>

            [% END %]
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
