You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by GitBox <gi...@apache.org> on 2022/09/12 07:37:49 UTC

[GitHub] [incubator-streampark] 1996fanrui commented on a diff in pull request #1265: [feature] add team management

1996fanrui commented on code in PR #1265:
URL: https://github.com/apache/incubator-streampark/pull/1265#discussion_r968055601


##########
streamx-console/streamx-console-service/src/assembly/script/final.sql:
##########
@@ -666,3 +682,39 @@ CREATE TABLE `t_alert_config` (
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4
   COLLATE = utf8mb4_general_ci;
+
+
+-- ----------------------------
+-- Table of t_team
+-- ----------------------------
+DROP TABLE IF EXISTS `t_team`;
+CREATE TABLE `t_team`
+(
+    `TEAM_ID`     bigint       NOT NULL AUTO_INCREMENT COMMENT 'ID',
+    `TEAM_CODE`   varchar(255) NOT NULL COMMENT '团队标识 后续可以用于队列 资源隔离相关',

Review Comment:
   有了 teamId 和 teamName,为什么还需要 teamCode? Id 不能当 code 来用吗?
   
   teamCode 是为了跟其他 其他打通吗?



##########
streamx-console/streamx-console-service/src/main/java/com/streamxhub/streamx/console/core/entity/Project.java:
##########
@@ -105,9 +106,13 @@ public class Project implements Serializable {
      */
     private transient String appSource;
 
+    private transient List<Long> teamIdList;

Review Comment:
   为什么有个 teamList? 一个 project 会属于 多个 teamId ?



##########
streamx-console/streamx-console-service/src/main/java/com/streamxhub/streamx/console/core/service/impl/ProjectServiceImpl.java:
##########
@@ -99,10 +103,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project>
 
     @Override
     public RestResponse create(Project project) {
+        RestResponse response = RestResponse.create();
+        if (project.getTeamId() == null) {
+            return response.message("请选择团队").data(false);

Review Comment:
   创建 project 或 app 时,前端必然应该携带 team 信息?而且应该不是选择?而是工作空间完全不同。
   
   例如,平台右上角显示当前正在操作的 team,那么列出来的 project 和 app 应该全是 当前 team 的。当然如果创建 project 或 app 也是按照工作空间来。
   
   project 和  app 不应该属于多个 team 共享。



##########
streamx-console/streamx-console-service/src/main/java/com/streamxhub/streamx/console/core/entity/Application.java:
##########
@@ -283,6 +285,9 @@ public class Application implements Serializable {
     private transient String backUpDescription;
     private transient String yarnQueue;
     private transient String yarnSessionClusterId;
+    private transient List<Long> teamIdList;

Review Comment:
   一个 app 可以属于多个 team?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@streampark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org