Skip to content

Commit

Permalink
Merge pull request #1854 from openshift-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…1811-to-release-4.15

[release-4.15] CNV-38360: Fix NIC hot-unplug alert message
  • Loading branch information
openshift-merge-bot[bot] committed Mar 25, 2024
2 parents b4fb12b + 9b128d8 commit 925a53e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion locales/en/plugin__kubevirt-plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
"Delete VirtualMachineInstancetype?": "Delete VirtualMachineInstancetype?",
"Delete VirtualMachinePreference?": "Delete VirtualMachinePreference?",
"Delete VirtualMachineSnapshot?": "Delete VirtualMachineSnapshot?",
"Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13 or for network interfaces that were added to the VirtualMachine in these versions.": "Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13 or for network interfaces that were added to the VirtualMachine in these versions.",
"Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13.": "Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13.",
"Deprecated": "Deprecated",
"Descheduler": "Descheduler",
"Descheduler settings": "Descheduler settings",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ const NetworkInterfaceActions: FC<NetworkInterfaceActionsProps> = ({
const editBtnText = t('Edit');
const deleteBtnText = t('Delete');

const isHotPlugNIC = Boolean(nicPresentation?.iface?.bridge);

const onEditModalOpen = () => {
createModal(({ isOpen, onClose }) => (
<VirtualMachinesEditNetworkInterfaceModal
Expand All @@ -64,10 +66,10 @@ const NetworkInterfaceActions: FC<NetworkInterfaceActionsProps> = ({
submitBtnVariant={ButtonVariant.danger}
>
<span>
{isRunning(vm) && (
{isRunning(vm) && isHotPlugNIC && (
<Alert
title={t(
'Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13 or for network interfaces that were added to the VirtualMachine in these versions.',
'Deleting a network interface is supported only on VirtualMachines that were created in versions greater than 4.13.',
)}
component={'h6'}
isInline
Expand Down

0 comments on commit 925a53e

Please sign in to comment.