证书内容输入框支持拖动文件上传

This commit is contained in:
GoEdgeLab
2023-03-24 10:17:05 +08:00
parent 11ffa23a5f
commit 5f02f5ac62
4 changed files with 18 additions and 13 deletions

View File

@@ -26,18 +26,20 @@ func (this *UpdatePopupAction) RunGet(params struct {
this.ErrorPage(err)
return
}
certConfigJSON := certConfigResp.SslCertJSON
var certConfigJSON = certConfigResp.SslCertJSON
if len(certConfigJSON) == 0 {
this.NotFound("cert", params.CertId)
return
}
certConfig := &sslconfigs.SSLCertConfig{}
var certConfig = &sslconfigs.SSLCertConfig{}
err = json.Unmarshal(certConfigJSON, certConfig)
if err != nil {
this.ErrorPage(err)
return
}
certConfig.CertData = nil // cert & key 不需要在界面上显示
certConfig.KeyData = nil
this.Data["certConfig"] = certConfig
this.Show()