diff --git a/class/core/site_api.py b/class/core/site_api.py index 0f92b3d47..0b96d49b0 100755 --- a/class/core/site_api.py +++ b/class/core/site_api.py @@ -690,9 +690,14 @@ class site_api: result = self.setSslConf(site_name) if not result['status']: return mw.getJson(result) - return mw.returnJson(True, '部署成功') + def renewSslApi(self): + site_name = request.form.get('site_name', '') + ssl_type = request.form.get('ssl_type', '') + + return mw.returnJson(True, '续期成功') + def getLetLogsApi(self): log_file = mw.getRunDir() + '/logs/letsencrypt.log' if not os.path.exists(log_file): diff --git a/route/static/app/site.js b/route/static/app/site.js index c8199a695..9c8f61ff2 100755 --- a/route/static/app/site.js +++ b/route/static/app/site.js @@ -1807,6 +1807,14 @@ function deploySSL(type,id,siteName){ },'json'); } +function renewSSL(type,id,siteName){ + $.post('/site/re_ssl','site_name='+siteName+'&ssl_type='+type,function(rdata){ + showMsg(rdata.msg, function(){ + opSSL(type,id,siteName); + },{icon:rdata.status?1:2}, 2000); + },'json'); +} + //SSL function opSSL(type, id, siteName, callback){ @@ -1958,7 +1966,7 @@ function opSSL(type, id, siteName, callback){ \
\ \ - \ + \ \
\ \