Added matcher syntax support for Routing tree editor. (#2065)
Added matcher syntax support for Routing tree editor. (#2065)

* Added feature for matcher syntax to Visual Editor. (#1638)

* feat: Added matcher syntax support for Alertmanager visual editor. First four examples from here https://prometheus.io/docs/alerting/latest/configuration/#matcher should be fine. The last one has an issue, escaped quotes make regexp test fail.

Signed-off-by: Alex Antipin <418672539f7bb54c2fb889ff133c844276aa0cf5@gmail.com>

* Added feature for matcher syntax to Visual Editor. (#1638)

* fix: parseSearch method behave incorrect for matchers syntax:
It's intended to split string to label\value pairs, but it would split values also if comma is present there. It is legitimate to have comma in values according to matcher value rules listed here https://prometheus.io/docs/alerting/latest/configuration/#matcher
Also it couldn't handle strings properly by ignoring escaped quotes that is produced after new syntax parsing.

Signed-off-by: Alex Antipin <418672539f7bb54c2fb889ff133c844276aa0cf5@gmail.com>

* Added feature for matcher syntax to Visual Editor. (#1638)

* fix: there could be zero or one heading\trailing spaces around selector

Signed-off-by: Alex Antipin <418672539f7bb54c2fb889ff133c844276aa0cf5@gmail.com>

* Added feature for matcher syntax to Visual Editor. (#1638)

* add: Matcher enum-like object holding relevant PromQL matcher operators
* add: matchNewSyntax method to check equality for values using Matcher operator
* fix: negative matchers should not be considered as Regexp

Signed-off-by: Alex Antipin <418672539f7bb54c2fb889ff133c844276aa0cf5@gmail.com>
prometheus/docs,prometheus/docs,prometheus/docs