<div ng-controller="Wizdom365RevisionTimerjobLogController" class="lt-module-page">

    <div class="lt-module-page__top lt-module-page-top">
        <div class="lt-module-page-top__title">
            <h1>{{'Timerjob log' | translate}}</h1>
        </div>
        <div class="lt-module-page-top__actions">

        </div>
    </div>

    <div class="panel panel-default lt-module-page__content-panel">

        <ul class="list-group lt-list"  >

            <li class="list-group-item lt-list__item lt-flextable__table">
                <div class="lt-flextable__row lt-flextable__row-heading">{{'Date' | translate}}</div>
                <div class="lt-flextable__row lt-flextable__row-heading">{{'Status' | translate}}</div>
                <div class="lt-flextable__row lt-flextable__row-heading">{{'Message' | translate}}</div>

            </li>

            <li class="list-group-item lt-list__item lt-flextable__table" ng-repeat="logEntry in logEntries track by $index" ng-style="{'background-color':calcBackground(logEntry.level), 'color':calcTextColor(logEntry.level)}">
                <div class="lt-list-item__title lt-list-item__title lt-flextable__row">{{logEntry.timestamp | date : 'dd-MM-yyyy HH:mm:ss'}}</div>
                <div class="lt-flextable__row">{{logEntry.level == 1 ? 'Info' : logEntry.level == 2 ? 'Warning' : 'Error'}}</div>
                <div class="lt-flextable__row" style="word-break:break-all;">{{logEntry.text}}</div>
            </li>
        </ul>
        <div ng-show="loading" wizdom365-spinner="" loading="loading"></div>
    </div>



    <div ng-show>

        <table class="table">
            <thead>
                <tr>
                    <th>{{'Date' | translate}}</th>
                    <th>{{'Status' | translate}}</th>
                    <th>{{'Message' | translate}}</th>
                </tr>
            </thead>
            <tbody ng-repeat="logEntry in logEntries"
                   ng-style="{'background-color':calcBackground(logEntry.level), 'color':calcTextColor(logEntry.level)}">
                <tr>
                    <td style="white-space:nowrap;">{{logEntry.timestamp | date : 'dd-MM-yyyy HH:mm:ss'}}</td>
                    <td style="white-space:nowrap;">{{logEntry.level == 1 ? 'Info' : logEntry.level == 2 ? 'Warning' : 'Error'}}</td>
                    <td style="min-width:500px;word-break:break-all;">{{logEntry.text}}</td>
                </tr>
            </tbody>
        </table>
        <div ng-show="loading" wizdom365-spinner="" loading="loading"></div>
    </div>
</div>