Skip to content

Commit

Permalink
Fix problems panel migration when panel options is not opened
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderzobnin committed Jun 10, 2020
1 parent 6a0c5e0 commit 23a759e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/datasource-zabbix/query.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -199,6 +201,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();
}
Expand Down

0 comments on commit 23a759e

Please sign in to comment.