From 9b128d8ff57237cfd40e4cfd5b2bfdfd6ecc9751 Mon Sep 17 00:00:00 2001 From: Phillip Bailey Date: Tue, 20 Feb 2024 22:03:07 -0500 Subject: [PATCH] Fix NIC hot-unplug message --- locales/en/plugin__kubevirt-plugin.json | 2 +- .../network/components/list/NetworkInterfaceActions.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/locales/en/plugin__kubevirt-plugin.json b/locales/en/plugin__kubevirt-plugin.json index 32bb6c565..ce520e870 100644 --- a/locales/en/plugin__kubevirt-plugin.json +++ b/locales/en/plugin__kubevirt-plugin.json @@ -392,7 +392,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", diff --git a/src/views/virtualmachines/details/tabs/configuration/network/components/list/NetworkInterfaceActions.tsx b/src/views/virtualmachines/details/tabs/configuration/network/components/list/NetworkInterfaceActions.tsx index 973a15421..1ff26784d 100644 --- a/src/views/virtualmachines/details/tabs/configuration/network/components/list/NetworkInterfaceActions.tsx +++ b/src/views/virtualmachines/details/tabs/configuration/network/components/list/NetworkInterfaceActions.tsx @@ -41,6 +41,8 @@ const NetworkInterfaceActions: FC = ({ const editBtnText = t('Edit'); const deleteBtnText = t('Delete'); + const isHotPlugNIC = Boolean(nicPresentation?.iface?.bridge); + const onEditModalOpen = () => { createModal(({ isOpen, onClose }) => ( = ({ submitBtnVariant={ButtonVariant.danger} > - {isRunning(vm) && ( + {isRunning(vm) && isHotPlugNIC && (