diff --git a/internal/web/actions/default/servers/create.go b/internal/web/actions/default/servers/create.go index 0487d190..0ad30b4c 100644 --- a/internal/web/actions/default/servers/create.go +++ b/internal/web/actions/default/servers/create.go @@ -338,7 +338,7 @@ func (this *CreateAction) RunPost(params struct { this.ErrorPage(err) return } - reverseProxyRef := &serverconfigs.ReverseProxyRef{ + var reverseProxyRef = &serverconfigs.ReverseProxyRef{ IsOn: true, ReverseProxyId: resp.ReverseProxyId, } @@ -355,7 +355,7 @@ func (this *CreateAction) RunPost(params struct { var rootJSON []byte var err error if len(params.WebRoot) > 0 { - rootConfig := &serverconfigs.HTTPRootConfig{} + var rootConfig = &serverconfigs.HTTPRootConfig{} rootConfig.IsOn = true rootConfig.Dir = params.WebRoot rootConfig.Indexes = []string{"index.html", "index.htm"} @@ -375,7 +375,7 @@ func (this *CreateAction) RunPost(params struct { } // 包含条件 - includeNodes := []maps.Map{} + var includeNodes = []maps.Map{} includeNodesJSON, err := json.Marshal(includeNodes) if err != nil { this.ErrorPage(err) @@ -383,7 +383,7 @@ func (this *CreateAction) RunPost(params struct { } // 排除条件 - excludeNodes := []maps.Map{} + var excludeNodes = []maps.Map{} excludeNodesJSON, err := json.Marshal(excludeNodes) if err != nil { this.ErrorPage(err) @@ -396,7 +396,7 @@ func (this *CreateAction) RunPost(params struct { AdminId: this.AdminId(), Type: params.ServerType, Name: params.Name, - ServerNamesJON: []byte(params.ServerNames), + ServerNamesJON: params.ServerNames, Description: params.Description, NodeClusterId: clusterId, IncludeNodesJSON: includeNodesJSON, diff --git a/web/public/js/utils.js b/web/public/js/utils.js index 312de8c0..7794e079 100644 --- a/web/public/js/utils.js +++ b/web/public/js/utils.js @@ -180,7 +180,7 @@ window.teaweb = { bytesAxis: function (stats, countFunc) { let max = Math.max.apply(this, stats.map(countFunc)) let divider = 1 - let unit = "" + let unit = "B" if (max >= Math.pow(1024, 6)) { unit = "E" divider = Math.pow(1024, 6) @@ -583,7 +583,10 @@ window.teaweb = { show: true, trigger: "item", formatter: function (args) { - return tooltipFunc.apply(this, [args, values]) + if (tooltipFunc != null) { + return tooltipFunc.apply(this, [args, values]) + } + return null } }, grid: { diff --git a/web/views/@default/clusters/cluster/settings/dns/index.html b/web/views/@default/clusters/cluster/settings/dns/index.html index e4d8f341..bfa6d297 100644 --- a/web/views/@default/clusters/cluster/settings/dns/index.html +++ b/web/views/@default/clusters/cluster/settings/dns/index.html @@ -31,7 +31,7 @@ 自动设置CNAME记录 -

除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如@www

+

除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如www

diff --git a/web/views/@default/dns/updateClusterPopup.html b/web/views/@default/dns/updateClusterPopup.html index 925ea8cc..291ff458 100644 --- a/web/views/@default/dns/updateClusterPopup.html +++ b/web/views/@default/dns/updateClusterPopup.html @@ -48,7 +48,7 @@ 自动设置CNAME记录 -

除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如@www

+

除集群已创建的网站服务之外,自动解析到集群的CNAME记录,比如www