-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/pci ai notebooks manage notebook pop up (Start, Stop, Delete) (#…
…13860) * feat(ai.notebooks): add notebook management popup * feat(ai.notebooks): fixing rebase issues * feat(ai.notebooks): fix pr comments Signed-off-by: Arthur Bullet <[email protected]>
- Loading branch information
Showing
34 changed files
with
1,150 additions
and
46 deletions.
There are no files selected for viewing
26 changes: 24 additions & 2 deletions
26
...-ai-notebooks/public/translations/pci-ai-notebooks/notebooks/notebook/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
{ | ||
"titleNot": "Dashboard page", | ||
"tesazdazt": "test" | ||
"deleteNotebookTitle": "Supprimer le notebook", | ||
"deleteNotebookDescription": "Etes-vous sur de vouloir supprimer le notebook {{name}} ?", | ||
"notebookButtonCancel": "Annuler", | ||
"deleteNotebookButtonConfirm": "Supprimer", | ||
"notebookToastErrorTitle": "Echec", | ||
"notebookToastSuccessTitle": "Succès", | ||
"deleteNotebookToastSuccessDescription": "Le notebook {{name}} a été supprimé", | ||
"startNotebookTitle": "Démarrer le notebook", | ||
"startNotebookDescription": "Etes-vous sur de vouloir démarrer le notebook {{name}} ?", | ||
"startNotebookButtonConfirm": "Démarrer", | ||
"startNotebookToastSuccessDescription": "Le notebook {{name}} a été démarré", | ||
"stopNotebookTitle": "Arrêter le notebook", | ||
"stopNotebookDescription1": "Lorsque vous stoppez un AI Notebook :", | ||
"stopNotebookDescriptionList1": "Les ressources de calculs sont libérées (vous ne payez plus pour les CPUs et GPUs)", | ||
"stopNotebookDescriptionList2": "Nous sauvegardons votre Espace de travail (dossier /worskpace) de manière sécurisée (10 Gio gratuits, ensuite au coût de l'Object Storage).", | ||
"stopNotebookDescriptionList3": "Tout ce qui est sur le stockage local éphémère sera perdu.", | ||
"stopNotebookDescription2": "Une fois stoppé, vous pourrez soit", | ||
"stopNotebookDescription2Bis": "supprimer", | ||
"stopNotebookDescription2Ter": "votre AI Notebook soit le", | ||
"stopNotebookDescription2Quater": "relancer", | ||
"stopNotebookDescription3": "Nous restaurerons votre Espace de Travail et réallouerons des ressources de calculs.", | ||
"stopNotebookConfirmation": "Etes-vous sur de vouloir arrêter le notebook {{name}} ?", | ||
"stopNotebookButtonConfirm": "Arrêter", | ||
"stopNotebookToastSuccessDescription": "Le notebook {{name}} a été arrêté" | ||
} |
2 changes: 1 addition & 1 deletion
2
...ci-ai-notebooks/public/translations/pci-ai-notebooks/notebooks/status/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
packages/manager/apps/pci-ai-notebooks/src/__tests__/helpers/mocks/container.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Containers } from '@/types/orderFunnel'; | ||
|
||
export const mockedContainer: Containers = { | ||
status: 'ok', | ||
message: 'message', | ||
containers: ['container1', 'container2'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/manager/apps/pci-ai-notebooks/src/configuration/polling.constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
packages/manager/apps/pci-ai-notebooks/src/data/api/ai/notebook/command.api.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
...anager/apps/pci-ai-notebooks/src/hooks/api/ai/datastore/useGetDatastoreContainer.spec.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { renderHook, waitFor } from '@testing-library/react'; | ||
import { vi } from 'vitest'; | ||
import { QueryClientWrapper } from '@/__tests__/helpers/wrappers/QueryClientWrapper'; | ||
import * as datastoreApi from '@/data/api/ai/datastore.api'; | ||
import { getDatastoreContainer } from '@/data/api/ai/datastore.api'; | ||
import { mockedContainer } from '@/__tests__/helpers/mocks/container'; | ||
import { useGetDatastoreContainer } from './useGetDatastoreContainer.hook'; | ||
|
||
vi.mock('@/data/api/ai/datastore.api', () => ({ | ||
getDatastoreContainer: vi.fn(), | ||
})); | ||
|
||
describe('useGetDatastoreContainer', () => { | ||
it('should return Container in Datastore', async () => { | ||
const projectId = 'projectId'; | ||
const region = 'region'; | ||
const alias = 'alias'; | ||
|
||
vi.mocked(datastoreApi.getDatastoreContainer).mockResolvedValue( | ||
mockedContainer, | ||
); | ||
|
||
const { result } = renderHook( | ||
() => useGetDatastoreContainer(projectId, region, alias), | ||
{ | ||
wrapper: QueryClientWrapper, | ||
}, | ||
); | ||
|
||
await waitFor(() => { | ||
expect(result.current.isSuccess).toBe(true); | ||
expect(result.current.data).toEqual(mockedContainer); | ||
expect(datastoreApi.getDatastoreContainer).toHaveBeenCalledWith({ | ||
projectId, | ||
region, | ||
alias, | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.