Fix problems panel migration when panel options is not opened

This commit is contained in:
Alexander Zobnin
2020-06-10 12:07:00 +03:00
parent 46c92ced92
commit 00f9c25a79

View File

@@ -5,6 +5,8 @@ import * as utils from './utils';
import * as metricFunctions from './metricFunctions';
import * as migrations from './migrations';
import { ShowProblemTypes } from './types';
import { CURRENT_SCHEMA_VERSION } from '../panel-triggers/migrations';
function getTargetDefaults() {
return {
@@ -225,6 +227,11 @@ export class ZabbixQueryController extends QueryCtrl {
}
};
// Update panel schema version to prevent unnecessary migrations
if (this.panel.type === c.ZABBIX_PROBLEMS_PANEL_ID) {
this.panel.schemaVersion = CURRENT_SCHEMA_VERSION;
}
this.init();
this.queryOptionsText = this.renderQueryOptionsText();
}