Log details

New: Logs now have details available
This commit is contained in:
Mark McDowall
2013-10-31 23:15:15 -07:00
parent 436644318b
commit e7ac2247ab
12 changed files with 78 additions and 12 deletions
@@ -0,0 +1,11 @@
'use strict';
define(
[
'vent',
'marionette'
], function (vent, Marionette) {
return Marionette.ItemView.extend({
template: 'System/Logs/Table/Details/LogDetailsViewTemplate'
});
});
@@ -0,0 +1,22 @@
<div class="log-details-modal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>Details</h3>
</div>
<div class="modal-body">
Message
<pre>{{message}}</pre>
{{#if exception}}
<br/>
Exception
<pre>{{exception}}</pre>
{{/if}}
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal">close</button>
</div>
</div>
+19
View File
@@ -0,0 +1,19 @@
'use strict';
define(
[
'vent',
'backgrid'
], function (vent, Backgrid) {
return Backgrid.Row.extend({
className: 'log-row',
events: {
'click': '_showDetails'
},
_showDetails: function () {
vent.trigger(vent.Commands.ShowLogDetails, { model: this.model });
}
});
});
+3 -2
View File
@@ -6,11 +6,12 @@ define(
'backgrid',
'System/Logs/Table/LogTimeCell',
'System/Logs/Table/LogLevelCell',
'System/Logs/Table/LogRow',
'Shared/Grid/Pager',
'System/Logs/LogsCollection',
'Shared/Toolbar/ToolbarLayout',
'Shared/LoadingView'
], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, GridPager, LogCollection, ToolbarLayout, LoadingView) {
], function (vent, Marionette, Backgrid, LogTimeCell, LogLevelCell, LogRow, GridPager, LogCollection, ToolbarLayout, LoadingView) {
return Marionette.Layout.extend({
template: 'System/Logs/Table/LogsTableLayoutTemplate',
@@ -77,7 +78,7 @@ define(
_showTable: function () {
this.grid.show(new Backgrid.Grid({
row : Backgrid.Row,
row : LogRow,
columns : this.columns,
collection: this.collection,
className : 'table table-hover'