<!--
 Licensed to the Apache Software Foundation (ASF) under one or more
 contributor license agreements.  See the NOTICE file distributed with
 this work for additional information regarding copyright ownership.
 The ASF licenses this file to You under the Apache License, Version 2.0
 (the "License"); you may not use this file except in compliance with
 the License.  You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<script id="history-summary-template" type="text/html">
<table id="history-summary-table" class="table table-striped compact">
  <thead>
    <tr>
      <th>
        <span data-toggle="tooltip" data-placement="right" title="ID of the application.">
          App ID
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="above" title="Name of the application.">
          App Name
        </span>
      </th>
      <th class="attemptIDSpan">
        <span data-toggle="tooltip" data-placement="above" title="The attempt ID of this application since one application might be launched several times">
          Attempt ID
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="right" title="Started time of this application.">
          Started
        </span>
      </th>
      <th class="completedColumn">
        <span data-toggle="tooltip" data-placement="above" title="The completed time of this application.">
          Completed
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="above" title="The duration time of this application.">
          Duration
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="right" title="The Spark user of this application">
          Spark User
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="above" title="The timestamp of the last updating on this application">
          Last Updated
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="above" title="Download the event log for this application">
          Event Log
        </span>
      </th>
  </thead>
  <tbody>
  {{#applications}}
    <tr>
      <td class="rowGroupColumn"><span title="{{id}}"><a href="{{uiroot}}/history/{{id}}/{{num}}/jobs/">{{id}}</a></span></td>
      <td class="rowGroupColumn">{{name}}</td>
      {{#attempts}}
      <td class="attemptIDSpan"><a href="{{uiroot}}/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td>
      <td>{{startTime}}</td>
      <td class="completedColumn">{{endTime}}</td>
      <td><span title="{{duration}}" class="durationClass">{{duration}}</span></td>
      <td>{{sparkUser}}</td>
      <td>{{lastUpdated}}</td>
      <td><a href="{{log}}" class="btn btn-info btn-mini">Download</a></td>
      {{/attempts}}
    </tr>
  {{/applications}}
  </tbody>
</table>
</script>
