From ad8f9937d967e63537514c7067503f852576bdce Mon Sep 17 00:00:00 2001 From: Alex Bozarth Date: Thu, 9 Jun 2022 16:52:40 -0500 Subject: [PATCH] Do not persist the jupyter baseUrl in pipelines (#2775) The changes in #2728 cause the pipeline-editor to persist the full url for a node's image. This could cause issues with surfacing PI, as such I've updated that fix to instead use the full URL base, which will behave the same as before the fix, but including the URL path from the baseUrl if one exists. Note that if a baseUrl path conatains PI that would still be persisted, but puting PI in a URL path is considered inappropriate handling of PI by the server owner, not Elyra. Fixes #2773 --- packages/pipeline-editor/src/pipeline-hooks.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/pipeline-editor/src/pipeline-hooks.ts b/packages/pipeline-editor/src/pipeline-hooks.ts index 69f8a0e61..ff2888041 100644 --- a/packages/pipeline-editor/src/pipeline-hooks.ts +++ b/packages/pipeline-editor/src/pipeline-hooks.ts @@ -213,10 +213,9 @@ export const componentFetcher = async (type: string): Promise => { category.node_types?.[0]?.runtime_type ?? 'LOCAL'; const type = types.find((t: any) => t.id === category_runtime_type); - const defaultIcon = URLExt.join( - ServerConnection.makeSettings().baseUrl, - type?.icon || '' - ); + const defaultIcon = URLExt.parse( + URLExt.join(ServerConnection.makeSettings().baseUrl, type?.icon || '') + ).pathname; category.image = defaultIcon;