diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index 02ba747a0..e500d921a 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -698,6 +698,8 @@ class plugins_api: # print sType, sPage, sPageSize ret = {} + + print(mw.readFile(self.__type)) ret['type'] = json.loads(mw.readFile(self.__type)) # plugins_info = self.getAllListThread(sType) # plugins_info = self.getAllListProcess(sType) diff --git a/plugins/gogs/index.py b/plugins/gogs/index.py index 575546673..ba96cbace 100755 --- a/plugins/gogs/index.py +++ b/plugins/gogs/index.py @@ -168,6 +168,15 @@ def getSshPort(): return tmp.groups()[0] +def getHttpPort(): + content = mw.readFile(getConf()) + rep = 'HTTP_PORT\s*=\s*(.*)' + tmp = re.search(rep, content) + if not tmp: + return '' + return tmp.groups()[0] + + def getRootPath(): content = mw.readFile(getConf()) rep = 'ROOT\s*=\s*(.*)' @@ -542,7 +551,7 @@ def projectScriptLoad(): cc_content = mw.readFile(commit_tpl) - sshUrl = 'ssh://127.0.0.1:' + getSshPort() + sshUrl = 'http://127.0.0.1:' + getHttpPort() cc_content = cc_content.replace('{$GITROOTURL}', sshUrl) cc_content = cc_content.replace('{$CODE_DIR}', codeDir) cc_content = cc_content.replace('{$USERNAME}', user)