Commit 17517703 by Hugo Häggmark Committed by GitHub

Fix: Fixes templateSrv is undefined for plugins that do not use @@ngInject (#20696)

Fixes #20662
parent 29d27fba
import _ from 'lodash';
import { sanitize, escapeHtml } from 'app/core/utils/text';
import { escapeHtml, sanitize } from 'app/core/utils/text';
import config from 'app/core/config';
import { profiler } from 'app/core/core';
import { Emitter } from 'app/core/core';
import { Emitter, profiler } from 'app/core/core';
import getFactors from 'app/core/utils/factors';
import {
duplicatePanel,
removePanel,
calculateInnerPanelHeight,
copyPanel as copyPanelUtil,
duplicatePanel,
editPanelJson as editPanelJsonUtil,
removePanel,
sharePanel as sharePanelUtil,
calculateInnerPanelHeight,
} from 'app/features/dashboard/utils/panel';
import { GRID_COLUMN_COUNT } from 'app/core/constants';
import { auto } from 'angular';
import { TemplateSrv } from '../templating/template_srv';
import { getPanelLinksSupplier } from './panellinks/linkSuppliers';
import { renderMarkdown, AppEvent, PanelEvents, PanelPluginMeta } from '@grafana/data';
import { AppEvent, PanelEvents, PanelPluginMeta, renderMarkdown } from '@grafana/data';
import { getLocationSrv } from '@grafana/runtime';
export class PanelCtrl {
......@@ -39,7 +38,6 @@ export class PanelCtrl {
timing: any;
maxPanelsPerRowOptions: number[];
/** @ngInject */
constructor($scope: any, $injector: auto.IInjectorService) {
this.$injector = $injector;
this.$location = $injector.get('$location');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment