Fix #1268, Torrent errors not displayed in webui
This commit is contained in:
parent
5ad21303c6
commit
95819c79e5
|
@ -86,7 +86,7 @@ Deluge.Keys = {
|
||||||
* Keys used in the details tab of the statistics panel.
|
* Keys used in the details tab of the statistics panel.
|
||||||
*/
|
*/
|
||||||
Details: [
|
Details: [
|
||||||
'name', 'save_path', 'total_size', 'num_files', 'tracker_status',
|
'name', 'save_path', 'total_size', 'num_files', 'message',
|
||||||
'tracker', 'comment'
|
'tracker', 'comment'
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
this.addItem('status', _('Status'));
|
this.addItem('status', _('Status'));
|
||||||
this.addItem('tracker', _('Tracker'));
|
this.addItem('tracker', _('Tracker'));
|
||||||
},
|
},
|
||||||
|
|
||||||
onRender: function(ct, position) {
|
onRender: function(ct, position) {
|
||||||
Deluge.details.DetailsTab.superclass.onRender.call(this, ct, position);
|
Deluge.details.DetailsTab.superclass.onRender.call(this, ct, position);
|
||||||
this.body.setStyle('padding', '10px');
|
this.body.setStyle('padding', '10px');
|
||||||
|
@ -76,7 +76,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
Ext.DomHelper.append(this.dl, {tag: 'dt', cls: id, html: label + ':'});
|
Ext.DomHelper.append(this.dl, {tag: 'dt', cls: id, html: label + ':'});
|
||||||
this.fields[id] = Ext.DomHelper.append(this.dl, {tag: 'dd', cls: id, html: ''}, true);
|
this.fields[id] = Ext.DomHelper.append(this.dl, {tag: 'dd', cls: id, html: ''}, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
clear: function() {
|
clear: function() {
|
||||||
if (!this.fields) return;
|
if (!this.fields) return;
|
||||||
for (var k in this.fields) {
|
for (var k in this.fields) {
|
||||||
|
@ -84,7 +84,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
}
|
}
|
||||||
this.oldData = {}
|
this.oldData = {}
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function(torrentId) {
|
update: function(torrentId) {
|
||||||
deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Details, {
|
deluge.client.web.get_torrent_status(torrentId, Deluge.Keys.Details, {
|
||||||
success: this.onRequestComplete,
|
success: this.onRequestComplete,
|
||||||
|
@ -92,7 +92,7 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
torrentId: torrentId
|
torrentId: torrentId
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
onRequestComplete: function(torrent, request, response, options) {
|
onRequestComplete: function(torrent, request, response, options) {
|
||||||
var data = {
|
var data = {
|
||||||
torrent_name: torrent.name,
|
torrent_name: torrent.name,
|
||||||
|
@ -100,11 +100,11 @@ Deluge.details.DetailsTab = Ext.extend(Ext.Panel, {
|
||||||
path: torrent.save_path,
|
path: torrent.save_path,
|
||||||
size: fsize(torrent.total_size),
|
size: fsize(torrent.total_size),
|
||||||
files: torrent.num_files,
|
files: torrent.num_files,
|
||||||
status: torrent.tracker_status,
|
status: torrent.message,
|
||||||
tracker: torrent.tracker,
|
tracker: torrent.tracker,
|
||||||
comment: torrent.comment
|
comment: torrent.comment
|
||||||
};
|
};
|
||||||
|
|
||||||
for (var field in this.fields) {
|
for (var field in this.fields) {
|
||||||
if (!Ext.isDefined(data[field])) continue; // this is a field we aren't responsible for.
|
if (!Ext.isDefined(data[field])) continue; // this is a field we aren't responsible for.
|
||||||
if (data[field] == this.oldData[field]) continue;
|
if (data[field] == this.oldData[field]) continue;
|
||||||
|
|
Loading…
Reference in New Issue