diff --git a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/bin/jvm_args_env.sh b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/bin/jvm_args_env.sh index d953e04d2f04..9d19a823f7b1 100644 --- a/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/bin/jvm_args_env.sh +++ b/dolphinscheduler-alert/dolphinscheduler-alert-server/src/main/bin/jvm_args_env.sh @@ -22,7 +22,7 @@ -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintGCDateStamps -XX:+PrintGCDetails --Xloggc:gc.log +-Xloggc:gc-%t.log -XX:-OmitStackTraceInFastThrow -XX:+ExitOnOutOfMemoryError diff --git a/dolphinscheduler-api/src/main/bin/jvm_args_env.sh b/dolphinscheduler-api/src/main/bin/jvm_args_env.sh index d953e04d2f04..9d19a823f7b1 100644 --- a/dolphinscheduler-api/src/main/bin/jvm_args_env.sh +++ b/dolphinscheduler-api/src/main/bin/jvm_args_env.sh @@ -22,7 +22,7 @@ -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintGCDateStamps -XX:+PrintGCDetails --Xloggc:gc.log +-Xloggc:gc-%t.log -XX:-OmitStackTraceInFastThrow -XX:+ExitOnOutOfMemoryError diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java index e23101da3658..f0e157eaa378 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ProjectParameterServiceImpl.java @@ -101,6 +101,7 @@ public Result createProjectParameter(User loginUser, long projectCode, String pr .code(CodeGenerateUtils.genCode()) .projectCode(projectCode) .userId(loginUser.getId()) + .operator(loginUser.getId()) .createTime(now) .updateTime(now) .build(); diff --git a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java index ef8ffd2768a9..c7d6dc73d65e 100644 --- a/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java +++ b/dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/ProjectParameterServiceTest.java @@ -114,6 +114,9 @@ public void testCreateProjectParameter() { result = projectParameterService.createProjectParameter(loginUser, projectCode, "key1", "value", DataType.VARCHAR.name()); assertEquals(Status.SUCCESS.getCode(), result.getCode()); + + ProjectParameter projectParameter = (ProjectParameter) result.getData(); + assertEquals(loginUser.getId(), projectParameter.getOperator()); } @Test diff --git a/dolphinscheduler-master/src/main/bin/jvm_args_env.sh b/dolphinscheduler-master/src/main/bin/jvm_args_env.sh index 1171cd78044f..0fedc71491aa 100644 --- a/dolphinscheduler-master/src/main/bin/jvm_args_env.sh +++ b/dolphinscheduler-master/src/main/bin/jvm_args_env.sh @@ -22,7 +22,7 @@ -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintGCDateStamps -XX:+PrintGCDetails --Xloggc:gc.log +-Xloggc:gc-%t.log -XX:-OmitStackTraceInFastThrow -XX:+ExitOnOutOfMemoryError diff --git a/dolphinscheduler-standalone-server/src/main/bin/jvm_args_env.sh b/dolphinscheduler-standalone-server/src/main/bin/jvm_args_env.sh index 95b283f91e03..b0e99e28f163 100644 --- a/dolphinscheduler-standalone-server/src/main/bin/jvm_args_env.sh +++ b/dolphinscheduler-standalone-server/src/main/bin/jvm_args_env.sh @@ -22,7 +22,7 @@ -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintGCDateStamps -XX:+PrintGCDetails --Xloggc:gc.log +-Xloggc:gc-%t.log -XX:-OmitStackTraceInFastThrow -XX:+ExitOnOutOfMemoryError diff --git a/dolphinscheduler-ui/src/utils/json.ts b/dolphinscheduler-ui/src/utils/json.ts index 3ce941ddb5be..347486ad6eb4 100644 --- a/dolphinscheduler-ui/src/utils/json.ts +++ b/dolphinscheduler-ui/src/utils/json.ts @@ -19,17 +19,11 @@ * Verify if it is in json format */ const isJson = (str: string) => { - if (typeof str === 'string') { - try { - const obj = JSON.parse(str) - if (typeof obj === 'object' && obj) { - return true - } else { - return false - } - } catch (e) { - return false - } + try { + const obj = JSON.parse(str) + return !!(typeof obj === 'object' && obj && !Array.isArray(obj)) + } catch (e) { + return false } } diff --git a/dolphinscheduler-ui/src/views/datasource/list/use-form.ts b/dolphinscheduler-ui/src/views/datasource/list/use-form.ts index 7a804d3de9d4..4b229868a642 100644 --- a/dolphinscheduler-ui/src/views/datasource/list/use-form.ts +++ b/dolphinscheduler-ui/src/views/datasource/list/use-form.ts @@ -269,6 +269,7 @@ export function useForm(id?: number) { } else { state.showPrincipal = false } + if ( type === 'SSH' || type === 'ZEPPELIN' || @@ -287,6 +288,8 @@ export function useForm(id?: number) { state.showHost = false state.showPort = false state.showRestEndpoint = true + } else { + state.showRestEndpoint = false } if ( type === 'SAGEMAKER' || @@ -299,18 +302,33 @@ export function useForm(id?: number) { if (type === 'K8S') { state.showNamespace = true state.showKubeConfig = true + } else { + state.showNamespace = false + state.showKubeConfig = false } if (type === 'ALIYUN_SERVERLESS_SPARK') { state.showAccessKeyId = true state.showAccessKeySecret = true state.showRegionId = true state.showEndpoint = true + } else { + state.showAccessKeyId = false + state.showAccessKeySecret = false + state.showRegionId = false + state.showEndpoint = false } } else { state.showDataBaseName = true state.requiredDataBase = true state.showJDBCConnectParameters = true state.showPublicKey = false + state.showRestEndpoint = false + state.showNamespace = false + state.showKubeConfig = false + state.showAccessKeyId = false + state.showAccessKeySecret = false + state.showRegionId = false + state.showEndpoint = false } } diff --git a/dolphinscheduler-worker/src/main/bin/jvm_args_env.sh b/dolphinscheduler-worker/src/main/bin/jvm_args_env.sh index 95b283f91e03..b0e99e28f163 100644 --- a/dolphinscheduler-worker/src/main/bin/jvm_args_env.sh +++ b/dolphinscheduler-worker/src/main/bin/jvm_args_env.sh @@ -22,7 +22,7 @@ -XX:+IgnoreUnrecognizedVMOptions -XX:+PrintGCDateStamps -XX:+PrintGCDetails --Xloggc:gc.log +-Xloggc:gc-%t.log -XX:-OmitStackTraceInFastThrow -XX:+ExitOnOutOfMemoryError