Переглянути джерело

Merge branch 'master' of github.com:grafana/grafana

Torkel Ödegaard 8 роки тому
батько
коміт
ebdd35d799
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      public/app/features/templating/interval_variable.ts

+ 3 - 2
public/app/features/templating/interval_variable.ts

@@ -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()};
     });