diff --git a/ui/src/Components/MainModal/Help.js b/ui/src/Components/MainModal/Help.js index 8c7e1618f..5f71d5dba 100644 --- a/ui/src/Components/MainModal/Help.js +++ b/ui/src/Components/MainModal/Help.js @@ -1,6 +1,9 @@ import React from "react"; import PropTypes from "prop-types"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faInfoCircle } from "@fortawesome/free-solid-svg-icons/faInfoCircle"; + import { Accordion } from "Components/Accordion"; const FilterOperatorHelp = ({ operator, description, children }) => ( @@ -23,11 +26,10 @@ const FilterOperatorHelp = ({ operator, description, children }) => ( ); FilterOperatorHelp.propTypes = { operator: PropTypes.string.isRequired, - description: PropTypes.string.isRequired, - children: PropTypes.array + description: PropTypes.string.isRequired }; -const QueryHelp = ({ title, operators, children }) => ( +const QueryHelp = ({ title, operators, warning, children }) => (
{title}
@@ -39,6 +41,12 @@ const QueryHelp = ({ title, operators, children }) => ( ))} + {warning ? ( +
+ + {warning} +
+ ) : null}
Examples:
@@ -47,7 +55,7 @@ const QueryHelp = ({ title, operators, children }) => ( QueryHelp.propTypes = { title: PropTypes.string.isRequired, operators: PropTypes.arrayOf(PropTypes.string).isRequired, - children: PropTypes.array + warning: PropTypes.node }; const FilterExample = ({ example, children }) => ( @@ -231,11 +239,9 @@ const Help = () => ( -
- This is supported only if JIRA regexp are enabled and able to - match JIRA ids in the silence comment body. -
Match silenced alerts where detected JIRA issue id is equal to{" "} PROJECT-123. @@ -250,8 +256,11 @@ const Help = () => (
- -
Value must be a number >= 1.
+ Limit number of displayed alerts to 10. diff --git a/ui/src/Components/MainModal/__snapshots__/Help.test.js.snap b/ui/src/Components/MainModal/__snapshots__/Help.test.js.snap index 95733eb9e..2c212cb10 100644 --- a/ui/src/Components/MainModal/__snapshots__/Help.test.js.snap +++ b/ui/src/Components/MainModal/__snapshots__/Help.test.js.snap @@ -685,13 +685,27 @@ exports[` matches snapshot 1`] = ` !~ +
+ + + + + This is supported only if JIRA regexp are enabled and able to match JIRA ids in the silence comment body. +
Examples:
    -
    - This is supported only if JIRA regexp are enabled and able to match JIRA ids in the silence comment body. -
  • @@ -746,13 +760,27 @@ exports[` matches snapshot 1`] = ` =
    +
    + + + + + Value must be a number >= 1. +
    Examples:
      -
      - Value must be a number >= 1. -