From 120d8f696dc72b047ef8e00ecc754a7bb53befae Mon Sep 17 00:00:00 2001 From: rickchengx <38122586+rickchengx@users.noreply.github.com> Date: Tue, 13 Sep 2022 13:54:55 +0800 Subject: [PATCH] [Fix-11877][UI] Fix the problem that the environment cannot be deleted on the UI of some tasks (#11878) --- .../views/projects/task/components/node/tasks/use-chunjun.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-datax.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-dinky.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-dvc.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-emr.ts | 2 +- .../views/projects/task/components/node/tasks/use-hive-cli.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-java.ts | 2 +- .../views/projects/task/components/node/tasks/use-jupyter.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-k8s.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-mlflow.ts | 2 +- .../views/projects/task/components/node/tasks/use-openmldb.ts | 2 +- .../views/projects/task/components/node/tasks/use-procedure.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-python.ts | 2 +- .../views/projects/task/components/node/tasks/use-pytorch.ts | 2 +- .../views/projects/task/components/node/tasks/use-sagemaker.ts | 2 +- .../views/projects/task/components/node/tasks/use-sea-tunnel.ts | 2 +- .../src/views/projects/task/components/node/tasks/use-sql.ts | 2 +- .../views/projects/task/components/node/tasks/use-zeppelin.ts | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts index eb6dc03d71..65f714d1ed 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-chunjun.ts @@ -59,7 +59,7 @@ export function useChunjun({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts index 21b30abd74..7dbcf04abd 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-datax.ts @@ -62,7 +62,7 @@ export function useDataX({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), ...Fields.useResourceLimit(), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts index 82c2915287..05dbaa60de 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dinky.ts @@ -54,7 +54,7 @@ export function useDinky({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts index 6108ca4e8e..284c9b1014 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-dvc.ts @@ -55,7 +55,7 @@ export function useDvc({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts index f6cdbaae11..c62bb9e44f 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-emr.ts @@ -56,7 +56,7 @@ export function useEmr({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts index 1c125e656e..c740384bc3 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-hive-cli.ts @@ -67,7 +67,7 @@ export function useHiveCli({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-java.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-java.ts index 822ec193cc..8f85266987 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-java.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-java.ts @@ -76,7 +76,7 @@ export function useJava({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts index 97f683df1e..a718320be9 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-jupyter.ts @@ -56,7 +56,7 @@ export function useJupyter({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), ...Fields.useResourceLimit(), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts index 1ae460917a..f13f7c74f0 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-k8s.ts @@ -55,7 +55,7 @@ export function useK8s({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts index e1957f138e..4e84d3ee2d 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-mlflow.ts @@ -65,7 +65,7 @@ export function useMlflow({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts index 0e7dbaa629..299cd8bd61 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-openmldb.ts @@ -58,7 +58,7 @@ export function useOpenmldb({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts index a1f5f3cfff..5e9ddb31de 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-procedure.ts @@ -58,7 +58,7 @@ export function useProcedure({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts index 7ad9ee95ec..5b06937016 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-python.ts @@ -58,7 +58,7 @@ export function usePython({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), ...Fields.useResourceLimit(), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts index 3f3172d419..302f73e758 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-pytorch.ts @@ -73,7 +73,7 @@ export function usePytorch({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), ...Fields.useResourceLimit(), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts index f525b53a48..89fab36525 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sagemaker.ts @@ -54,7 +54,7 @@ export function userSagemaker({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts index c570bac15b..0f184461a0 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sea-tunnel.ts @@ -85,7 +85,7 @@ export function useSeaTunnel({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), ...Fields.useResourceLimit(), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts index 481bae1b34..d477d340c9 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-sql.ts @@ -63,7 +63,7 @@ export function useSql({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model), diff --git a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts index 823752b9a3..0f6bbeeeab 100644 --- a/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts +++ b/dolphinscheduler-ui/src/views/projects/task/components/node/tasks/use-zeppelin.ts @@ -54,7 +54,7 @@ export function useZeppelin({ Fields.useDescription(), Fields.useTaskPriority(), Fields.useWorkerGroup(), - Fields.useEnvironmentName(model, !model.id), + Fields.useEnvironmentName(model, !data?.id), ...Fields.useTaskGroup(model, projectCode), ...Fields.useFailed(), Fields.useDelayTime(model),