mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 07:10:27 +08:00
优化代码
This commit is contained in:
@@ -217,14 +217,14 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
|
|
||||||
// 证书
|
// 证书
|
||||||
if len(params.CertIdsJSON) > 0 {
|
if len(params.CertIdsJSON) > 0 {
|
||||||
certIds := []int64{}
|
var certIds = []int64{}
|
||||||
err := json.Unmarshal(params.CertIdsJSON, &certIds)
|
err := json.Unmarshal(params.CertIdsJSON, &certIds)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if len(certIds) > 0 {
|
if len(certIds) > 0 {
|
||||||
certRefs := []*sslconfigs.SSLCertRef{}
|
var certRefs = []*sslconfigs.SSLCertRef{}
|
||||||
for _, certId := range certIds {
|
for _, certId := range certIds {
|
||||||
certRefs = append(certRefs, &sslconfigs.SSLCertRef{
|
certRefs = append(certRefs, &sslconfigs.SSLCertRef{
|
||||||
IsOn: true,
|
IsOn: true,
|
||||||
@@ -251,7 +251,7 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sslPolicyId := sslPolicyIdResp.SslPolicyId
|
var sslPolicyId = sslPolicyIdResp.SslPolicyId
|
||||||
httpsConfig.SSLPolicyRef = &sslconfigs.SSLPolicyRef{
|
httpsConfig.SSLPolicyRef = &sslconfigs.SSLPolicyRef{
|
||||||
IsOn: true,
|
IsOn: true,
|
||||||
SSLPolicyId: sslPolicyId,
|
SSLPolicyId: sslPolicyId,
|
||||||
|
|||||||
@@ -221,6 +221,7 @@ func (this *IndexAction) RunPost(params struct {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
httpsConfig.SSLPolicy = nil
|
||||||
httpsConfig.SSLPolicyRef = &sslconfigs.SSLPolicyRef{
|
httpsConfig.SSLPolicyRef = &sslconfigs.SSLPolicyRef{
|
||||||
IsOn: true,
|
IsOn: true,
|
||||||
SSLPolicyId: sslPolicyId,
|
SSLPolicyId: sslPolicyId,
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ func (this *ComponentsAction) RunGet(params struct{}) {
|
|||||||
|
|
||||||
if !Tea.IsTesting() && len(componentsData) > 0 {
|
if !Tea.IsTesting() && len(componentsData) > 0 {
|
||||||
this.AddHeader("Last-Modified", "Fri, 06 Sep 2019 08:29:50 GMT")
|
this.AddHeader("Last-Modified", "Fri, 06 Sep 2019 08:29:50 GMT")
|
||||||
this.Write(componentsData)
|
_, _ = this.Write(componentsData)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
@media screen and (min-width: 1024px) {
|
@media screen and (min-width: 1124px) {
|
||||||
.tables-box {
|
.tables-box {
|
||||||
width: 1024px;
|
width: 1024px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1024px) {
|
@media screen and (min-width: 1124px) {
|
||||||
.tables-box {
|
.tables-box {
|
||||||
width: 1024px;
|
width: 1024px;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user