From 3ef58930ad27d308fbcbda4f6cf8b6ffd22f3ad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Sun, 27 Oct 2019 12:35:17 +0000 Subject: [PATCH] fix(ui): set silence modal tab on edit --- ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js | 3 ++- .../Grid/AlertGrid/AlertGroup/GroupHeader/GroupMenu.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js index d0a505ca5..3c9965c78 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.js @@ -18,7 +18,7 @@ import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons/faExternalL import { APIAlert, APIGroup } from "Models/API"; import { AlertStore } from "Stores/AlertStore"; -import { SilenceFormStore } from "Stores/SilenceFormStore"; +import { SilenceFormStore, SilenceTabNames } from "Stores/SilenceFormStore"; import { FetchPauser } from "Components/FetchPauser"; import { DropdownSlide } from "Components/Animations/DropdownSlide"; @@ -29,6 +29,7 @@ const onSilenceClick = (alertStore, silenceFormStore, group, alert) => { alertStore.settings.values.silenceForm.strip.labels, [alert] ); + silenceFormStore.tab.setTab(SilenceTabNames.Editor); silenceFormStore.toggle.show(); }; diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupHeader/GroupMenu.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupHeader/GroupMenu.js index 355deaadd..6d7ebe3bc 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupHeader/GroupMenu.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/GroupHeader/GroupMenu.js @@ -17,7 +17,7 @@ import { faBellSlash } from "@fortawesome/free-solid-svg-icons/faBellSlash"; import { APIGroup } from "Models/API"; import { FormatAlertsQ } from "Stores/AlertStore"; import { AlertStore } from "Stores/AlertStore"; -import { SilenceFormStore } from "Stores/SilenceFormStore"; +import { SilenceFormStore, SilenceTabNames } from "Stores/SilenceFormStore"; import { QueryOperators, StaticLabels, FormatQuery } from "Common/Query"; import { DropdownSlide } from "Components/Animations/DropdownSlide"; import { FetchPauser } from "Components/FetchPauser"; @@ -28,6 +28,7 @@ const onSilenceClick = (alertStore, silenceFormStore, group) => { group, alertStore.settings.values.silenceForm.strip.labels ); + silenceFormStore.tab.setTab(SilenceTabNames.Editor); silenceFormStore.toggle.show(); };