From cab3f0820fc082d9f619fe8aeeaba3354265ce2b Mon Sep 17 00:00:00 2001 From: kmalyjur Date: Wed, 12 Jun 2024 07:22:15 +0000 Subject: [PATCH] Fixes #37556 - Show host name instead of id in canceled build notification --- .../react_app/components/HostDetails/ActionsBar/actions.js | 4 ++-- .../react_app/components/HostDetails/ActionsBar/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/actions.js b/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/actions.js index 726aff33ec7..5c161a7e11e 100644 --- a/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/actions.js +++ b/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/actions.js @@ -89,9 +89,9 @@ export const buildHost = hostId => dispatch => { ); }; -export const cancelBuild = hostId => dispatch => { +export const cancelBuild = (hostId, hostName) => dispatch => { const successToast = () => - sprintf(__('Canceled pending build for %s'), hostId); + sprintf(__('Canceled pending build for %s'), hostName); const errorToast = ({ message }) => message; const url = foremanUrl(`/hosts/${hostId}/cancelBuild`); dispatch( diff --git a/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/index.js b/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/index.js index b366137076b..4570a2f249d 100644 --- a/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/index.js +++ b/webpack/assets/javascripts/react_app/components/HostDetails/ActionsBar/index.js @@ -70,7 +70,7 @@ const ActionsBar = ({ }; const buildHandler = () => { if (isBuild) { - dispatch(cancelBuild(hostId)); + dispatch(cancelBuild(hostId, hostName)); setKebab(false); } else { setBuildModal(true);