From cc1e69ace3a02044ea284f21f89536af0f102e9a Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 17 Oct 2017 11:50:33 +0900 Subject: [PATCH 1/4] remove extra state push --- public/app/plugins/datasource/prometheus/mode-prometheus.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/mode-prometheus.js b/public/app/plugins/datasource/prometheus/mode-prometheus.js index 165c1a364c4..1e93f8c9a60 100644 --- a/public/app/plugins/datasource/prometheus/mode-prometheus.js +++ b/public/app/plugins/datasource/prometheus/mode-prometheus.js @@ -75,8 +75,7 @@ var PrometheusHighlightRules = function() { regex : '"[^"]*"|\'[^\']*\'' }, { token : "punctuation.operator", - regex : ",", - push : 'start-label-matcher' + regex : "," }, { token : "paren.rparen", regex : "}", From 8580b78ce6818ef28f8943f0375490a76a8d391d Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 17 Oct 2017 12:19:42 +0900 Subject: [PATCH 2/4] remove label match operator from keyword.operator --- public/app/plugins/datasource/prometheus/mode-prometheus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/prometheus/mode-prometheus.js b/public/app/plugins/datasource/prometheus/mode-prometheus.js index 1e93f8c9a60..094faf40f85 100644 --- a/public/app/plugins/datasource/prometheus/mode-prometheus.js +++ b/public/app/plugins/datasource/prometheus/mode-prometheus.js @@ -46,7 +46,7 @@ var PrometheusHighlightRules = function() { regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", - regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~" + regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>" }, { token : "paren.lparen", regex : "[[(]" From c51f84a12e838ad7094e9ced0e070f90bce08d24 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 17 Oct 2017 12:19:56 +0900 Subject: [PATCH 3/4] remove label match operator from keyword.operator --- public/app/plugins/datasource/prometheus/mode-prometheus.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/plugins/datasource/prometheus/mode-prometheus.js b/public/app/plugins/datasource/prometheus/mode-prometheus.js index 094faf40f85..bc28ebce87b 100644 --- a/public/app/plugins/datasource/prometheus/mode-prometheus.js +++ b/public/app/plugins/datasource/prometheus/mode-prometheus.js @@ -46,7 +46,7 @@ var PrometheusHighlightRules = function() { regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }, { token : "keyword.operator", - regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>" + regex : "\\+|\\-|\\*|\\/|%|\\^|==|!=|<=|>=|<|>" }, { token : "paren.lparen", regex : "[[(]" From c4c64365f1dca7400bd76564258dad93341f4256 Mon Sep 17 00:00:00 2001 From: Mitsuhiro Tanda Date: Tue, 17 Oct 2017 12:24:29 +0900 Subject: [PATCH 4/4] remove duplicative prometheus function --- public/app/plugins/datasource/prometheus/mode-prometheus.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/public/app/plugins/datasource/prometheus/mode-prometheus.js b/public/app/plugins/datasource/prometheus/mode-prometheus.js index bc28ebce87b..49d63070d70 100644 --- a/public/app/plugins/datasource/prometheus/mode-prometheus.js +++ b/public/app/plugins/datasource/prometheus/mode-prometheus.js @@ -111,11 +111,6 @@ var keyWordsCompletions = prometheusKeyWords.map(function(word) { }); var prometheusFunctions = [ - { - name: 'abs()', value: 'abs', - def: 'abs(v instant-vector)', - docText: 'Returns the input vector with all sample values converted to their absolute value.' - }, { name: 'abs()', value: 'abs', def: 'abs(v instant-vector)',