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:
@@ -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 }));
|
||||
},
|
||||
|
||||
|
||||
@@ -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 });
|
||||
}
|
||||
});
|
||||
|
||||
@@ -18,4 +18,8 @@
|
||||
|
||||
.log-file-row {
|
||||
.clickable;
|
||||
}
|
||||
|
||||
.log-row {
|
||||
.clickable;
|
||||
}
|
||||
11
src/UI/System/Logs/Table/Details/LogDetailsView.js
Normal file
11
src/UI/System/Logs/Table/Details/LogDetailsView.js
Normal file
@@ -0,0 +1,11 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'vent',
|
||||
'marionette'
|
||||
], function (vent, Marionette) {
|
||||
|
||||
return Marionette.ItemView.extend({
|
||||
template: 'System/Logs/Table/Details/LogDetailsViewTemplate'
|
||||
});
|
||||
});
|
||||
22
src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html
Normal file
22
src/UI/System/Logs/Table/Details/LogDetailsViewTemplate.html
Normal 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">×</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
src/UI/System/Logs/Table/LogRow.js
Normal file
19
src/UI/System/Logs/Table/LogRow.js
Normal 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 });
|
||||
}
|
||||
});
|
||||
});
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user