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
375ee2dd1c
commit
272d2005e0
|
@ -42,13 +42,17 @@ Deluge.Keys = {
|
||||||
* <pre>['queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
* <pre>['queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
||||||
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
* 'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||||
* 'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
* '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: [
|
Grid: [
|
||||||
'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
'queue', 'name', 'total_size', 'state', 'progress', 'num_seeds',
|
||||||
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
'total_seeds', 'num_peers', 'total_peers', 'download_payload_rate',
|
||||||
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
'upload_payload_rate', 'eta', 'ratio', 'distributed_copies',
|
||||||
'is_auto_managed', 'time_added', 'tracker_host', 'save_path'
|
'is_auto_managed', 'time_added', 'tracker_host', 'save_path',
|
||||||
|
'total_done', 'total_uploaded', 'max_download_speed', 'max_upload_speed',
|
||||||
|
'seeds_peers_ratio'
|
||||||
],
|
],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -43,6 +43,10 @@
|
||||||
if (!value) return;
|
if (!value) return;
|
||||||
return fspeed(value);
|
return fspeed(value);
|
||||||
}
|
}
|
||||||
|
function torrentLimitRenderer(value) {
|
||||||
|
if (value == -1) return '';
|
||||||
|
return fspeed(value * 1024.0);
|
||||||
|
}
|
||||||
function torrentProgressRenderer(value, p, r) {
|
function torrentProgressRenderer(value, p, r) {
|
||||||
value = new Number(value);
|
value = new Number(value);
|
||||||
var progress = value;
|
var progress = value;
|
||||||
|
@ -65,7 +69,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function availRenderer(value, p, r) {
|
function availRenderer(value, p, r) {
|
||||||
return (value < 0) ? '∞' : new Number(value).toFixed(3);
|
return (value < 0) ? '∞' : parseFloat(new Number(value).toFixed(3));
|
||||||
}
|
}
|
||||||
function trackerRenderer(value, p, r) {
|
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);
|
return String.format('<div style="background: url(' + deluge.config.base + 'tracker/{0}) no-repeat; padding-left: 20px;">{0}</div>', value);
|
||||||
|
@ -117,18 +121,6 @@
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: torrentProgressRenderer,
|
renderer: torrentProgressRenderer,
|
||||||
dataIndex: 'progress'
|
dataIndex: 'progress'
|
||||||
}, {
|
|
||||||
header: _('Seeders'),
|
|
||||||
width: 60,
|
|
||||||
sortable: true,
|
|
||||||
renderer: seedsRenderer,
|
|
||||||
dataIndex: 'num_seeds'
|
|
||||||
}, {
|
|
||||||
header: _('Peers'),
|
|
||||||
width: 60,
|
|
||||||
sortable: true,
|
|
||||||
renderer: peersRenderer,
|
|
||||||
dataIndex: 'num_peers'
|
|
||||||
}, {
|
}, {
|
||||||
header: _('Down Speed'),
|
header: _('Down Speed'),
|
||||||
width: 80,
|
width: 80,
|
||||||
|
@ -147,36 +139,90 @@
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: ftime,
|
renderer: ftime,
|
||||||
dataIndex: 'eta'
|
dataIndex: 'eta'
|
||||||
|
}, {
|
||||||
|
header: _('Seeders'),
|
||||||
|
hidden: true,
|
||||||
|
width: 60,
|
||||||
|
sortable: true,
|
||||||
|
renderer: seedsRenderer,
|
||||||
|
dataIndex: 'num_seeds'
|
||||||
|
}, {
|
||||||
|
header: _('Peers'),
|
||||||
|
hidden: true,
|
||||||
|
width: 60,
|
||||||
|
sortable: true,
|
||||||
|
renderer: peersRenderer,
|
||||||
|
dataIndex: 'num_peers'
|
||||||
}, {
|
}, {
|
||||||
header: _('Ratio'),
|
header: _('Ratio'),
|
||||||
|
hidden: true,
|
||||||
width: 60,
|
width: 60,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: availRenderer,
|
renderer: availRenderer,
|
||||||
dataIndex: 'ratio'
|
dataIndex: 'ratio'
|
||||||
}, {
|
}, {
|
||||||
header: _('Avail'),
|
header: _('Avail'),
|
||||||
|
hidden: true,
|
||||||
width: 60,
|
width: 60,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: availRenderer,
|
renderer: availRenderer,
|
||||||
dataIndex: 'distributed_copies'
|
dataIndex: 'distributed_copies'
|
||||||
}, {
|
}, {
|
||||||
header: _('Added'),
|
header: _('Added'),
|
||||||
|
hidden: true,
|
||||||
width: 80,
|
width: 80,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: fdate,
|
renderer: fdate,
|
||||||
dataIndex: 'time_added'
|
dataIndex: 'time_added'
|
||||||
}, {
|
}, {
|
||||||
header: _('Tracker'),
|
header: _('Tracker'),
|
||||||
|
hidden: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: trackerRenderer,
|
renderer: trackerRenderer,
|
||||||
dataIndex: 'tracker_host'
|
dataIndex: 'tracker_host'
|
||||||
}, {
|
}, {
|
||||||
header: _('Save Path'),
|
header: _('Save Path'),
|
||||||
|
hidden: true,
|
||||||
width: 120,
|
width: 120,
|
||||||
sortable: true,
|
sortable: true,
|
||||||
renderer: fplain,
|
renderer: fplain,
|
||||||
dataIndex: 'save_path'
|
dataIndex: 'save_path'
|
||||||
|
}, {
|
||||||
|
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: {
|
meta: {
|
||||||
|
@ -199,7 +245,12 @@
|
||||||
{name: 'distributed_copies', type: 'float'},
|
{name: 'distributed_copies', type: 'float'},
|
||||||
{name: 'time_added', type: 'int'},
|
{name: 'time_added', type: 'int'},
|
||||||
{name: 'tracker_host'},
|
{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'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -212,6 +263,7 @@
|
||||||
cls: 'deluge-torrents',
|
cls: 'deluge-torrents',
|
||||||
stripeRows: true,
|
stripeRows: true,
|
||||||
autoExpandColumn: 'name',
|
autoExpandColumn: 'name',
|
||||||
|
autoExpandMin: 150,
|
||||||
deferredRender:false,
|
deferredRender:false,
|
||||||
autoScroll:true,
|
autoScroll:true,
|
||||||
margins: '5 5 0 0',
|
margins: '5 5 0 0',
|
||||||
|
|
Loading…
Reference in New Issue