diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.js index 098f59031..ab5ac9143 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.js @@ -10,6 +10,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faTrash } from "@fortawesome/free-solid-svg-icons/faTrash"; import { faExclamationCircle } from "@fortawesome/free-solid-svg-icons/faExclamationCircle"; import { faCheckCircle } from "@fortawesome/free-solid-svg-icons/faCheckCircle"; +import { faCircleNotch } from "@fortawesome/free-solid-svg-icons/faCircleNotch"; import { APIAlertmanagerUpstream } from "Models/API"; import { AlertStore, FormatBackendURI, FormatAlertsQ } from "Stores/AlertStore"; @@ -20,6 +21,16 @@ import { GroupListToUniqueLabelsList } from "Components/LabelSetList"; +const ProgressMessage = () => ( +
+ +
+); + const ErrorMessage = ({ message }) => (
=0.16.0"); const uri = isOpenAPI @@ -196,6 +215,8 @@ const DeleteSilenceModalContent = observer( ) : ( ) + ) : this.deleteState.fetch !== null ? ( + ) : this.previewState.error === null ? ( {this.deleteState.fetch !== null && diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.test.js b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.test.js index a119c9309..7704ff8b2 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.test.js +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Silence/DeleteSilence.test.js @@ -149,6 +149,8 @@ describe("", () => { expect(fetch.mock.calls).toHaveLength(2); tree.find(".btn-outline-danger").simulate("click"); expect(fetch.mock.calls).toHaveLength(2); + tree.instance().onDelete(); + expect(fetch.mock.calls).toHaveLength(2); }); it("renders SuccessMessage on 'success' response status", async () => {