Skip to content

Commit 18a91cb

Browse files
committed
fix bug #448
1 parent 588ca20 commit 18a91cb

File tree

8 files changed

+9
-55
lines changed

8 files changed

+9
-55
lines changed

db/dss_dml.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ DELETE FROM dss_onestop_menu;
5959
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('1','应用开发','application development','应用开发','应用开发描述','1',NULL,NULL,NULL,NULL,NULL,NULL);
6060
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('2','数据分析','data analysis','数据分析','数据分析描述','1',NULL,NULL,NULL,NULL,NULL,NULL);
6161
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('3','生产运维','production operation','生产运维','生产运维描述','1',NULL,NULL,NULL,NULL,NULL,NULL);
62-
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('4','数据质量','data quality','数据质量','数据质量描述','1',NULL,NULL,NULL,NULL,NULL,NULL);
62+
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('4','数据质量','data quality','数据质量','数据质量描述','0',NULL,NULL,NULL,NULL,NULL,NULL);
6363
INSERT INTO `dss_onestop_menu` (`id`, `name`, `title_en`, `title_cn`, `description`, `is_active`, `icon`, `order`, `create_by`, `create_time`, `last_update_time`, `last_update_user`) VALUES('5','管理员功能','administrator function','管理员功能','管理员功能描述','0',NULL,NULL,NULL,NULL,NULL,NULL);
6464

6565
DELETE FROM dss_onestop_menu_application;

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/DefaultWorkFlowManager.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ public DSSFlow createWorkflow(String userName,
128128

129129
@Override
130130
public DSSFlow copyRootflowWithSubflows(String userName, long rootFlowId, String workspaceName, String projectName, String contextIdStr, String version, String description) throws DSSErrorException, IOException {
131-
132131
return flowService.copyRootFlow(rootFlowId, userName, workspaceName, projectName, version,contextIdStr);
133-
134132
}
135133

136134
@Override
@@ -176,7 +174,6 @@ public List<DSSFlow> importWorkflow(String userName,
176174
String resourceId,
177175
String bmlVersion,
178176
DSSFlowImportParam dssFlowImportParam) throws DSSErrorException, IOException {
179-
180177
//todo download workflow bml file contains flowInfo and flowRelationInfo
181178
String inputZipPath = IoUtils.generateIOPath(userName, dssFlowImportParam.getProjectName(), dssFlowImportParam.getProjectName() + ".zip");
182179
bmlService.downloadToLocalPath(userName, resourceId, bmlVersion, inputZipPath);

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/restful/ContextServiceRestful.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import javax.servlet.http.HttpServletRequest;
3232
import javax.ws.rs.core.Context;
33-
import javax.ws.rs.core.Response;
3433

3534
@RequestMapping(path = "/dss/workflow", produces = {"application/json"})
3635
@RestController
@@ -47,7 +46,6 @@ public Message tables(@Context HttpServletRequest req, @RequestBody TablesReques
4746
return Message.ok().data("tables", csTableService.queryTables("default", contextIDStr, nodeName));
4847
}
4948

50-
5149
@RequestMapping(value = "columns",method = RequestMethod.POST)
5250
public Message queryTableMeta(@Context HttpServletRequest req,@RequestBody QueryTableMetaRequest queryTableMetaRequest) throws DSSErrorException {
5351
String userName = SecurityFilter.getLoginUsername(req);

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/restful/FlowRestfulApi.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,10 @@ public Message addFlow(@Context HttpServletRequest req, @RequestBody AddFlowRequ
7575
List<DSSLabel> dssLabelList = new ArrayList<>();
7676
String contextId = contextService.createContextID(workspaceName, projectName, name, version, userName);
7777
DSSFlow dssFlow = workFlowManager.createWorkflow(userName,name,contextId,description,parentFlowID,uses,null,dssLabelList);
78-
7978
// TODO: 2019/5/16 空值校验,重复名校验
8079
return Message.ok().data("flow", dssFlow);
8180
}
8281

83-
8482
@RequestMapping(value = "publishWorkflow",method = RequestMethod.POST)
8583
public Message publishWorkflow(@Context HttpServletRequest request, @RequestBody PublishWorkflowRequest publishWorkflowRequest) {
8684
Long workflowId = publishWorkflowRequest.getWorkflowId();
@@ -110,7 +108,6 @@ public Message publishWorkflow(@Context HttpServletRequest request, @RequestBody
110108
return message;
111109
}
112110

113-
114111
/**
115112
* 获取发布任务状态
116113
* @param request
@@ -148,15 +145,13 @@ public Message getReleaseStatus(@Context HttpServletRequest request,
148145
return message;
149146
}
150147

151-
152148
/**
153149
* 更新工作流的基本信息,不包括更新Json,BML版本等
154150
* @param req
155151
* @param updateFlowBaseInfoRequest
156152
* @return
157153
* @throws DSSErrorException
158154
*/
159-
160155
@RequestMapping(value = "updateFlowBaseInfo",method = RequestMethod.POST)
161156
// @ProjectPrivChecker
162157
public Message updateFlowBaseInfo(@Context HttpServletRequest req,@RequestBody UpdateFlowBaseInfoRequest updateFlowBaseInfoRequest) throws DSSErrorException {

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/restful/NodeRestfulApi.java

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616

1717
package com.webank.wedatasphere.dss.workflow.restful;
18-
19-
2018
import com.webank.wedatasphere.dss.appconn.core.AppConn;
2119
import com.webank.wedatasphere.dss.appconn.core.ext.OnlySSOAppConn;
2220
import com.webank.wedatasphere.dss.appconn.manager.AppConnManager;
@@ -30,12 +28,7 @@
3028
import com.webank.wedatasphere.dss.standard.sso.utils.SSOHelper;
3129
import com.webank.wedatasphere.dss.workflow.common.entity.DSSFlow;
3230
import com.webank.wedatasphere.dss.workflow.cs.DSSCSHelper;
33-
import com.webank.wedatasphere.dss.workflow.entity.CommonAppConnNode;
34-
import com.webank.wedatasphere.dss.workflow.entity.ContentLanguage;
35-
import com.webank.wedatasphere.dss.workflow.entity.NodeGroup;
36-
import com.webank.wedatasphere.dss.workflow.entity.NodeInfo;
37-
import com.webank.wedatasphere.dss.workflow.entity.NodeUi;
38-
import com.webank.wedatasphere.dss.workflow.entity.NodeUiValidate;
31+
import com.webank.wedatasphere.dss.workflow.entity.*;
3932
import com.webank.wedatasphere.dss.workflow.entity.request.AppConnNodeUrlRequest;
4033
import com.webank.wedatasphere.dss.workflow.entity.request.BatchDeleteAppConnNodeRequest;
4134
import com.webank.wedatasphere.dss.workflow.entity.request.CreateExternalNodeRequest;
@@ -53,29 +46,22 @@
5346
import org.apache.linkis.cs.common.utils.CSCommonUtils;
5447
import org.apache.linkis.server.Message;
5548
import org.apache.linkis.server.security.SecurityFilter;
56-
import java.util.ArrayList;
57-
import java.util.List;
58-
import java.util.Map;
59-
import java.util.stream.Collectors;
60-
import javax.servlet.http.HttpServletRequest;
61-
import javax.ws.rs.Consumes;
62-
import javax.ws.rs.GET;
63-
import javax.ws.rs.POST;
64-
import javax.ws.rs.Path;
65-
import javax.ws.rs.Produces;
66-
import javax.ws.rs.core.Context;
67-
import javax.ws.rs.core.MediaType;
68-
import javax.ws.rs.core.Response;
6949
import org.slf4j.Logger;
7050
import org.slf4j.LoggerFactory;
7151
import org.springframework.beans.BeanUtils;
7252
import org.springframework.beans.factory.annotation.Autowired;
73-
import org.springframework.stereotype.Component;
7453
import org.springframework.web.bind.annotation.RequestBody;
7554
import org.springframework.web.bind.annotation.RequestMapping;
7655
import org.springframework.web.bind.annotation.RequestMethod;
7756
import org.springframework.web.bind.annotation.RestController;
7857

58+
import javax.servlet.http.HttpServletRequest;
59+
import javax.ws.rs.core.Context;
60+
import java.util.ArrayList;
61+
import java.util.List;
62+
import java.util.Map;
63+
import java.util.stream.Collectors;
64+
7965
@RestController
8066
@RequestMapping(path = "/dss/workflow", produces = {"application/json"})
8167
public class NodeRestfulApi {
@@ -185,7 +171,6 @@ public Message createExternalNode(@Context HttpServletRequest req, @RequestBody
185171
node.setProjectId(projectID);
186172
node.setNodeType(nodeType);
187173
node.setFlowId(flowID);
188-
node.setProjectId(projectID);
189174
//update by peaceWong add nodeID to appConnNode
190175
String nodeID = createExternalNodeRequest.getNodeID();
191176
if (null != nodeID) {
@@ -293,7 +278,5 @@ public Message getAppConnNodeUrl(@Context HttpServletRequest req, @RequestBody A
293278
String jumpUrl = workflowNodeService.getNodeJumpUrl(params, node);
294279
return Message.ok().data("jumpUrl", jumpUrl);
295280
}
296-
297-
298281
}
299282

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/impl/DSSFlowServiceImpl.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,13 @@ public class DSSFlowServiceImpl implements DSSFlowService {
5151

5252
@Autowired
5353
private FlowMapper flowMapper;
54-
55-
5654
@Autowired
5755
private NodeInputService nodeInputService;
58-
59-
// @Autowired
60-
// private EventRelationMapper eventRelationMapper;
61-
6256
@Autowired
6357
private WorkFlowParser workFlowParser;
64-
6558
@Autowired
6659
private BMLService bmlService;
6760

68-
69-
// @Autowired(required = false)
70-
// private LockMapper lockMapper;
71-
7261
private static ContextService contextService = ContextServiceImpl.getInstance();
7362

7463
@Override
@@ -78,18 +67,14 @@ public DSSFlow getFlowByID(Long id) {
7867

7968
@Override
8069
public DSSFlow getFlowWithJsonAndSubFlowsByID(Long rootFlowId) {
81-
8270
return genDSSFlowTree(rootFlowId);
8371
}
8472

85-
8673
private DSSFlow genDSSFlowTree(Long parentFlowId) {
8774
DSSFlow cyFlow = flowMapper.selectFlowByID(parentFlowId);
88-
8975
String userName = cyFlow.getCreator();
9076
Map<String, Object> query = bmlService.query(userName, cyFlow.getResourceId(), cyFlow.getBmlVersion());
9177
cyFlow.setFlowJson(query.get("string").toString());
92-
9378
List<Long> subFlowIDs = flowMapper.selectSubFlowIDByParentFlowID(parentFlowId);
9479
for (Long subFlowID : subFlowIDs) {
9580
if (cyFlow.getChildren() == null) {
@@ -102,7 +87,6 @@ private DSSFlow genDSSFlowTree(Long parentFlowId) {
10287
return cyFlow;
10388
}
10489

105-
10690
@Lock
10791
@Transactional(rollbackFor = DSSErrorException.class)
10892
@Override

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/impl/PublishServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public ResponseConvertOrchestrator getStatus(String username, String taskId) {
7272
LOGGER.debug("{} is asking status of {}.", username, taskId);
7373
}
7474
ResponseConvertOrchestrator response =new ResponseConvertOrchestrator();
75-
7675
//通过rpc的方式去获取到最新status
7776
try {
7877
RequestFrameworkConvertOrchestrationStatus req = new RequestFrameworkConvertOrchestrationStatus(taskId);

dss-orchestrator/orchestrators/dss-workflow/dss-workflow-server/src/main/java/com/webank/wedatasphere/dss/workflow/service/impl/WorkflowNodeServiceImpl.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ public List<NodeGroup> listNodeGroups() {
7272
return nodeInfoMapper.listNodeGroups();
7373
}
7474

75-
7675
@Override
7776
public Map<String, Object> createNode(String userName, AbstractAppConnNode node) throws ExternalOperationFailedException {
7877
NodeInfo nodeInfo = nodeInfoMapper.getWorkflowNodeByType(node.getNodeType());
@@ -106,7 +105,6 @@ public Map<String, Object> createNode(String userName, AbstractAppConnNode node)
106105
ref.setOrcName(node.getFlowName());
107106

108107
// parse to external ProjectId
109-
110108
ref.setProjectId(parseProjectId(node.getProjectId(), appConn.getAppDesc().getAppName(), label));
111109
ref.setProjectName(node.getProjectName());
112110
ref.setNodeType(node.getNodeType());

0 commit comments

Comments
 (0)