mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tech: removing unused variables from typescript files, and making tslint rules more strict
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import coreModule from '../../core/core_module';
|
||||
import config from 'app/core/config';
|
||||
|
||||
export class PlaylistEditCtrl {
|
||||
filteredDashboards: any = [];
|
||||
@@ -21,11 +19,10 @@ export class PlaylistEditCtrl {
|
||||
/** @ngInject */
|
||||
constructor(
|
||||
private $scope,
|
||||
private playlistSrv,
|
||||
private backendSrv,
|
||||
private $location,
|
||||
private $route,
|
||||
private navModelSrv
|
||||
$route,
|
||||
navModelSrv
|
||||
) {
|
||||
|
||||
this.navModel = navModelSrv.getPlaylistsNav(0);
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import config from 'app/core/config';
|
||||
import _ from 'lodash';
|
||||
import $ from 'jquery';
|
||||
import coreModule from '../../core/core_module';
|
||||
|
||||
export class PlaylistSearchCtrl {
|
||||
@@ -13,7 +9,7 @@ export class PlaylistSearchCtrl {
|
||||
searchStarted: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $scope, private $location, private $timeout, private backendSrv, private contextSrv) {
|
||||
constructor($timeout, private backendSrv) {
|
||||
this.query = {query: '', tag: [], starred: false, limit: 30};
|
||||
|
||||
$timeout(() => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import coreModule from '../../core/core_module';
|
||||
import kbn from 'app/core/utils/kbn';
|
||||
import appEvents from 'app/core/app_events';
|
||||
@@ -16,7 +15,6 @@ class PlaylistSrv {
|
||||
|
||||
/** @ngInject */
|
||||
constructor(
|
||||
private $rootScope: any,
|
||||
private $location: any,
|
||||
private $timeout: any,
|
||||
private backendSrv: any,
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
///<reference path="../../headers/common.d.ts" />
|
||||
|
||||
import angular from 'angular';
|
||||
import _ from 'lodash';
|
||||
import coreModule from '../../core/core_module';
|
||||
|
||||
@@ -9,7 +8,7 @@ export class PlaylistsCtrl {
|
||||
navModel: any;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $scope, private $location, private backendSrv, private navModelSrv) {
|
||||
constructor(private $scope, private backendSrv, navModelSrv) {
|
||||
this.navModel = navModelSrv.getPlaylistsNav(0);
|
||||
|
||||
backendSrv.get('/api/playlists').then(result => {
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('PlaylistEditCtrl', () => {
|
||||
getPlaylistsNav: page => {},
|
||||
};
|
||||
|
||||
ctx = new PlaylistEditCtrl(null, null, null, null, { current: { params: {} } }, navModelSrv);
|
||||
ctx = new PlaylistEditCtrl(null, null, null, { current: { params: {} } }, navModelSrv);
|
||||
|
||||
ctx.dashboardresult = [
|
||||
{ id: 2, title: 'dashboard: 2' },
|
||||
|
||||
Reference in New Issue
Block a user