<!DOCTYPE html>
<!-- saved from url=(0014)about:internet -->
<!-- prior comment allows JS to execute on IE when saved as a local file, "MOTW" -->
<html lang="en">
  <head>
    <title><%= Inspec::Dist::PRODUCT_NAME %> Results</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
    /* Must inline all CSS files, this is a single-file output that may be airgapped */
    <%= ERB.new(File.read(css_path), eoutvar: "_css").result(binding)  %>
    </style>
    <script type="text/javascript">
    // <![CDATA[
    /* Must inline all JavaScript files, this is a single-file output that may be airgapped */
    <%= ERB.new(File.read(js_path), eoutvar: "_js").result(binding)  %>
    // ]]>
    </script>
  </head>
  <body onload="pageLoaded()">
    <%= ERB.new(File.read(template_path + "/selector.html.erb"), eoutvar: "_select").result(binding)  %>
    <div class="inspec-report">
    <h1><%= Inspec::Dist::PRODUCT_NAME %> Report</h1>
    <% run_data.profiles.each do |profile| %>
      <%= ERB.new(File.read(template_path + "/profile.html.erb"), eoutvar: "_prof").result(binding)  %>
    <% end %>

    <div class="inspec-summary">
      <table id="platform" class="info">
      <caption>Platform Information</caption>
        <tr><th colspan=2><h4 id="platform-label">Platform Information</h4></th></tr>
        <tr class= "name"><th>Name:</th><td><%= run_data.platform.name %></td></tr>
        <tr class= "release"><th>Release:</th><td><%= run_data.platform.release %></td></tr>
        <tr class= "target"><th>Target:</th><td><%= run_data.platform.target %></td></tr>
      </table>
      <table id="statistics" class="info">
      <caption>Control Statistics</caption>
        <tr><th colspan="2"><h4 id="statistics-label">Control Statistics</h4></th></tr>
        <tr class= "passed"><th>Passed:</th><td><%= run_data.statistics.controls.passed.total %></td></tr>
        <tr class= "skipped"><th>Skipped:</th><td><%= run_data.statistics.controls.skipped.total %></td></tr>
        <tr class= "failed"><th>Failed:</th><td><%= run_data.statistics.controls.failed.total %></td></tr>
        <tr class= "duration"><th>Duration:</th><td><%= run_data.statistics.duration %> seconds</td></tr>
        <tr class= "date"><th>Time Finished:</th><td><%= Time.now %></td></tr>
      </table>
      <span id="inspec-version"><%= Inspec::Dist::PRODUCT_NAME %> version <%= run_data.version %></span>
    </div>
    </div>
  </body>
</html>
