This commit is contained in:
midoks
2021-11-11 18:38:47 +08:00
parent 221bc629c3
commit 76b5255430
2 changed files with 12 additions and 1 deletions
+2
View File
@@ -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)
+10 -1
View File
@@ -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)