Add feature object and show/hide elements accordingly

This commit is contained in:
Johannes Zellner
2020-02-13 15:30:31 +01:00
parent 3dd0566f48
commit a13414ddb9
7 changed files with 135 additions and 98 deletions

View File

@@ -23,28 +23,33 @@
</div>
<div>
<div class="col-md-10 col-md-offset-1">
<div class="card card-block" style="max-width: 100%">
<center ng-show="busy"><h2><i class="fa fa-circle-notch fa-spin"></i></h2></center>
<table ng-hide="busy" class="table table-condensed table-hover">
<thead>
<tr>
<th class="col-md-2">Time</th>
<th class="col-md-3">Source</th>
<th class="col-md-7">Details</th>
</tr>
</thead>
<tbody ng-repeat="eventLog in eventLogs">
<tr ng-click="showEventLogDetails(eventLog)" class="hand">
<td><span uib-tooltip="{{ eventLog.raw.creationTime | prettyLongDate }}" class="arrow">{{ eventLog.raw.creationTime | prettyDate }}</span></td>
<td>{{ eventLog.source }}</td>
<td ng-bind-html="eventLog.details"></td>
</tr>
<tr ng-show="activeEventLog === eventLog">
<td colspan="4"><pre class="eventlog-details">{{ eventLog.raw.data | json }}</pre></td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-10 col-md-offset-1">
<div class="card card-block" style="max-width: 100%">
<div ng-hide="features.eventLog">
<b class="text-danger">This features is only available in the business plan.</b>
</div>
<div ng-show="features.eventLog">
<center ng-show="busy"><h2><i class="fa fa-circle-notch fa-spin"></i></h2></center>
<table ng-hide="busy" class="table table-condensed table-hover">
<thead>
<tr>
<th class="col-md-2">Time</th>
<th class="col-md-3">Source</th>
<th class="col-md-7">Details</th>
</tr>
</thead>
<tbody ng-repeat="eventLog in eventLogs">
<tr ng-click="showEventLogDetails(eventLog)" class="hand">
<td><span uib-tooltip="{{ eventLog.raw.creationTime | prettyLongDate }}" class="arrow">{{ eventLog.raw.creationTime | prettyDate }}</span></td>
<td>{{ eventLog.source }}</td>
<td ng-bind-html="eventLog.details"></td>
</tr>
<tr ng-show="activeEventLog === eventLog">
<td colspan="4"><pre class="eventlog-details">{{ eventLog.raw.data | json }}</pre></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>