Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
322 commits
Select commit Hold shift + click to select a range
ed095fd
Forgot to dispatch an action
garronej Feb 11, 2026
a8b53a5
Forgot to dispatch (2)
garronej Feb 11, 2026
204d7f9
Fix navigation issue in explorer
garronej Feb 11, 2026
3c1944b
Explorer usecase duplicate
garronej Feb 12, 2026
212b038
Firs step in overhauling the core of the s3 explorer
garronej Feb 15, 2026
eff4c5f
Checkpoint
garronej Feb 16, 2026
e360590
Progress...
garronej Feb 16, 2026
1e453f8
Checkpoint
garronej Feb 17, 2026
5e2a921
Reactive refresh on download complete
garronej Feb 17, 2026
29465ca
Implement createDirectory using putObjects
garronej Feb 17, 2026
f428848
Create simplified version of the s3 port
garronej Feb 23, 2026
4b9c6bf
Update S3Uri utils
garronej Feb 24, 2026
0ccaf22
Move to new, partial implementation of the s3 port
garronej Feb 24, 2026
eed85ab
Implement proper delete and bulk delete approach
garronej Feb 26, 2026
68429bc
Implement get presigned url
garronej Feb 26, 2026
f26c4bd
remove unused import
garronej Feb 26, 2026
a96af2d
Working on new explorer UI without style - new headless component spl…
garronej Feb 26, 2026
fd366d8
fix(duckdb): load https extension after setting custom repository
ddecrulle Dec 22, 2025
6666ead
Bump web version
ddecrulle Dec 22, 2025
c28b59b
Automatic patch bump of chart version to 10.30.14
actions-user Dec 22, 2025
bb73af0
Update oidc-spa to v9
garronej Jan 6, 2026
cb3337d
Bump web version
garronej Jan 6, 2026
6734ba7
Automatic patch bump of chart version to 10.30.15
actions-user Jan 6, 2026
99c5b9f
Enable DPoP
garronej Jan 7, 2026
13ce490
Bump web version
garronej Jan 7, 2026
bd74c6a
Automatic minor bump of chart version to 10.31.0
actions-user Jan 7, 2026
8f0b04a
Disable dpop until the onboarding API supports it
garronej Jan 7, 2026
aeb763a
Bump web version
garronej Jan 7, 2026
8731448
Automatic patch bump of chart version to 10.31.1
actions-user Jan 7, 2026
e953e89
Fix autologin full page redirect bug
garronej Jan 7, 2026
ad6d205
Bump version
garronej Jan 7, 2026
bf43a1e
Automatic patch bump of chart version to 10.31.2
actions-user Jan 7, 2026
e147db4
Update oidc-spa
garronej Jan 12, 2026
834b40a
Bump web version
garronej Jan 12, 2026
4364b0b
Automatic patch bump of chart version to 10.31.3
actions-user Jan 12, 2026
1206163
Enable DPoP if the AS supports it, unless the Go Onboarding API is en…
garronej Jan 13, 2026
adf5225
Bump web version
garronej Jan 13, 2026
e2ab9ee
Automatic minor bump of chart version to 10.32.0
actions-user Jan 13, 2026
f5a874c
Configure figma mcp
marchufschmitt Mar 2, 2026
bdac504
UI - Add S3 Navigation Bar
marchufschmitt Mar 2, 2026
5a52dba
UI - Add Pinned Bookmarks (List and entry Point List)
marchufschmitt Mar 2, 2026
7b76e04
UI - Add S3 Profile Selector
marchufschmitt Mar 2, 2026
fea484c
Improve comment in S3ExplorerNavigationBar.tsx
marchufschmitt Mar 2, 2026
31700a6
Save spec
garronej Mar 2, 2026
f2f90a5
Moving specs of the S3UriBar outside of the implementation
garronej Mar 3, 2026
3b874a2
Start a spec file where we put general instruction for LLM agents to …
garronej Mar 3, 2026
87e2534
Increase timeout
garronej Mar 3, 2026
a022d33
FIx focus
garronej Mar 3, 2026
f523c56
Remove extra delimiter
garronej Mar 3, 2026
5032fa4
Two states for bookmarked and not bookmarked
garronej Mar 3, 2026
8b2f45d
Update progress on S3UriBar
garronej Mar 3, 2026
3ea30fa
Enhance S3UriBar: Add root icon for navigation crumbs and adjust styles
garronej Mar 3, 2026
b2a4ed1
Enhance S3UriBar: Add root icon styling and adjust border radius
garronej Mar 3, 2026
a6e5e0a
Enhance S3UriBar styles: Adjust height and add box-sizing for better …
garronej Mar 3, 2026
1e47526
Update icons
garronej Mar 3, 2026
bd4e5df
Enhance S3UriBar styles: Add right padding for improved layout
garronej Mar 3, 2026
a9ffcd8
Enhance S3UriBar: Exclude segment crumbs from current styling adjustm…
garronej Mar 3, 2026
9f5d20d
Enhance S3UriBar styles: Update padding for segment key first element
garronej Mar 3, 2026
1bfdf6a
Enhance S3UriBar styles: Reduce left and right padding for improved l…
garronej Mar 3, 2026
be0f8a0
Enhance S3UriBar styles: Add cursor style for text input
garronej Mar 3, 2026
0417b13
Fix type check for event target in S3UriBar component
garronej Mar 3, 2026
70635a5
Enhance S3UriBar styles: Add left padding to input for better spacing
garronej Mar 3, 2026
45553aa
Enhance S3UriBar: Add edit mode toggle button with tooltip and styling
garronej Mar 3, 2026
526d356
Better positioning of the autocomplete modal
garronej Mar 4, 2026
77db75b
Enhance S3UriBar: Add support for shortcut hints and improve hint typ…
garronej Mar 4, 2026
14ef3e7
Enhance S3UriBar: Add hint type labels and icons for better user expe…
garronej Mar 4, 2026
274da49
Enhance S3UriBar: Update shortcut hints for improved clarity and add …
garronej Mar 4, 2026
0c198a5
Enhance S3UriBar: Add auto-scrolling for active hint in editing mode
garronej Mar 4, 2026
a9438b9
Enhance S3UriBar: Add support for collapsing long hint names with ell…
garronej Mar 4, 2026
4cc3097
Refactor code structure for improved readability and maintainability
garronej Mar 4, 2026
0961af7
Specs for S3BookmarksBar
marchufschmitt Mar 4, 2026
2956d41
Merge branch 'main' into explorer_deep_rework
garronej Mar 4, 2026
bd4143b
Move all ongoing work on the components build with codex in a dedicat…
garronej Mar 4, 2026
7c36824
Add more specs to S3BookmarksBar
marchufschmitt Mar 4, 2026
a87429a
Start spec of S3BookmarksBarItem
garronej Mar 4, 2026
caf6a58
Update onyxia-ui
garronej Mar 4, 2026
013d57e
Add padding to segmentBucket background style
garronej Mar 4, 2026
6f1ab50
Adjust button sizes in S3UriBar for improved UI consistency
garronej Mar 4, 2026
88acb06
Update bookmark button background color for improved visibility
garronej Mar 4, 2026
f8b6c4b
Increase bookmark button dimensions for improved usability
garronej Mar 4, 2026
6dfbc54
Refactor S3UriBar hints to use 'text' instead of 'name' and add 'book…
garronej Mar 5, 2026
c198e7b
Refactor S3UriBar to remove isEditing prop and related handlers for i…
garronej Mar 5, 2026
870eb97
(MAYBE Regression) Make the S3UriBar handle the state internally whil…
garronej Mar 5, 2026
cd4c3ee
Remove legacy implementation of the explorer and setup a very minimal…
garronej Mar 9, 2026
b8927b0
Create new ui components S3BookmarksItem and S3BookmarksBar
marchufschmitt Mar 4, 2026
4ab4e12
Add some props to bookmarks item and bar
marchufschmitt Mar 9, 2026
eb63c41
Create new component for S3 Profile Select
marchufschmitt Mar 9, 2026
0c51659
Remove file created by mistake
marchufschmitt Mar 9, 2026
dc06881
Change read-only profile indicator to S3ProfileSelect component
marchufschmitt Mar 11, 2026
35c74cf
Make it compile
garronej Mar 11, 2026
701fd2f
Update component to match the new S3Uri abstraction.
garronej Mar 11, 2026
8f51bae
Changes propagation to UI
garronej Mar 11, 2026
f407361
Update onyxia-ui
garronej Mar 11, 2026
9569068
Propagate S3Uri changes
garronej Mar 11, 2026
63d8b1a
Remove legacy components
garronej Mar 11, 2026
53944c6
Update onyxia-ui
garronej Mar 11, 2026
d6ad856
Fix compilation error
garronej Mar 13, 2026
563506e
Remove unused translations
garronej Mar 13, 2026
ebfa103
Remove translation re-use
garronej Mar 13, 2026
f7f4648
Complete the fix of compilation errors
garronej Mar 13, 2026
b1fc0b6
Add optional debounce for listPrefix
garronej Mar 13, 2026
500f04a
Do not parse bookmarks uri before applying substitution
garronej Mar 13, 2026
8284a0d
Exclude current hints
garronej Mar 13, 2026
cf89985
Fix bar UriBarCompletion
garronej Mar 14, 2026
0ae55ff
Navigation to "here" with hint.
garronej Mar 14, 2026
d7132ef
Add Enter key handling to exit editing mode in S3UriBar when no hints…
garronej Mar 14, 2026
b7f0886
Let the core know when the s3Uri is undefined.
garronej Mar 15, 2026
97e5331
Add visual feedback when listing
garronej Mar 16, 2026
af02e77
Enhance getIsInside function to handle identical URIs and improve top…
garronej Mar 16, 2026
daeda3e
Skip listing when we can infer from current state
garronej Mar 16, 2026
84ae057
Debounce listing only when relevant
garronej Mar 16, 2026
4b46c85
Correct computation of hints from bookmarks, removing duplicated entries
garronej Mar 16, 2026
3819be7
Add root button functionality to enter editing mode with default draft
garronej Mar 16, 2026
e4e823e
Remove the copy button
garronej Mar 16, 2026
801cbf9
Remove the edit button
garronej Mar 16, 2026
c9c5e30
Fix uriBar / core connection relative bookmarks
garronej Mar 16, 2026
56d5a0a
Properly order hints
garronej Mar 16, 2026
8862867
Connect the data explorer to the new S3 explorer
garronej Mar 17, 2026
2211123
Adjustment on the size of the data explorer
garronej Mar 17, 2026
1dfcb37
The core should be responsible of what happen when a hint is selected.
garronej Mar 17, 2026
1b41da6
Hide hint modal when focus is lost
garronej Mar 17, 2026
8747a96
The hint modal should be visible only when the end of the input is se…
garronej Mar 17, 2026
030d196
Using tab for completion
garronej Mar 17, 2026
8308fb0
Pressing escape loose the focus
garronej Mar 17, 2026
757f810
Enable to select the key by pressing the key icon in the S3UriBar
garronej Mar 17, 2026
d6b8c36
Add S3 Bookmarks Entry Point Item and list
marchufschmitt Mar 16, 2026
2ac7164
Add Component : Create S3 Profile Modal
marchufschmitt Mar 16, 2026
51b54fc
Integrate bookmark bar
garronej Mar 17, 2026
bebb0a8
Add spacing
garronej Mar 17, 2026
3a35417
Fix compilation error
garronej Mar 17, 2026
8b4d768
Standardize the way we sync route (and add sync in the new s3Explorer…
garronej Mar 18, 2026
91e4bd4
Add synchronization of draft S3 URI with external updates in editing …
garronej Mar 18, 2026
40fee3c
Add update to : S3ProfileSelect Component (Remove icons, remove S3 UR…
marchufschmitt Mar 18, 2026
c677127
S3UriBar Ui Update : Change hover boxShadow
marchufschmitt Mar 18, 2026
b79a084
S3UriBar UI Update : change some background colors
marchufschmitt Mar 18, 2026
6036b1b
S3BookmarksItem UI Update (active, hover and some other datils on hov…
marchufschmitt Mar 18, 2026
ffdeac9
Modal for editing bookmark name
garronej Mar 18, 2026
38b1d8c
Improve naming bookmarks
garronej Mar 18, 2026
fd4470c
Refactor CreateOrRenameBookmarkDialog title and subtitle for clarity;…
garronej Mar 18, 2026
961ee08
Fix getDefaultDisplayName logic to handle S3 URI key segments correctly
garronej Mar 18, 2026
3a61d90
Add translations for CreateOrRenameBookmarkDialog in multiple languages
garronej Mar 18, 2026
d0a1b0d
Create props for two new components
garronej Mar 18, 2026
b6f99e5
Merge branch 'main' into explorer_deep_rework
garronej Mar 19, 2026
726de90
Fix spelling error in name in directory
garronej Mar 18, 2026
411c70a
Remove unused prop
garronej Mar 18, 2026
c4c3ee1
Integrate the profile select
garronej Mar 18, 2026
37b1846
Position S3Profile
garronej Mar 18, 2026
d8c256e
Center the loading progress while we're loading a data file.
garronej Mar 19, 2026
28ecb77
Design the props of the explorer main view and integrate it.
garronej Mar 19, 2026
059043d
Basic explorer view
garronej Mar 19, 2026
76c17f5
Enable to open files
garronej Mar 19, 2026
fbd7b40
Save vertical space
garronej Mar 19, 2026
ab11c53
Adjust spacing
garronej Mar 19, 2026
22266e6
Remove console log.
garronej Mar 19, 2026
98a7264
Adjust page layout
garronej Mar 19, 2026
85e2625
Adjust spacing
garronej Mar 19, 2026
795dde9
Reuse button bar
garronej Mar 19, 2026
bf7017e
Use button bar
garronej Mar 19, 2026
2bbfd68
Adjust padding in toolbar styles for better layout
garronej Mar 19, 2026
34d8584
Adjust margin top in S3BookmarksBar for improved layout
garronej Mar 19, 2026
f0f213f
Add sorting indicators for table columns in S3ExplorerMainView
garronej Mar 19, 2026
01bda40
Update listingProgress styles for improved positioning and interaction
garronej Mar 19, 2026
9afd462
Adjust padding in styles for improved layout in S3ExplorerMainView
garronej Mar 19, 2026
d742017
Update overflow and zIndex styles for drag-and-drop functionality in …
garronej Mar 19, 2026
e449360
Reintroduce command bar
garronej Mar 20, 2026
2e630cc
Internationalize the S3ExplorerMainView component
garronej Mar 20, 2026
79e319a
Make sure no elements of the S3MainView goes over the command bar. Re…
garronej Mar 20, 2026
dedca39
Add handling for exiting undefined prefix mode in S3UriBar
garronej Mar 20, 2026
292a477
fix(web): align S3 bookmark props and restore URI bar navigation mode
garronej Mar 20, 2026
96cfee1
fix(web): conditionally render CommandBar based on command logs entries
garronej Mar 20, 2026
9a6984c
fix(web): improve focus handling for input during editing in S3UriBar
garronej Mar 20, 2026
99be82d
feat(s3Explorer): add page header and move command bar to top-right
garronej Mar 20, 2026
ee29041
fix(s3Explorer): report upload progress for putObject action
garronej Mar 20, 2026
6050594
feat(s3-explorer): refine inline upload progress feedback
garronej Mar 20, 2026
c693a50
fix(S3Explorer): enhance status pill styling with padding adjustments
garronej Mar 20, 2026
f052c31
feat(S3Explorer): enhance table layout with column definitions and fi…
garronej Mar 20, 2026
88477f3
Create a beginning of component for S3SelectionActionBar
marchufschmitt Mar 20, 2026
15919cb
S3SelectionActionBar UI Update (Padding & alignements)
marchufschmitt Mar 20, 2026
518f431
S3UriBar UI Update
marchufschmitt Mar 23, 2026
6629c7f
S3ProfileSelect : Add Label and UI Update
marchufschmitt Mar 23, 2026
e316977
S3ExplorerMainView UI Update (Data Grid)
marchufschmitt Mar 23, 2026
cd6a95a
Add some behavior update for S3ExplorerMainView Item
marchufschmitt Mar 24, 2026
1574da8
New component : S3Uploads Spec
marchufschmitt Mar 24, 2026
cfc86c4
Correct positioning of the CommandBar
garronej Mar 24, 2026
e6ae4cc
Superposition of the bookmark bar and action bar
garronej Mar 24, 2026
ff1091c
Basic fixes
garronej Mar 24, 2026
47acca1
Do not adjust spacing, icon size depending of the screen width
garronej Mar 24, 2026
1d0bc78
update S3Upload component (with better height spacing and add an hove…
marchufschmitt Mar 24, 2026
1361128
Rollback broken superposition
garronej Mar 24, 2026
ae02a46
Update spacing between the datagrid and the S3SelectionActionBar
marchufschmitt Mar 24, 2026
ce6d839
Update UI with spacing of S3UriBar
marchufschmitt Mar 25, 2026
0720981
Some update with S3Upload
marchufschmitt Mar 25, 2026
8552b23
Update s3Explorer page layout
garronej Mar 24, 2026
cceaf3a
Add horizontal scroll bar
garronej Mar 25, 2026
6236df5
Spacing adjustment
garronej Mar 25, 2026
af95689
Big Updates to Bookmark UI & Behaviors
marchufschmitt Mar 25, 2026
7ae588d
S3ProfileSelect UI Update
marchufschmitt Mar 25, 2026
fea5f13
UI Upgrade of S3ExplorerMainView
marchufschmitt Mar 25, 2026
c5e4aea
S3ExplorerMainView UI Update (Colors Surface - small changes)
marchufschmitt Mar 25, 2026
4ffc1e7
Report upload progress 100% only when actually done to deal with timi…
garronej Mar 25, 2026
c3175f3
Enable upload to be canceled
garronej Mar 25, 2026
e4d29bf
Do not collapse expended command bar on click away on every pages
garronej Mar 25, 2026
994e5a6
Fix command line response formating
garronej Mar 25, 2026
b6351a2
Update of spacing on S3Explorer Main Page
marchufschmitt Mar 25, 2026
90d93b7
S3 BookmarksBar UI Update (Colors : default and hover)
marchufschmitt Mar 25, 2026
5c807f0
Update style of SelectionActionsBar
marchufschmitt Mar 25, 2026
54a36e0
Add some UI changes on S3ExplorerMainView
marchufschmitt Mar 25, 2026
9422812
New UI Iteration of the S3Upload Component
marchufschmitt Mar 25, 2026
6d485e1
Padding Upgrade on S3UriBar
marchufschmitt Mar 25, 2026
75c0582
S3Upload Details UI Upgrade + add collapsed interaction
marchufschmitt Mar 26, 2026
762c0ac
Change Upload Zone Size and upgrade UI and content info
marchufschmitt Mar 26, 2026
1a031d8
Upload Integration
marchufschmitt Mar 26, 2026
618a347
Fix build
garronej Mar 30, 2026
b9ba3de
Fix layout shift
garronej Mar 30, 2026
ff3e65d
Add padding to avoid shadow clipping
garronej Mar 30, 2026
c8f53ab
We need space below the main view to show the data grid.
garronej Mar 30, 2026
95088ca
Enable to upload directory
garronej Mar 30, 2026
f117e81
Make sure that when a download has been cancel, progress can't be rep…
garronej Mar 30, 2026
e265511
Cancel command when upload has been canceled
garronej Mar 30, 2026
b9d1004
Enable to 'delete' ongoing uploads (it cancels)
garronej Mar 30, 2026
44d1394
S3Upload Component - UI Update : spacing, icons and upload gauge
marchufschmitt Mar 31, 2026
7070b9a
Update specs with new ui changes of S3upload component
marchufschmitt Mar 31, 2026
c847e1d
S3ExplorerMainView : Add surface background on headerRow
marchufschmitt Mar 31, 2026
87dcfb7
Define min width for the open modal of S3ProfileSelect component (UI)
marchufschmitt Mar 31, 2026
c7c83a0
Proper error handling on failed uploads
garronej Mar 31, 2026
ca9f7f0
Implement a queue for file uploads, can only upload one file at the time
garronej Apr 1, 2026
22054ad
Create new compoent S3ContextActionButton with spec and story
marchufschmitt Apr 1, 2026
304a8ae
Update upload ui component to align with how Google Drive does it
garronej Apr 2, 2026
f84915c
Implement error upload retry
garronej Apr 2, 2026
63801cc
Fix putObject cancel logic
garronej Apr 2, 2026
f105438
core: Cancel and retry uploads
garronej Apr 2, 2026
cd804d2
Introduce upload status modal global to the app UI
garronej Apr 2, 2026
17dadde
Keep completed uploads in the list
garronej Apr 2, 2026
6665e97
Sort file upload alphabetically
garronej Apr 2, 2026
0c9c56f
Avoid layout shift on uploads
garronej Apr 3, 2026
6b683b6
Integrate navigate back button
garronej Apr 3, 2026
c42d4da
Integrate S3 bar buttons for creating a dir and uploading a file (WIP…
garronej Apr 3, 2026
18370e3
S3UriBar component : Update UI of "bookmarkButtonReadonly" Statut
marchufschmitt Apr 7, 2026
c85a723
Fix crash when not logged in
garronej Apr 7, 2026
4f6194b
Add dialog for directory creation
garronej Apr 7, 2026
2e21ae2
Make the directory creation give an error when attempting to create a…
garronej Apr 7, 2026
2aa827a
Exclude .keep from uploads
garronej Apr 7, 2026
64e8f0c
Fix back button when visualizing a single file
garronej Apr 7, 2026
59de652
Upload (without drag and drop)
garronej Apr 7, 2026
a6f201b
Fix sizing of the darg and drop area
garronej Apr 7, 2026
72ad197
Simplify the drag and drop UI (and code)
garronej Apr 7, 2026
52b7576
Drag and drop only when listing a prefix
garronej Apr 7, 2026
c4bb1a9
Enable to ask confirmation before overwriting files that already exist
garronej Apr 7, 2026
e593c03
Pre-select the file when oppening from the upload modal
garronej Apr 7, 2026
cd77c69
Fix bookmark links not including the ambient profile
garronej Apr 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"servers": {
"figma": {
"url": "http://127.0.0.1:3845/mcp",
"type": "http"
}
},
"inputs": []
}
1 change: 1 addition & 0 deletions web/.env
Original file line number Diff line number Diff line change
Expand Up @@ -893,3 +893,4 @@ OIDC_DISABLE_DPOP=false

# Can be "auto", "iframe" or "full page redirect"
OIDC_SESSION_RESTORATION_METHOD=auto

6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"async-mutex": "^0.5.0",
"axios": "^1.9.0",
"bytes": "^3.1.2",
"clean-architecture": "^6.0.3",
"clean-architecture": "^6.1.0",
"codemirror": "6.0.1",
"codemirror-json-schema": "0.7.9",
"compare-versions": "^6.1.1",
Expand All @@ -70,15 +70,15 @@
"minimal-polyfills": "^2.2.3",
"mui-icons-material-lazy": "^1.0.4",
"oidc-spa": "^10.0.4",
"onyxia-ui": "^6.7.8",
"onyxia-ui": "^6.10.0",
"pathe": "^2.0.3",
"powerhooks": "^2.0.1",
"react": "^18.3.1",
"react-code-blocks": "^0.1.6",
"react-dom": "^18.3.1",
"run-exclusive": "^2.2.19",
"screen-scaler": "^2.0.0",
"tsafe": "^1.8.5",
"tsafe": "^1.8.12",
"tss-react": "^4.9.18",
"type-route": "1.1.0",
"xterm": "^5.3.0",
Expand Down
57 changes: 57 additions & 0 deletions web/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Before:

```js
{
workingDirectory: {
bucketMode: "multi",
bucketNamePrefix: "",
bucketNamePrefixGroup: "projet-"
},
bookmarkedDirectories: [
{
fullPath: "donnees-insee/diffusion/",
title: {
fr: "Données de diffusion",
en: "Dissemination Data"
},
description: {
fr: "Bucket public destiné à la diffusion de données",
en: "Public bucket intended for data dissemination"
}
}
]
}
```

After:

```js
{
bookmarkedDirectories: [
{
fullPath: "$1/",
title: "Personal",
description: "Personal Bucket",
claimName: "preferred_username"
},
{
fullPath: "projet-$1/",
title: "Group $1",
description: "Shared bucket among members of project $1",
claimName: "groups",
excludedClaimPattern: "^USER_ONYXIA$"
},
{
fullPath: "donnees-insee/diffusion/",
title: {
fr: "Données de diffusion",
en: "Dissemination Data"
},
description: {
fr: "Bucket public destiné à la diffusion de données",
en: "Public bucket intended for data dissemination"
}
}
];
}
```
33 changes: 22 additions & 11 deletions web/src/core/adapters/onyxiaApi/ApiTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,23 +83,33 @@
};
data?: {
S3?: ArrayOrNot<{
profileName?: string;
URL: string;
pathStyleAccess?: true;

region?: string;
sts?: {
URL?: string;
durationSeconds?: number;
role:
| {
roleARN: string;
roleSessionName: string;
}
| undefined;
role?: ArrayOrNot<
{
roleARN: string;
roleSessionName: string;
profileName: string;
} & (
| { claimName?: undefined }

Check warning on line 100 in web/src/core/adapters/onyxiaApi/ApiTypes.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Consider removing 'undefined' type or '?' specifier, one of them is redundant.

See more on https://sonarcloud.io/project/issues?id=InseeFrLab_onyxia&issues=AZy4_nAlvKEmeUrlRKsP&open=AZy4_nAlvKEmeUrlRKsP&pullRequest=1057
| {
claimName: string;
includedClaimPattern?: string;
excludedClaimPattern?: string;
}
)
>;
oidcConfiguration?: Partial<ApiTypes.OidcConfiguration>;
};

/** Ok to be undefined only if sts is undefined */
// NOTE: Remove in next major
workingDirectory?:
| {
bucketMode: "shared";
Expand All @@ -115,14 +125,15 @@
bookmarkedDirectories?: ({
fullPath: string;
title: LocalizedString;
description: LocalizedString | undefined;
tags: LocalizedString[] | undefined;
description?: LocalizedString;
tags?: LocalizedString[];
forProfileName?: string | string[];
} & (
| { claimName: undefined }
| { claimName?: undefined }
| {
claimName: string;
includedClaimPattern: string;
excludedClaimPattern: string;
includedClaimPattern?: string;
excludedClaimPattern?: string;
}
))[];
}>;
Expand Down
183 changes: 138 additions & 45 deletions web/src/core/adapters/onyxiaApi/onyxiaApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,141 @@
return [value];
})();

const s3ConfigCreationFormDefaults: DeploymentRegion["s3ConfigCreationFormDefaults"] =
const s3Profiles: DeploymentRegion.S3Profile[] =
s3Configs_api
.filter(
s3Configs_api =>

Check failure on line 238 in web/src/core/adapters/onyxiaApi/onyxiaApi.ts

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Refactor this code to not nest functions more than 4 levels deep.

See more on https://sonarcloud.io/project/issues?id=InseeFrLab_onyxia&issues=AZy4_nBdvKEmeUrlRKsR&open=AZy4_nBdvKEmeUrlRKsR&pullRequest=1057
s3Configs_api.sts !== undefined
)
.map(
(
s3Config_api
): DeploymentRegion.S3Profile => {
return {
profileName: s3Config_api.profileName,
url: s3Config_api.URL,
pathStyleAccess:
s3Config_api.pathStyleAccess ??
true,
region: s3Config_api.region,
sts: (() => {
const sts_api = s3Config_api.sts;

assert(sts_api !== undefined);

return {
url: sts_api.URL,
durationSeconds:
sts_api.durationSeconds,
roles: (() => {
if (
sts_api.role ===
undefined
) {
return [];
}

const rolesArray =
sts_api.role instanceof
Array
? sts_api.role
: [sts_api.role];

return rolesArray.map(
(
role_api
): DeploymentRegion.S3Profile.StsRole => ({
roleARN:
role_api.roleARN,
roleSessionName:
role_api.roleSessionName,
profileName:
role_api.profileName,
...(role_api.claimName ===
undefined
? {
claimName:
undefined
}
: {
claimName:
role_api.claimName,
includedClaimPattern:
role_api.includedClaimPattern,
excludedClaimPattern:
role_api.excludedClaimPattern
})
})
);
})(),
oidcParams:
apiTypesOidcConfigurationToOidcParams_Partial(
sts_api.oidcConfiguration
)
} as any;
})(),
bookmarks: (
s3Config_api.bookmarkedDirectories ??
[]
).map(
(
bookmarkedDirectory_api
): DeploymentRegion.S3Profile.Bookmark => {
return id<DeploymentRegion.S3Profile.Bookmark>(
{
s3UriStr_templated: `s3://${bookmarkedDirectory_api.fullPath}`,
title: bookmarkedDirectory_api.title,
description:
bookmarkedDirectory_api.description,
tags:
bookmarkedDirectory_api.tags ??
[],
forProfileNames:
(() => {
const v =
bookmarkedDirectory_api.forProfileName;

if (
v ===
undefined
) {
return [];
}

if (
typeof v ===
"string"
) {
return [
v
];
}

return v;
})(),
...(bookmarkedDirectory_api.claimName ===
undefined
? {
claimName:
undefined
}
: {
claimName:
bookmarkedDirectory_api.claimName,
includedClaimPattern:
bookmarkedDirectory_api.includedClaimPattern,
excludedClaimPattern:
bookmarkedDirectory_api.excludedClaimPattern
})
}
);
}
)
};
}
);

const s3Profiles_defaultValuesOfCreationForm: DeploymentRegion["s3Profiles_defaultValuesOfCreationForm"] =
(() => {
const s3Config_api = (() => {
config_without_sts: {
Expand Down Expand Up @@ -265,54 +399,13 @@
url: s3Config_api.URL,
pathStyleAccess:
s3Config_api.pathStyleAccess ?? true,
region: s3Config_api.region,
workingDirectory:
s3Config_api.workingDirectory
region: s3Config_api.region
};
})();

const s3Configs: DeploymentRegion["s3Configs"] =
s3Configs_api
.map(({ sts, workingDirectory, ...rest }) => {
if (sts === undefined) {
return undefined;
}
assert(
workingDirectory !== undefined,
"If region.data.S3.sts is not undefined workingDirectory must be specified"
);

return {
sts,
workingDirectory,
...rest
};
})
.filter(exclude(undefined))
.map(s3Config_api => ({
url: s3Config_api.URL,
pathStyleAccess:
s3Config_api.pathStyleAccess ?? true,
region: s3Config_api.region,
sts: {
url: s3Config_api.sts.URL,
durationSeconds:
s3Config_api.sts.durationSeconds,
role: s3Config_api.sts.role,
oidcParams:
apiTypesOidcConfigurationToOidcParams_Partial(
s3Config_api.sts.oidcConfiguration
)
},
workingDirectory:
s3Config_api.workingDirectory,
bookmarkedDirectories:
s3Config_api.bookmarkedDirectories ?? []
}));

return {
s3Configs,
s3ConfigCreationFormDefaults
s3Profiles,
s3Profiles_defaultValuesOfCreationForm
};
})(),
allowedURIPatternForUserDefinedInitScript:
Expand Down
Loading
Loading