1
1
/*
2
- * Copyright (c) 2021, 2022 Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 2021, 2025 Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -105,6 +105,7 @@ void load()
105
105
{
106
106
GlobalPreferences preferences = GlobalPreferences .sharedInstance ();
107
107
m_refreshTime .setValue (preferences .getRefreshTime ());
108
+ m_gRPCVersion .setValue (preferences .getGrpcVersion ());
108
109
m_logQueryTimes .setSelected (preferences .isLogQueryTimes ());
109
110
m_disableMBeanCheck .setSelected (preferences .isMBeanCheckDisabled ());
110
111
m_restRequestTimout .setValue (preferences .getRestTimeout ());
@@ -132,6 +133,7 @@ void store()
132
133
preferences .setClusterSnapshotEnabled (m_enableClusterSnapshot .isSelected ());
133
134
preferences .setAdminFunctionsEnabled (m_adminFunctionsEnabled .isSelected ());
134
135
preferences .setSSLCertValidationDisabled (m_disableSSLCertValidation .isSelected ());
136
+ preferences .setGrpcVersion ((Integer ) m_gRPCVersion .getValue ());
135
137
}
136
138
137
139
/**
@@ -195,23 +197,43 @@ private void initComponents()
195
197
c .insets = new Insets (3 , 0 , 3 , 0 );
196
198
add (plottersUnits , c );
197
199
200
+ // ---- gRPC Version Label
201
+ JLabel plottersLabelgRPC = new JLabel ();
202
+ Mnemonics .setLocalizedText (plottersLabelgRPC , getLocalText ("LBL_grpc_version" ));
203
+ GridBagConstraints c2 = new GridBagConstraints ();
204
+ c2 .gridx = 0 ;
205
+ c2 .gridy = 2 ;
206
+ c2 .anchor = GridBagConstraints .WEST ;
207
+ c2 .insets = new Insets (3 , 15 , 3 , 0 );
208
+ add (plottersLabelgRPC , c2 );
209
+
210
+ m_gRPCVersion = new JSpinner ();
211
+ m_gRPCVersion .setToolTipText (getLocalText ("TTIP_grpc_version" ));
212
+ m_gRPCVersion .setModel (new SpinnerNumberModel (0 , 0 , 1 , 1 ));
213
+ c2 = new GridBagConstraints ();
214
+ c2 .gridx = 1 ;
215
+ c2 .gridy = 2 ;
216
+ c2 .anchor = GridBagConstraints .WEST ;
217
+ c2 .insets = new Insets (3 , 5 , 3 , 4 );
218
+ add (m_gRPCVersion , c2 );
219
+
198
220
m_logQueryTimes = new JCheckBox ();
199
221
m_logQueryTimes .setToolTipText (getLocalText ("TTIP_log_query_times" ));
200
- addCheckBox (2 , "LBL_log_query_times" , m_logQueryTimes );
222
+ addCheckBox (3 , "LBL_log_query_times" , m_logQueryTimes );
201
223
202
224
m_disableMBeanCheck = new JCheckBox ();
203
225
m_disableMBeanCheck .setToolTipText (getLocalText ("TTIP_disable_mbean_check" ));
204
- addCheckBox (3 , "LBL_disable_mbean_check" , m_disableMBeanCheck );
226
+ addCheckBox (4 , "LBL_disable_mbean_check" , m_disableMBeanCheck );
205
227
206
228
// ---- REST ----
207
- addHeader (4 , "LBL_rest" );
229
+ addHeader (5 , "LBL_rest" );
208
230
209
231
// ---- REST Request Timeout ----
210
232
JLabel lblRest = new JLabel ();
211
233
Mnemonics .setLocalizedText (lblRest , getLocalText ("LBL_rest_request_timeout" ));
212
234
c = new GridBagConstraints ();
213
235
c .gridx = 0 ;
214
- c .gridy = 5 ;
236
+ c .gridy = 6 ;
215
237
c .anchor = GridBagConstraints .WEST ;
216
238
c .insets = new Insets (3 , 15 , 3 , 0 );
217
239
add (lblRest , c );
@@ -222,7 +244,7 @@ private void initComponents()
222
244
m_restRequestTimout .setModel (new SpinnerNumberModel (30000 , 1000 , 99999999 , 1000 ));
223
245
c = new GridBagConstraints ();
224
246
c .gridx = 1 ;
225
- c .gridy = 5 ;
247
+ c .gridy = 6 ;
226
248
c .anchor = GridBagConstraints .WEST ;
227
249
c .insets = new Insets (3 , 5 , 3 , 4 );
228
250
add (m_restRequestTimout , c );
@@ -231,37 +253,37 @@ private void initComponents()
231
253
Mnemonics .setLocalizedText (requestUnits , getLocalText ("LBL_millis" )); // NOI18N
232
254
c = new GridBagConstraints ();
233
255
c .gridx = 2 ;
234
- c .gridy = 5 ;
256
+ c .gridy = 6 ;
235
257
c .anchor = GridBagConstraints .WEST ;
236
258
c .insets = new Insets (3 , 0 , 3 , 0 );
237
259
add (requestUnits , c );
238
260
239
261
m_enableRestDebug = new JCheckBox ();
240
262
m_enableRestDebug .setToolTipText (getLocalText ("TTIP_rest_debug" ));
241
- addCheckBox (6 , "LBL_enable_rest_debug" , m_enableRestDebug );
263
+ addCheckBox (7 , "LBL_enable_rest_debug" , m_enableRestDebug );
242
264
243
265
m_disableSSLCertValidation = new JCheckBox ();
244
266
m_disableSSLCertValidation .setToolTipText (getLocalText ("TTIP_ssl_disable" ));
245
- addCheckBox (7 , "LBL_disable_cert_validation" , m_disableSSLCertValidation );
267
+ addCheckBox (8 , "LBL_disable_cert_validation" , m_disableSSLCertValidation );
246
268
247
269
// ---- Other / Experimental ----
248
- addHeader (8 , "LBL_other" );
270
+ addHeader (9 , "LBL_other" );
249
271
250
272
m_enablePersistenceList = new JCheckBox ();
251
273
m_enablePersistenceList .setToolTipText (getLocalText ("TTIP_persistence_list" ));
252
- addCheckBox (9 , "LBL_enable_persistence_list" , m_enablePersistenceList );
274
+ addCheckBox (10 , "LBL_enable_persistence_list" , m_enablePersistenceList );
253
275
254
276
m_enableZoom = new JCheckBox ();
255
277
m_enableZoom .setToolTipText (getLocalText ("TTIP_zoom_enabled" ));
256
- addCheckBox (10 , "LBL_enable_zoom" , m_enableZoom );
278
+ addCheckBox (11 , "LBL_enable_zoom" , m_enableZoom );
257
279
258
280
m_enableClusterSnapshot = new JCheckBox ();
259
281
m_enableClusterSnapshot .setToolTipText (getLocalText ("TTIP_enable_cluster_snapshot" ));
260
- addCheckBox (11 , "LBL_enable_cluster_snapshot" , m_enableClusterSnapshot );
282
+ addCheckBox (12 , "LBL_enable_cluster_snapshot" , m_enableClusterSnapshot );
261
283
262
284
m_adminFunctionsEnabled = new JCheckBox ();
263
285
m_adminFunctionsEnabled .setToolTipText (getLocalText ("TTIP_enable_cluster_head_dump" ));
264
- addCheckBox (12 , "LBL_enable_admin_functions" , m_adminFunctionsEnabled );
286
+ addCheckBox (13 , "LBL_enable_admin_functions" , m_adminFunctionsEnabled );
265
287
266
288
m_btnAnalyzeUnavailableTime = new JButton (Localization .getLocalText ("LBL_analyze_log_file" ));
267
289
m_btnAnalyzeUnavailableTime .setMnemonic (KeyEvent .VK_A );
@@ -286,7 +308,7 @@ private void initComponents()
286
308
287
309
c = new GridBagConstraints ();
288
310
c .gridx = 0 ;
289
- c .gridy = 13 ;
311
+ c .gridy = 14 ;
290
312
c .anchor = GridBagConstraints .WEST ;
291
313
c .insets = new Insets (3 , 15 , 3 , 0 );
292
314
add (m_btnAnalyzeUnavailableTime , c );
@@ -304,7 +326,7 @@ private void initComponents()
304
326
// filler
305
327
c = new GridBagConstraints ();
306
328
c .gridx = 0 ;
307
- c .gridy = 16 ;
329
+ c .gridy = 17 ;
308
330
c .weightx = 1 ;
309
331
c .weighty = 1 ;
310
332
c .anchor = GridBagConstraints .NORTHWEST ;
@@ -364,6 +386,7 @@ private void addHeader(int y, String sLabel)
364
386
private void startTrackingChanges ()
365
387
{
366
388
m_refreshTime .getModel ().addChangeListener (f_changeListener );
389
+ m_gRPCVersion .getModel ().addChangeListener (f_changeListener );
367
390
m_logQueryTimes .getModel ().addChangeListener (f_changeListener );
368
391
m_disableMBeanCheck .getModel ().addChangeListener (f_changeListener );
369
392
m_enableRestDebug .getModel ().addChangeListener (f_changeListener );
@@ -695,6 +718,11 @@ public String toString()
695
718
*/
696
719
private JSpinner m_refreshTime ;
697
720
721
+ /**
722
+ * gRPC version spinner..
723
+ */
724
+ private JSpinner m_gRPCVersion ;
725
+
698
726
/**
699
727
* Reqest request time spinner.
700
728
*/
0 commit comments