1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-17 21:26:22 -04:00

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

View File

@@ -130,12 +130,12 @@ define(
filename: filename
});
this.listenToOnce(contentsModel, 'sync', this._showContents);
this.listenToOnce(contentsModel, 'sync', this._showDetails);
contentsModel.fetch({ dataType: 'text' });
},
_showContents: function (model) {
_showDetails: function (model) {
this.contents.show(new ContentsView({ model: model }));
},

View File

@@ -9,10 +9,10 @@ define(
className: 'log-file-row',
events: {
'click': '_showContents'
'click': '_showDetails'
},
_showContents: function () {
_showDetails: function () {
vent.trigger(vent.Commands.ShowLogFile, { model: this.model });
}
});

View File

@@ -18,4 +18,8 @@
.log-file-row {
.clickable;
}
.log-row {
.clickable;
}

View File

@@ -0,0 +1,11 @@
'use strict';
define(
[
'vent',
'marionette'
], function (vent, Marionette) {
return Marionette.ItemView.extend({
template: 'System/Logs/Table/Details/LogDetailsViewTemplate'
});
});

View File

@@ -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>

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 });
}
});
});

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'