pull/109/head
midoks 4 years ago
parent 221bc629c3
commit 76b5255430
  1. 2
      class/core/plugins_api.py
  2. 11
      plugins/gogs/index.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)

@ -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)

Loading…
Cancel
Save