File tree 2 files changed +15
-0
lines changed
src/server/src/main/java/io/cassandrareaper/resources
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -114,8 +114,18 @@ public Response getCluster(
114
114
.build ();
115
115
116
116
} else {
117
+
118
+ final String jmxUsername ;
119
+
120
+ if (context .jmxConnectionFactory .getJmxCredentialsForCluster (clusterName ).isPresent ()) {
121
+ jmxUsername = context .jmxConnectionFactory .getJmxCredentialsForCluster (clusterName ).get ().getUsername ();
122
+ } else {
123
+ jmxUsername = "" ;
124
+ }
125
+
117
126
ClusterStatus clusterStatus = new ClusterStatus (
118
127
cluster .get (),
128
+ jmxUsername ,
119
129
context .storage .getClusterRunStatuses (cluster .get ().getName (), limit .orElse (Integer .MAX_VALUE )),
120
130
context .storage .getClusterScheduleStatuses (cluster .get ().getName ()),
121
131
getNodesStatus (cluster ).orElse (null ));
Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ public final class ClusterStatus {
29
29
@ JsonProperty
30
30
public final String name ;
31
31
32
+ @ JsonProperty ("jmx_username" )
33
+ public final String jmxUsername ;
34
+
32
35
@ JsonProperty ("seed_hosts" )
33
36
public final Set <String > seedHosts ;
34
37
@@ -43,11 +46,13 @@ public final class ClusterStatus {
43
46
44
47
public ClusterStatus (
45
48
Cluster cluster ,
49
+ String jmxUsername ,
46
50
Collection <RepairRunStatus > repairRuns ,
47
51
Collection <RepairScheduleStatus > repairSchedules ,
48
52
NodesStatus nodesStatus ) {
49
53
50
54
this .name = cluster .getName ();
55
+ this .jmxUsername = jmxUsername ;
51
56
this .seedHosts = cluster .getSeedHosts ();
52
57
this .repairRuns = repairRuns ;
53
58
this .repairSchedules = repairSchedules ;
You can’t perform that action at this time.
0 commit comments