Issue #2704 fix alertviz connectivity checks
Former-commit-id:4d68994525
[formerly0c4de50218
[formerly adfb9c293456aeced60e3ab41575d8b3b0f635b8]] Former-commit-id:0c4de50218
Former-commit-id:0160ab0464
This commit is contained in:
parent
34c7c3cba1
commit
742217ded0
2 changed files with 23 additions and 6 deletions
|
@ -68,6 +68,7 @@ import com.raytheon.uf.viz.core.comm.IConnectivityCallback;
|
|||
* Aug 02, 2013 2202 bsteffen Add edex specific connectivity checking.
|
||||
* Feb 04, 2014 2704 njensen Shifted some private fields/methods to protected,
|
||||
* Added status and details, better site validation
|
||||
* Feb 17, 2014 2704 njensen Changed some alertviz fields to protected
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -117,15 +118,15 @@ public class ConnectivityPreferenceDialog extends Dialog {
|
|||
|
||||
private Label localizationLabel;
|
||||
|
||||
private Text localizationText;
|
||||
protected Text localizationText;
|
||||
|
||||
private String localization = "";
|
||||
|
||||
private boolean localizationGood = false;
|
||||
|
||||
private Text alertVizText;
|
||||
protected Text alertVizText;
|
||||
|
||||
private String alertVizServer = null;
|
||||
protected String alertVizServer = null;
|
||||
|
||||
private boolean alertVizGood = true;
|
||||
|
||||
|
@ -460,7 +461,7 @@ public class ConnectivityPreferenceDialog extends Dialog {
|
|||
localizationCallback);
|
||||
}
|
||||
|
||||
private void validateAlertviz() {
|
||||
protected void validateAlertviz() {
|
||||
ConnectivityManager.checkAlertService(alertVizServer, alertCallback);
|
||||
}
|
||||
|
||||
|
@ -657,8 +658,8 @@ public class ConnectivityPreferenceDialog extends Dialog {
|
|||
if (status != null) {
|
||||
statusLabel.setText(status);
|
||||
} else {
|
||||
throw new IllegalStateException(
|
||||
"Connectivity dialog received non-good status without status message");
|
||||
// shoudln't be able to reach this but just in case
|
||||
statusLabel.setText("Connection error");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,7 @@ import com.raytheon.uf.viz.thinclient.preferences.ThinClientPreferenceConstants;
|
|||
* Nov 23, 2011 bsteffen Initial creation
|
||||
* Aug 02, 2013 2202 bsteffen Add edex specific connectivity checking.
|
||||
* Feb 04, 2014 2704 njensen Refactored
|
||||
* Feb 17, 2014 2704 njensen Added checks for alertviz connectivity
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
|
@ -303,6 +304,16 @@ public class ThinClientConnectivityDialog extends ConnectivityPreferenceDialog {
|
|||
siteText.setBackground(getTextColor(isSiteGood()));
|
||||
}
|
||||
|
||||
// validate alertviz
|
||||
// apparently alertvizserver == null means it's alertviz itself
|
||||
if (alertVizServer != null) {
|
||||
if (alertVizText != null && !alertVizText.isDisposed()) {
|
||||
setAlertVizServer(alertVizText.getText());
|
||||
super.validateAlertviz();
|
||||
alertVizText.setBackground(getTextColor(isAlertVizGood()));
|
||||
}
|
||||
}
|
||||
|
||||
boolean everythingGood = servicesGood && pypiesGood && isSiteGood()
|
||||
&& isAlertVizGood() && jmsGood;
|
||||
updateStatus(everythingGood, status, details);
|
||||
|
@ -326,6 +337,11 @@ public class ThinClientConnectivityDialog extends ConnectivityPreferenceDialog {
|
|||
useProxy = useProxyCheck.getSelection();
|
||||
proxyText.setEnabled(useProxy);
|
||||
super.setLocalizationEnabled(!useProxy);
|
||||
if (useProxy) {
|
||||
if (localizationText != null && !localizationText.isDisposed()) {
|
||||
localizationText.setBackground(getTextColor(true));
|
||||
}
|
||||
}
|
||||
validate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue