From f30d8e1bb8a3f5a1cf5689b2e9aca82b25e8ff3b Mon Sep 17 00:00:00 2001 From: RachelElysia <71795832+RachelElysia@users.noreply.github.com> Date: Thu, 15 May 2025 14:35:49 -0400 Subject: [PATCH] Fleet UI: Confirmed toast messages to end user for self-service install/uninstall (#29179) --- .../cards/Software/SelfService/SelfServiceTableConfig.tsx | 1 + .../UninstallSoftwareModal/UninstallSoftwareModal.tsx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/pages/hosts/details/cards/Software/SelfService/SelfServiceTableConfig.tsx b/frontend/pages/hosts/details/cards/Software/SelfService/SelfServiceTableConfig.tsx index ec0c7ee854..6fdcf17844 100644 --- a/frontend/pages/hosts/details/cards/Software/SelfService/SelfServiceTableConfig.tsx +++ b/frontend/pages/hosts/details/cards/Software/SelfService/SelfServiceTableConfig.tsx @@ -293,6 +293,7 @@ const InstallerStatusAction = ({ onInstallOrUninstall(); } } catch (error) { + // We only show toast message if API returns an error renderFlash("error", "Couldn't install. Please try again."); } }, [deviceToken, id, onInstallOrUninstall, renderFlash]); diff --git a/frontend/pages/hosts/details/cards/Software/SelfService/UninstallSoftwareModal/UninstallSoftwareModal.tsx b/frontend/pages/hosts/details/cards/Software/SelfService/UninstallSoftwareModal/UninstallSoftwareModal.tsx index e3398a8f88..956502d291 100644 --- a/frontend/pages/hosts/details/cards/Software/SelfService/UninstallSoftwareModal/UninstallSoftwareModal.tsx +++ b/frontend/pages/hosts/details/cards/Software/SelfService/UninstallSoftwareModal/UninstallSoftwareModal.tsx @@ -36,10 +36,9 @@ const UninstallSoftwareModal = ({ setIsUninstalling(true); try { await deviceUserAPI.uninstallSelfServiceSoftware(token, softwareId); - // TODO: Change this toast message or hide it all together? - // renderFlash("success", "Software uninstalled successfully!"); onSuccess(); } catch (error) { + // We only show toast message to end user if API returns an error renderFlash("error", "Couldn't uninstall. Please try again."); } setIsUninstalling(false);