only call onPanelMigration when the version actually changes (#16186)

* set the plugin version if there is a migration handler
* only call panel migration if the version changes
* set the version after change also
* avoid NPE... check that we have options
* destroy is based on the previous panel type, not the next one
* Panels: Minor refactoring on panel plugin version code, #16186
This commit is contained in:
Ryan McKinley
2019-03-25 06:10:23 -07:00
committed by Torkel Ödegaard
parent a8c50ed6ba
commit e5c8375ec2
7 changed files with 35 additions and 15 deletions

View File

@@ -1,8 +1,6 @@
import React, { PureComponent } from 'react';
import $ from 'jquery';
import { getColorFromHexRgbOrName } from '../../utils';
import { DisplayValue, Threshold, GrafanaThemeType, Themeable } from '../../types';
export interface Props extends Themeable {