mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
parent
bbc079e57b
commit
75454b02c0
@ -64,20 +64,12 @@ func NewReverseProxy(ds *m.DataSource, proxyPath string, targetUrl *url.URL) *ht
|
||||
return &httputil.ReverseProxy{Director: director}
|
||||
}
|
||||
|
||||
var dsMap map[int64]*m.DataSource = make(map[int64]*m.DataSource)
|
||||
|
||||
func getDatasource(id int64, orgId int64) (*m.DataSource, error) {
|
||||
// ds, exists := dsMap[id]
|
||||
// if exists && ds.OrgId == orgId {
|
||||
// return ds, nil
|
||||
// }
|
||||
|
||||
query := m.GetDataSourceByIdQuery{Id: id, OrgId: orgId}
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
dsMap[id] = &query.Result
|
||||
return &query.Result, nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user