mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
tslint: more const fixes (#13035)
This commit is contained in:
@@ -22,7 +22,7 @@ export class PlaylistEditCtrl {
|
||||
this.isNew = $route.current.params.id;
|
||||
|
||||
if ($route.current.params.id) {
|
||||
var playlistId = $route.current.params.id;
|
||||
const playlistId = $route.current.params.id;
|
||||
|
||||
backendSrv.get('/api/playlists/' + playlistId).then(result => {
|
||||
this.playlist = result;
|
||||
@@ -69,7 +69,7 @@ export class PlaylistEditCtrl {
|
||||
}
|
||||
|
||||
addTagPlaylistItem(tag) {
|
||||
var playlistItem: any = {
|
||||
const playlistItem: any = {
|
||||
value: tag.term,
|
||||
type: 'dashboard_by_tag',
|
||||
order: this.playlistItems.length + 1,
|
||||
@@ -124,8 +124,8 @@ export class PlaylistEditCtrl {
|
||||
}
|
||||
|
||||
movePlaylistItem(playlistItem, offset) {
|
||||
var currentPosition = this.playlistItems.indexOf(playlistItem);
|
||||
var newPosition = currentPosition + offset;
|
||||
const currentPosition = this.playlistItems.indexOf(playlistItem);
|
||||
const newPosition = currentPosition + offset;
|
||||
|
||||
if (newPosition >= 0 && newPosition < this.playlistItems.length) {
|
||||
this.playlistItems.splice(currentPosition, 1);
|
||||
|
||||
@@ -19,7 +19,7 @@ export class PlaylistSearchCtrl {
|
||||
|
||||
searchDashboards() {
|
||||
this.tagsMode = false;
|
||||
var prom: any = {};
|
||||
const prom: any = {};
|
||||
|
||||
prom.promise = this.backendSrv.search(this.query).then(result => {
|
||||
return {
|
||||
@@ -50,7 +50,7 @@ export class PlaylistSearchCtrl {
|
||||
}
|
||||
|
||||
getTags() {
|
||||
var prom: any = {};
|
||||
const prom: any = {};
|
||||
prom.promise = this.backendSrv.get('/api/dashboards/tags').then(result => {
|
||||
return {
|
||||
dashboardResult: [],
|
||||
|
||||
@@ -16,14 +16,14 @@ class PlaylistSrv {
|
||||
next() {
|
||||
this.$timeout.cancel(this.cancelPromise);
|
||||
|
||||
var playedAllDashboards = this.index > this.dashboards.length - 1;
|
||||
const playedAllDashboards = this.index > this.dashboards.length - 1;
|
||||
|
||||
if (playedAllDashboards) {
|
||||
window.location.href = this.getUrlWithKioskMode();
|
||||
return;
|
||||
}
|
||||
|
||||
var dash = this.dashboards[this.index];
|
||||
const dash = this.dashboards[this.index];
|
||||
this.$location.url('dashboard/' + dash.uri);
|
||||
|
||||
this.index++;
|
||||
|
||||
Reference in New Issue
Block a user