mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
dataproxy: added caching of datasources when doing data proxy requests, #9078
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
"github.com/grafana/grafana/pkg/components/securejsondata"
|
||||
"github.com/grafana/grafana/pkg/metrics"
|
||||
m "github.com/grafana/grafana/pkg/models"
|
||||
)
|
||||
|
||||
@@ -19,6 +20,8 @@ func init() {
|
||||
}
|
||||
|
||||
func GetDataSourceById(query *m.GetDataSourceByIdQuery) error {
|
||||
metrics.M_DB_DataSource_QueryById.Inc(1)
|
||||
|
||||
datasource := m.DataSource{OrgId: query.OrgId, Id: query.Id}
|
||||
has, err := x.Get(&datasource)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user