Port: Allow Routing to Partial Monthly Client Count From Namespaces (#13086)

* add function for routing activity log client counts to ent namespaces

* changelog
This commit is contained in:
Hridoy Roy 2021-11-08 15:38:35 -08:00 committed by GitHub
parent e733c78ff6
commit e7e881c559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

3
changelog/13086.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
activity log (enterprise): allow partial monthly client count to be accessed from namespaces
```

View File

@ -41,7 +41,7 @@ func (b *SystemBackend) activityQueryPath() *framework.Path {
// monthlyActivityCountPath is available in every namespace // monthlyActivityCountPath is available in every namespace
func (b *SystemBackend) monthlyActivityCountPath() *framework.Path { func (b *SystemBackend) monthlyActivityCountPath() *framework.Path {
return &framework.Path{ return &framework.Path{
Pattern: "internal/counters/activity/monthly", Pattern: "internal/counters/activity/monthly$",
HelpSynopsis: strings.TrimSpace(sysHelp["activity-monthly"][0]), HelpSynopsis: strings.TrimSpace(sysHelp["activity-monthly"][0]),
HelpDescription: strings.TrimSpace(sysHelp["activity-monthly"][1]), HelpDescription: strings.TrimSpace(sysHelp["activity-monthly"][1]),
Operations: map[logical.Operation]framework.OperationHandler{ Operations: map[logical.Operation]framework.OperationHandler{
@ -53,6 +53,13 @@ func (b *SystemBackend) monthlyActivityCountPath() *framework.Path {
} }
} }
func (b *SystemBackend) activityPaths() []*framework.Path {
return []*framework.Path{
b.monthlyActivityCountPath(),
b.activityQueryPath(),
}
}
// rootActivityPaths are available only in the root namespace // rootActivityPaths are available only in the root namespace
func (b *SystemBackend) rootActivityPaths() []*framework.Path { func (b *SystemBackend) rootActivityPaths() []*framework.Path {
return []*framework.Path{ return []*framework.Path{