mirror of https://github.com/grafana/grafana
Public Dashboards: count public dashboards view requests (#52419)
parent
0300b1c674
commit
e0a58300ac
@ -1,9 +1,18 @@ |
|||||||
package api |
package api |
||||||
|
|
||||||
import "github.com/grafana/grafana/pkg/models" |
import ( |
||||||
|
"github.com/grafana/grafana/pkg/infra/metrics" |
||||||
|
"github.com/grafana/grafana/pkg/models" |
||||||
|
) |
||||||
|
|
||||||
func SetPublicDashboardFlag() func(c *models.ReqContext) { |
func SetPublicDashboardFlag() func(c *models.ReqContext) { |
||||||
return func(c *models.ReqContext) { |
return func(c *models.ReqContext) { |
||||||
c.IsPublicDashboardView = true |
c.IsPublicDashboardView = true |
||||||
} |
} |
||||||
} |
} |
||||||
|
|
||||||
|
func CountPublicDashboardRequest() func(c *models.ReqContext) { |
||||||
|
return func(c *models.ReqContext) { |
||||||
|
metrics.MPublicDashboardRequestCount.Inc() |
||||||
|
} |
||||||
|
} |
||||||
|
Loading…
Reference in new issue