mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
SQLStore: customise the limit of retrieved datasources per organisation (#29358)
* SQLStore: customise the limit of retrieved datasources per organisation * update all suggestions regarding nil or 0 as default * Apply suggestions from code review Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * correct default.ini description + adding unittest * Apply suggestions from code review Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com> * modify unittest name Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
This commit is contained in:
@@ -19,8 +19,8 @@ import (
|
||||
|
||||
var datasourcesLogger = log.New("datasources")
|
||||
|
||||
func GetDataSources(c *models.ReqContext) Response {
|
||||
query := models.GetDataSourcesQuery{OrgId: c.OrgId}
|
||||
func (hs *HTTPServer) GetDataSources(c *models.ReqContext) Response {
|
||||
query := models.GetDataSourcesQuery{OrgId: c.OrgId, DataSourceLimit: hs.Cfg.DataSourceLimit}
|
||||
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
return Error(500, "Failed to query datasources", err)
|
||||
|
||||
Reference in New Issue
Block a user