mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-28 23:27:08 -04:00
UI Cleanup - Updated System, Tags and Wanted subtrees.
This commit is contained in:
@@ -2,9 +2,11 @@ var NzbDroneCell = require('../../../Cells/NzbDroneCell');
|
||||
|
||||
module.exports = NzbDroneCell.extend({
|
||||
className : 'log-level-cell',
|
||||
render : function(){
|
||||
|
||||
render : function() {
|
||||
var level = this._getValue();
|
||||
this.$el.html('<i class="icon-nd-health-{0}" title="{1}"/>'.format(this._getValue().toLowerCase(), level));
|
||||
|
||||
return this;
|
||||
}
|
||||
});
|
||||
@@ -6,37 +6,47 @@ var HealthWikiCell = require('./HealthWikiCell');
|
||||
var HealthOkView = require('./HealthOkView');
|
||||
|
||||
module.exports = Marionette.Layout.extend({
|
||||
template : 'System/Info/Health/HealthLayoutTemplate',
|
||||
regions : {grid : '#x-health-grid'},
|
||||
columns : [{
|
||||
name : 'type',
|
||||
label : '',
|
||||
cell : HealthCell,
|
||||
sortable : false
|
||||
}, {
|
||||
name : 'message',
|
||||
label : 'Message',
|
||||
cell : 'string',
|
||||
sortable : false
|
||||
}, {
|
||||
name : 'wikiUrl',
|
||||
label : '',
|
||||
cell : HealthWikiCell,
|
||||
sortable : false
|
||||
}],
|
||||
initialize : function(){
|
||||
template : 'System/Info/Health/HealthLayoutTemplate',
|
||||
|
||||
regions : {
|
||||
grid : '#x-health-grid'
|
||||
},
|
||||
|
||||
columns : [
|
||||
{
|
||||
name : 'type',
|
||||
label : '',
|
||||
cell : HealthCell,
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'message',
|
||||
label : 'Message',
|
||||
cell : 'string',
|
||||
sortable : false
|
||||
},
|
||||
{
|
||||
name : 'wikiUrl',
|
||||
label : '',
|
||||
cell : HealthWikiCell,
|
||||
sortable : false
|
||||
}
|
||||
],
|
||||
|
||||
initialize : function() {
|
||||
this.listenTo(HealthCollection, 'sync', this.render);
|
||||
HealthCollection.fetch();
|
||||
},
|
||||
onRender : function(){
|
||||
if(HealthCollection.length === 0) {
|
||||
|
||||
onRender : function() {
|
||||
if (HealthCollection.length === 0) {
|
||||
this.grid.show(new HealthOkView());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this._showTable();
|
||||
}
|
||||
},
|
||||
_showTable : function(){
|
||||
|
||||
_showTable : function() {
|
||||
this.grid.show(new Backgrid.Grid({
|
||||
row : Backgrid.Row,
|
||||
columns : this.columns,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var Marionette = require('marionette');
|
||||
|
||||
module.exports = Marionette.ItemView.extend({template : 'System/Info/Health/HealthOkViewTemplate'});
|
||||
module.exports = Marionette.ItemView.extend({
|
||||
template : 'System/Info/Health/HealthOkViewTemplate'
|
||||
});
|
||||
@@ -3,9 +3,12 @@ var Backgrid = require('backgrid');
|
||||
|
||||
module.exports = Backgrid.UriCell.extend({
|
||||
className : 'wiki-link-cell',
|
||||
title : 'Read the Wiki for more information',
|
||||
text : 'Wiki',
|
||||
render : function(){
|
||||
|
||||
title : 'Read the Wiki for more information',
|
||||
|
||||
text : 'Wiki',
|
||||
|
||||
render : function() {
|
||||
this.$el.empty();
|
||||
var rawValue = this.model.get(this.column.get('name'));
|
||||
var formattedValue = this.formatter.fromRaw(rawValue, this.model);
|
||||
|
||||
Reference in New Issue
Block a user