From be8ec241063e43a880abcd292e177aa00316ea25 Mon Sep 17 00:00:00 2001 From: simnv Date: Tue, 15 Mar 2016 16:05:32 +0500 Subject: [PATCH 1/3] Slash escape regex Slash symbol "/" wasn't escaped when we chose variable from template dropdown, so we couldn't choose interface names like Gi9/10 when querying from influxdb. --- public/app/features/templating/templateSrv.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/templating/templateSrv.js b/public/app/features/templating/templateSrv.js index ece69302196..98103f5259f 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) { From dd5b4a25d1b35809882132d1a28443936c45618c Mon Sep 17 00:00:00 2001 From: simnv Date: Sun, 20 Mar 2016 00:13:48 +0600 Subject: [PATCH 2/3] Slash escaping test --- public/test/specs/templateSrv-specs.js | 5 +++++ 1 file changed, 5 insertions(+) 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() { From 273311eed2ee431feb4f01f453507c764687e950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sun, 20 Mar 2016 17:33:30 +0100 Subject: [PATCH 3/3] ux(graph styles tab): updated forms in graph styles tab --- .../app/plugins/panel/graph/styleEditor.html | 177 ++++++++++-------- 1 file changed, 99 insertions(+), 78 deletions(-) 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}} + +
    • - -
    -
    -
    -
    + +
+
+
+
- -
+ +