Unverified Commit aec883ce authored by qiaozhanwei's avatar qiaozhanwei Committed by GitHub
Browse files

Merge branch 'dev' into fixbug-#2439

parents 7c70ef82 8b4eb20b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ CREATE TABLE t_ds_command (
  dependence varchar(255) DEFAULT NULL ,
  update_time timestamp DEFAULT NULL ,
  process_instance_priority int DEFAULT NULL ,
  worker_group_id int DEFAULT '-1' ,
  worker_group varchar(64),
  PRIMARY KEY (id)
) ;

@@ -275,7 +275,7 @@ CREATE TABLE t_ds_error_command (
  update_time timestamp DEFAULT NULL ,
  dependence text ,
  process_instance_priority int DEFAULT NULL ,
  worker_group_id int DEFAULT '-1' ,
  worker_group varchar(64),
  message text ,
  PRIMARY KEY (id)
);
@@ -748,7 +748,7 @@ CREATE SEQUENCE t_ds_worker_server_id_sequence;
ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_server_id_sequence');


-- Records of t_ds_useruser : admin , password : dolphinscheduler123
-- Records of t_ds_user?user : admin , password : dolphinscheduler123
INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22');

-- Records of t_ds_alertgroup,dolphinscheduler warning group
+4 −2
Original line number Diff line number Diff line
@@ -173,9 +173,11 @@ public class ProcessDefinitionService extends BaseDAGService {
        for(TaskNode taskNode : tasks){
            String taskParameter = taskNode.getParams();
            AbstractParameters params = TaskParametersUtils.getParameters(taskNode.getType(),taskParameter);
            if (CollectionUtils.isNotEmpty(params.getResourceFilesList())) {
                Set<Integer> tempSet = params.getResourceFilesList().stream().map(t->t.getId()).collect(Collectors.toSet());
                resourceIds.addAll(tempSet);
            }
        }

        StringBuilder sb = new StringBuilder();
        for(int i : resourceIds) {
+14 −7
Original line number Diff line number Diff line
@@ -423,6 +423,7 @@ public class UsersService extends BaseService {
     * @param projectIds project id array
     * @return grant result code
     */
    @Transactional(rollbackFor = Exception.class)
    public Map<String, Object> grantProject(User loginUser, int userId, String projectIds) {
        Map<String, Object> result = new HashMap<>(5);
        result.put(Constants.STATUS, false);
@@ -472,6 +473,7 @@ public class UsersService extends BaseService {
     * @param resourceIds resource id array
     * @return grant result code
     */
    @Transactional(rollbackFor = Exception.class)
    public Map<String, Object> grantResources(User loginUser, int userId, String resourceIds) {
        Map<String, Object> result = new HashMap<>(5);
        //only admin can operate
@@ -484,9 +486,10 @@ public class UsersService extends BaseService {
            return result;
        }

        Set<Integer> needAuthorizeResIds = new HashSet();
        if (StringUtils.isNotBlank(resourceIds)) {
            String[] resourceFullIdArr = resourceIds.split(",");
            // need authorize resource id set
        Set<Integer> needAuthorizeResIds = new HashSet();
            for (String resourceFullId : resourceFullIdArr) {
                String[] resourceIdArr = resourceFullId.split("-");
                for (int i=0;i<=resourceIdArr.length-1;i++) {
@@ -494,6 +497,8 @@ public class UsersService extends BaseService {
                    needAuthorizeResIds.add(resourceIdValue);
                }
            }
        }


        //get the authorized resource id list by user id
        List<Resource> oldAuthorizedRes = resourceMapper.queryAuthorizedResourceList(userId);
@@ -565,6 +570,7 @@ public class UsersService extends BaseService {
     * @param udfIds udf id array
     * @return grant result code
     */
    @Transactional(rollbackFor = Exception.class)
    public Map<String, Object> grantUDFFunction(User loginUser, int userId, String udfIds) {
        Map<String, Object> result = new HashMap<>(5);

@@ -611,6 +617,7 @@ public class UsersService extends BaseService {
     * @param datasourceIds  data source id array
     * @return grant result code
     */
    @Transactional(rollbackFor = Exception.class)
    public Map<String, Object> grantDataSource(User loginUser, int userId, String datasourceIds) {
        Map<String, Object> result = new HashMap<>(5);
        result.put(Constants.STATUS, false);
+1 −1
Original line number Diff line number Diff line
@@ -64,7 +64,7 @@ public class SpringConnectionFactory {
     * @return druid dataSource
     */
    @Bean(destroyMethod="")
    public static DruidDataSource dataSource() {
    public DruidDataSource dataSource() {

        DruidDataSource druidDataSource = new DruidDataSource();

+17 −18
Original line number Diff line number Diff line
@@ -101,9 +101,9 @@ public class ErrorCommand {
    private String message;

    /**
     * worker group id
     * worker group
     */
    private int workerGroupId;
    private String workerGroup;

    public ErrorCommand(){}

@@ -257,17 +257,25 @@ public class ErrorCommand {
        this.updateTime = updateTime;
    }

    public int getWorkerGroupId() {
        return workerGroupId;
    public String getWorkerGroup() {
        return workerGroup;
    }

    public void setWorkerGroupId(int workerGroupId) {
        this.workerGroupId = workerGroupId;
    public void setWorkerGroup(String workerGroup) {
        this.workerGroup = workerGroup;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    @Override
    public String toString() {
        return "Command{" +
        return "ErrorCommand{" +
                "id=" + id +
                ", commandType=" + commandType +
                ", processDefinitionId=" + processDefinitionId +
@@ -281,17 +289,8 @@ public class ErrorCommand {
                ", startTime=" + startTime +
                ", processInstancePriority=" + processInstancePriority +
                ", updateTime=" + updateTime +
                ", message=" + message +
                ", message='" + message + '\'' +
                ", workerGroup='" + workerGroup + '\'' +
                '}';
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }


}
Loading