From 549b11dcfb39a60acd6d3899fce51b31149f8594 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 18 Oct 2024 20:30:34 +0200 Subject: [PATCH] fix(frontend): add back script lockfile to script details pae --- .../details/DetailPageDetailPanel.svelte | 8 ++-- .../details/DetailPageLayout.svelte | 11 ++++- .../details/DetailPageTriggerPanel.svelte | 24 +++++------ frontend/src/lib/relative_imports.ts | 2 +- .../scripts/get/[...hash]/+page.svelte | 40 +++++-------------- 5 files changed, 38 insertions(+), 47 deletions(-) diff --git a/frontend/src/lib/components/details/DetailPageDetailPanel.svelte b/frontend/src/lib/components/details/DetailPageDetailPanel.svelte index a5927c2938da7..4d56fba8f35b3 100644 --- a/frontend/src/lib/components/details/DetailPageDetailPanel.svelte +++ b/frontend/src/lib/components/details/DetailPageDetailPanel.svelte @@ -31,13 +31,12 @@ {/if} {#if flow_json} Export + {:else} + Script {/if} {#if selected == 'flow_step'} Step {/if} - {#if !flow_json && !isOperator} - Schema - {/if}
@@ -47,6 +46,9 @@ + + + diff --git a/frontend/src/lib/components/details/DetailPageLayout.svelte b/frontend/src/lib/components/details/DetailPageLayout.svelte index 8e9dc119a046f..ec0a5bda16799 100644 --- a/frontend/src/lib/components/details/DetailPageLayout.svelte +++ b/frontend/src/lib/components/details/DetailPageLayout.svelte @@ -52,10 +52,9 @@ - + - @@ -70,6 +69,10 @@ {#if !isOperator} Triggers {/if} + {#if !flow_json} + Script + {/if} + @@ -82,12 +85,16 @@ + + + +
diff --git a/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte b/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte index 71824b14d0fce..d09a92ae81d57 100644 --- a/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte +++ b/frontend/src/lib/components/details/DetailPageTriggerPanel.svelte @@ -17,38 +17,38 @@ - - + + Webhooks - - + + Schedules - - + + HTTP - - + + Websockets - - + + Email - - + + CLI diff --git a/frontend/src/lib/relative_imports.ts b/frontend/src/lib/relative_imports.ts index 3923a1e648133..fd4b44c9ba98c 100644 --- a/frontend/src/lib/relative_imports.ts +++ b/frontend/src/lib/relative_imports.ts @@ -26,5 +26,5 @@ export function approximateFindPythonRelativePath(code: string) { // Use match to find all matches in the code const matches = code.match(regex) - return [...(matches?.entries() ?? [])] || [] + return [...(matches?.entries() ?? [])] } diff --git a/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte b/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte index de4a75fc4ec77..66641c18d324d 100644 --- a/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte @@ -21,7 +21,6 @@ import { enterpriseLicense, hubBaseUrlStore, userStore, workspaceStore } from '$lib/stores' import { isDeployable, ALL_DEPLOYABLE } from '$lib/utils_deployable' - import SchemaViewer from '$lib/components/SchemaViewer.svelte' import { onDestroy } from 'svelte' import HighlightCode from '$lib/components/HighlightCode.svelte' import { @@ -686,17 +685,6 @@
- -
- - -
-
{#if args} - +
Code Lockfile - - - Inputs - - The jsonschema defines the constraints that the payload must respect to be - compatible with the input parameters of this script. The UI form is generated - automatically from the script jsonschema. See - - jsonschema documentation - - - - + Schema
@@ -808,9 +784,15 @@ {/if}
- -
- + +
+ +