Browse Source

fix: added new known data source plugins, and minor migration fix for v1 dashboards

Torkel Ödegaard 7 years ago
parent
commit
3964d6b797

+ 16 - 15
pkg/models/datasource.go

@@ -58,21 +58,22 @@ type DataSource struct {
 }
 }
 
 
 var knownDatasourcePlugins map[string]bool = map[string]bool{
 var knownDatasourcePlugins map[string]bool = map[string]bool{
-	DS_ES:                                 true,
-	DS_GRAPHITE:                           true,
-	DS_INFLUXDB:                           true,
-	DS_INFLUXDB_08:                        true,
-	DS_KAIROSDB:                           true,
-	DS_CLOUDWATCH:                         true,
-	DS_PROMETHEUS:                         true,
-	DS_OPENTSDB:                           true,
-	DS_POSTGRES:                           true,
-	DS_MYSQL:                              true,
-	"opennms":                             true,
-	"druid":                               true,
-	"dalmatinerdb":                        true,
-	"gnocci":                              true,
-	"zabbix":                              true,
+	DS_ES:                       true,
+	DS_GRAPHITE:                 true,
+	DS_INFLUXDB:                 true,
+	DS_INFLUXDB_08:              true,
+	DS_KAIROSDB:                 true,
+	DS_CLOUDWATCH:               true,
+	DS_PROMETHEUS:               true,
+	DS_OPENTSDB:                 true,
+	DS_POSTGRES:                 true,
+	DS_MYSQL:                    true,
+	"opennms":                   true,
+	"abhisant-druid-datasource": true,
+	"dalmatinerdb-datasource":   true,
+	"gnocci":                    true,
+	"zabbix":                    true,
+	"alexanderzobnin-zabbix-datasource":   true,
 	"newrelic-app":                        true,
 	"newrelic-app":                        true,
 	"grafana-datadog-datasource":          true,
 	"grafana-datadog-datasource":          true,
 	"grafana-simple-json":                 true,
 	"grafana-simple-json":                 true,

+ 1 - 1
public/app/core/components/search/search_results.html

@@ -20,7 +20,7 @@
   <div class="search-section__header" ng-show="section.hideHeader"></div>
   <div class="search-section__header" ng-show="section.hideHeader"></div>
 
 
   <div ng-if="section.expanded">
   <div ng-if="section.expanded">
-    <a ng-repeat="item in section.items" class="search-item" ng-class="{'selected': item.selected}" ng-href="{{::item.url}}">
+    <a ng-repeat="item in section.items" class="search-item" ng-class="{'selected': item.selected}" ng-href="{{::item.url}}" >
       <div ng-click="ctrl.toggleSelection(item, $event)">
       <div ng-click="ctrl.toggleSelection(item, $event)">
         <gf-form-switch
         <gf-form-switch
            ng-show="ctrl.editable"
            ng-show="ctrl.editable"

+ 6 - 0
public/app/features/dashboard/dashboard_migration.ts

@@ -63,11 +63,17 @@ export class DashboardMigrator {
         }
         }
 
 
         if (panel.y_format) {
         if (panel.y_format) {
+          if (!panel.y_formats) {
+            panel.y_formats = [];
+          }
           panel.y_formats[0] = panel.y_format;
           panel.y_formats[0] = panel.y_format;
           delete panel.y_format;
           delete panel.y_format;
         }
         }
 
 
         if (panel.y2_format) {
         if (panel.y2_format) {
+          if (!panel.y_formats) {
+            panel.y_formats = [];
+          }
           panel.y_formats[1] = panel.y2_format;
           panel.y_formats[1] = panel.y2_format;
           delete panel.y2_format;
           delete panel.y2_format;
         }
         }