diff --git a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx index ffb2ee52e7..94d54542f9 100644 --- a/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx +++ b/web/app/components/datasets/create-from-pipeline/create-options/create-from-dsl-modal/index.tsx @@ -103,7 +103,7 @@ const CreateFromDSLModal = ({ if (!response) return - const { id, status, pipeline_id, imported_dsl_version, current_dsl_version } = response + const { id, status, pipeline_id, dataset_id, imported_dsl_version, current_dsl_version } = response if (status === DSLImportStatus.COMPLETED || status === DSLImportStatus.COMPLETED_WITH_WARNINGS) { if (onSuccess) onSuccess() @@ -117,7 +117,7 @@ const CreateFromDSLModal = ({ }) if (pipeline_id) await handleCheckPluginDependencies(pipeline_id, true) - push(`datasets/${pipeline_id}/pipeline`) + push(`datasets/${dataset_id}/pipeline`) } else if (status === DSLImportStatus.PENDING) { setVersions({ @@ -160,7 +160,7 @@ const CreateFromDSLModal = ({ import_id: importId, }) - const { status, pipeline_id } = response + const { status, pipeline_id, dataset_id } = response if (status === DSLImportStatus.COMPLETED) { if (onSuccess) @@ -174,7 +174,7 @@ const CreateFromDSLModal = ({ }) if (pipeline_id) await handleCheckPluginDependencies(pipeline_id, true) - push(`datasets/${pipeline_id}/pipeline`) + push(`datasets/${dataset_id}/pipeline`) } else if (status === DSLImportStatus.FAILED) { notify({ type: 'error', message: t('app.newApp.appCreateFailed') }) diff --git a/web/app/components/datasets/create-from-pipeline/list/template-card/details.tsx b/web/app/components/datasets/create-from-pipeline/list/template-card/details.tsx index 9d869146eb..43d16fd336 100644 --- a/web/app/components/datasets/create-from-pipeline/list/template-card/details.tsx +++ b/web/app/components/datasets/create-from-pipeline/list/template-card/details.tsx @@ -6,6 +6,7 @@ import { RiAddLine, RiCloseLine } from '@remixicon/react' import Button from '@/app/components/base/button' import { useTranslation } from 'react-i18next' import Tooltip from '@/app/components/base/tooltip' +import Loading from '@/app/components/base/loading' type DetailsProps = { id: string @@ -31,9 +32,7 @@ const Details = ({ if (!pipelineTemplateInfo) { return ( -
-
Loading...
-
+ ) } diff --git a/web/models/pipeline.ts b/web/models/pipeline.ts index c03039cfd4..dbb34367f5 100644 --- a/web/models/pipeline.ts +++ b/web/models/pipeline.ts @@ -77,6 +77,7 @@ export type ImportPipelineDSLResponse = { id: string status: DSLImportStatus pipeline_id: string + dataset_id: string current_dsl_version: string imported_dsl_version: string error: string @@ -91,6 +92,7 @@ export type ImportPipelineDSLConfirmResponse = { id: string status: DSLImportStatus pipeline_id: string + dataset_id: string current_dsl_version: string imported_dsl_version: string error: string