[% PROCESS _header.tt %]
[% PROCESS _message.tt %]

<div class="flexrow justify-between">
  <div class="flexcol w-fit">
    [% PROCESS _infobox.tt %]
    <div class="card w-full">
      <div class="actionbox">
        <div><a class="flex" href="status.cgi?hostgroup=[% hostgroup.name | uri %]&amp;style=detail">View Status Detail For This Hostgroup</a></div>
        <div><a class="flex" href="status.cgi?hostgroup=[% hostgroup.name | uri %]&amp;style=overview">View Status Overview For This Hostgroup</a></div>
        <div><a class="flex" href="status.cgi?hostgroup=[% hostgroup.name | uri %]&amp;style=grid">View Status Grid For This Hostgroup</a></div>
        <div><a class="flex" href="avail.cgi?hostgroup=[% hostgroup.name | uri %]">View Availability For This Hostgroup</a></div>
      </div>
    </div>
  </div>

  <div class="flexcol text-center">
    [% IF hostgroup.action_url %]
      <div>
        <a class="link" href='[% l = set_target_link(hostgroup.action_url, c.config.action_url_target); l.0 %]' target='[% l.1 %]' title='Perform Additional Actions On This Hostgroup'>
          <i class="fa-solid fa-chart-line text-4xl w-fit h-fit"></i><br>
          <font size="-1"><i>Extra Actions</i></font>
        </a>
      </div>
    [% END %]

    [% IF hostgroup.notes_url %]
      <div>
        <a class="link" href='[% l = set_target_link(hostgroup.notes_url, c.config.notes_url_target); l.0 %]' target='[% l.1 %]' title='View Additional Notes For This Hostgroup'>
          <i class="fa-solid fa-clipboard text-4xl w-fit h-fit"></i><br>
          <font size="-1"><i>Extra Notes</i></font>
        </a>
      </div>
    [% END %]
  </div>
</div>

<div class="flexcol w-fit mx-auto text-center items-center">
  <div>
    <h1>Hostgroup</h1>
    <h3>[% hostgroup.alias | html %]</h3>
    <h3>([% hostgroup.name | html %])</h3>
  </div>

  [% IF hostgroup.notes %]
    <div class="card w-fit">
      <div class="head"><h3>Notes</h3></div>
      <div class="body w-fit">
      [% hostgroup.notes | html %]
      </div>
    </div>
  [% END %]

  <div class="card mt-5 min-w-[350px] overflow-hidden">
    <div class="head">
      <h3>Hostgroup Commands</h3>
    </div>
    <div class="actionbox">
      [% UNLESS command_disabled(c, '84') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=84&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-moon"></i>Schedule downtime for all hosts in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '85') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=85&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-moon"></i>Schedule downtime for all services in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '65') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=65&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-bell"></i>Enable notifications for all hosts in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '66') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=66&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-bell-slash"></i>Disable notifications for all hosts in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '63') %]
        <div>
        <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=63&amp;hostgroup=[% hostgroup.name | uri %]">
          <i class="fa-solid fa-bell"></i>Enable notifications for all services in this hostgroup
        </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '64') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=64&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-bell-slash"></i>Disable notifications for all services in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '67') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=67&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-check round small green"></i>Enable active checks of all services in this hostgroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '68') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=68&amp;hostgroup=[% hostgroup.name | uri %]">
            <i class="fa-solid fa-xmark round small red"></i>Disable active checks of all services in this hostgroup
          </a>
        </div>
      [% END %]
    </div>
  </div>
</div>

[% PROCESS _footer.tt %]
