1<loader loading="loading"></loader>
2<div id="event-log">
3  <div class="row column">
4    <h1>Event log</h1>
5  </div>
6  <section class="row column">
7    <div class="page-header">
8      <h2 class="inline">All events from the BMC</h2>
9      <div class="event-log__timezone inline float-right">
10        <button class="dropdown__button" ng-click="timezone = timezone == true ? false : true;" toggle-flag="timezone">
11          <span>{{tmz === 'UTC' ? 'UTC Timezone' : 'User Timezone'}}</span>
12        </button>
13        <ul class="dropdown__list inline" ng-show="timezone">
14          <li>
15            <button ng-click="tmz = ''">User Timezone</button>
16          </li>
17          <li>
18            <button ng-click="tmz = 'UTC'">UTC Timezone</button>
19          </li>
20        </ul>
21      </div>
22    </div>
23  </section>
24  <!-- search -->
25  <log-search-control></log-search-control>
26  <!-- filters -->
27  <log-filter></log-filter>
28  <section id="event-log__events" class="row column">
29    <div id="event__actions-bar" class="row header__actions-bar no-margin">
30      <div class="column small-1 large-1 event-log__col-check">
31        <label class="control-check">
32          <input type="checkbox" name="events__check-all" ng-disabled="filteredLogs.length === 0" ng-model="all" ng-checked="((filteredLogs|filter:{selected: true}).length == filteredLogs.length) && filteredLogs.length != 0"/>
33          <span class="control__indicator"></span>
34        </label>
35      </div>
36      <div class="column small-11 end col-logged-events">
37        <!-- top bar confirmation - ADD ACTIVE CLASS TO DISPLAY-->
38        <div class="inline__confirm event__confirm" ng-class="{active: confirm}">
39          <div class="inline__confirm-message">
40            <p class="h3"><i></i>Are you sure you want to <strong class="ng-binding">delete {{selectedEvents.length}} logs</strong>?
41            </p>
42          </div>
43          <div class="inline__confirm-buttons">
44            <button class="btn-primary" ng-click="accept()">Yes</button>
45            <button class="btn-primary" ng-click="confirm = false">No</button>
46          </div>
47        </div>
48        <p class="inline" ng-show="selectedEvents.length"><span class="event__select-count">{{selectedEvents.length}}</span> Events are selected</p>
49        <p class="inline" ng-hide="selectedEvents.length"><span class="event__select-count">{{filteredLogs.length}}</span> Events are logged</p>
50        <!-- when logs are selected, this text changes to show how many logs are checked -->
51        <div class="event__actions">
52          <button class="inline btn-delete" ng-class="{'disabled': (!selectedEvents.length && !all)}" ng-disabled="!selectedEvents.length && !all" ng-click="confirm= ! confirm">
53            <img class="event__icon" src="../../assets/images/icon-trashcan-white.svg" alt="">Delete
54          </button>
55          <button class="inline btn-resolve" ng-class="{'disabled': ((selectedEvents|unResolvedCount) == 0)}" ng-click="resolve()" ng-disabled="(selectedEvents|unResolvedCount) == 0">
56            <img class="event__icon" src="../../assets/images/icon-check-white.svg" alt="">Mark as resolved
57          </button>
58          <a ng-href="data:text/json;charset=utf-8,{{export_data}}" class="inline btn-export"  ng-class="{'disabled': (!selectedEvents.length && !all)}" download="{{export_name}}">Export</a>
59        </div>
60      </div>
61    </div>
62    <div class="empty__logs" ng-if="filteredLogs.length === 0">{{filteredLogs.length === logs.length ? 'No events have been logged yet.' : 'There are no events that match the selected criteria.'}}</div>
63    <log-event
64      dir-paginate="event in (filteredLogs = (logs|filter:filterBySeverity|filter:filterByStatus|filter:filterByDate|filter:filterBySearchTerms | orderBy:'-Id'))| itemsPerPage: itemsPerPage"
65      event="event"
66      tmz="tmz"
67      multi-selected="selectedEvents.length > 1"
68      >
69    </log-event>
70    <dir-pagination-controls></dir-pagination-controls>
71  </section>
72</div> <!-- end event log -->
73