mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
changed var to const 2 (#13068)
* changed var to const * fixed typo created in last commit * added or empty object to options in prometheus/datasource
This commit is contained in:
committed by
Torkel Ödegaard
parent
5e0d0c5816
commit
a702603e7b
@@ -95,7 +95,7 @@ export class DatasourceSrv {
|
||||
}
|
||||
|
||||
getMetricSources(options) {
|
||||
var metricSources = [];
|
||||
const metricSources = [];
|
||||
|
||||
_.each(config.datasources, function(value, key) {
|
||||
if (value.meta && value.meta.metrics) {
|
||||
@@ -137,7 +137,7 @@ export class DatasourceSrv {
|
||||
addDataSourceVariables(list) {
|
||||
// look for data source variables
|
||||
for (var i = 0; i < this.templateSrv.variables.length; i++) {
|
||||
var variable = this.templateSrv.variables[i];
|
||||
const variable = this.templateSrv.variables[i];
|
||||
if (variable.type !== 'datasource') {
|
||||
continue;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ export class DatasourceSrv {
|
||||
first = config.defaultDatasource;
|
||||
}
|
||||
|
||||
var ds = config.datasources[first];
|
||||
const ds = config.datasources[first];
|
||||
|
||||
if (ds) {
|
||||
const key = `$${variable.name}`;
|
||||
|
||||
Reference in New Issue
Block a user