diff --git a/x-pack/plugins/transform/public/app/components/toast_notification_text.tsx b/x-pack/plugins/transform/public/app/components/toast_notification_text.tsx index dcbbca2746d99..3f664cf8bb09b 100644 --- a/x-pack/plugins/transform/public/app/components/toast_notification_text.tsx +++ b/x-pack/plugins/transform/public/app/components/toast_notification_text.tsx @@ -51,7 +51,7 @@ export const ToastNotificationText: FC = ({ const unformattedText = text.message ? text.message : text; const formattedText = typeof unformattedText === 'object' ? JSON.stringify(text, null, 2) : text; - const textLength = previewTextLength || 140; + const textLength = previewTextLength ?? 140; const previewText = `${formattedText.substring(0, textLength)}${ formattedText.length > textLength ? ' ...' : '' }`; diff --git a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx index f47dc885f5013..373dd436efef4 100644 --- a/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx +++ b/x-pack/plugins/transform/public/app/hooks/use_delete_transform.tsx @@ -157,7 +157,7 @@ export const useDeleteTransforms = () => { const destinationIndex = status.destinationIndex; // if we are only deleting one transform, show the success toast messages - if (!isBulk) { + if (!isBulk && status.transformDeleted) { if (status.transformDeleted?.success) { toastNotifications.addSuccess( i18n.translate('xpack.transform.transformList.deleteTransformSuccessMessage', { diff --git a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/action_delete.tsx b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/action_delete.tsx index 03dcb575f477f..d7db55990d333 100644 --- a/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/action_delete.tsx +++ b/x-pack/plugins/transform/public/app/sections/transform_management/components/transform_list/action_delete.tsx @@ -15,6 +15,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiSwitch, + EuiSpacer, } from '@elastic/eui'; import { FormattedMessage } from '@kbn/i18n/react'; import { TRANSFORM_STATE } from '../../../../../../common'; @@ -99,11 +100,10 @@ export const DeleteAction: FC = ({ items, forceDisable }) => { = ({ items, forceDisable }) => /> } + { = ({ items, forceDisable }) => {userCanDeleteIndex && ( = ({ items, forceDisable }) => /> )} - - {userCanDeleteIndex && indexPatternExists && ( + {userCanDeleteIndex && indexPatternExists && ( + + = ({ items, forceDisable }) => checked={deleteIndexPattern} onChange={toggleDeleteIndexPattern} /> - )} - + + )} );