-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f9a52d
commit 2fc5e20
Showing
4 changed files
with
113 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/Components/TriggerModeEditor/Components/TooltipExpressionHelp/TooltipExpressionHelp.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from "react"; | ||
import { Link } from "@skbkontur/react-ui/components/Link"; | ||
import CodeRef from "../../../CodeRef/CodeRef"; | ||
import classNames from "classnames/bind"; | ||
|
||
import styles from "../../TriggerModeEditor.less"; | ||
|
||
const cn = classNames.bind(styles); | ||
|
||
export const TooltipExpressionHelp = (): React.ReactNode => ( | ||
<div className={cn("expression-help")}> | ||
<div className={cn("main-description")}> | ||
Expression uses{" "} | ||
<Link target="_blank" href="https://github.com/Knetic/govaluate/blob/master/MANUAL.md"> | ||
govaluate | ||
</Link>{" "} | ||
with predefined constants: | ||
</div> | ||
<div> | ||
<CodeRef>t1</CodeRef>, <CodeRef>t2</CodeRef>, ... are values from your targets. | ||
</div> | ||
<div> | ||
<CodeRef>OK</CodeRef>, <CodeRef>WARN</CodeRef>, <CodeRef>ERROR</CodeRef>,{" "} | ||
<CodeRef>NODATA</CodeRef> are states that must be the result of evaluation. | ||
</div> | ||
<div> | ||
<CodeRef>PREV_STATE</CodeRef> is equal to previously set state, and allows you to | ||
prevent frequent state changes. | ||
</div> | ||
|
||
<div className={cn("note")}> | ||
NOTE: Only T1 target can resolve into multiple metrics in Advanced Mode. T2, T3, ... | ||
must resolve to single metrics. | ||
</div> | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters