<div ng-controller="SpringBatch.ExecutionHistoryController">
    <h3>Execution History</h3>
    <div>
        <a ng-href="#/springbatch/jobs/{{jobName}}/executions/{{jobId}}" class="btn btn-small btn-primary pull-right">Back</a>
    </div>
    <table class="table table-striped table-hover">
        <thead>
        <tr>
            <th> <a ng-click="predicate='id';reverse=!reverse;" style="cursor: pointer">Id</a> </th>
            <th> <a ng-click="predicate='status';reverse=!reverse;" style="cursor: pointer">Status</a> </th>
            <th> <a ng-click="predicate='startTime';reverse=!reverse;" style="cursor: pointer">StartTime</a> </th>
            <th> <a ng-click="predicate='duration';reverse=!reverse;" style="cursor: pointer">Duration</a> </th>
            <th> <a ng-click="predicate='resource';reverse=!reverse;" style="cursor: pointer">Resource</a> </th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="execution in executionHistory | orderBy:predicate:reverse">
            <td>{{execution.id}}</td>
            <td>{{execution.status}}</td>
            <td>{{execution.startTime}}</td>
            <td>{{execution.duration}}</td>
            <td>{{execution.resource}}</td>
        </tr>
        </tbody>
    </table>
</div>