[% USE date %]
[% size = 1 %]
[% IF data %][% size = data.size + 1 %][% END %]
<workbook>
  <worksheet name='Notifications' autofilter='A1:[% last_col %][% size %]'>
    <row>
      <format bold='1' bg_color='silver' align='center'>
        [% IF columns.1  %]<cell width='18'>Host</cell>[% END %]
        [% IF columns.2  %]<cell width='23'>Service</cell>[% END %]
        [% IF columns.2  %]<cell width='18'>Type</cell>[% END %]
        [% IF columns.3  %]<cell width='18'>Time</cell>[% END %]
        [% IF columns.4  %]<cell width='18'>Contact</cell>[% END %]
        [% IF columns.5  %]<cell width='18'>Notification Command</cell>[% END %]
        [% IF columns.6  %]<cell width='60'>Information</cell>[% END %]
      </format>
    </row>
    [% FOREACH n = data %]
    [% PROCESS _notifications_log_line.tt %]
    <row>
        [% IF columns.1  %]<cell>[% escape_xml(n.host_name) %]</cell>[% END %]
        [% IF columns.2  %]<cell>[% escape_xml(n.service_description) %]</cell>[% END %]
        [% IF columns.3  %]<format bg_color='[% state_color %]'><cell>[% level %]</cell></format>[% END %]
        [% IF columns.4  %]<format align="left" num_format="MM/DD/YYYY HH:MM:SS"><cell type="date_time">[% format_date(n.time, "%Y-%m-%dT%H:%M:%S.000") %]</cell></format>[% END %]
        [% IF columns.5  %]<cell>[% escape_xml(n.contact_name) %]</cell>[% END %]
        [% IF columns.6  %]<cell>[% escape_xml(n.command_name) %]</cell>[% END %]
        [% IF columns.6  %]<cell>[% escape_xml(n.plugin_output) %]</cell>[% END %]
    </row>
    [% END %]
  </worksheet>
</workbook>
