feat: Create YAML import endpoint for Tangle Deploy to preview pipeline#1829
feat: Create YAML import endpoint for Tangle Deploy to preview pipeline#1829yuechao-qin merged 1 commit intomasterfrom
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
http://localhost:3000/#/import?url=http://bad-url We wanted to implement this feature for sample pipelines, but eventually went with a preloaded set of pipelines. Although, doing such importing in the browser is still more secure than doing that in the backend (which is more privileged and has access to internal resources). |
|
>/import I think we need the name to be more specific so that it does not conflict with things like importing components. Also, I'de like the frontend to minimize the number of root route "directories". In some circumstances we need to route HTTP requests between UI and API server (on same domain) and URL prefixes makes that easier. |
|
In order to properly load remote resource we would need a proxy to:
|
767f09b to
5dff0ff
Compare
🎩 To tophat this PR:You can add the following URL parameter to your browser to tophat this PR: |
5dff0ff to
2973409
Compare
2973409 to
26ebe8e
Compare
Merge activity
|
26ebe8e to
43fb8e7
Compare

tangle-ui
Description
Add
/app/editor/import-pipelineroute to enable opening pipeline YAML files directly in the browser editor from external tools.Look at PR-28268 for Video Demos for what this PR supports.
Changes
ImportPagecomponent (src/routes/Import/index.tsx) — strict URL validation (isAllowedImportUrl), confirmation dialog before fetch, step indicator UI, error handling with reusableErrorScreencomponent/app/editor/import-pipelineinrouter.tsSecurity
http://127.0.0.1:{port>=10000}/tangle-deploy/pipeline.yaml— blocks crafted URLs targeting local servicesimportPipelineFromYamlvalidates YAML syntax and graph structure before saving to IndexedDB/importto/app/editor/import-pipelineto avoid root-level conflicts and clarify intentTest Steps
npm run start(frontend onlocalhost:3000)tangle-view-pipeline <any_pipeline.yaml> --ui-url http://localhost:3000— browser should open, show the step indicator, and redirect to the editor with the pipeline loadedhttp://localhost:3000/#/import(nourlparam) — should show "Missing 'url' parameter" error with Back to Home buttonhttp://localhost:3000/#/import?url=http://bad-url— should show fetch error UInpm test -- src/routes/Import/Import.test.tsx— all 6 tests should pass