fix(ui): add @cluster filter to the Help section

This commit is contained in:
Łukasz Mierzwa
2020-06-12 10:59:24 +01:00
committed by Łukasz Mierzwa
parent f83c2c4743
commit cf6f14cda9
2 changed files with 86 additions and 0 deletions

View File

@@ -172,6 +172,25 @@ const Help = ({ defaultIsOpen }) => (
</FilterExample>
</QueryHelp>
<QueryHelp
title="Match alerts based on the Alertmanager cluster name"
operators={["=", "!=", "=~", "!~"]}
>
<FilterExample example="@cluster=production">
Match alerts collected from Alertmanager instances that are
members of the <code>prod</code> cluster.
</FilterExample>
<FilterExample example="@cluster!=staging">
Match alerts collected from Alertmanager instances that are not
members of the <code>staging</code> cluster.
</FilterExample>
<FilterExample example="@cluster=~prod">
Match alerts collected from Alertmanager instances that are
members of any cluster with name matching regular expression{" "}
<code>/.*prod.*/</code>.
</FilterExample>
</QueryHelp>
<QueryHelp
title="Match alerts based on the receiver name"
operators={["=", "!=", "=~", "!~"]}

View File

@@ -426,6 +426,73 @@ exports[`<Help /> matches snapshot 1`] = `
</li>
</ul>
</dd>
<dt>
Match alerts based on the Alertmanager cluster name
</dt>
<dd class=\\"mb-5\\">
<div>
Supported operators:
<kbd class=\\"mr-1\\">
=
</kbd>
<kbd class=\\"mr-1\\">
!=
</kbd>
<kbd class=\\"mr-1\\">
=~
</kbd>
<kbd class=\\"mr-1\\">
!~
</kbd>
</div>
<div>
Examples:
</div>
<ul>
<li>
<div>
<span class=\\"badge badge-info\\">
@cluster=production
</span>
</div>
<div>
Match alerts collected from Alertmanager instances that are members of the
<code>
prod
</code>
cluster.
</div>
</li>
<li>
<div>
<span class=\\"badge badge-info\\">
@cluster!=staging
</span>
</div>
<div>
Match alerts collected from Alertmanager instances that are not members of the
<code>
staging
</code>
cluster.
</div>
</li>
<li>
<div>
<span class=\\"badge badge-info\\">
@cluster=~prod
</span>
</div>
<div>
Match alerts collected from Alertmanager instances that are members of any cluster with name matching regular expression
<code>
/.*prod.*/
</code>
.
</div>
</li>
</ul>
</dd>
<dt>
Match alerts based on the receiver name
</dt>