import type { FC, ReactNode } from "react";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons/faInfoCircle";
import { Accordion, AccordionItem } from "Components/Accordion";
const FilterOperatorHelp: FC<{
operator: string;
description: string;
}> = ({ operator, description, children }) => (
<>
{operator} {description}
Example:{" "}
key
{operator}
value
{children}
>
);
const QueryHelp: FC<{
title: string;
operators: string[];
warning?: ReactNode;
}> = ({ title, operators, warning, children }) => (
<>
{title}
Supported operators:{" "}
{operators.map((op) => (
{op}
))}
{warning ? (
{warning}
) : null}
Examples:
>
);
const FilterExample: FC<{
example: string;
}> = ({ example, children }) => (
{example}
{children}
);
const Help: FC<{ defaultIsOpen: boolean }> = ({ defaultIsOpen }) => (
True if compared alert attribute value is equal to{" "}
value.
True if compared alert attribute is missing or have a value that is
not equal to value.
True if compared alert attribute value matches value{" "}
regex.
False if compared alert attribute value matches value{" "}
regex.
True if compared alert attribute value is greater than{" "}
value.
True if compared alert attribue value is less than{" "}
value.
}
defaultIsOpen={true}
/>
", "<"]}
>
Match alerts with label alertname equal to{" "}
UnableToPing.
Match alerts with label hostname equal to{" "}
localhost.
Match alerts with label service missing or not equal
to apache3.
Match alerts with label service matching regular
expression /.*apache.*/.
Match alerts without any value for label service.
Match alerts with label service matching regular
expression /.*apache[1-3].*/.
Match alerts with label priority value{" "}
> than 4. Value will be casted to
integer if possible, string comparision will be used as fallback.
}
defaultIsOpen={defaultIsOpen}
/>
Match alerts collected from Alertmanager instance named{" "}
prod.
Match alerts collected from Alertmanager instances except for the
one named dev.
Match alerts collected from Alertmanager instances with names
matching regular expression /.*prod.*/.
Match alerts collected from Alertmanager instances that are
members of the prod cluster.
Match alerts collected from Alertmanager instances that are not
members of the staging cluster.
Match alerts collected from Alertmanager instances that are
members of any cluster with name matching regular expression{" "}
/.*prod.*/.
Match alerts sent to the default receiver.
Match alerts not sent to the hipchat receiver.
Match alerts sent to any receiver with name matching regular
expression /.*email.*/.
Match only active alerts.
Match alerts that are not active, only suppressed and unprocessed
will be matched.
Match only suppressed alerts.
Match only unprocessed alerts.
Match only alert with fingerprint 123456789.
Match all alerts except the one with fingerprint{" "}
123456789.
Match alerts suppressed by silence abc123456789.
Match alerts suppressed by any silence except{" "}
abc123456789.
Match alerts silenced by me@example.com.
Match alerts silenced by everyone except{" "}
foo@example.com.
Match alerts silenced by author matching regular expression{" "}
/.*@example.com.*/.
Match silenced alerts where detected ticket ID is equal to{" "}
PROJECT-123.
Match silenced alerts where detected ticket ID is different than{" "}
PROJECT-123.
Match silenced alerts where detected ticket ID matches regular
expression /.*PROJECT.*/.
Limit number of displayed alerts to 10.
", "<"]}
>
Match alerts older than 15 minutes.
Match alerts older than 1 hour.
Match alerts more recent than 10 hours and 30 minutes.
}
defaultIsOpen={defaultIsOpen}
/>
);
export { Help };