Fine0830 commented on code in PR #442:
URL:
https://github.com/apache/skywalking-booster-ui/pull/442#discussion_r1893448301
##########
src/store/modules/topology.ts:
##########
@@ -338,14 +338,19 @@ export const topologyStore = defineStore({
}
const res = await this.getEndpointTopology(endpointIds);
if (depth > 1) {
- const ids = res.nodes.map((item: Node) => item.id).filter((d: string)
=> !endpointIds.includes(d));
+ const userNodeName = "User";
+ const ids = res.nodes
+ .filter((item: Node) => item.name != userNodeName)
+ .map((item: Node) => item.id)
+ .filter((d: string) => !endpointIds.includes(d));
Review Comment:
```suggestion
const ids = res.nodes.filter((d: Node) =>
!endpointIds.includes(d.id) && d.name !== userNodeName).map((item: Node) =>
item.id);
```
##########
src/store/modules/topology.ts:
##########
@@ -338,14 +338,19 @@ export const topologyStore = defineStore({
}
const res = await this.getEndpointTopology(endpointIds);
if (depth > 1) {
- const ids = res.nodes.map((item: Node) => item.id).filter((d: string)
=> !endpointIds.includes(d));
+ const userNodeName = "User";
+ const ids = res.nodes
+ .filter((item: Node) => item.name != userNodeName)
+ .map((item: Node) => item.id)
+ .filter((d: string) => !endpointIds.includes(d));
if (!ids.length) {
this.setTopology(res);
return;
}
const json = await this.getEndpointTopology(ids);
if (depth > 2) {
const pods = json.nodes
+ .filter((item: Node) => item.name != userNodeName)
Review Comment:
Need to change as above
##########
src/store/modules/topology.ts:
##########
@@ -368,6 +374,7 @@ export const topologyStore = defineStore({
const data = await this.getEndpointTopology(endpoints);
if (depth > 4) {
const nodeIds = data.nodes
+ .filter((item: Node) => item.name != userNodeName)
Review Comment:
Need to change as above
##########
src/store/modules/topology.ts:
##########
@@ -357,6 +362,7 @@ export const topologyStore = defineStore({
const topo = await this.getEndpointTopology(pods);
if (depth > 3) {
const endpoints = topo.nodes
+ .filter((item: Node) => item.name != userNodeName)
Review Comment:
Need to change as above
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]