Commit de91d684 by Torkel Ödegaard

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

parent cfd755eb
///<reference path="../../headers/common.d.ts" />
import _ from 'lodash'; import _ from 'lodash';
import config from 'app/core/config'; import config from 'app/core/config';
......
...@@ -15,6 +15,10 @@ export class GraphiteConfigCtrl { ...@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment