Skip to content

Commit

Permalink
[#2288] feat(dashboard): Show nodeInfo in excludeNode page (#2289)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
Show nodeInfo in excludeNode page
<img width="1593" alt="image" src="https://github.com/user-attachments/assets/e74b23dc-4c32-4faf-94c7-278a0b05fef1" />

<img width="1670" alt="企业微信截图_b08453cf-21af-43ed-bcdd-4238390c9823" src="https://github.com/user-attachments/assets/3b9ada0b-56ed-4515-9c24-0414ea324a27" />

### Why are the changes needed?
Fix: #2288 

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?

Manually.
  • Loading branch information
kuszz authored Dec 18, 2024
1 parent a1d3252 commit 258db12
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 279 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ public Response<List<ServerNode>> nodes(@QueryParam("status") String status) {
serverList = clusterManager.getLostServerList();
} else if (ServerStatus.EXCLUDED.name().equalsIgnoreCase(status)) {
serverList =
clusterManager.getExcludedNodes().stream()
.map(ServerNode::new)
clusterManager.list().stream()
.filter(node -> clusterManager.getExcludedNodes().contains(node.getId()))
.collect(Collectors.toList());
} else {
List<ServerNode> serverAllList = clusterManager.list();
Expand All @@ -92,9 +92,10 @@ public Response<List<ServerNode>> nodes(@QueryParam("status") String status) {
serverList =
serverList.stream()
.filter(
server -> {
return status == null || server.getStatus().name().equalsIgnoreCase(status);
})
server ->
status == null
|| server.getStatus().name().equalsIgnoreCase(status)
|| ServerStatus.EXCLUDED.name().equalsIgnoreCase(status))
.collect(Collectors.toList());
serverList.sort(Comparator.comparing(ServerNode::getId));
return Response.success(serverList);
Expand Down
12 changes: 6 additions & 6 deletions dashboard/src/main/webapp/src/pages/ShuffleServerPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/activeNodeList"
:to="{ path: '/shuffleserverpage/activeNodeList', query: { isExcludedPage: false } }"
@click.native="routerHandler"
>
<el-card class="box-card" shadow="hover">
Expand All @@ -37,7 +37,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/decommissioningNodeList"
:to="{ path: '/shuffleserverpage/decommissioningNodeList', query: { isExcludedPage: false } }"
@click.native="routerHandler"
>
<el-card class="box-card" shadow="hover">
Expand All @@ -55,7 +55,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/decommissionedNodeList"
:to="{ path: '/shuffleserverpage/decommissionedNodeList', query: { isExcludedPage: false } }"
@click.native="routerHandler"
>
<el-card class="box-card" shadow="hover">
Expand All @@ -73,7 +73,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/lostNodeList"
:to="{ path: '/shuffleserverpage/lostNodeList', query: { isExcludedPage: false } }"
@click.native="routerHandler"
:updateTotalPage="updateTotalPage"
>
Expand All @@ -90,7 +90,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/unhealthyNodeList"
:to="{ path: '/shuffleserverpage/unhealthyNodeList', query: { isExcludedPage: false } }"
@click.native="routerHandler"
>
<el-card class="box-card" shadow="hover">
Expand All @@ -106,7 +106,7 @@
<el-col :span="4">
<router-link
class="router-link-active"
to="/shuffleserverpage/excludeNodeList"
:to="{ path: '/shuffleserverpage/excludeNodeList', query: { isExcludedPage: true } }"
@click.native="routerHandler"
>
<el-card class="box-card" shadow="hover">
Expand Down
264 changes: 0 additions & 264 deletions dashboard/src/main/webapp/src/pages/serverstatus/ExcludeNodeList.vue

This file was deleted.

Loading

0 comments on commit 258db12

Please sign in to comment.