diff --git a/packages/forklift-console-plugin/src/modules/Overview/modal/EditInventoryMemoryLimitModal.tsx b/packages/forklift-console-plugin/src/modules/Overview/modal/EditInventoryMemoryLimitModal.tsx new file mode 100644 index 000000000..32744fbbe --- /dev/null +++ b/packages/forklift-console-plugin/src/modules/Overview/modal/EditInventoryMemoryLimitModal.tsx @@ -0,0 +1,50 @@ +import React from 'react'; +import { EditModal, ModalInputComponentType } from 'src/modules/Providers/modals'; +import { useForkliftTranslation } from 'src/utils/i18n'; + +import { ForkliftControllerModel } from '@kubev2v/types'; +import { ModalVariant } from '@patternfly/react-core'; + +import { EditSettingsModalProps } from './EditSettingsModalProps'; +import SettingsSelectInput from './SettingsSelectInput'; + +// Define the options +const options = [ + { key: '400Mi', name: '400Mi', description: 'Low memory limit' }, + { key: '1000Mi', name: '1000Mi', description: 'Moderate memory limit' }, + { key: '2000Mi', name: '2000Mi', description: 'High memory limit' }, + { key: '8000Mi', name: '8000Mi', description: 'Very high memory limit' }, +]; + +/** + * InventoryMemoryLimitSelect component. + * Wraps the SettingsSelectInput component with pre-defined options. + * + * @param {ModalInputComponentProps} props - Properties passed to the component + * @returns {JSX.Element} + */ +const InventoryMemoryLimitSelect: ModalInputComponentType = (props) => { + return ; +}; + +export const EditInventoryMemoryLimitModal: React.FC = (props) => { + const { t } = useForkliftTranslation(); + + return ( + + ); +}; diff --git a/packages/forklift-console-plugin/src/modules/Overview/modal/index.ts b/packages/forklift-console-plugin/src/modules/Overview/modal/index.ts index 93ac82708..81eb36677 100644 --- a/packages/forklift-console-plugin/src/modules/Overview/modal/index.ts +++ b/packages/forklift-console-plugin/src/modules/Overview/modal/index.ts @@ -1,6 +1,7 @@ // @index(['./*', /style/g], f => `export * from '${f.path}';`) export * from './EditControllerCPULimitModal'; export * from './EditControllerMemoryLimitModal'; +export * from './EditInventoryMemoryLimitModal'; export * from './EditMaxVMInFlightModal'; export * from './EditPreCopyIntervalModal'; export * from './EditSettingsModalProps'; diff --git a/packages/forklift-console-plugin/src/modules/Overview/views/overview/tabs/Details/cards/SettingsCard.tsx b/packages/forklift-console-plugin/src/modules/Overview/views/overview/tabs/Details/cards/SettingsCard.tsx index 4b7214f06..a1fbc28c0 100644 --- a/packages/forklift-console-plugin/src/modules/Overview/views/overview/tabs/Details/cards/SettingsCard.tsx +++ b/packages/forklift-console-plugin/src/modules/Overview/views/overview/tabs/Details/cards/SettingsCard.tsx @@ -2,6 +2,7 @@ import React, { FC } from 'react'; import { EditControllerCPULimitModal, EditControllerMemoryLimitModal, + EditInventoryMemoryLimitModal, EditMaxVMInFlightModal, EditPreCopyIntervalModal, EditSnapshotPoolingIntervalModal, @@ -98,6 +99,28 @@ const SettingsCard_: FC = ({ obj }) => { onEdit={() => showModal()} /> + {'1000Mi'} + ) + } + moreInfoLink={ + 'https://docs.redhat.com/en/documentation/migration_toolkit_for_virtualization/2.6/html-single/installing_and_using_the_migration_toolkit_for_virtualization/index#advanced-migration-options_mtv' + } + helpContent={ + + {t( + 'Sets the memory limits allocated to the inventory container in the controller pod. The default value is 1000Mi.', + )} + + } + crumbs={['spec', 'inventory_container_limits_memory']} + onEdit={() => showModal()} + /> +