mirror of
https://gitee.com/wanwujie/sub2api
synced 2026-04-16 21:04:45 +08:00
feat(usage): add group usage distribution chart alongside model distribution
- Add GroupStat type to usagestats package - Add GetGroupStatsWithFilters to UsageLogRepository interface and implement with LEFT JOIN groups - Add GetGroupStats dashboard API endpoint (GET /admin/dashboard/groups) - Add GroupDistributionChart.vue component mirroring ModelDistributionChart - Rearrange UsageView layout: model + group in one row, token trend full-width below - All filters (user, api_key, account, group, model, date range) apply to group stats
This commit is contained in:
@@ -1563,6 +1563,10 @@ func (r *stubUsageLogRepo) GetModelStatsWithFilters(ctx context.Context, startTi
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (r *stubUsageLogRepo) GetGroupStatsWithFilters(ctx context.Context, startTime, endTime time.Time, userID, apiKeyID, accountID, groupID int64, stream *bool, billingType *int8) ([]usagestats.GroupStat, error) {
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
func (r *stubUsageLogRepo) GetAPIKeyUsageTrend(ctx context.Context, startTime, endTime time.Time, granularity string, limit int) ([]usagestats.APIKeyUsageTrendPoint, error) {
|
||||
return nil, errors.New("not implemented")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user