Add missing columns to WebUI
Added Download,Uploaded,Down Limit, Up Limit & Seeder/Peeds. Also selected columns start out hidden to match gtkui and the name column has a minimum width of 150.
This commit is contained in:
parent
ec27028f1b
commit
2793e1ec53
|
@ -42,13 +42,17 @@ Deluge.Keys = {
|
|||
* <pre>['queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
||||
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||
* 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
||||
* 'is_auto_managed', 'time_added', 'tracker_host']</pre>
|
||||
* 'is_auto_managed', 'time_added', 'tracker_host', 'save_path',
|
||||
* 'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
|
||||
* 'seeds_peers_ratio']</pre>
|
||||
*/
|
||||
Grid: [
|
||||
'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
||||
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
||||
'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete'
|
||||
'is_auto_managed', 'time_added', 'tracker_host', 'save_path', 'last_seen_complete',
|
||||
'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
|
||||
'seeds_peers_ratio'
|
||||
],
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
if (!value) return;
|
||||
return fspeed(value);
|
||||
}
|
||||
function torrentLimitRenderer(value) {
|
||||
if (value == -1) return '';
|
||||
return fspeed(value * 1024.0);
|
||||
}
|
||||
function torrentProgressRenderer(value, p, r) {
|
||||
value = new Number(value);
|
||||
var progress = value;
|
||||
|
@ -64,8 +68,8 @@
|
|||
return value;
|
||||
}
|
||||
}
|
||||
function availRenderer(value, p, r) {
|
||||
return (value < 0) ? '∞' : new Number(value).toFixed(3);
|
||||
function availRenderer(value, p, r) {
|
||||
return (value < 0) ? '∞' : parseFloat(new Number(value).toFixed(3));
|
||||
}
|
||||
function trackerRenderer(value, p, r) {
|
||||
return String.format('<div style="background: url(' + deluge.config.base + 'tracker/{0}) no-repeat; padding-left: 20px;">{0}</div>', value);
|
||||
|
@ -123,12 +127,14 @@
|
|||
dataIndex: 'progress'
|
||||
}, {
|
||||
header: _('Seeders'),
|
||||
hidden: true,
|
||||
width: 60,
|
||||
sortable: true,
|
||||
renderer: seedsRenderer,
|
||||
dataIndex: 'num_seeds'
|
||||
}, {
|
||||
header: _('Peers'),
|
||||
hidden: true,
|
||||
width: 60,
|
||||
sortable: true,
|
||||
renderer: peersRenderer,
|
||||
|
@ -153,18 +159,21 @@
|
|||
dataIndex: 'eta'
|
||||
}, {
|
||||
header: _('Ratio'),
|
||||
hidden: true,
|
||||
width: 60,
|
||||
sortable: true,
|
||||
renderer: availRenderer,
|
||||
dataIndex: 'ratio'
|
||||
}, {
|
||||
header: _('Avail'),
|
||||
hidden: true,
|
||||
width: 60,
|
||||
sortable: true,
|
||||
renderer: availRenderer,
|
||||
dataIndex: 'distributed_copies'
|
||||
}, {
|
||||
header: _('Added'),
|
||||
hidden: true,
|
||||
width: 80,
|
||||
sortable: true,
|
||||
renderer: fdate,
|
||||
|
@ -177,12 +186,14 @@
|
|||
dataIndex: 'last_seen_complete'
|
||||
}, {
|
||||
header: _('Tracker'),
|
||||
hidden: true,
|
||||
width: 120,
|
||||
sortable: true,
|
||||
renderer: trackerRenderer,
|
||||
dataIndex: 'tracker_host'
|
||||
}, {
|
||||
header: _('Save Path'),
|
||||
hidden: true,
|
||||
width: 120,
|
||||
sortable: true,
|
||||
renderer: fplain,
|
||||
|
@ -195,16 +206,53 @@
|
|||
dataIndex: 'owner'
|
||||
}, {
|
||||
header: _('Public'),
|
||||
hidden: true,
|
||||
width: 80,
|
||||
sortable: true,
|
||||
renderer: fplain,
|
||||
dataIndex: 'public'
|
||||
}, {
|
||||
header: _('Shared'),
|
||||
hidden: true,
|
||||
width: 80,
|
||||
sortable: true,
|
||||
renderer: fplain,
|
||||
dataIndex: 'shared'
|
||||
}, {
|
||||
header: _('Downloaded'),
|
||||
hidden: true,
|
||||
width: 75,
|
||||
sortable: true,
|
||||
renderer: fsize,
|
||||
dataIndex: 'total_done'
|
||||
}, {
|
||||
header: _('Uploaded'),
|
||||
hidden: true,
|
||||
width: 75,
|
||||
sortable: true,
|
||||
renderer: fsize,
|
||||
dataIndex: 'total_uploaded'
|
||||
}, {
|
||||
header: _('Down Limit'),
|
||||
hidden: true,
|
||||
width: 75,
|
||||
sortable: true,
|
||||
renderer: torrentLimitRenderer,
|
||||
dataIndex: 'max_download_speed'
|
||||
}, {
|
||||
header: _('Up Limit'),
|
||||
hidden: true,
|
||||
width: 75,
|
||||
sortable: true,
|
||||
renderer: torrentLimitRenderer,
|
||||
dataIndex: 'max_upload_speed'
|
||||
}, {
|
||||
header: _('Seeders') + '/' + _('Peers'),
|
||||
hidden: true,
|
||||
width: 75,
|
||||
sortable: true,
|
||||
renderer: availRenderer,
|
||||
dataIndex: 'seeds_peers_ratio'
|
||||
}],
|
||||
|
||||
meta: {
|
||||
|
@ -227,7 +275,12 @@
|
|||
{name: 'distributed_copies', type: 'float'},
|
||||
{name: 'time_added', type: 'int'},
|
||||
{name: 'tracker_host'},
|
||||
{name: 'save_path'}
|
||||
{name: 'save_path'},
|
||||
{name: 'total_done', type: 'int'},
|
||||
{name: 'total_uploaded', type: 'int'},
|
||||
{name: 'max_download_speed', type: 'int'},
|
||||
{name: 'max_upload_speed', type: 'int'},
|
||||
{name: 'seeds_peers_ratio', type: 'float'}
|
||||
]
|
||||
},
|
||||
|
||||
|
@ -240,6 +293,7 @@
|
|||
cls: 'deluge-torrents',
|
||||
stripeRows: true,
|
||||
autoExpandColumn: 'name',
|
||||
autoExpandMin: 150,
|
||||
deferredRender:false,
|
||||
autoScroll:true,
|
||||
margins: '5 5 0 0',
|
||||
|
|
Loading…
Reference in New Issue