mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
styled log page.
This commit is contained in:
parent
27c7ed1e6d
commit
8f9b9c901c
8 changed files with 1804 additions and 43 deletions
|
@ -1,11 +1,13 @@
|
|||
'use strict';
|
||||
define([
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Shared/Grid/Pager',
|
||||
'Logs/Collection'
|
||||
],
|
||||
function (Marionette,Backgrid, GridPager, LogCollection) {
|
||||
define(
|
||||
[
|
||||
'marionette',
|
||||
'backgrid',
|
||||
'Logs/LogTimeCell',
|
||||
'Logs/LogLevelCell',
|
||||
'Shared/Grid/Pager',
|
||||
'Logs/Collection'
|
||||
], function (Marionette, Backgrid, LogTimeCell, LogLevelCell, GridPager, LogCollection) {
|
||||
return Marionette.Layout.extend({
|
||||
template: 'Logs/LayoutTemplate',
|
||||
|
||||
|
@ -15,41 +17,49 @@ define([
|
|||
pager : '#x-pager'
|
||||
},
|
||||
|
||||
columns: [
|
||||
{
|
||||
name : 'level',
|
||||
label : 'Level',
|
||||
sortable: true,
|
||||
cell : Backgrid.StringCell
|
||||
},
|
||||
{
|
||||
name : 'logger',
|
||||
label : 'Component',
|
||||
sortable: true,
|
||||
cell : Backgrid.StringCell
|
||||
},
|
||||
{
|
||||
name : 'message',
|
||||
label : 'Message',
|
||||
sortable: false,
|
||||
cell : Backgrid.StringCell
|
||||
},
|
||||
{
|
||||
name : 'time',
|
||||
label: 'Time',
|
||||
cell : Backgrid.DatetimeCell
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
id: 'logs-screen'
|
||||
},
|
||||
|
||||
columns:
|
||||
[
|
||||
{
|
||||
name : 'level',
|
||||
label : '',
|
||||
sortable: true,
|
||||
cell : LogLevelCell
|
||||
},
|
||||
{
|
||||
name : 'logger',
|
||||
label : 'Component',
|
||||
sortable: true,
|
||||
cell : Backgrid.StringCell.extend({
|
||||
className: 'log-logger-cell'
|
||||
})
|
||||
},
|
||||
{
|
||||
name : 'message',
|
||||
label : 'Message',
|
||||
sortable: false,
|
||||
cell : Backgrid.StringCell.extend({
|
||||
className: 'log-message-cell'
|
||||
})
|
||||
},
|
||||
{
|
||||
name : 'time',
|
||||
label: 'Time',
|
||||
cell : LogTimeCell
|
||||
}
|
||||
],
|
||||
|
||||
showTable: function () {
|
||||
|
||||
this.grid.show(new Backgrid.Grid(
|
||||
{
|
||||
row : Backgrid.Row,
|
||||
columns : this.columns,
|
||||
collection: this.collection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
this.grid.show(new Backgrid.Grid({
|
||||
row : Backgrid.Row,
|
||||
columns : this.columns,
|
||||
collection: this.collection,
|
||||
className : 'table table-hover'
|
||||
}));
|
||||
|
||||
this.pager.show(new GridPager({
|
||||
columns : this.columns,
|
||||
|
@ -66,7 +76,5 @@ define([
|
|||
this.showTable();
|
||||
}
|
||||
|
||||
})
|
||||
;
|
||||
})
|
||||
;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue