Refactor: move getQueryRunner() to PanelModel (#16679)

* move queryRunner to panelModel
* Added interval back as prop, not used yet
* PanelQueryRunner: Refactoring, added getQueryRunner to PanelModel
* PanelQueryRunner: interpolatel min interval
This commit is contained in:
Ryan McKinley
2019-04-18 14:10:18 -07:00
committed by GitHub
parent 0f1ae76e33
commit 5f474c6328
6 changed files with 175 additions and 34 deletions

View File

@@ -30,7 +30,7 @@ describe('MetricsPanelCtrl', () => {
describe('and has datasource set that supports explore and user does not have access to explore', () => {
it('should not return any items', () => {
const ctrl = setupController({ hasAccessToExplore: false });
ctrl.datasource = { meta: { explore: true } };
ctrl.datasource = { meta: { explore: true } } as any;
expect(ctrl.getAdditionalMenuItems().length).toBe(0);
});
@@ -39,7 +39,7 @@ describe('MetricsPanelCtrl', () => {
describe('and has datasource set that supports explore and user has access to explore', () => {
it('should return one item', () => {
const ctrl = setupController({ hasAccessToExplore: true });
ctrl.datasource = { meta: { explore: true } };
ctrl.datasource = { meta: { explore: true } } as any;
expect(ctrl.getAdditionalMenuItems().length).toBe(1);
});