Skip to content

Commit

Permalink
Fixes #37556 - Show host name instead of id in canceled build notific…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
kmalyjur authored and MariaAga committed Jun 13, 2024
1 parent 58e8f94 commit cab3f08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ActionsBar = ({
};
const buildHandler = () => {
if (isBuild) {
dispatch(cancelBuild(hostId));
dispatch(cancelBuild(hostId, hostName));
setKebab(false);
} else {
setBuildModal(true);
Expand Down

0 comments on commit cab3f08

Please sign in to comment.