mirror of
https://github.com/sismics/docs.git
synced 2025-12-21 13:41:37 +00:00
#20: Audit log displayed on main screen
This commit is contained in:
@@ -9,6 +9,11 @@ angular.module('docs').controller('DocumentDefault', function($scope, $state, Re
|
||||
$scope.app = data;
|
||||
});
|
||||
|
||||
// Load user audit log
|
||||
Restangular.one('auditlog').get().then(function(data) {
|
||||
$scope.logs = data.logs;
|
||||
});
|
||||
|
||||
/**
|
||||
* Load unlinked files.
|
||||
*/
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<img src="img/loader.gif" ng-show="!app" />
|
||||
|
||||
<div ng-show="app">
|
||||
<h1>
|
||||
{{ app.document_count }} <small>document{{ app.document_count > 1 ? 's' : '' }} in the database</small>
|
||||
</h1>
|
||||
|
||||
<div class="row upload-zone" ng-model="dropFiles" ng-file-drop drag-over-class="bg-success"
|
||||
ng-multiple="true" allow-dir="false" accept="image/*,application/pdf,application/zip" ng-file-change="fileDropped($files, $event, $rejectedFiles)">
|
||||
<div class="col-xs-6 col-sm-4 col-md-3 col-lg-2 text-center" ng-repeat="file in files">
|
||||
@@ -45,6 +41,17 @@
|
||||
|
||||
<div ui-view="file"></div>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Message</th>
|
||||
</tr>
|
||||
<tr ng-repeat="log in logs">
|
||||
<td>{{ log.create_date | date: 'yyyy-MM-dd HH:mm' }}</td>
|
||||
<td>{{ log.class }} {{ log.type }} {{ log.message }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="text-muted text-right">
|
||||
<ul class="list-inline">
|
||||
<li><strong>Version:</strong> {{ app.current_version }}</li>
|
||||
|
||||
Reference in New Issue
Block a user