From db2523a95f33b92d7aa86e802d2b71d5290fbe79 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Fri, 2 Aug 2019 13:46:51 +0800 Subject: [PATCH] =?UTF-8?q?web=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/solr/index.py | 16 ++++++++++++++-- plugins/solr/js/solr.js | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) 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 += '
'; con += ''; con += ''; - con += ''; + con += ''; con += ''; con += ''; @@ -170,6 +170,7 @@ function pRead(){ var readme = ''; $('.soft-man-con').html(readme);
collection操作(添加)操作(添加)'+ '|'+ 'WEB管理