Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Prettify button on view metrics page changes query #1062

Open
davidarcher opened this issue Aug 15, 2019 · 1 comment
Open

Prettify button on view metrics page changes query #1062

davidarcher opened this issue Aug 15, 2019 · 1 comment

Comments

@davidarcher
Copy link

REPRO STEPS:

  1. Navigate to the Argus viewmetrics page
  2. Paste in the following to the text input box
GROUPBY(-15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg, #(someRegexForGrouping)#, #SUM#)
  1. Click the Prettify button

EXPECTED:
The query entered should be formatted without changing the actual text of the query

GROUPBY(
  -15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg,
  #(someRegexForGrouping)#,
  #SUM#
)

ACTUAL:
The prettified version of the query has an extra comma between the closing parenthesis of the regex field and the # symbol.

GROUPBY(
  -15m:-2m:foo.bar.-.-:some.metric.*.here{tag=baz}:avg:3m-avg,#(
    someRegexForGrouping
  ),
  #,#SUM#
)
@prestonfff
Copy link
Contributor

Yes, this happens when parentheses are included in regex. Let me confirm with my team if regex in expression supports characters like brackets or commas.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants