From 3afe14ee9ec0543900f9cf39b36a8f8802ff72c2 Mon Sep 17 00:00:00 2001 From: Arthur Bullet Date: Thu, 14 Nov 2024 18:45:27 +0100 Subject: [PATCH] feat(ai.notebooks): fixing rebase issues Signed-off-by: Arthur Bullet --- .../framework/FrameworkTile.component.tsx | 3 -- .../FrameworkTileVersion.component.tsx | 1 - .../order/volumes/VolumesForm.component.tsx | 1 + .../hooks/api/sshkey/useAddSshKey.spec.tsx | 11 +++-- .../src/lib/frameworkNameHelper.ts | 26 ------------ .../_components/OrderFunnel.component.tsx | 41 ------------------- 6 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 packages/manager/apps/pci-ai-notebooks/src/lib/frameworkNameHelper.ts diff --git a/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTile.component.tsx b/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTile.component.tsx index e24a022a2f52..8025133c9d9d 100644 --- a/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTile.component.tsx +++ b/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTile.component.tsx @@ -53,9 +53,6 @@ export const FrameworkTile = ({ selectedVersion={selectedVersion} isFrameworkSelected={selected} onChange={(versionName) => { - console.log(framework.versions); - // console.log(framework.versions.find((v) => v === versionName)); - console.log(versionName); setSelectedVersion(framework.versions.find((v) => v === versionName)); }} /> diff --git a/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTileVersion.component.tsx b/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTileVersion.component.tsx index 7e1f66c018f7..28a2aca1fd30 100644 --- a/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTileVersion.component.tsx +++ b/packages/manager/apps/pci-ai-notebooks/src/components/order/framework/FrameworkTileVersion.component.tsx @@ -72,7 +72,6 @@ const VersionSelector = ({ key={fmkVersion} value={fmkVersion} onSelect={(value) => { - console.log(value); onChange(value); setOpen(false); }} diff --git a/packages/manager/apps/pci-ai-notebooks/src/components/order/volumes/VolumesForm.component.tsx b/packages/manager/apps/pci-ai-notebooks/src/components/order/volumes/VolumesForm.component.tsx index f87eb0f9bb62..b1cdaa1162b2 100644 --- a/packages/manager/apps/pci-ai-notebooks/src/components/order/volumes/VolumesForm.component.tsx +++ b/packages/manager/apps/pci-ai-notebooks/src/components/order/volumes/VolumesForm.component.tsx @@ -29,6 +29,7 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select'; + import { DataStoresWithContainers } from '@/hooks/api/ai/datastore/useGetDatastoresWithContainers.hook'; import { FormVolumes, OrderVolumes } from '@/types/orderFunnel'; import { VOLUMES_CONFIG } from './volume.const'; diff --git a/packages/manager/apps/pci-ai-notebooks/src/hooks/api/sshkey/useAddSshKey.spec.tsx b/packages/manager/apps/pci-ai-notebooks/src/hooks/api/sshkey/useAddSshKey.spec.tsx index bef92dd91049..f0db6f8763b5 100644 --- a/packages/manager/apps/pci-ai-notebooks/src/hooks/api/sshkey/useAddSshKey.spec.tsx +++ b/packages/manager/apps/pci-ai-notebooks/src/hooks/api/sshkey/useAddSshKey.spec.tsx @@ -11,14 +11,17 @@ vi.mock('@/data/api/sshkey/sshkey.api', () => ({ describe('useAddSshKey', () => { it('should create a SshKey', async () => { - const onSuccess = vi.fn(); + const onAddKeySuccess = vi.fn(); const onError = vi.fn(); vi.mocked(sshkeyApi.addSSHKey).mockResolvedValue(mockedSshKey); - const { result } = renderHook(() => useAddSshKey({ onError, onSuccess }), { - wrapper: QueryClientWrapper, - }); + const { result } = renderHook( + () => useAddSshKey({ onError, onAddKeySuccess }), + { + wrapper: QueryClientWrapper, + }, + ); const addSshKeyProps: sshkeyApi.AddSSHKey = { projectId: 'projectId', diff --git a/packages/manager/apps/pci-ai-notebooks/src/lib/frameworkNameHelper.ts b/packages/manager/apps/pci-ai-notebooks/src/lib/frameworkNameHelper.ts deleted file mode 100644 index d019e7f1a16e..000000000000 --- a/packages/manager/apps/pci-ai-notebooks/src/lib/frameworkNameHelper.ts +++ /dev/null @@ -1,26 +0,0 @@ -import * as ai from '@/types/cloud/project/ai'; - -export function humanizeFramework( - framework: ai.capabilities.notebook.Framework, -) { - switch (framework.id) { - case 'alicebob': - return 'Alice & Bob'; - case 'myqlm': - return 'myQLM'; - case 'autogluon-mxnet': - return 'Autogluon'; - case 'fastai': - return 'Fastai'; - case 'huggingface': - return 'Huggin Face'; - case 'colatible': - return 'Miniconda'; - case 'one-for-all': - return 'One for all'; - case 'perceval': - return 'Perceval'; - default: - return framework.name; - } -} diff --git a/packages/manager/apps/pci-ai-notebooks/src/pages/notebooks/create/_components/OrderFunnel.component.tsx b/packages/manager/apps/pci-ai-notebooks/src/pages/notebooks/create/_components/OrderFunnel.component.tsx index a0df152fc8d1..ca4bcd51df54 100644 --- a/packages/manager/apps/pci-ai-notebooks/src/pages/notebooks/create/_components/OrderFunnel.component.tsx +++ b/packages/manager/apps/pci-ai-notebooks/src/pages/notebooks/create/_components/OrderFunnel.component.tsx @@ -528,33 +528,6 @@ const OrderFunnel = ({ -
- ( - - - {t('fieldConfigurationSSHKeysLabel')} - - - - model.form.setValue('sshKey', newSshKey) - } - /> - - - - )} - /> -
@@ -599,20 +572,6 @@ const OrderFunnel = ({ > {t('orderButton')} - -