Add apiVersion to datasource settings DTO (#90057)

This commit is contained in:
Andres Martinez Gotor 2024-07-04 16:44:19 +02:00 committed by GitHub
parent 37a58d15cf
commit be98ab1111
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 8 deletions

View File

@ -412,14 +412,15 @@ func (hs *HTTPServer) getFSDataSources(c *contextmodel.ReqContext, availablePlug
}
dsDTO := plugins.DataSourceDTO{
ID: ds.ID,
UID: ds.UID,
Type: ds.Type,
Name: ds.Name,
URL: url,
IsDefault: ds.IsDefault,
Access: string(ds.Access),
ReadOnly: ds.ReadOnly,
ID: ds.ID,
UID: ds.UID,
Type: ds.Type,
Name: ds.Name,
URL: url,
IsDefault: ds.IsDefault,
Access: string(ds.Access),
ReadOnly: ds.ReadOnly,
APIVersion: ds.APIVersion,
}
ap, exists := availablePlugins.Get(plugins.TypeDataSource, ds.Type)

View File

@ -191,6 +191,7 @@ type DataSourceDTO struct {
Module string `json:"module,omitempty"`
JSONData map[string]any `json:"jsonData"`
ReadOnly bool `json:"readOnly"`
APIVersion string `json:"apiVersion,omitempty"`
BasicAuth string `json:"basicAuth,omitempty"`
WithCredentials bool `json:"withCredentials,omitempty"`