Fix problems panel migration when panel options is not opened
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user