Skip to content
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

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open

Feature xuehui #56

wants to merge 31 commits into from

Conversation

renxuehui
Copy link
Collaborator

  • 蓝绿拓扑图功能

renxuehui and others added 10 commits July 14, 2021 20:24
…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) {
Copy link
Member

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";
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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 {
Copy link
Member

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) {
Copy link
Member

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('你点击的是边上的圆点');
}
Copy link
Member

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;
Copy link
Member

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 {

Copy link
Member

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;
}
Copy link
Member

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>&nbsp;&nbsp;查看<b>拓扑</b>图
</button>
</div>
</@insert>
Copy link
Member

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
*/

Copy link
Member

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;
Copy link
Member

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
*/
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

import顺序format一下

renxuehui and others added 15 commits July 19, 2021 22:21
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants