mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-26 20:40:24 +08:00
创建新服务时默认开启配置可以选择统计
This commit is contained in:
@@ -89,6 +89,7 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
CacheIsOn bool
|
CacheIsOn bool
|
||||||
WafIsOn bool
|
WafIsOn bool
|
||||||
RemoteAddrIsOn bool
|
RemoteAddrIsOn bool
|
||||||
|
StatIsOn bool
|
||||||
|
|
||||||
WebRoot string
|
WebRoot string
|
||||||
|
|
||||||
@@ -582,6 +583,27 @@ func (this *CreateAction) RunPost(params struct {
|
|||||||
this.ErrorPage(err)
|
this.ErrorPage(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 统计
|
||||||
|
if params.StatIsOn {
|
||||||
|
var statConfig = &serverconfigs.HTTPStatRef{
|
||||||
|
IsPrior: false,
|
||||||
|
IsOn: true,
|
||||||
|
}
|
||||||
|
statJSON, err := json.Marshal(statConfig)
|
||||||
|
if err != nil {
|
||||||
|
this.ErrorPage(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
_, err = this.RPC().HTTPWebRPC().UpdateHTTPWebStat(this.AdminContext(), &pb.UpdateHTTPWebStatRequest{
|
||||||
|
HttpWebId: webConfig.Id,
|
||||||
|
StatJSON: statJSON,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
this.ErrorPage(err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr v-if="serverType == 'httpProxy' || serverType == 'httpWeb'">
|
||||||
<td>默认开启配置</td>
|
<td>默认开启配置</td>
|
||||||
<td>
|
<td>
|
||||||
<checkbox checked="checked" name="accessLogIsOn">访问日志</checkbox>
|
<checkbox checked="checked" name="accessLogIsOn">访问日志</checkbox>
|
||||||
@@ -117,6 +117,8 @@
|
|||||||
<checkbox name="wafIsOn">WAF</checkbox>
|
<checkbox name="wafIsOn">WAF</checkbox>
|
||||||
|
|
||||||
<checkbox name="remoteAddrIsOn">从上级代理中读取IP <tip-icon content="用来支持读取上级代理传递的X-Real-IP、X-Forwarded-For等信息。如果用户需要通过别的代理服务才能访问到这个网站服务,才需要选中。"></tip-icon> </checkbox>
|
<checkbox name="remoteAddrIsOn">从上级代理中读取IP <tip-icon content="用来支持读取上级代理传递的X-Real-IP、X-Forwarded-For等信息。如果用户需要通过别的代理服务才能访问到这个网站服务,才需要选中。"></tip-icon> </checkbox>
|
||||||
|
|
||||||
|
<checkbox name="statIsOn">统计</checkbox>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user