Commit dd902d5a by Torkel Ödegaard

integrated parser into graphite target editor

parent 042e2a20
define([ define([
'./lexer' './lexer'
], function (Lexer) { ], function (Lexer) {
'use strict';
var NodeTypes = { var NodeTypes = {
MetricExpression: 1, MetricExpression: 1,
...@@ -47,7 +48,7 @@ define([ ...@@ -47,7 +48,7 @@ define([
type: 'segment', type: 'segment',
value: this.tokens[this.index].value value: this.tokens[this.index].value
}] }]
} };
this.index++; this.index++;
...@@ -59,7 +60,7 @@ define([ ...@@ -59,7 +60,7 @@ define([
return null; return null;
} }
node.segments = node.segments.concat(rest.segments) node.segments = node.segments.concat(rest.segments);
} }
return node; return node;
...@@ -117,7 +118,7 @@ define([ ...@@ -117,7 +118,7 @@ define([
return { return {
type: 'number', type: 'number',
value: parseInt(this.tokens[this.index-1].value) value: parseInt(this.tokens[this.index-1].value, 10)
}; };
}, },
...@@ -151,7 +152,7 @@ define([ ...@@ -151,7 +152,7 @@ define([
match: function(token1, token2) { match: function(token1, token2) {
return this.matchToken(token1, 0) && return this.matchToken(token1, 0) &&
(!token2 || this.matchToken(token2, 1)) (!token2 || this.matchToken(token2, 1));
}, },
}; };
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -147,6 +147,10 @@ ...@@ -147,6 +147,10 @@
} }
.grafana-target-func-panel { .grafana-target-func-panel {
background: #202020;
border-top: 1px solid black;
border-bottom: 1px solid black;
ul { ul {
list-style: none; list-style: none;
margin: 0; margin: 0;
......
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