mirror of
https://github.com/grafana/grafana.git
synced 2024-11-26 02:40:26 -06:00
Error message for missing dashboards.json config section, Closes #2256
This commit is contained in:
parent
a38a06a077
commit
0d856cc135
@ -1,6 +1,7 @@
|
||||
package search
|
||||
|
||||
import (
|
||||
"log"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
|
||||
@ -15,6 +16,12 @@ func Init() {
|
||||
bus.AddHandler("search", searchHandler)
|
||||
|
||||
jsonIndexCfg, _ := setting.Cfg.GetSection("dashboards.json")
|
||||
|
||||
if jsonIndexCfg == nil {
|
||||
log.Fatal("Config section missing: dashboards.json")
|
||||
return
|
||||
}
|
||||
|
||||
jsonIndexEnabled := jsonIndexCfg.Key("enabled").MustBool(false)
|
||||
|
||||
if jsonIndexEnabled {
|
||||
|
Loading…
Reference in New Issue
Block a user