diff --git a/ui/package.json b/ui/package.json
index 592f9e965..9af8ecbbb 100644
--- a/ui/package.json
+++ b/ui/package.json
@@ -43,6 +43,7 @@
"react-resize-detector": "3.1.3",
"react-scripts": "2.0.4",
"react-select": "2.1.0",
+ "react-tippy": "1.2.3",
"react-transition-group": "2.5.0",
"whatwg-fetch": "3.0.0"
},
diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap
index 82930fa36..55c1afdf7 100644
--- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap
+++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/__snapshots__/index.test.js.snap
@@ -63,12 +63,26 @@ exports[` matches snapshot with showAlertmanagers=false showReceiver=fa
a day ago
-
- job: node_exporter
-
-
- cluster: dev
-
+
+
+ job: node_exporter
+
+
+
+
+ cluster: dev
+
+
matches snapshot 1`] = `
hidden
-
- label1: foo
-
-
- label2: bar
-
-
- @alertmanager: default
-
-
- @receiver: by-name
-
+
+
+ label1: foo
+
+
+
+
+ label2: bar
+
+
+
+
+ @alertmanager: default
+
+
+
+
+ @receiver: by-name
+
+
-
+
+
+
diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap
index 45c7a1302..a50c3fed5 100644
--- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap
+++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/__snapshots__/index.test.js.snap
@@ -18,19 +18,26 @@ exports[` matches snapshot when data is present in alertStore 1`] = `
Fake silence
+
-
-
-
+
+
+
+
+
))}
-
+
+
+
{showDelete ? (
-
+
+
+
) : null}
diff --git a/ui/src/Components/SilenceModal/index.js b/ui/src/Components/SilenceModal/index.js
index b615af585..9d58e8a2e 100644
--- a/ui/src/Components/SilenceModal/index.js
+++ b/ui/src/Components/SilenceModal/index.js
@@ -10,6 +10,7 @@ import { AlertStore } from "Stores/AlertStore";
import { SilenceFormStore } from "Stores/SilenceFormStore";
import { Settings } from "Stores/Settings";
import { MountModal } from "Components/Animations/MountModal";
+import { TooltipWrapper } from "Components/TooltipWrapper";
import { SilenceModalContent } from "./SilenceModalContent";
import "./index.css";
@@ -53,12 +54,14 @@ const SilenceModal = observer(
return (
-
-
-
+
+
+
+
+
(
+
+ {children}
+
+);
+Tooltip.propTypes = {
+ children: PropTypes.node.isRequired
+};
+
+export { TooltipWrapper };
diff --git a/ui/src/Stores/SilenceFormStore.js b/ui/src/Stores/SilenceFormStore.js
index 5f16b0903..76ca3a5ed 100644
--- a/ui/src/Stores/SilenceFormStore.js
+++ b/ui/src/Stores/SilenceFormStore.js
@@ -148,6 +148,9 @@ class SilenceFormStore {
}
this.matchers = matchers;
+ // ensure that silenceID is nulled, since it's used to edit silences
+ // and this is used to silence groups
+ this.silenceID = null;
},
fillFormFromSilence(alertmanager, silence) {
diff --git a/ui/src/Stores/SilenceFormStore.test.js b/ui/src/Stores/SilenceFormStore.test.js
index b25a288ea..b8994373f 100644
--- a/ui/src/Stores/SilenceFormStore.test.js
+++ b/ui/src/Stores/SilenceFormStore.test.js
@@ -187,6 +187,13 @@ describe("SilenceFormStore.data", () => {
);
});
+ it("fillMatchersFromGroup() resets silenceID if set", () => {
+ store.data.silenceID = "12345";
+ const group = MockGroup();
+ store.data.fillMatchersFromGroup(group, [group.alerts[0]]);
+ expect(store.data.silenceID).toBeNull();
+ });
+
it("fillFormFromSilence() sets silenceID", () => {
const alertmanager = MockAlertmanager();
const silence = MockSilence();
diff --git a/ui/yarn.lock b/ui/yarn.lock
index 2b21cb319..da2f09706 100644
--- a/ui/yarn.lock
+++ b/ui/yarn.lock
@@ -8135,7 +8135,7 @@ pnp-webpack-plugin@1.1.0:
resolved "https://registry.yarnpkg.com/pnp-webpack-plugin/-/pnp-webpack-plugin-1.1.0.tgz#947a96d1db94bb5a1fc014d83b581e428699ac8c"
integrity sha512-CPCdcFxx7fEcDMWTDjXe2Wypt4JuMt4q5Q2UrpTcyBBkLiCIyPEh/mCGmUWIcNkKGyXwQ9Y2wVhlKm6ketiBNQ==
-popper.js@^1.14.1:
+popper.js@^1.11.1, popper.js@^1.14.1:
version "1.14.4"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.4.tgz#8eec1d8ff02a5a3a152dd43414a15c7b79fd69b6"
integrity sha1-juwdj/AqWjoVLdQ0FKFce3n9abY=
@@ -9324,6 +9324,13 @@ react-themeable@^1.1.0:
dependencies:
object-assign "^3.0.0"
+react-tippy@1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/react-tippy/-/react-tippy-1.2.3.tgz#8aef183ec4986ca7c5c556465013d95196fecfd8"
+ integrity sha512-cEmhw29DbVP33n9ayo0nLzibuSz6o0A77cZtzno7zGsfOH8tUEGai/8a7TXRIKHPYDooW8iJkJBIPDnxmEu00g==
+ dependencies:
+ popper.js "^1.11.1"
+
react-transition-group@2.5.0, react-transition-group@^2.2.1:
version "2.5.0"
resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-2.5.0.tgz#70bca0e3546102c4dc5cf3f5f57f73447cce6874"