mirror of
https://github.com/grafana/grafana.git
synced 2025-08-03 02:42:22 +08:00
Chore: Rename Id to ID in alerting models (#62777)
* Chore: Rename Id to ID in alerting models * Add xorm tags for datasource * Add xorm tag for uid
This commit is contained in:
@ -262,7 +262,7 @@ func isSupportBundlesEnabled(hs *HTTPServer) bool {
|
||||
func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, enabledPlugins EnabledPlugins) (map[string]plugins.DataSourceDTO, error) {
|
||||
orgDataSources := make([]*datasources.DataSource, 0)
|
||||
if c.OrgID != 0 {
|
||||
query := datasources.GetDataSourcesQuery{OrgId: c.OrgID, DataSourceLimit: hs.Cfg.DataSourceLimit}
|
||||
query := datasources.GetDataSourcesQuery{OrgID: c.OrgID, DataSourceLimit: hs.Cfg.DataSourceLimit}
|
||||
err := hs.DataSourcesService.GetDataSources(c.Req.Context(), &query)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -283,15 +283,15 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, enabledPlugin
|
||||
dataSources := make(map[string]plugins.DataSourceDTO)
|
||||
|
||||
for _, ds := range orgDataSources {
|
||||
url := ds.Url
|
||||
url := ds.URL
|
||||
|
||||
if ds.Access == datasources.DS_ACCESS_PROXY {
|
||||
url = "/api/datasources/proxy/uid/" + ds.Uid
|
||||
url = "/api/datasources/proxy/uid/" + ds.UID
|
||||
}
|
||||
|
||||
dsDTO := plugins.DataSourceDTO{
|
||||
ID: ds.Id,
|
||||
UID: ds.Uid,
|
||||
ID: ds.ID,
|
||||
UID: ds.UID,
|
||||
Type: ds.Type,
|
||||
Name: ds.Name,
|
||||
URL: url,
|
||||
@ -365,7 +365,7 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, enabledPlugin
|
||||
|
||||
if ds.Type == datasources.DS_PROMETHEUS {
|
||||
// add unproxied server URL for link to Prometheus web UI
|
||||
ds.JsonData.Set("directUrl", ds.Url)
|
||||
ds.JsonData.Set("directUrl", ds.URL)
|
||||
}
|
||||
|
||||
dataSources[ds.Name] = dsDTO
|
||||
|
Reference in New Issue
Block a user