diff --git a/public/app/features/templating/templateSrv.js b/public/app/features/templating/templateSrv.js index 0aa0990896c..26dc77d36a9 100644 --- a/public/app/features/templating/templateSrv.js +++ b/public/app/features/templating/templateSrv.js @@ -35,7 +35,7 @@ function (angular, _) { }; function regexEscape(value) { - return value.replace(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + return value.replace(/[\\^$*+?.()|[\]{}\/]/g, '\\$&'); } function luceneEscape(value) { diff --git a/public/app/plugins/panel/graph/styleEditor.html b/public/app/plugins/panel/graph/styleEditor.html index b730b1d397a..465e8d4894e 100644 --- a/public/app/plugins/panel/graph/styleEditor.html +++ b/public/app/plugins/panel/graph/styleEditor.html @@ -1,102 +1,123 @@
-
Chart Options
- - - -
- -
-
Line options
-
- - +
Draw Modes
+
+ +
-
- - +
+ +
-
- - +
+ +
-
- - -
- -
-
Multiple Series
- - - -
- -
-
Rendering
-
- - +
Mode Options
+
+ +
+ +
-
- - +
+ +
+ +
+
+
+ +
+ +
+
+
+ + +
+
+
+
Misc options
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
-
Tooltip
- - -
- - +
Multiple Series
+
+ + +
+
+ + +
+
+ +
+ +
+
-
-
Series specific overrides Regex match example: /server[0-3]/i
-
-
-
    -
  • - -
  • +
    Series specific overrides Regex match example: /server[0-3]/i
    +
    +
    +
      +
    • + +
    • -
    • - alias or regex -
    • +
    • + alias or regex +
    • -
    • - -
    • +
    • + +
    • -
    • - - - Color: - - - {{option.name}}: {{option.value}} - -
    • +
    • + + + Color: + + + {{option.name}}: {{option.value}} + +
    • - -
    -
    -
    -
    + +
+
+
+
- -
+ +
diff --git a/public/test/specs/templateSrv-specs.js b/public/test/specs/templateSrv-specs.js index 65bd3f088ef..4948e1272ce 100644 --- a/public/test/specs/templateSrv-specs.js +++ b/public/test/specs/templateSrv-specs.js @@ -135,6 +135,11 @@ define([ expect(result).to.be('test|test2'); }); + it('slash should be properly escaped in regex format', function() { + var result = _templateSrv.formatValue('Gi3/14', 'regex'); + expect(result).to.be('Gi3\\/14'); + }); + }); describe('can check if variable exists', function() {