-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature xuehui #56
base: master
Are you sure you want to change the base?
Feature xuehui #56
Conversation
renxuehui
commented
Jul 17, 2021
- 蓝绿拓扑图功能
…into feature # Conflicts: # discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/entity/dto/GrayDto.java # discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/GrayService.java # discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/GrayServiceImpl.java
return nodeCache; | ||
} | ||
|
||
public static GraphDto changeRuleEntityToGraph(RuleEntity ruleEntity) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change改成convert
|
||
public class GraphUtils { | ||
private GraphUtils(){} | ||
private static final String BEGIN_NODE_ID = "begin"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static final 一般放在类的第一行
} | ||
|
||
private String condition; | ||
private String routeId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
移动到上面去
private String id; | ||
private String label; | ||
private String type; | ||
private String version; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version改成value
|
||
private String source; | ||
private String target; | ||
private String version; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉version
* @version 1.0 | ||
*/ | ||
|
||
public class GraphEdgeDto { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类命名成GraphLinkDto
return edges; | ||
} | ||
|
||
public void setEdges(List<GraphEdgeDto> edges) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
改成setLinks
var type = target.get('type'); | ||
if (type === 'circle') { | ||
alert('你点击的是边上的圆点'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉alert
* @version 1.0 | ||
*/ | ||
|
||
import com.nepxion.discovery.common.util.JsonUtil; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
导入模板,format import次序。下同
import java.util.List; | ||
|
||
public class GraphDto { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dto集成序列化接口,序列化自动通过IDE生成,不要用1L表示
|
||
public void setEdges(List<GraphEdgeDto> edges) { | ||
this.edges = edges; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加如下方法,在底部
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
@Override
public boolean equals(Object object) {
return EqualsBuilder.reflectionEquals(this, object);
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
- 代码格式模板导入 - 去掉edgeDto version; NodeDto, version => value - hash、equals、toString; - serialVersionUID;
<i class="layui-icon layui-icon-add-1"></i> 查看<b>拓扑</b>图 | ||
</button> | ||
</div> | ||
</@insert> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
按钮风格需要调整一下
* @author Xuehui Ren | ||
* @version 1.0 | ||
*/ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把作者信息移到package和import之间
|
||
private static final long serialVersionUID = 3536615004773370039L; | ||
private String source; | ||
private String target; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有对齐?
* | ||
* @author Xuehui Ren | ||
* @version 1.0 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把作者信息移到package和import之间
|
||
private static final long serialVersionUID = 5728555476871710353L; | ||
private String id; | ||
private String label; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有对齐?
import com.nepxion.discovery.platform.server.entity.po.BlueGreenPo; | ||
import com.nepxion.discovery.platform.server.service.base.BasePublishService; | ||
import java.util.Collection; | ||
import java.util.List; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import顺序format一下
- UI蓝绿颜色交替显示; - 选中记录才能查看拓扑图; - reformat for tab to 4 spaces; - 去掉后台测试代码,改成正式: RuleEntity ruleEntity = platformDiscoveryAdapter.getConfig(portalName)
# Conflicts: # discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/BlueGreenService.java # discovery-platform-server/discovery-platform-starter-server/src/main/java/com/nepxion/discovery/platform/server/service/BlueGreenServiceImpl.java