Просмотр исходного кода

feat(dashboards): dashboard sharing fixes

Torkel Ödegaard 9 лет назад
Родитель
Сommit
305a6ae110

+ 4 - 0
pkg/services/sqlstore/migrations/dashboard_mig.go

@@ -107,4 +107,8 @@ func addDashboardMigration(mg *Migrator) {
 	mg.AddMigration("Add column gnetId in dashboard", NewAddColumnMigration(dashboardV2, &Column{
 		Name: "gnet_id", Type: DB_BigInt, Nullable: true,
 	}))
+
+	mg.AddMigration("Add index for gnetId in dashboard", NewAddIndexMigration(dashboardV2, &Index{
+		Cols: []string{"gnet_id"}, Type: IndexType,
+	}))
 }

+ 1 - 3
public/app/features/dashboard/import/dash_import.ts

@@ -69,9 +69,7 @@ export class DashImportCtrl {
 
     if (sources.length === 0) {
       inputModel.info = "No data sources of type " + input.pluginName + " found";
-    } else if (inputModel.description) {
-      inputModel.info = inputModel.description;
-    } else {
+    } else if (!inputModel.info) {
       inputModel.info = "Select a " + input.pluginName + " data source";
     }