优化
This commit is contained in:
parent
6b703b2e60
commit
0b3c129df0
@ -89,7 +89,7 @@ type LogConfig struct {
|
||||
|
||||
func (this *Config) GetCkQueryLimit() int {
|
||||
if this.Manager.CkQueryLimit == 0 {
|
||||
return 10
|
||||
return 5
|
||||
}
|
||||
return this.Manager.CkQueryLimit
|
||||
}
|
||||
|
@ -18,21 +18,31 @@ func runAnalysis(app *fiber.App) {
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "获取分析面板初始化数据", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.GetConfigs)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "根据事件名查找指标的运算函数", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.LoadPropQuotas)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "获取上报字段所有的值", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.GetValues)
|
||||
appG = appG.Use(middleware.OperaterLog)
|
||||
|
||||
appG = appG.(*fiber.Group).
|
||||
Use(middleware.OperaterLog).
|
||||
appG = appG.
|
||||
Use(limiter.New(
|
||||
limiter.Config{
|
||||
Max: model.GlobConfig.GetCkQueryLimit(),
|
||||
Expiration: time.Duration(model.GlobConfig.GetCkQueryExpiration()) * time.Second,
|
||||
}))
|
||||
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "事件分析查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.EventList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "漏斗分析查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.FunnelList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "留存分析查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.RetentionList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "智能路径分析查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.TraceList)
|
||||
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "用户属性分析查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.UserAttrList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "用户列表查询", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.UserList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "查询用户访问过的事件详情", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.UserEventDetailList)
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "查询用户访问过的事件统计", AbsolutePath: AbsolutePath}, appG.(*fiber.Group), BehaviorAnalysisController{}.UserEventCountList)
|
||||
|
||||
f := appG.
|
||||
Use(limiter.New(
|
||||
limiter.Config{
|
||||
Max: 1,
|
||||
Expiration: 2 * time.Second,
|
||||
}))
|
||||
|
||||
c.MountApi(api_config.MountApiBasePramas{Remark: "智能路径分析查询", AbsolutePath: AbsolutePath}, f.(*fiber.Group), BehaviorAnalysisController{}.TraceList)
|
||||
}
|
||||
}
|
||||
|
@ -45,7 +45,7 @@
|
||||
<div class="xwl_main">
|
||||
<div>
|
||||
<div class="row___xwl" style="padding: 10px;">
|
||||
<select2 v-model="form.eventNames" :options="eventOptions" :checkeds="false" placeholder="请选择事件名" />
|
||||
<select2 v-if="eventNameSelectShow" v-model="form.eventNames" :options="eventOptions" :checkeds="false" placeholder="请选择事件名" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -230,6 +230,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
eventNameSelectShow:true,
|
||||
eventOptions: [],
|
||||
traceTableRes: [],
|
||||
traceChartsRes: [],
|
||||
@ -339,7 +340,13 @@ export default {
|
||||
this.currentReportTable.name = res.data.name
|
||||
this.currentReportTable.remark = res.data.remark
|
||||
this.form = JSON.parse(res.data.data)
|
||||
this.eventNameSelectShow = false
|
||||
this.$nextTick(() => {
|
||||
this.eventNameSelectShow = true
|
||||
})
|
||||
|
||||
this.go()
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user