Explorar o código

fix: don't detect graphite version before it's saved

Torkel Ödegaard %!s(int64=8) %!d(string=hai) anos
pai
achega
de91d68402

+ 0 - 2
public/app/features/plugins/ds_edit_ctrl.ts

@@ -1,5 +1,3 @@
-///<reference path="../../headers/common.d.ts" />
-
 import _ from 'lodash';
 import _ from 'lodash';
 
 
 import config from 'app/core/config';
 import config from 'app/core/config';

+ 4 - 0
public/app/plugins/datasource/graphite/config_ctrl.ts

@@ -15,6 +15,10 @@ export class GraphiteConfigCtrl {
   }
   }
 
 
   autoDetectGraphiteVersion() {
   autoDetectGraphiteVersion() {
+    if (!this.current.id) {
+      return;
+    }
+
     this.datasourceSrv.loadDatasource(this.current.name)
     this.datasourceSrv.loadDatasource(this.current.name)
     .then((ds) => {
     .then((ds) => {
       return ds.getVersion();
       return ds.getVersion();