<!--
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.
-->
<div id="logging" class="clearfix">

  <div id="viewer">
    <div class="block">
      <h2><span>{{watcher}}</span></h2>
    </div>
    <table class="has-data" border="0" cellpadding="0" cellspacing="0">
      <thead>
        <tr>
          <th class="time">Time (<span>{{timezone}}</span>)</th>
          <th class="level">Level</th>
          <th class="core">Core</th>
          <th class="logger">Logger</th>
          <th class="message">Message</th>
        </tr>
      </thead>
      <tbody ng-repeat="event in events">
        <tr ng-click="toggleRow(event)" class="{{event.trace ? 'has-trace': ''}} {{'level-'+event.level.toLowerCase()}}">
          <td class="span"><a><span>{{ timezone == "UTC" ? event.utc_time : event.local_time }}</span></a></td>
          <td class="level span"><a><span>{{ event.level }} {{event.showTrace}}</span></span></a></td>
          <td class="span"><a><span>{{ event.core }}</span></a></td>
          <td class="span"><a><span><abbr title="{{event.logger}}">{{event.loggerBase}}</abbr></span></a></td>
          <td class="message span"><a><span>{{ event.message }}</span></a></td>
        </tr>
        <tr class="trace" ng-show="event.showTrace && event.trace">
          <td colspan="4"><pre>{{event.trace}}</pre></td>
        </tr>
      </tbody>
      <tfoot>
        <tr ng-show="events.length==0">
          <td colspan="4">No Events available</td>
        </tr>
     </tfoot>
    </table>
    <div id="footer" class="clearfix">
      <div id="state">Last Check: {{sinceDisplay}}</div>
      <div id="date-format" ng-click="toggleTimezone()"><a ng-class="{on: timezone=='UTC'}">Show dates in UTC</a></div>
      <a id="refresh-toggle" ng-class="{'active': !stopped, 'stopped': stopped}" ng-click="toggleRefresh()">Auto-Refresh</a>
    </div>
  </div>
</div>
