diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesList.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesList.tsx index 09acba996..aafc1880f 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesList.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesList.tsx @@ -21,19 +21,6 @@ const openShiftVmFieldsMetadataFactory: ResourceFieldFactory = (t) => [ }, sortable: true, }, - { - resourceFieldId: 'concerns', - jsonPath: '$.concerns', - label: t('Concerns'), - isVisible: true, - sortable: true, - filter: { - type: 'enum', - primary: true, - placeholderLabel: t('Concerns'), - values: EnumToTuple({ Critical: 'Critical', Warning: 'Warning', Information: 'Information' }), - }, - }, { resourceFieldId: 'status', jsonPath: (data: VmData) => getVmPowerState(data?.vm), diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesRow.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesRow.tsx index 71ae071ec..0af8c2932 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesRow.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/OpenShiftVirtualMachinesRow.tsx @@ -4,11 +4,10 @@ import { ResourceField, RowProps } from '@kubev2v/common'; import { Td, Tr } from '@patternfly/react-table'; import { PowerStateCellRenderer } from './components/PowerStateCellRenderer'; -import { VMCellProps, VMConcernsCellRenderer, VmData, VMNameCellRenderer } from './components'; +import { VMCellProps, VmData, VMNameCellRenderer } from './components'; const cellRenderers: Record> = { name: VMNameCellRenderer, - concerns: VMConcernsCellRenderer, status: PowerStateCellRenderer, }; diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/VMConcernsCellRenderer.tsx b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/VMConcernsCellRenderer.tsx index 5c83134d1..c93aa703e 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/VMConcernsCellRenderer.tsx +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/components/VMConcernsCellRenderer.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { TFunction } from 'react-i18next'; -import { TableCell } from 'src/modules/Providers/utils'; +import { TableCell, TableEmptyCell } from 'src/modules/Providers/utils'; import { useForkliftTranslation } from 'src/utils/i18n'; import { Concern } from '@kubev2v/types'; @@ -20,6 +20,10 @@ import { VMCellProps } from './VMCellProps'; * @returns {ReactElement} The rendered table cell. */ export const VMConcernsCellRenderer: React.FC = ({ data }) => { + if (data?.vm?.providerType === 'openshift') { + return ; + } + const groupedConcerns = groupConcernsByCategory(data?.vm?.concerns); return ( diff --git a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/helpers/getHighestPriorityConcern.ts b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/helpers/getHighestPriorityConcern.ts index 53aaa2f3a..4af0dd64c 100644 --- a/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/helpers/getHighestPriorityConcern.ts +++ b/packages/forklift-console-plugin/src/modules/Providers/views/details/tabs/VirtualMachines/utils/helpers/getHighestPriorityConcern.ts @@ -3,7 +3,7 @@ import { ProviderVirtualMachine } from '@kubev2v/types'; type ConcernCategory = 'Critical' | 'Warning' | 'Information'; export const getHighestPriorityConcern = (vm: ProviderVirtualMachine): ConcernCategory => { - if (!vm?.concerns) { + if (vm?.providerType === 'openshift' || !vm?.concerns) { return undefined; } diff --git a/packages/types/src/types/provider/openshift/VM.ts b/packages/types/src/types/provider/openshift/VM.ts index d70b431c8..607aa9826 100644 --- a/packages/types/src/types/provider/openshift/VM.ts +++ b/packages/types/src/types/provider/openshift/VM.ts @@ -1,10 +1,8 @@ import { V1VirtualMachine } from '../../k8s/V1VirtualMachine'; -import { Concern } from '../base'; import { TypedOpenshiftResource } from './TypedResource'; // https://github.com/kubev2v/forklift/blob/main/pkg/controller/provider/web/ocp/vm.go export interface OpenshiftVM extends TypedOpenshiftResource { - concerns: Concern[]; object: V1VirtualMachine; }