mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
added this:any to functions and changed functions to arrowfunctions
This commit is contained in:
@@ -140,15 +140,12 @@ export class DashboardMigrator {
|
||||
}
|
||||
|
||||
// ensure query refIds
|
||||
panelUpgrades.push(function(panel) {
|
||||
_.each(
|
||||
panel.targets,
|
||||
function(target) {
|
||||
if (!target.refId) {
|
||||
target.refId = this.dashboard.getNextQueryLetter(panel);
|
||||
}
|
||||
}.bind(this)
|
||||
);
|
||||
panelUpgrades.push(panel => {
|
||||
_.each(panel.targets, target => {
|
||||
if (!target.refId) {
|
||||
target.refId = this.dashboard.getNextQueryLetter(panel);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import angular from 'angular';
|
||||
import { ChangeTracker } from './change_tracker';
|
||||
|
||||
/** @ngInject */
|
||||
export function unsavedChangesSrv($rootScope, $q, $location, $timeout, contextSrv, dashboardSrv, $window) {
|
||||
export function unsavedChangesSrv(this: any, $rootScope, $q, $location, $timeout, contextSrv, dashboardSrv, $window) {
|
||||
this.init = function(dashboard, scope) {
|
||||
this.tracker = new ChangeTracker(dashboard, scope, 1000, $location, $window, $timeout, contextSrv, $rootScope);
|
||||
return this.tracker;
|
||||
|
||||
@@ -3,7 +3,7 @@ import { VariableSrv } from '../variable_srv';
|
||||
import moment from 'moment';
|
||||
import $q from 'q';
|
||||
|
||||
describe('VariableSrv', function() {
|
||||
describe('VariableSrv', function(this: any) {
|
||||
const ctx = <any>{
|
||||
datasourceSrv: {},
|
||||
timeSrv: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import _ from 'lodash';
|
||||
import { VariableSrv } from '../variable_srv';
|
||||
import $q from 'q';
|
||||
|
||||
describe('VariableSrv init', function() {
|
||||
describe('VariableSrv init', function(this: any) {
|
||||
const templateSrv = {
|
||||
init: vars => {
|
||||
this.variables = vars;
|
||||
|
||||
Reference in New Issue
Block a user