Datasource proxy, switch to lookup by id

This commit is contained in:
Torkel Ödegaard
2014-12-19 07:27:25 +01:00
parent a2a0e0394d
commit a7c816c65e
5 changed files with 12 additions and 13 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package api
import (
"encoding/json"
"strconv"
"strings"
"github.com/torkelo/grafana-pro/pkg/bus"
@@ -27,7 +28,7 @@ func renderConfig(data *configJsTmplModel) string {
for _, ds := range data.DataSources {
url := ds.Url
if ds.Access == m.DS_ACCESS_PROXY {
url = "/api/datasources/proxy/" + ds.Name
url = "/api/datasources/proxy/" + strconv.FormatInt(ds.Id, 10)
}
datasources[ds.Name] = map[string]interface{}{
"type": ds.Type,