<!--
 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="top" title="ID of this application.">
          App ID
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="top" title="Name of this application.">
          App Name
        </span>
      </th>
      {{#hasMultipleAttempts}}
      <th>
        <span data-toggle="tooltip" data-placement="top" title="The attempt ID of this application since one application might be launched several times">
          Attempt ID
        </span>
      </th>
      {{/hasMultipleAttempts}}
      <th>
        <span data-toggle="tooltip" data-placement="top" title="Started time of this application.">
          Started
        </span>
      </th>
      {{#showCompletedColumn}}
      <th>
        <span data-toggle="tooltip" data-placement="top" title="The completed time of this application.">
          Completed
        </span>
      </th>
      {{/showCompletedColumn}}
      <th>
        <span data-toggle="tooltip" data-placement="top" title="The duration time of this application.">
          Duration
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="top" title="The Spark user of this application">
          Spark User
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="top" title="The timestamp of the last updating on this application">
          Last Updated
        </span>
      </th>
      <th>
        <span data-toggle="tooltip" data-placement="top" title="Download the event log for this application">
          Event Log
        </span>
      </th>
  </thead>
  <tbody>
  {{#applications}}
    <tr>
      <td {{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}><span title="{{id}}"><a href="{{uiroot}}/history/{{id}}/{{num}}/jobs/">{{id}}</a></span></td>
      <td {{#hasMultipleAttempts}}style="background-color:#fff"{{/hasMultipleAttempts}}>{{name}}</td>
      {{#attempts}}
      {{#hasMultipleAttempts}}
      <td><a href="{{uiroot}}/history/{{id}}/{{attemptId}}/jobs/">{{attemptId}}</a></td>
      {{/hasMultipleAttempts}}
      <td>{{startTime}}</td>
      {{#showCompletedColumn}}
      <td>{{endTime}}</td>
      {{/showCompletedColumn}}
      <td><span title="{{durationMillisec}}">{{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>
