From 296cb92638529b806b83c79230a56e83c8006ac5 Mon Sep 17 00:00:00 2001 From: wenmo <32723967+aiwenmo@users.noreply.github.com> Date: Tue, 25 Feb 2025 18:12:16 +0800 Subject: [PATCH] [Optimization-4165] Optimization udf saved placeholder --- .../src/main/java/org/dinky/controller/TaskController.java | 4 ++++ dinky-common/src/main/java/org/dinky/data/enums/Status.java | 2 +- .../src/main/resources/i18n/messages_en_US.properties | 1 + .../src/main/resources/i18n/messages_zh_CN.properties | 1 + 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dinky-admin/src/main/java/org/dinky/controller/TaskController.java b/dinky-admin/src/main/java/org/dinky/controller/TaskController.java index f9edef0b57..4608722176 100644 --- a/dinky-admin/src/main/java/org/dinky/controller/TaskController.java +++ b/dinky-admin/src/main/java/org/dinky/controller/TaskController.java @@ -19,6 +19,7 @@ package org.dinky.controller; +import org.dinky.config.Dialect; import org.dinky.data.annotations.CheckTaskOwner; import org.dinky.data.annotations.ExecuteProcess; import org.dinky.data.annotations.Log; @@ -210,6 +211,9 @@ public Result getJobPlan(@RequestBody TaskDTO taskDTO) { @CheckTaskOwner(checkParam = TaskId.class, checkInterface = TaskService.class) public Result saveOrUpdateTask(@Validated({Save.class}) @RequestBody TaskSaveDTO task) { if (taskService.saveOrUpdateTask(task.toTaskEntity())) { + if (Dialect.isUDF(task.getDialect())) { + return Result.succeed(Status.UDF_SAVE_SUCCESS_PLACEHOLDER); + } return Result.succeed(Status.SAVE_SUCCESS); } else { return Result.failed(Status.SAVE_FAILED); diff --git a/dinky-common/src/main/java/org/dinky/data/enums/Status.java b/dinky-common/src/main/java/org/dinky/data/enums/Status.java index f68b177cc2..9ecb2d90be 100644 --- a/dinky-common/src/main/java/org/dinky/data/enums/Status.java +++ b/dinky-common/src/main/java/org/dinky/data/enums/Status.java @@ -301,7 +301,7 @@ public enum Status { * udf template */ UDF_TEMPLATE_EXIST_RELATIONSHIP(23001, "udf.template.exist.relationship"), - + UDF_SAVE_SUCCESS_PLACEHOLDER(23002, "udf.save.success.placeholder"), /** * Resource */ diff --git a/dinky-common/src/main/resources/i18n/messages_en_US.properties b/dinky-common/src/main/resources/i18n/messages_en_US.properties index f71482d07d..99099538af 100644 --- a/dinky-common/src/main/resources/i18n/messages_en_US.properties +++ b/dinky-common/src/main/resources/i18n/messages_en_US.properties @@ -147,6 +147,7 @@ cluster.instance.not.health=Cluster Instance Status Not Health cluster.instance.health.not.delete=This cluster instance belongs to automatic registration mode and is in an available state, and deletion is not allowed. Please stop this cluster instance first cluster.config.exist.relationship=Cluster Config Already Exists Relationship, Can Not Delete udf.template.exist.relationship=Udf Template Already Exists Relationship, Can Not Delete +udf.save.success.placeholder=The UDF has been saved, please click the [Publish] button to recompile it, otherwise it will not take effect/cannot be used operate.failed=Operate Failed test.connection.failed=Test Connection Failed switching.tenant.success=Select Tenant Success diff --git a/dinky-common/src/main/resources/i18n/messages_zh_CN.properties b/dinky-common/src/main/resources/i18n/messages_zh_CN.properties index 0902bca283..c5650c2a88 100644 --- a/dinky-common/src/main/resources/i18n/messages_zh_CN.properties +++ b/dinky-common/src/main/resources/i18n/messages_zh_CN.properties @@ -147,6 +147,7 @@ cluster.instance.not.health=集群实例状态不健康 cluster.instance.health.not.delete=该集群实例属于自动注册模式且为可用状态,不允许删除,请先停止该集群实例 cluster.config.exist.relationship=集群配置已存在关联关系,不允许删除 udf.template.exist.relationship=UDF模板已存在关联关系,不允许删除 +udf.save.success.placeholder=UDF 已保存,请点击 [发布] 按钮重新编译,否则不会生效/无法使用 operate.failed=操作失败 test.connection.failed=测试连接失败 switching.tenant.success=选择租户成功