diff --git a/plugins/gogs/index.html b/plugins/gogs/index.html index 27135ae46..f09dfde13 100755 --- a/plugins/gogs/index.html +++ b/plugins/gogs/index.html @@ -3,7 +3,8 @@

服务

自启动

-

自启动配置

+

启动配置

+

手动编辑

配置文件

配置修改

用户列表

diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index d55fae695..c46db4ec2 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -566,6 +566,13 @@ def projectScriptDebug(): return public.getJson(data) + +def gogsEdit(): + data = {} + data['post_receive'] = getPluginDir() + '/hook/post-receive.tpl' + data['commit'] = getPluginDir() + '/hook/commit.tpl' + return public.getJson(data) + if __name__ == "__main__": func = sys.argv[1] if func == 'status': @@ -608,5 +615,7 @@ if __name__ == "__main__": print projectScriptUnload() elif func == 'project_script_debug': print projectScriptDebug() + elif func == 'gogs_edit': + print gogsEdit() else: print 'fail' diff --git a/plugins/gogs/js/gogs.js b/plugins/gogs/js/gogs.js index 57a424080..5358de57e 100755 --- a/plugins/gogs/js/gogs.js +++ b/plugins/gogs/js/gogs.js @@ -111,6 +111,20 @@ function submitGogsConf() { }); } +function gogsEdit(){ + + gogsPost('gogs_edit',{} , function(data){ + // console.log(data); + var rdata = $.parseJSON(data.data); + var edit = '

通用的手动编辑:

'; + edit +='
\ + \ + \ +
'; + $(".soft-man-con").html(edit); + }); + +} function gogsUserList(page, search) {