Skip to content

Commit

Permalink
[Optimization] Optimization udf saved placeholder (#4165)
Browse files Browse the repository at this point in the history
Co-authored-by: Zzm0809 <[email protected]>
Co-authored-by: GH Action - Upstream Sync <[email protected]>
  • Loading branch information
3 people authored Jan 21, 2025
1 parent d9b3f12 commit 095c553
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/sqldialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.dinky.controller;

import org.dinky.config.Dialect;
import org.dinky.data.annotations.CheckTaskApproval;
import org.dinky.data.annotations.CheckTaskOwner;
import org.dinky.data.annotations.ExecuteProcess;
Expand Down Expand Up @@ -213,6 +214,9 @@ public Result<ObjectNode> getJobPlan(@RequestBody TaskDTO taskDTO) {
@CheckTaskOwner(checkParam = TaskId.class, checkInterface = TaskService.class)
public Result<Void> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=选择租户成功
Expand Down

0 comments on commit 095c553

Please sign in to comment.