mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
This improvement allows to wrap an "expression" when using single or double quotes. So now you can have time interval with offset for influxdb.
This commit is contained in:
parent
6af62abd41
commit
31866b5e57
@ -59,8 +59,9 @@ export class IntervalVariable implements Variable {
|
||||
}
|
||||
|
||||
updateOptions() {
|
||||
// extract options in comma separated string
|
||||
this.options = _.map(this.query.split(/[,]+/), function(text) {
|
||||
// extract options between quotes and/or comma
|
||||
this.options = _.map(this.query.match(/(["'])(.*?)\1|\w+/g), function(text) {
|
||||
text = text.replace(/["']+/g, '');
|
||||
return {text: text.trim(), value: text.trim()};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user