Fixed migration issues.

This commit is contained in:
Alexander Zobnin
2016-03-29 13:50:05 +03:00
parent 3f028c7e2d
commit 7f75abb2d3
3 changed files with 23 additions and 36 deletions

View File

@@ -33,11 +33,12 @@ export class ZabbixQueryController extends QueryCtrl {
this.init = function() {
this.target = migrations.migrate(this.target);
this.templateSrv = templateSrv;
var target = this.target;
// Migrate old targets
target = migrations.migrate(target);
var scopeDefaults = {
metric: {},
oldTarget: _.cloneDeep(this.target)
@@ -69,11 +70,6 @@ export class ZabbixQueryController extends QueryCtrl {
{name: "max", value: "max"}
];
// Set avg by default
if (!target.downsampleFunction) {
target.downsampleFunction = this.downsampleFunctionList[0];
}
this.initFilters();
}
else if (target.mode === 1) {