UNPKG

sheercms

Version:

Sheer Cliff CMS is a simple and powerful content management system (CMS) for Node JS.

88 lines (77 loc) 3.79 kB
<div class="row main-container log-view"> <div class="col-md-12"> <div ng-if="data.isAuthorized !== true" class="no-auth alert alert-danger"> You are not authorized to use this tool. </div> <div class="toolbar" ng-if="data.isAuthorized === true"> <ul> <li ng-show="selectedLog.log !== null"> <a href="javascript:void(0);" title="Go back to list of logs" ng-click="back()"> <img src="/cms/static/images/icons/32/back_arrow.png" alt="Back"/> <span>Back</span> </a> </li> <li> <a href="javascript:void(0);" title="Reload the list of logs or selected log file" ng-click="reload()"> <img src="/cms/static/images/icons/32/update.png" alt="Refresh"/> <span>Refresh</span> </a> </li> <li ng-show="selectedLog.log !== null"> <a href="javascript:void(0);" title="Toggle between ascending and descending order" ng-click="toggleSort()"> <img src="/cms/static/images/icons/32/sort.png" alt="Toggle Sort"/> <span>Toggle Sort</span> </a> </li> </ul> </div> <div id="logs-page" ng-if="data.isAuthorized === true"> <h3>{{data.title}}</h3> <div class="select-container" ng-show="selectedLog.log != null"> <label>Filter by Level:</label> <select ng-model="selectedLog.level" ng-options="a.value as a.text for a in data.levels" ng-change="changeLevel()"></select> </div> <div ng-if="data.message != null && data.message.length > 0"> <div class="alert {{data.messageType}}">{{data.message}}</div> </div> <div class="alert alert-warning" ng-if="data.logs.length == 0">There are currently no log files.</div> <div ng-if="data.logs.length > 0 && selectedLog.log == null"> <table class="table table-click table-bordered"> <thead> <tr> <th>Name</th> <th style="width:100px;">Size</th> <th style="width:160px;">Last Modified</th> </tr> </thead> <tbody> <tr ng-repeat="log in data.logs" ng-click="selectLog(log)"> <td>{{log.name}}</td> <td>{{log.size}}</td> <td>{{log.modified}}</td> </tr> </tbody> </table> </div> <div ng-if="selectedLog.log != null"> <table class="table table-click table-bordered"> <thead> <tr> <th style="width:80px;">Line</th> <th style="width:220px;">Time</th> <th style="width:80px;">Level</th> <th>Message</th> </tr> </thead> <tbody> <tr ng-repeat="entry in selectedLog.entries"> <td>{{entry.line}}</td> <td>{{entry.formattedTime}}</td> <td class="level-{{entry.levelText}}">{{entry.levelText}}</td> <td>{{entry.msg}}</td> </tr> </tbody> </table> </div> </div> </div> </div>