diff --git a/common/topic_list.go b/common/topic_list.go index cf6e304a..f0bccb6e 100644 --- a/common/topic_list.go +++ b/common/topic_list.go @@ -402,5 +402,8 @@ func ArgQToTopicCount(argList []interface{}, qlist string) (topicCount int, err } func TopicCountInForums(forums []Forum) (topicCount int, err error) { - return ArgQToTopicCount(ForumListToArgQ(forums)) + for _, f := range forums { + topicCount += f.TopicCount + } + return topicCount, nil } diff --git a/routes/panel/analytics.go b/routes/panel/analytics.go index 156fcaf5..768cc279 100644 --- a/routes/panel/analytics.go +++ b/routes/panel/analytics.go @@ -834,7 +834,7 @@ func AnalyticsRoutesPerf(w http.ResponseWriter, r *http.Request, user c.User) c. if inEx(ovitem.name) { continue } - if strings.HasPrefix(ovitem.name,"panel.") { + if strings.HasPrefix(ovitem.name, "panel.") { continue } var viewList []int64 @@ -842,8 +842,9 @@ func AnalyticsRoutesPerf(w http.ResponseWriter, r *http.Request, user c.User) c. viewList = append(viewList, ovitem.viewMap[value]) } vList = append(vList, viewList) - legendList = append(legendList, ovitem.name) - if i >= 6 { + shortName := strings.Replace(ovitem.name, "routes.", "r.", -1) + legendList = append(legendList, shortName) + if i >= 7 { break } i++ @@ -860,7 +861,7 @@ func AnalyticsRoutesPerf(w http.ResponseWriter, r *http.Request, user c.User) c. cv, cu := c.ConvertPerfUnit(float64(count)) routeItems = append(routeItems, c.PanelAnalyticsRoutesPerfItem{ Route: route, - Unit: cu, + Unit: cu, Count: int(cv), }) } @@ -1082,8 +1083,9 @@ func AnalyticsRoutes(w http.ResponseWriter, r *http.Request, user c.User) c.Rout viewList = append(viewList, ovitem.viewMap[value]) } vList = append(vList, viewList) - legendList = append(legendList, ovitem.name) - if i >= 6 { + shortName := strings.Replace(ovitem.name, "routes.", "r.", -1) + legendList = append(legendList, shortName) + if i >= 7 { break } i++