Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added matcher syntax support for Routing tree editor. (prometheus#2065)
* Added feature for matcher syntax to Visual Editor. (prometheus#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 <[email protected]> * Added feature for matcher syntax to Visual Editor. (prometheus#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 <[email protected]> * Added feature for matcher syntax to Visual Editor. (prometheus#1638) * fix: there could be zero or one heading\trailing spaces around selector Signed-off-by: Alex Antipin <[email protected]> * Added feature for matcher syntax to Visual Editor. (prometheus#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 <[email protected]>
- Loading branch information