Merge pull request #6417 from ajp8164/feat/improved-log
Enhance logging with timestamps and filtering.
This commit is contained in:
commit
e2cd5650ed
14 changed files with 356 additions and 47 deletions
10
www/views/includes/checkBar.html
Normal file
10
www/views/includes/checkBar.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<div id="check-bar">
|
||||
<div class="check-bar list">
|
||||
<div ng-class="fillClass" class="initial-bar-default initial-bar"></div>
|
||||
<div class="base-bar"></div>
|
||||
<div class="custom-checkbox" ng-repeat="option in options track by $index" ng-class="{'head': option.head}">
|
||||
<label>{{option.label}}</label>
|
||||
<ion-checkbox ng-model="option.selected" ng-change="getFillClass(option.level)"></ion-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
21
www/views/includes/logOptions.html
Normal file
21
www/views/includes/logOptions.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<action-sheet action-sheet-show="show" class="log-options">
|
||||
<img class="back-arrow" src="img/icon-back-arrow.svg" ng-click="hide()">
|
||||
<div class="header" translate="">Log options</div>
|
||||
<div ng-include="'views/includes/checkBar.html'"></div>
|
||||
<a class="item item-icon-left entry no-border" copy-to-clipboard="onCopy()" ng-click="hide()">
|
||||
<i class="icon ion-clipboard"></i>
|
||||
<div class="entry-inner">
|
||||
<div class="entry-details">
|
||||
<div class="entry-name" translate>Copy to clipboard</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a class="item item-icon-left entry no-border" ng-click="onSend(); hide()" ng-show="isCordova">
|
||||
<i class="icon ion-ios-email-outline"></i>
|
||||
<div class="entry-inner">
|
||||
<div class="entry-details">
|
||||
<div class="entry-name" translate>Send by email</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</action-sheet>
|
||||
|
|
@ -1,23 +1,23 @@
|
|||
<ion-view class="settings" show-tabs>
|
||||
<ion-view class="settings" hide-tabs>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Session Log' | translate}}</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button back-button" ng-click="showOptionsMenu()">
|
||||
<i class="icon ion-ios-more"></i>
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<div class="settings-button-group">
|
||||
<button class="button button-standard button-primary" copy-to-clipboard="prepare()">
|
||||
<span translate>Copy to clipboard</span>
|
||||
</button>
|
||||
<button class="button button-standard button-secondary" ng-show="isCordova" ng-click="sendLogs()">
|
||||
<span translate>Send by email</span>
|
||||
</button>
|
||||
</div>
|
||||
<ion-content class="log-bg">
|
||||
<div class="list">
|
||||
<div class="item item-text-wrap enable_text_select">
|
||||
<ul>
|
||||
<li ng-repeat="l in logs">
|
||||
<span ng-class="{'energized': l.level=='warn', 'dark': l.level=='debug', 'positive': l.level=='info', 'assertive': l.level=='error' }">
|
||||
<div class="item item-text-wrap enable_text_select log-entry">
|
||||
<div class="centered" ng-show="filteredLogs.length == 0" translate>No entries for this log level <a ng-click="showOptionsMenu()">filter setting</a>.</div>
|
||||
<ul ng-show="filteredLogs.length > 0">
|
||||
<li ng-repeat="l in filteredLogs">
|
||||
<span ng-class="{'energized': l.level=='warn', 'dark': l.level=='debug', 'positive': l.level=='info', 'assertive': l.level=='error'}">
|
||||
<span class="log-timestamp">[{{l.timestamp}}]</span>
|
||||
<span class="log-level">[{{l.level}}]</span>
|
||||
{{l.msg}}
|
||||
</span>
|
||||
</li>
|
||||
|
|
@ -25,4 +25,12 @@
|
|||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
<log-options
|
||||
log-options-show="showOptions"
|
||||
log-options="logOptions"
|
||||
log-options-fill-class="fillClass"
|
||||
log-options-on-select="setOptionSelected"
|
||||
log-options-on-copy="prepareLogs"
|
||||
log-options-on-send="sendLogs">
|
||||
</log-options>
|
||||
</ion-view>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue