diff --git a/plugins/go-fastdfs/index.html b/plugins/go-fastdfs/index.html
index bbeddaa5a..354561bb1 100755
--- a/plugins/go-fastdfs/index.html
+++ b/plugins/go-fastdfs/index.html
@@ -3,7 +3,10 @@
diff --git a/plugins/go-fastdfs/index.py b/plugins/go-fastdfs/index.py
index 8815ba53b..f7103df95 100755
--- a/plugins/go-fastdfs/index.py
+++ b/plugins/go-fastdfs/index.py
@@ -43,6 +43,10 @@ def getLog():
return getServerDir() + "/log/fileserver.log"
+def gfBreakpointLog():
+ return getServerDir() + "/log/tusd.log"
+
+
def getArgs():
args = sys.argv[2:]
tmp = {}
@@ -158,6 +162,37 @@ def initdUinstall():
return 'ok'
+def gfConf():
+ return getServerDir() + "/conf/cfg.json"
+
+
+def gfConfSet():
+ gets = [
+ {'name': 'addr', 'type': -1, 'ps': '绑定端口'},
+ {'name': 'peer_id', 'type': -1, 'ps': '集群内唯一,请使用0-9的单字符'},
+ {'name': 'host', 'type': -1, 'ps': '本主机地址'},
+ {'name': 'group', 'type': -1, 'ps': '组号'},
+ {'name': 'support_group_manage', 'type': 0, 'ps': '是否支持按组(集群)管理'},
+ {'name': 'enable_merge_small_file', 'type': 0, 'ps': '是否合并小文件'},
+ {'name': 'refresh_interval', 'type': 1, 'ps': '重试同步失败文件的时间'},
+ {'name': 'rename_file', 'type': 0, 'ps': '是否自动重命名'},
+ {'name': 'enable_web_upload', 'type': 0, 'ps': '是否支持web上传,方便调试'},
+ {'name': 'enable_custom_path', 'type': 0, 'ps': '是否支持非日期路径'},
+ {'name': 'enable_migrate', 'type': 0, 'ps': '是否启用迁移'},
+ {'name': 'enable_cross_origin', 'type': 0, 'ps': '是否开启跨站访问'},
+ {'name': 'enable_tus', 'type': 0, 'ps': '是否开启断点续传'}
+ ]
+ data = public.readFile(gfConf())
+ result = json.loads(data)
+
+ ret = []
+ for g in gets:
+ if g['name'] in result:
+ g['value'] = result[g['name']]
+ ret.append(g)
+
+ return public.getJson(ret)
+
if __name__ == "__main__":
func = sys.argv[1]
if func == 'status':
@@ -178,5 +213,9 @@ if __name__ == "__main__":
print initdUinstall()
elif func == 'run_log':
print getLog()
+ elif func == 'conf':
+ print gfConf()
+ elif func == 'gf_conf_set':
+ print gfConfSet()
else:
print 'error'
diff --git a/plugins/go-fastdfs/js/fastdfs.js b/plugins/go-fastdfs/js/fastdfs.js
index 1243aad12..c62ce9a8b 100755
--- a/plugins/go-fastdfs/js/fastdfs.js
+++ b/plugins/go-fastdfs/js/fastdfs.js
@@ -37,6 +37,57 @@ function pPost(method,args,callback, title){
}
+
+function gfConfigSet(){
+ pPost('gf_conf_set', '', function(data){
+ var rdata = $.parseJSON(data.data);
+
+ var mlist = '';
+ for (var i = 0; i < rdata.length; i++) {
+ var w = '140';
+ if (rdata[i].name == 'error_reporting') w = '250';
+ var ibody = '
';
+ switch (rdata[i].type) {
+ case 0:
+ var selected_1 = (rdata[i].value == 1) ? 'selected' : '';
+ var selected_0 = (rdata[i].value == 0) ? 'selected' : '';
+ ibody = '
';
+ break;
+ case 1:
+ var selected_1 = (rdata[i].value == 'On') ? 'selected' : '';
+ var selected_0 = (rdata[i].value == 'Off') ? 'selected' : '';
+ ibody = '
'
+ break;
+ case 2:
+ var selected_1 = (rdata[i].value == 'true') ? 'selected' : '';
+ var selected_0 = (rdata[i].value == 'false') ? 'selected' : '';
+ ibody = '
'
+ break;
+ }
+ mlist += '
' + rdata[i].name + '' + ibody + ', ' + rdata[i].ps + '
'
+ }
+ var html = '
\
+ ' + mlist + '\
+
\
+ \
+
\
+
';
+ $(".soft-man-con").html(html);
+ });
+}
+
+
+
+
+
+
function pRead(){
var readme = '
';
readme += '- 使用默认solr端口,如有需要自行修改
';