This is an automated email from the ASF dual-hosted git repository.

benjobs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git


The following commit(s) were added to refs/heads/dev by this push:
     new 5104d70bc [Improve] field name Improvement (#2218)
5104d70bc is described below

commit 5104d70bca5c161b12f07e4b55fc4a8ea1e52258
Author: benjobs <[email protected]>
AuthorDate: Mon Jan 2 09:57:01 2023 +0800

    [Improve] field name Improvement (#2218)
---
 .../main/assembly/script/schema/mysql-schema.sql   |  4 +--
 .../main/assembly/script/schema/pgsql-schema.sql   |  4 +--
 .../main/assembly/script/upgrade/mysql/2.0.0.sql   |  8 ++---
 .../streampark/console/base/util/GitUtils.java     | 12 +++----
 .../streampark/console/core/entity/Project.java    |  4 +--
 .../enums/{GitProtocol.java => GitCredential.java} | 10 ++++--
 .../core/service/impl/ProjectServiceImpl.java      | 10 +++---
 .../src/main/resources/db/schema-h2.sql            |  4 +--
 .../main/resources/mapper/core/ProjectMapper.xml   |  4 +--
 .../streampark/console/core/entity/GitTest.java    |  4 +--
 .../src/enums/projectEnum.ts                       |  2 +-
 .../src/locales/lang/en/flink/project.ts           | 10 +++---
 .../src/locales/lang/zh-CN/flink/project.ts        | 10 +++---
 .../src/views/flink/project/Add.vue                |  4 +--
 .../src/views/flink/project/Edit.vue               |  4 +--
 .../flink/project/components/RepositoryGroup.tsx   | 14 ++++----
 .../src/views/flink/project/useProject.tsx         | 38 +++++++++++-----------
 17 files changed, 75 insertions(+), 71 deletions(-)

diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
index a7d914cec..d1eaa6f0f 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
@@ -183,12 +183,12 @@ create table `t_flink_project` (
   `id` bigint not null auto_increment,
   `team_id` bigint not null,
   `name` varchar(255) collate utf8mb4_general_ci default null,
-  `git_protocol` tinyint not null,
+  `git_credential` tinyint not null,
   `url` varchar(1000) collate utf8mb4_general_ci default null,
   `branches` varchar(1000) collate utf8mb4_general_ci default null,
   `user_name` varchar(255) collate utf8mb4_general_ci default null,
   `password` varchar(255) collate utf8mb4_general_ci default null,
-  `rsa_path` varchar(255) collate utf8mb4_general_ci default null,
+  `prvkey_path` varchar(255) collate utf8mb4_general_ci default null,
   `pom` varchar(255) collate utf8mb4_general_ci default null,
   `build_args` varchar(255) default null,
   `type` tinyint default null,
diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/pgsql-schema.sql
 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/pgsql-schema.sql
index 7654c79a7..65dfc108b 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/pgsql-schema.sql
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/pgsql-schema.sql
@@ -419,12 +419,12 @@ create table "public"."t_flink_project" (
   "id" int8 not null default 
nextval('streampark_t_flink_project_id_seq'::regclass),
   "team_id" int8,
   "name" varchar(255) collate "pg_catalog"."default",
-  "git_protocol" int2,
+  "git_credential" int2,
   "url" varchar(1000) collate "pg_catalog"."default",
   "branches" varchar(1000) collate "pg_catalog"."default",
   "user_name" varchar(255) collate "pg_catalog"."default",
   "password" varchar(255) collate "pg_catalog"."default",
-  "rsa_path" varchar(255) collate "pg_catalog"."default",
+  "prvkey_path" varchar(255) collate "pg_catalog"."default",
   "pom" varchar(255) collate "pg_catalog"."default",
   "build_args" varchar(255) collate "pg_catalog"."default",
   "type" int2,
diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.0.0.sql
 
b/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.0.0.sql
index 6028cd6ce..de4e88c82 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.0.0.sql
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.0.0.sql
@@ -76,13 +76,13 @@ alter table `t_flink_log` add column `job_manager_url` 
varchar(255) default null
 alter table `t_flink_project`
     change column `date` `create_time` datetime default current_timestamp not 
null,
     add column `team_id` bigint not null comment 'team id' default 100000 
after `id`,
-    add column `git_protocol` tinyint not null default 1 after `id`,
-    add column `rsa_path` varchar(255) collate utf8mb4_general_ci default null 
after `password`,
+    add column `git_credential` tinyint not null default 1 after `id`,
+    add column `prvkey_path` varchar(255) collate utf8mb4_general_ci default 
null after `password`,
     add column `modify_time` datetime not null default current_timestamp on 
update current_timestamp after `create_time`,
     add index `inx_team` (`team_id`) using btree;
 
-update `t_flink_project` set git_protocol=1 where url like 'http%';
-update `t_flink_project` set git_protocol=2 where url like 'git@%';
+update `t_flink_project` set git_credential=1 where url like 'http%';
+update `t_flink_project` set git_credential=2 where url like 'git@%';
 
 alter table `t_flink_cluster`
     drop column `flame_graph`,
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/util/GitUtils.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/util/GitUtils.java
index 995575ba1..58544afa5 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/util/GitUtils.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/base/util/GitUtils.java
@@ -18,7 +18,7 @@
 package org.apache.streampark.console.base.util;
 
 import org.apache.streampark.console.core.entity.Project;
-import org.apache.streampark.console.core.enums.GitProtocol;
+import org.apache.streampark.console.core.enums.GitCredential;
 
 import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.JSchException;
@@ -74,8 +74,8 @@ public class GitUtils {
   }
 
   private static void setCredentials(TransportCommand<?, ?> transportCommand, 
Project project) {
-    GitProtocol gitProtocol = GitProtocol.of(project.getGitProtocol());
-    switch (gitProtocol) {
+    GitCredential gitCredential = GitCredential.of(project.getGitCredential());
+    switch (gitCredential) {
       case HTTPS:
         if (!StringUtils.isAllEmpty(project.getUserName(), 
project.getPassword())) {
           UsernamePasswordCredentialsProvider credentialsProvider =
@@ -97,13 +97,13 @@ public class GitUtils {
                     @Override
                     protected JSch createDefaultJSch(FS fs) throws 
JSchException {
                       JSch jSch = super.createDefaultJSch(fs);
-                      if (project.getRsaPath() == null) {
+                      if (project.getPrvkeyPath() == null) {
                         return jSch;
                       }
                       if (StringUtils.isEmpty(project.getPassword())) {
-                        jSch.addIdentity(project.getRsaPath());
+                        jSch.addIdentity(project.getPrvkeyPath());
                       } else {
-                        jSch.addIdentity(project.getRsaPath(), 
project.getPassword());
+                        jSch.addIdentity(project.getPrvkeyPath(), 
project.getPassword());
                       }
                       return jSch;
                     }
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
index e532a05e3..d29d7b8eb 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/entity/Project.java
@@ -63,7 +63,7 @@ public class Project implements Serializable {
 
   private Date lastBuild;
 
-  private Integer gitProtocol;
+  private Integer gitCredential;
 
   @TableField(updateStrategy = FieldStrategy.IGNORED)
   private String userName;
@@ -72,7 +72,7 @@ public class Project implements Serializable {
   private String password;
 
   @TableField(updateStrategy = FieldStrategy.IGNORED)
-  private String rsaPath;
+  private String prvkeyPath;
 
   /** 1:git 2:svn */
   private Integer repository;
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitProtocol.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitCredential.java
similarity index 82%
rename from 
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitProtocol.java
rename to 
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitCredential.java
index 92d48b8fa..36a19a90f 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitProtocol.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/enums/GitCredential.java
@@ -19,20 +19,24 @@ package org.apache.streampark.console.core.enums;
 
 import java.util.Arrays;
 
-public enum GitProtocol {
+public enum GitCredential {
   HTTPS(1),
   SSH(2);
 
   private final int value;
 
-  GitProtocol(int value) {
+  GitCredential(int value) {
     this.value = value;
   }
 
-  public static GitProtocol of(Integer value) {
+  public static GitCredential of(Integer value) {
     return Arrays.stream(values()).filter(x -> x.value == 
value).findFirst().orElse(null);
   }
 
+  public static boolean isSSH(Integer gitCredential) {
+    return GitCredential.SSH.equals(GitCredential.of(gitCredential));
+  }
+
   public Integer getValue() {
     return this.value;
   }
diff --git 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
index 7fc3fd0b4..46e445fb5 100644
--- 
a/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
+++ 
b/streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ProjectServiceImpl.java
@@ -34,7 +34,7 @@ import org.apache.streampark.console.base.util.GZipUtils;
 import org.apache.streampark.console.core.entity.Application;
 import org.apache.streampark.console.core.entity.Project;
 import org.apache.streampark.console.core.enums.BuildState;
-import org.apache.streampark.console.core.enums.GitProtocol;
+import org.apache.streampark.console.core.enums.GitCredential;
 import org.apache.streampark.console.core.enums.LaunchState;
 import org.apache.streampark.console.core.mapper.ProjectMapper;
 import org.apache.streampark.console.core.service.ApplicationService;
@@ -120,17 +120,17 @@ public class ProjectServiceImpl extends 
ServiceImpl<ProjectMapper, Project>
       project.setName(projectParam.getName());
       project.setUrl(projectParam.getUrl());
       project.setBranches(projectParam.getBranches());
-      project.setGitProtocol(projectParam.getGitProtocol());
-      project.setRsaPath(projectParam.getRsaPath());
+      project.setGitCredential(projectParam.getGitCredential());
+      project.setPrvkeyPath(projectParam.getPrvkeyPath());
       project.setUserName(projectParam.getUserName());
       project.setPassword(projectParam.getPassword());
       project.setPom(projectParam.getPom());
       project.setDescription(projectParam.getDescription());
       project.setBuildArgs(projectParam.getBuildArgs());
-      if (GitProtocol.SSH.equals(GitProtocol.of(project.getGitProtocol()))) {
+      if (GitCredential.isSSH(project.getGitCredential())) {
         project.setUserName(null);
       } else {
-        project.setRsaPath(null);
+        project.setPrvkeyPath(null);
       }
       if (projectParam.getBuildState() != null) {
         project.setBuildState(projectParam.getBuildState());
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
 
b/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
index de4f16faa..a305db5dc 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
+++ 
b/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
@@ -163,12 +163,12 @@ create table if not exists `t_flink_project` (
   `id` bigint generated by default as identity not null,
   `team_id` bigint not null,
   `name` varchar(255)  default null,
-  `git_protocol` tinyint not null,
+  `git_credential` tinyint not null,
   `url` varchar(1000)  default null,
   `branches` varchar(1000)  default null,
   `user_name` varchar(255)  default null,
   `password` varchar(255)  default null,
-  `rsa_path` varchar(255)  default null,
+  `prvkey_path` varchar(255)  default null,
   `pom` varchar(255)  default null,
   `build_args` varchar(255) default null,
   `type` tinyint default null,
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
 
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
index 6b21cccfc..9706a69d2 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
+++ 
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
@@ -22,13 +22,13 @@
         <id column="id" jdbcType="INTEGER" property="id"/>
         <result column="team_id" jdbcType="BIGINT" property="teamId"/>
         <result column="name" jdbcType="VARCHAR" property="name"/>
-        <result column="git_protocol" jdbcType="INTEGER" 
property="gitProtocol"/>
+        <result column="git_credential" jdbcType="INTEGER" 
property="gitCredential"/>
         <result column="url" jdbcType="VARCHAR" property="url"/>
         <result column="repository" jdbcType="INTEGER" property="repository"/>
         <result column="branches" jdbcType="VARCHAR" property="branches"/>
         <result column="user_name" jdbcType="VARCHAR" property="userName"/>
         <result column="password" jdbcType="VARCHAR" property="password"/>
-        <result column="rsa_path" jdbcType="VARCHAR" property="rsaPath"/>
+        <result column="prvkey_path" jdbcType="VARCHAR" property="prvkeyPath"/>
         <result column="pom" jdbcType="VARCHAR" property="pom"/>
         <result column="build_args" jdbcType="VARCHAR" property="buildArgs"/>
         <result column="type" jdbcType="INTEGER" property="type"/>
diff --git 
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/entity/GitTest.java
 
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/entity/GitTest.java
index af8d92ba3..70e125707 100644
--- 
a/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/entity/GitTest.java
+++ 
b/streampark-console/streampark-console-service/src/test/java/org/apache/streampark/console/core/entity/GitTest.java
@@ -18,7 +18,7 @@
 package org.apache.streampark.console.core.entity;
 
 import org.apache.streampark.console.core.enums.GitAuthorizedError;
-import org.apache.streampark.console.core.enums.GitProtocol;
+import org.apache.streampark.console.core.enums.GitCredential;
 
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -32,7 +32,7 @@ class GitTest {
   @BeforeEach
   void before() {
     project.setUrl("https://github.com/apache/incubator-streampark.git";);
-    project.setGitProtocol(GitProtocol.HTTPS.getValue());
+    project.setGitCredential(GitCredential.HTTPS.getValue());
   }
 
   @Test
diff --git 
a/streampark-console/streampark-console-webapp/src/enums/projectEnum.ts 
b/streampark-console/streampark-console-webapp/src/enums/projectEnum.ts
index 14fa2e026..32dbabbf0 100644
--- a/streampark-console/streampark-console-webapp/src/enums/projectEnum.ts
+++ b/streampark-console/streampark-console-webapp/src/enums/projectEnum.ts
@@ -20,7 +20,7 @@ export enum ProjectTypeEnum {
   SPARK = 2,
 }
 
-export enum GitProtocolEnum {
+export enum GitCredentialEnum {
   HTTPS = 1,
   SSH = 2,
 }
diff --git 
a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts
 
b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts
index 44b7fdd33..88fb824ee 100644
--- 
a/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts
+++ 
b/streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts
@@ -32,10 +32,10 @@ export default {
     projectType: 'Project Type',
     projectTypePlaceholder: 'please select project type',
     cvs: 'CVS',
-    rsaPath: 'RSAPath',
-    rsaPathPlaceholder: 'RSA private key path, e.g: ~/.ssh/id_rsa',
-    gitProtocol: 'Connect Type',
-    gitProtocolPlaceholder: 'Git connection type, http/ssh',
+    prvkeyPath: 'Private Key Path',
+    prvkeyPathPlaceholder: 'private key path, e.g: ~/.ssh/id_rsa',
+    gitCredential: 'Connect Type',
+    gitCredentialPlaceholder: 'Git connection type, http/ssh',
     cvsPlaceholder: 'CVS',
     repositoryURL: 'Repository URL',
     repositoryURLPlaceholder: 'The Repository URL for this project',
@@ -62,7 +62,7 @@ export default {
     projectNameIsRequiredMessage: 'Project Name is required',
     projectNameIsUniqueMessage: 'The Project Name is already exists. Please 
check',
     projectTypeIsRequiredMessage: 'Project Type is required',
-    gitProtocolIsRequiredMessage: 'Connect Type is required',
+    gitCredentialIsRequiredMessage: 'Connect Type is required',
     cvsIsRequiredMessage: 'CVS is required',
     repositoryURLIsRequiredMessage: 'Repository URL is required',
     pomSpecifiesModuleMessage:
diff --git 
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts
 
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts
index fd56b43b7..8c85a2987 100644
--- 
a/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts
+++ 
b/streampark-console/streampark-console-webapp/src/locales/lang/zh-CN/flink/project.ts
@@ -32,10 +32,10 @@ export default {
     projectType: '项目类型',
     projectTypePlaceholder: '请选择项目类型',
     cvs: 'CVS',
-    rsaPath: 'RSA私钥',
-    rsaPathPlaceholder: 'RSA私钥文件路径, 如: ~/.ssh/id_rsa',
-    gitProtocol: '连接方式',
-    gitProtocolPlaceholder: 'Git连接方式, http/ssh',
+    prvkeyPath: '私钥路径',
+    prvkeyPathPlaceholder: '私钥文件路径, 如: ~/.ssh/id_rsa',
+    gitCredential: '连接方式',
+    gitCredentialPlaceholder: 'Git连接方式, http/ssh',
     cvsPlaceholder: 'CVS类型: git/svn',
     repositoryURL: '仓库地址',
     repositoryURLPlaceholder: '请输入该项目的仓库地址',
@@ -61,7 +61,7 @@ export default {
     projectNameIsRequiredMessage: '项目名称必填',
     projectNameIsUniqueMessage: '项目名称已存在,请再次输入',
     projectTypeIsRequiredMessage: '项目类型必选',
-    gitProtocolIsRequiredMessage: 'Git连接方式为必填项',
+    gitCredentialIsRequiredMessage: 'Git连接方式为必填项',
     cvsIsRequiredMessage: '资源来源必选',
     repositoryURLIsRequiredMessage: '(项目)仓库地址必填',
     pomSpecifiesModuleMessage: '指定编译pom.xml的模块 如未指定,则在根路径pom.xml下找到',
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/project/Add.vue 
b/streampark-console/streampark-console-webapp/src/views/flink/project/Add.vue
index 4d3eae72f..a3d4c0920 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/flink/project/Add.vue
+++ 
b/streampark-console/streampark-console-webapp/src/views/flink/project/Add.vue
@@ -42,14 +42,14 @@
       const res = await createProject({
         teamId: getUserTeamId(),
         name: values.name,
-        gitProtocol: values.gitProtocol,
+        gitCredential: values.gitCredential,
         url: values.url,
         repository: values.repository,
         type: values.type,
         branches: values.branches,
         userName: values.userName,
         password: values.password,
-        rsaPath: values.rsaPath || null,
+        prvkeyPath: values.prvkeyPath || null,
         pom: values.pom,
         buildArgs: values.buildArgs,
         description: values.description,
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue 
b/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
index 84f44d44d..2650ad78d 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
+++ 
b/streampark-console/streampark-console-webapp/src/views/flink/project/Edit.vue
@@ -60,14 +60,14 @@
       const { data } = await updateProject({
         id: route.query.id,
         name: values.name,
-        gitProtocol: values.gitProtocol,
+        gitCredential: values.gitCredential,
         url: values.url,
         repository: values.repository,
         type: values.type,
         branches: values.branches,
         userName: values.userName,
         password: values.password,
-        rsaPath: values.rsaPath,
+        prvkeyPath: values.prvkeyPath,
         pom: values.pom,
         buildArgs: values.buildArgs,
         description: values.description,
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx
 
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx
index e1ff08929..8bef222ef 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx
+++ 
b/streampark-console/streampark-console-webapp/src/views/flink/project/components/RepositoryGroup.tsx
@@ -18,11 +18,11 @@ import { defineComponent } from 'vue';
 import type { PropType } from 'vue';
 import { Form, Input, Select } from 'ant-design-vue';
 export interface RepositoryProps {
-  gitProtocol: string | number;
+  gitCredential: string | number;
   url: string;
 }
 import { useI18n } from '/@/hooks/web/useI18n';
-import { GitProtocolEnum } from '/@/enums/projectEnum';
+import { GitCredentialEnum } from '/@/enums/projectEnum';
 export default defineComponent({
   name: 'RepositoryUrl',
   props: {
@@ -45,8 +45,8 @@ export default defineComponent({
     };
 
     const options = [
-      { label: 'http/https', value: GitProtocolEnum.HTTPS },
-      { label: 'ssh', value: GitProtocolEnum.SSH },
+      { label: 'http/https', value: GitCredentialEnum.HTTPS },
+      { label: 'ssh', value: GitCredentialEnum.SSH },
     ];
 
     return () => {
@@ -54,10 +54,10 @@ export default defineComponent({
         <div>
           <Input.Group compact class="!flex custom-input-group">
             <Select
-              name="gitProtocol"
+              name="gitCredential"
               style="width: 120px"
-              placeholder={t('flink.project.form.gitProtocolPlaceholder')}
-              value={props.value?.gitProtocol}
+              placeholder={t('flink.project.form.gitCredentialPlaceholder')}
+              value={props.value?.gitCredential}
               onChange={(e: any) => handleProtocolChange(e)}
               options={options}
             />
diff --git 
a/streampark-console/streampark-console-webapp/src/views/flink/project/useProject.tsx
 
b/streampark-console/streampark-console-webapp/src/views/flink/project/useProject.tsx
index b78ccb4c9..61d319282 100644
--- 
a/streampark-console/streampark-console-webapp/src/views/flink/project/useProject.tsx
+++ 
b/streampark-console/streampark-console-webapp/src/views/flink/project/useProject.tsx
@@ -24,7 +24,7 @@ import { useRoute } from 'vue-router';
 import { ProjectRecord } from '/@/api/flink/project/model/projectModel';
 import { filterOption } from '../app/utils';
 import { useI18n } from '/@/hooks/web/useI18n';
-import { GitProtocolEnum, ProjectTypeEnum, CVSTypeEnum } from 
'/@/enums/projectEnum';
+import { GitCredentialEnum, ProjectTypeEnum, CVSTypeEnum } from 
'/@/enums/projectEnum';
 import RepositoryGroup from './components/RepositoryGroup';
 import { Form } from 'ant-design-vue';
 
@@ -43,8 +43,8 @@ export const useProject = () => {
     if (!values.url) {
       return Promise.reject(t('flink.project.form.repositoryURLRequired'));
     }
-    switch (values.gitProtocol) {
-      case GitProtocolEnum.SSH:
+    switch (values.gitCredential) {
+      case GitCredentialEnum.SSH:
         if (/^git@(.*)/.test(values.url)) {
           return Promise.resolve();
         } else {
@@ -111,11 +111,11 @@ export const useProject = () => {
         ],
       },
       {
-        field: 'gitProtocol',
+        field: 'gitCredential',
         label: '',
         component: 'Input',
         show: false,
-        defaultValue: GitProtocolEnum.HTTPS,
+        defaultValue: GitCredentialEnum.HTTPS,
       },
       { field: 'url', label: '', component: 'Input', show: false },
       {
@@ -131,10 +131,10 @@ export const useProject = () => {
             >
               <RepositoryGroup
                 value={{
-                  gitProtocol: Number(model.gitProtocol) || 
GitProtocolEnum.HTTPS,
+                  gitCredential: Number(model.gitCredential) || 
GitCredentialEnum.HTTPS,
                   url: model.url || '',
                 }}
-                onUpdateProtocol={(value) => (model.gitProtocol = value)}
+                onUpdateProtocol={(value) => (model.gitCredential = value)}
                 onUpdateUrl={(value) => (model.url = value)}
               />
             </Form.Item>
@@ -142,19 +142,19 @@ export const useProject = () => {
         },
       },
       {
-        field: 'rsaPath',
-        label: t('flink.project.form.rsaPath'),
+        field: 'prvkeyPath',
+        label: t('flink.project.form.prvkeyPath'),
         component: 'Input',
-        ifShow: ({ values }) => values.gitProtocol == GitProtocolEnum.SSH,
+        ifShow: ({ values }) => values.gitCredential == GitCredentialEnum.SSH,
         componentProps: {
-          placeholder: t('flink.project.form.rsaPathPlaceholder'),
+          placeholder: t('flink.project.form.prvkeyPathPlaceholder'),
         },
       },
       {
         field: 'userName',
         label: t('flink.project.form.userName'),
         component: 'Input',
-        ifShow: ({ values }) => values.gitProtocol == GitProtocolEnum.HTTPS,
+        ifShow: ({ values }) => values.gitCredential == 
GitCredentialEnum.HTTPS,
         componentProps: {
           placeholder: t('flink.project.form.userNamePlaceholder'),
           autocomplete: 'new-password',
@@ -255,10 +255,10 @@ export const useProject = () => {
       const res = await gitCheck({
         url: values.url,
         branches: values.branches,
-        gitProtocol: values.gitProtocol,
+        gitCredential: values.gitCredential,
         userName: values.userName || null,
         password: values.password || null,
-        rsaPath: values.rsaPath || null,
+        prvkeyPath: values.prvkeyPath || null,
       });
       if (res === 0) {
         if (branchList.value.length === 0) {
@@ -292,14 +292,14 @@ export const useProject = () => {
     try {
       const url = values.url;
       if (url) {
-        const gitProtocol = values.gitProtocol;
+        const gitCredential = values.gitCredential;
         const userName = values.userName || null;
         const password = values.password || null;
-        const rsaPath = values.rsaPath || null;
+        const prvkeyPath = values.prvkeyPath || null;
         const userNull = userName === null || userName === undefined || 
userName === '';
         const passNull = password === null || password === undefined || 
password === '';
         if ((userNull && passNull) || (!userNull && !passNull)) {
-          const res = await fetchBranches({ gitProtocol, url, userName, 
password, rsaPath });
+          const res = await fetchBranches({ gitCredential, url, userName, 
password, prvkeyPath });
           if (res) branchList.value = res.map((i) => ({ label: i, value: i }));
         }
       }
@@ -318,11 +318,11 @@ export const useProject = () => {
         name: res.name,
         type: res.type,
         repository: res.repository,
-        gitProtocol: res.gitProtocol || GitProtocolEnum.HTTPS,
+        gitCredential: res.gitCredential || GitCredentialEnum.HTTPS,
         url: res.url,
         userName: res.userName,
         password: res.password,
-        rsaPath: res.rsaPath || null,
+        prvkeyPath: res.prvkeyPath || null,
         branches: res.branches,
         pom: res.pom,
         buildArgs: res.buildArgs,

Reply via email to