Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions sdcclient/monitor/dashboard_converters/_dashboard_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def convert_scope_string_to_expression(scope = None):
;

word =
| /[\w\.]+/
| '"' /[\w\.]+/ '"'
| "'" /[\w\.]+/ "'"
| /[a-zA-Z0-9-_\-\.]+/
| '"' /[a-zA-Z0-9-_\-\.]+/ '"'
| "'" /[a-zA-Z0-9-_\-\.]+/ "'"
;
"""

Expand Down
6 changes: 3 additions & 3 deletions specs/monitor/dashboard_converters/dashboard_scope_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
"value": ["foo"]
}]]))

with it('parses correctly: cluster.id-number = "foo"'):
param = 'cluster.id-number = "foo"'
with it('parses correctly: cluster.id-number = "foo-bar"'):
param = 'cluster.id-number = "foo-bar"'
res = convert_scope_string_to_expression(param)
expect(res).to(equal([True, [{
"displayName": "",
"isVariable": False,
"operand": "cluster.id-number",
"operator": "equals",
"value": ["foo"]
"value": ["foo-bar"]
}]]))

with it("parses correctly: agent.id = 'foo'"):
Expand Down