[% 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?servicegroup=[% servicegroup.name | uri %]&amp;style=detail">View Status Detail For This Servicegroup</a></div>
        <div><a class="flex" href="status.cgi?servicegroup=[% servicegroup.name | uri %]&amp;style=overview">View Status Overview For This Servicegroup</a></div>
        <div><a class="flex" href="status.cgi?servicegroup=[% servicegroup.name | uri %]&amp;style=grid">View Status Grid For This Servicegroup</a></div>
        <div><a class="flex" href="avail.cgi?servicegroup=[% servicegroup.name | uri %]">View Availability For This Servicegroup</a></div>
      </div>
    </div>
  </div>

  <div class="flexcol text-center">
    [% IF servicegroup.action_url %]
      <div>
        <a class="link" href='[% l = set_target_link(servicegroup.action_url, c.config.action_url_target); l.0 %]' target='[% l.1 %]' title='Perform Additional Actions On This Servicegroup'>
          <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 servicegroup.notes_url %]
      <div>
        <a class="link" href='[% l = set_target_link(servicegroup.notes_url, c.config.notes_url_target); l.0 %]' target='[% l.1 %]' title='View Additional Notes For This Servicegroup'>
          <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>Servicegroup</h1>
    <h3>[% servicegroup.alias | html %]</h3>
    <h3>([% servicegroup.name | html %])</h3>
  </div>

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

  <div class="card mt-5 min-w-[350px] overflow-hidden">
    <div class="head">
      <h3>Servicegroup Commands</h3>
    </div>
    <div class="actionbox">
      [% UNLESS command_disabled(c, '121') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=121&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-moon"></i>Schedule downtime for all hosts in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '122') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=122&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-moon"></i>Schedule downtime for all services in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '111') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=111&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-bell"></i>Enable notifications for all hosts in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '112') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=112&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-bell-slash"></i>Disable notifications for all hosts in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '109') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=109&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-bell"></i>Enable notifications for all services in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '110') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=110&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-bell-slash"></i>Disable notifications for all services in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '113') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=113&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-check round small green"></i>Enable active checks of all services in this servicegroup
          </a>
        </div>
      [% END %]
      [% UNLESS command_disabled(c, '114') %]
        <div>
          <a class="flex js-modal-command-link" href="cmd.cgi?cmd_typ=114&amp;servicegroup=[% servicegroup.name | uri %]">
            <i class="fa-solid fa-xmark round small red"></i>Disable active checks of all services in this servicegroup
          </a>
        </div>
      [% END %]
    </div>
  </div>
</div>


[% PROCESS _footer.tt %]
