Skip to content

Commit 57a4ac8

Browse files
committed
[grid] Adding node count to GraphQL data
1 parent 46da791 commit 57a4ac8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

java/server/src/org/openqa/selenium/grid/graphql/Grid.java

+4
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ public List<Node> getNodes() {
9898
return toReturn.build();
9999
}
100100

101+
public int getNodeCount() {
102+
return distributorStatus.get().getNodes().size();
103+
}
104+
101105
public int getSessionCount() {
102106
return distributorStatus.get().getNodes().stream()
103107
.map(NodeStatus::getSlots)

java/server/src/org/openqa/selenium/grid/graphql/selenium-grid-schema.graphqls

+1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type GridQuery {
6565
type Grid {
6666
uri: Uri!
6767
totalSlots: Int!
68+
nodeCount: Int!
6869
maxSession: Int!
6970
sessionCount: Int!
7071
version: String!

0 commit comments

Comments
 (0)