mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
committed by
Łukasz Mierzwa
parent
76f860cfe7
commit
9dc175fbd1
@@ -2,6 +2,10 @@
|
||||
|
||||
## [next]
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed regexp escaping for auto-populated silence matchers #3936.
|
||||
|
||||
### Changed
|
||||
|
||||
- Upgraded [Font Awesome](https://fontawesome.com/) icons to 6.0
|
||||
|
||||
@@ -110,7 +110,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "alertnameEqual",
|
||||
value: "alertnameEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -123,7 +123,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "alertnameNotEqual",
|
||||
value: "alertnameNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -136,7 +136,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*alertnameRegex.*",
|
||||
value: ".*alertnameRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -149,7 +149,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*alertnameNegativeRegex.*",
|
||||
value: ".*alertnameNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -162,7 +162,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "clusterEqual",
|
||||
value: "clusterEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -175,7 +175,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "clusterNotEqual",
|
||||
value: "clusterNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -188,7 +188,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*clusterRegex.*",
|
||||
value: ".*clusterRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -201,7 +201,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*clusterNegativeRegex.*",
|
||||
value: ".*clusterNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -214,7 +214,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "fooEqual",
|
||||
value: "fooEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -227,7 +227,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "fooNotEqual",
|
||||
value: "fooNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -240,7 +240,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*fooRegex.*",
|
||||
value: ".*fooRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -253,7 +253,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*fooNegativeRegex.*",
|
||||
value: ".*fooNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -300,7 +300,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "alertnameEqual",
|
||||
value: "alertnameEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -313,7 +313,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "alertnameNotEqual",
|
||||
value: "alertnameNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -326,7 +326,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*alertnameRegex.*",
|
||||
value: ".*alertnameRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -339,7 +339,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*alertnameNegativeRegex.*",
|
||||
value: ".*alertnameNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -352,7 +352,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "clusterEqual",
|
||||
value: "clusterEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -365,7 +365,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "clusterNotEqual",
|
||||
value: "clusterNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -378,7 +378,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*clusterRegex.*",
|
||||
value: ".*clusterRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -391,7 +391,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*clusterNegativeRegex.*",
|
||||
value: ".*clusterNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -404,7 +404,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "fooEqual",
|
||||
value: "fooEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -417,7 +417,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: "fooNotEqual",
|
||||
value: "fooNotEqual",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -430,7 +430,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*fooRegex.*",
|
||||
value: ".*fooRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -443,7 +443,7 @@ describe("<SilenceForm /> matchers", () => {
|
||||
{
|
||||
label: ".*fooNegativeRegex.*",
|
||||
value: ".*fooNegativeRegex.*",
|
||||
wasCreated: false,
|
||||
wasCreated: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -123,11 +123,15 @@ const SilenceForm: FC<{
|
||||
f.matcher === QueryOperators.Regex ||
|
||||
f.matcher === QueryOperators.NegativeRegex
|
||||
) {
|
||||
matcher.values = [StringToOption(`.*${f.value}.*`)];
|
||||
matcher.values = [
|
||||
{ ...StringToOption(`.*${f.value}.*`), wasCreated: true },
|
||||
];
|
||||
matcher.isRegex = true;
|
||||
matcher.isEqual = f.matcher === QueryOperators.Regex;
|
||||
} else {
|
||||
matcher.values = [StringToOption(f.value)];
|
||||
matcher.values = [
|
||||
{ ...StringToOption(f.value), wasCreated: true },
|
||||
];
|
||||
matcher.isEqual = f.matcher === QueryOperators.Equal;
|
||||
}
|
||||
silenceFormStore.data.addMatcherWithID(matcher);
|
||||
|
||||
Reference in New Issue
Block a user