<div ng-controller="ViewSchedulerJobHistoryController">
    <ul class="breadcrumb">
        <li><a href="#/system">{{'label.anchor.system' | translate}}</a></li>
        <li><a href="#/jobs">{{'label.anchor.manageschedulerjobs' | translate}}</a></li>
        <li class="active">{{'label.anchor.schedularjobhistory' | translate}}</li>
    </ul>
    <input ng-autofocus="true" ng-model="filterText" type="text" class="form-control"
           placeholder="{{'label.input.filterbyversion' | translate}}">
    <table class="table">
        <thead>
        <tr class="graybg">
            <th>{{'label.heading.version' | translate}}</th>
            <th>{{'label.heading.runstarttime' | translate}}</th>
            <th>{{'label.heading.status' | translate}}</th>
            <th>{{'label.heading.runtype' | translate}}</th>
            <th>{{'label.heading.errorlog' | translate}}</th>
        </tr>
        </thead>
        <tbody>
        <tr ng-repeat="history in jobhistory.currentPageItems  | filter:filterText">
            <td>{{history.version}}</td>
            <td>{{history.jobRunStartTime}}</td>
            <td>{{history.status}}</td>
            <td>{{history.triggerType}}</td>
            <td><button data-ng-show="history.jobRunErrorLog" class="btn-warning" ng-click="errorLog(history)"><i class="icon-exclamation-sign icon-white"></i></button></td>
        </tr>
        </tbody>
    </table>
    <script type="text/ng-template" id="errorlog.html">
        <div class="modal-header silver">
            <h3 class="bolder">{{'label.heading.errorlog' | translate}}</h3>
        </div>
        <div class="modal-body">
            <p>{{error}}</p>
        </div>
        <div class="modal-footer">
            <button class="btn btn-warning" ng-click="cancel()">{{'label.button.close' | translate}}</button>
        </div>
    </script>
    <ul class="pager">
        <li class="previous"><a id="prev" ng-click="jobhistory.previous()" href=""
                                ng-disabled="!jobhistory.hasPrevious()">&larr;{{'label.button.previous' |
            translate}}</a></li>
        <li class="next"><a id="next" ng-click="jobhistory.next()" href="" ng-disabled="!jobhistory.hasNext()">{{'label.button.next'
            | translate}} &rarr;</a></li>
    </ul>
</div>