mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
Fixed opentsdb templating bug (#7208)
This commit is contained in:
parent
6518a0f765
commit
7e3ccdf983
@ -150,6 +150,11 @@ describe('templateSrv', function() {
|
||||
expect(result).to.be('test,build=test2');
|
||||
});
|
||||
|
||||
it('multi value and distributed should render when not string', function() {
|
||||
var result = _templateSrv.formatValue(['test'], 'distributed', { name: 'build' });
|
||||
expect(result).to.be('test');
|
||||
});
|
||||
|
||||
it('slash should be properly escaped in regex format', function() {
|
||||
var result = _templateSrv.formatValue('Gi3/14', 'regex');
|
||||
expect(result).to.be('Gi3\\/14');
|
||||
|
@ -97,6 +97,9 @@ function (angular, _, kbn) {
|
||||
return value.join('|');
|
||||
}
|
||||
case "distributed": {
|
||||
if (typeof value === 'string') {
|
||||
return value;
|
||||
}
|
||||
return this.distributeVariable(value, variable.name);
|
||||
}
|
||||
default: {
|
||||
|
Loading…
Reference in New Issue
Block a user