diff --git a/public/app/features/templating/partials/editor.html b/public/app/features/templating/partials/editor.html
index 78132a1d04a..442ee0c9f2a 100644
--- a/public/app/features/templating/partials/editor.html
+++ b/public/app/features/templating/partials/editor.html
@@ -12,7 +12,7 @@
- {{current.name}}
+ Edit
@@ -108,35 +108,35 @@
Value Options
-
- All value
-
-
-
Update
@@ -165,13 +160,19 @@
diff --git a/public/app/features/templating/templateSrv.js b/public/app/features/templating/templateSrv.js
index 011b3150e2f..0df887ca483 100644
--- a/public/app/features/templating/templateSrv.js
+++ b/public/app/features/templating/templateSrv.js
@@ -107,7 +107,11 @@ function (angular, _) {
if (variable.allValue) {
return variable.allValue;
}
- return _.pluck(variable.options, 'value');
+ var values = [];
+ for (var i = 1; i < variable.options.length; i++) {
+ values.push(variable.options[i].value);
+ }
+ return values;
};
this.replace = function(target, scopedVars, format) {
diff --git a/public/app/plugins/datasource/opentsdb/datasource.js b/public/app/plugins/datasource/opentsdb/datasource.js
index 14605151752..e9662f8f289 100644
--- a/public/app/plugins/datasource/opentsdb/datasource.js
+++ b/public/app/plugins/datasource/opentsdb/datasource.js
@@ -335,7 +335,7 @@ function (angular, _, dateMath) {
query.tags = angular.copy(target.tags);
if(query.tags){
for(var key in query.tags){
- query.tags[key] = templateSrv.replace(query.tags[key], options.scopedVars);
+ query.tags[key] = templateSrv.replace(query.tags[key], options.scopedVars, 'pipe');
}
}
}
@@ -355,7 +355,7 @@ function (angular, _, dateMath) {
} else {
return target.metric === metricData.metric &&
_.all(target.tags, function(tagV, tagK) {
- interpolatedTagValue = templateSrv.replace(tagV, options.scopedVars);
+ interpolatedTagValue = templateSrv.replace(tagV, options.scopedVars, 'pipe');
return metricData.tags[tagK] === interpolatedTagValue || interpolatedTagValue === "*";
});
}
diff --git a/public/test/specs/templateSrv-specs.js b/public/test/specs/templateSrv-specs.js
index d48cd04e7bf..65bd3f088ef 100644
--- a/public/test/specs/templateSrv-specs.js
+++ b/public/test/specs/templateSrv-specs.js
@@ -72,7 +72,7 @@ define([
name: 'test',
current: {value: '$__all' },
options: [
- {value: 'value1'}, {value: 'value2'}
+ {value: '$__all'}, {value: 'value1'}, {value: 'value2'}
]
}]);
});