typescript: updated tslint and fixed new warnings

This commit is contained in:
Torkel Ödegaard
2017-04-20 11:16:37 +02:00
parent 98266bd95a
commit f1276774a0
34 changed files with 107 additions and 308 deletions

View File

@@ -69,7 +69,7 @@ export class AnnotationsEditorCtrl {
this.reset();
this.mode = 'list';
this.$scope.broadcastRefresh();
};
}
add() {
this.annotations.push(this.currentAnnotation);
@@ -77,7 +77,7 @@ export class AnnotationsEditorCtrl {
this.mode = 'list';
this.$scope.broadcastRefresh();
this.$scope.dashboard.updateSubmenuVisibility();
};
}
removeAnnotation(annotation) {
var index = _.indexOf(this.annotations, annotation);

View File

@@ -216,7 +216,6 @@ coreModule.directive('panelDropZone', function($timeout) {
}
if (indrag === true) {
var dropZoneSpan = 12 - row.span;
if (dropZoneSpan > 1) {
return showPanel(dropZoneSpan, 'Drop Here');
}

View File

@@ -60,7 +60,7 @@ class TimeSrv {
if (_.isString(this.time.to) && this.time.to.indexOf('Z') >= 0) {
this.time.to = moment(this.time.to).utc();
}
};
}
private parseUrlParam(value) {
if (value.indexOf('now') !== -1) {
@@ -92,7 +92,7 @@ class TimeSrv {
if (params.refresh) {
this.refresh = params.refresh || this.refresh;
}
};
}
private routeUpdated() {
var params = this.$location.search();
@@ -154,7 +154,7 @@ class TimeSrv {
private cancelNextRefresh() {
this.timer.cancel(this.refreshTimer);
};
}
setTime(time, fromRouteUpdate?) {
_.extend(this.time, time);

View File

@@ -136,7 +136,7 @@ class MetricsPanelCtrl extends PanelCtrl {
this.calculateInterval();
return this.datasource;
};
}
calculateInterval() {
var intervalOverride = this.panel.interval;
@@ -194,7 +194,7 @@ class MetricsPanelCtrl extends PanelCtrl {
if (this.panel.hideTimeOverride) {
this.timeInfo = '';
}
};
}
issueQueries(datasource) {
this.datasource = datasource;

View File

@@ -74,7 +74,7 @@ export class PlaylistEditCtrl {
return playlistItem === listedPlaylistItem;
});
this.filterFoundPlaylistItems();
};
}
savePlaylist(playlist, playlistItems) {
var savePromise;

View File

@@ -154,7 +154,7 @@ export class DataSourceEditCtrl {
this.$location.path('datasources/edit/' + result.id);
});
}
};
}
confirmDelete() {
this.backendSrv.delete('/api/datasources/' + this.current.id).then(() => {

View File

@@ -17,4 +17,4 @@ export {
CustomVariable,
ConstantVariable,
AdhocVariable,
}
};