mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
PanelEditor: Fixed issue with PanelModel change plugin type (#23949)
This commit is contained in:
@@ -214,10 +214,15 @@ describe('PanelModel', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
model.editSourceId = 1001;
|
||||||
model.changePlugin(newPlugin);
|
model.changePlugin(newPlugin);
|
||||||
model.alert = { id: 2 };
|
model.alert = { id: 2 };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should keep editSourceId', () => {
|
||||||
|
expect(model.editSourceId).toBe(1001);
|
||||||
|
});
|
||||||
|
|
||||||
it('should apply next panel option defaults', () => {
|
it('should apply next panel option defaults', () => {
|
||||||
expect(model.getOptions().showThresholdLabels).toBeFalsy();
|
expect(model.getOptions().showThresholdLabels).toBeFalsy();
|
||||||
expect(model.getOptions().showThresholds).toBeUndefined();
|
expect(model.getOptions().showThresholds).toBeUndefined();
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ const mustKeepProps: { [str: string]: boolean } = {
|
|||||||
queryRunner: true,
|
queryRunner: true,
|
||||||
transformations: true,
|
transformations: true,
|
||||||
fieldConfig: true,
|
fieldConfig: true,
|
||||||
|
editSourceId: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
const defaults: any = {
|
const defaults: any = {
|
||||||
|
|||||||
Reference in New Issue
Block a user