diff --git a/plugins/solr/index.py b/plugins/solr/index.py index 255f19155..5a54012cf 100755 --- a/plugins/solr/index.py +++ b/plugins/solr/index.py @@ -165,7 +165,8 @@ def initdUinstall(): def collectionList(): path = getServerDir() + '/server/solr' listDir = os.listdir(path) - data = [] + data = {} + dlist = [] for dirname in listDir: dirpath = path + '/' + dirname if not os.path.isdir(dirpath): @@ -175,7 +176,18 @@ def collectionList(): tmp = {} tmp['name'] = dirname - data.append(tmp) + dlist.append(tmp) + data['list'] = dlist + data['ip'] = public.getLocalIp() + data['port'] = '8983' + + content = public.readFile(path+'/solr.xml') + + rep = "jetty.port:(.*)\}" + tmp = re.search(rep, content) + port = tmp.groups()[0] + data['port'] = port + return public.returnJson(True, 'OK', data) diff --git a/plugins/solr/js/solr.js b/plugins/solr/js/solr.js index 449936cff..b9c7556df 100755 --- a/plugins/solr/js/solr.js +++ b/plugins/solr/js/solr.js @@ -45,12 +45,12 @@ function collectionManagement(){ return; } - var list = rdata.data; + var list = rdata.data.list; var con = ''; con += '
collection | '; - con += '操作(添加) | '; + con += '操作(添加)'+ '|'+ 'WEB管理 | '; con += '
---|