From ba3a572604679032a0f7535373185d8b8e9344bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Thu, 11 Oct 2018 12:23:22 +0100 Subject: [PATCH] feat(ui): add tooltips to silence matcher counters --- .../SilenceModal/SilenceMatch/MatchCounter.js | 28 +++++++++++++------ .../LabelValueInput.test.js.snap | 15 ++++++---- .../__snapshots__/MatchCounter.test.js.snap | 17 +++++++---- 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/ui/src/Components/SilenceModal/SilenceMatch/MatchCounter.js b/ui/src/Components/SilenceModal/SilenceMatch/MatchCounter.js index 5b3d66974..37ccec5f2 100644 --- a/ui/src/Components/SilenceModal/SilenceMatch/MatchCounter.js +++ b/ui/src/Components/SilenceModal/SilenceMatch/MatchCounter.js @@ -14,6 +14,7 @@ import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons/faExclama import { FormatBackendURI, FormatAlertsQ } from "Stores/AlertStore"; import { SilenceFormStore } from "Stores/SilenceFormStore"; import { SilenceFormMatcher } from "Models/SilenceForm"; +import { TooltipWrapper } from "Components/TooltipWrapper"; import { MatcherToFilter, AlertManagersToFilter } from "../Matchers"; const MatchCounter = observer( @@ -93,7 +94,16 @@ const MatchCounter = observer( if (this.matchedAlerts.error !== null) { return ( - + + + ); } @@ -107,13 +117,15 @@ const MatchCounter = observer( }); return ( - - {this.matchedAlerts.total} - + + + {this.matchedAlerts.total} + + ); } } diff --git a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelValueInput.test.js.snap b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelValueInput.test.js.snap index 185dfd6c6..855ac2f66 100644 --- a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelValueInput.test.js.snap +++ b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/LabelValueInput.test.js.snap @@ -5,12 +5,17 @@ exports[` matches snapshot 1`] = `
- - 0 - + + 0 + +
Label value diff --git a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/MatchCounter.test.js.snap b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/MatchCounter.test.js.snap index 9064ad4b4..79623f9aa 100644 --- a/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/MatchCounter.test.js.snap +++ b/ui/src/Components/SilenceModal/SilenceMatch/__snapshots__/MatchCounter.test.js.snap @@ -2,11 +2,18 @@ exports[` matches snapshot with empty matcher 1`] = ` " - - 0 - + + 0 + +
" `;