[% IF !param.exists("max_pnp_sources") %][% param.max_pnp_sources = 1 %][% END %]
[% available = get_availability_percents(hst, svc) %]
[% IF available.keys.size < 15 %]
  [% PROCESS 'reports/comp/sla_graph_fixed.tt' data = available %]
  [% PROCESS 'reports/comp/sla_table.tt' %]
[% ELSE %]
  [% PROCESS 'reports/comp/sla_graph_by_time.tt' data = available %]
[% END %]
[% PROCESS 'reports/comp/sla_total_table.tt' data = available.total %]

[% IF param.max_pnp_sources >= 1 %]
  [% source = get_graph_source(hst, svc) %]
  [% pnpdata = get_pnp_image(hst, svc, start, end, 400, 100, source) %]
  [% IF pnpdata %]
  <div align="center">
    <img src="[% pnpdata %]" class="[% c.stash.last_graph_type %]image" alt="[% c.stash.last_graph_type %] graph">
  </div>
  [% END %]
[% END %]
