|
|
@ -383,6 +383,10 @@ def postReceiveLog(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getGogsConf(): |
|
|
|
def getGogsConf(): |
|
|
|
|
|
|
|
conf = getConf() |
|
|
|
|
|
|
|
if not os.path.exists(conf): |
|
|
|
|
|
|
|
return mw.returnJson(False, "请先安装初始化!") |
|
|
|
|
|
|
|
|
|
|
|
gets = [ |
|
|
|
gets = [ |
|
|
|
{'name': 'DOMAIN', 'type': -1, 'ps': '服务器域名'}, |
|
|
|
{'name': 'DOMAIN', 'type': -1, 'ps': '服务器域名'}, |
|
|
|
{'name': 'ROOT_URL', 'type': -1, 'ps': '公开的完整URL路径'}, |
|
|
|
{'name': 'ROOT_URL', 'type': -1, 'ps': '公开的完整URL路径'}, |
|
|
@ -403,7 +407,7 @@ def getGogsConf(): |
|
|
|
{'name': 'SHOW_FOOTER_VERSION', 'type': 2, 'ps': 'Gogs版本信息'}, |
|
|
|
{'name': 'SHOW_FOOTER_VERSION', 'type': 2, 'ps': 'Gogs版本信息'}, |
|
|
|
{'name': 'SHOW_FOOTER_TEMPLATE_LOAD_TIME', 'type': 2, 'ps': 'Gogs模板加载时间'}, |
|
|
|
{'name': 'SHOW_FOOTER_TEMPLATE_LOAD_TIME', 'type': 2, 'ps': 'Gogs模板加载时间'}, |
|
|
|
] |
|
|
|
] |
|
|
|
conf = mw.readFile(getConf()) |
|
|
|
conf = mw.readFile(conf) |
|
|
|
result = [] |
|
|
|
result = [] |
|
|
|
|
|
|
|
|
|
|
|
for g in gets: |
|
|
|
for g in gets: |
|
|
@ -413,7 +417,7 @@ def getGogsConf(): |
|
|
|
continue |
|
|
|
continue |
|
|
|
g['value'] = tmp.groups()[0] |
|
|
|
g['value'] = tmp.groups()[0] |
|
|
|
result.append(g) |
|
|
|
result.append(g) |
|
|
|
return mw.getJson(result) |
|
|
|
return mw.returnJson(True, 'OK', result) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def submitGogsConf(): |
|
|
|
def submitGogsConf(): |
|
|
@ -445,6 +449,11 @@ def submitGogsConf(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def userList(): |
|
|
|
def userList(): |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
conf = getConf() |
|
|
|
|
|
|
|
if not os.path.exists(conf): |
|
|
|
|
|
|
|
return mw.returnJson(False, "请先安装初始化!") |
|
|
|
|
|
|
|
|
|
|
|
import math |
|
|
|
import math |
|
|
|
args = getArgs() |
|
|
|
args = getArgs() |
|
|
|
|
|
|
|
|
|
|
|