Sfoglia il codice sorgente

fix(default datasource): minor fix for handling of default datasource

Torkel Ödegaard 10 anni fa
parent
commit
50281f12b9
2 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 1 1
      pkg/api/frontendsettings.go
  2. 1 0
      public/app/panels/singlestat/module.js

+ 1 - 1
pkg/api/frontendsettings.go

@@ -98,7 +98,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
 	}
 
 	if defaultDatasource == "" {
-		defaultDatasource = "grafana"
+		defaultDatasource = "-- Grafana --"
 	}
 
 	jsonObj := map[string]interface{}{

+ 1 - 0
public/app/panels/singlestat/module.js

@@ -37,6 +37,7 @@ function (angular, app, _, TimeSeries, kbn, PanelMeta) {
     // Set and populate defaults
     var _d = {
       links: [],
+      datasource: null,
       maxDataPoints: 100,
       interval: null,
       targets: [{}],