From 9319e07db5bda0e1e2934f20133e9a04d3be2577 Mon Sep 17 00:00:00 2001 From: bendikro Date: Tue, 29 Dec 2015 20:32:40 +0100 Subject: [PATCH] [Webui] Show user in connection manager --- deluge/ui/web/js/deluge-all/ConnectionManager.js | 7 ++++--- deluge/ui/web/json_api.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deluge/ui/web/js/deluge-all/ConnectionManager.js b/deluge/ui/web/js/deluge-all/ConnectionManager.js index 269d3f678..3165d6a0c 100644 --- a/deluge/ui/web/js/deluge-all/ConnectionManager.js +++ b/deluge/ui/web/js/deluge-all/ConnectionManager.js @@ -35,10 +35,11 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, { this.list = new Ext.list.ListView({ store: new Ext.data.ArrayStore({ fields: [ - {name: 'status', mapping: 3}, + {name: 'status', mapping: 4}, {name: 'host', mapping: 1}, {name: 'port', mapping: 2}, - {name: 'version', mapping: 4} + {name: 'user', mapping: 3}, + {name: 'version', mapping: 5} ], id: 0 }), @@ -62,7 +63,7 @@ Deluge.ConnectionManager = Ext.extend(Ext.Window, { header: _('Host'), width: .51, sortable: true, - tpl: '{host}:{port}', + tpl: '{user}@{host}:{port}', dataIndex: 'host' }, { header: _('Version'), diff --git a/deluge/ui/web/json_api.py b/deluge/ui/web/json_api.py index 8675fd826..3085dad4c 100644 --- a/deluge/ui/web/json_api.py +++ b/deluge/ui/web/json_api.py @@ -306,6 +306,7 @@ HOSTLIST_PASS = 4 HOSTS_ID = HOSTLIST_ID HOSTS_NAME = HOSTLIST_NAME HOSTS_PORT = HOSTLIST_PORT +HOSTS_USER = HOSTLIST_USER HOSTS_STATUS = 3 HOSTS_INFO = 4 @@ -746,7 +747,7 @@ class WebApi(JSONComponent): Return the hosts in the hostlist. """ log.debug("get_hosts called") - return [(tuple(host[HOSTS_ID:HOSTS_PORT + 1]) + ("Offline",)) for host in self.host_list["hosts"]] + return [(tuple(host[HOSTS_ID:HOSTS_USER + 1]) + ("Offline",)) for host in self.host_list["hosts"]] @export def get_host_status(self, host_id): @@ -756,7 +757,6 @@ class WebApi(JSONComponent): :param host_id: the hash id of the host :type host_id: string """ - def response(status, info=None): return host_id, host, port, status, info