Commit e8141b48 by Carl Bergquist Committed by GitHub

Merge pull request #9555 from mtanda/prometheus_46_improve_minor_fix

(prometheus) minor fix of auto complete
parents b3a8d93d c4c64365
...@@ -46,7 +46,7 @@ var PrometheusHighlightRules = function() { ...@@ -46,7 +46,7 @@ var PrometheusHighlightRules = function() {
regex : "[a-zA-Z_:][a-zA-Z0-9_:]*" regex : "[a-zA-Z_:][a-zA-Z0-9_:]*"
}, { }, {
token : "keyword.operator", token : "keyword.operator",
regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~" regex : "\\+|\\-|\\*|\\/|%|\\^|==|!=|<=|>=|<|>"
}, { }, {
token : "paren.lparen", token : "paren.lparen",
regex : "[[(]" regex : "[[(]"
...@@ -75,8 +75,7 @@ var PrometheusHighlightRules = function() { ...@@ -75,8 +75,7 @@ var PrometheusHighlightRules = function() {
regex : '"[^"]*"|\'[^\']*\'' regex : '"[^"]*"|\'[^\']*\''
}, { }, {
token : "punctuation.operator", token : "punctuation.operator",
regex : ",", regex : ","
push : 'start-label-matcher'
}, { }, {
token : "paren.rparen", token : "paren.rparen",
regex : "}", regex : "}",
...@@ -118,11 +117,6 @@ var prometheusFunctions = [ ...@@ -118,11 +117,6 @@ var prometheusFunctions = [
docText: 'Returns the input vector with all sample values converted to their absolute value.' docText: 'Returns the input vector with all sample values converted to their absolute value.'
}, },
{ {
name: 'abs()', value: 'abs',
def: 'abs(v instant-vector)',
docText: 'Returns the input vector with all sample values converted to their absolute value.'
},
{
name: 'absent()', value: 'absent', name: 'absent()', value: 'absent',
def: 'absent(v instant-vector)', def: 'absent(v instant-vector)',
docText: 'Returns an empty vector if the vector passed to it has any elements and a 1-element vector with the value 1 if the vector passed to it has no elements. This is useful for alerting on when no time series exist for a given metric name and label combination.' docText: 'Returns an empty vector if the vector passed to it has any elements and a 1-element vector with the value 1 if the vector passed to it has no elements. This is useful for alerting on when no time series exist for a given metric name and label combination.'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment