From a091e85ec925fdb878303144f7b4f5e302e7c35f Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Fri, 21 Sep 2007 17:31:33 +0000
Subject: [PATCH] Fix for issues 2314 and 2238.
---
opends/src/guitools/org/opends/guitools/statuspanel/ui/StatusPanelDialog.java | 39 ++++++++++++++++++++++++++++++++++++---
1 files changed, 36 insertions(+), 3 deletions(-)
diff --git a/opends/src/guitools/org/opends/guitools/statuspanel/ui/StatusPanelDialog.java b/opends/src/guitools/org/opends/guitools/statuspanel/ui/StatusPanelDialog.java
index fb7554d..e1ea0e2 100644
--- a/opends/src/guitools/org/opends/guitools/statuspanel/ui/StatusPanelDialog.java
+++ b/opends/src/guitools/org/opends/guitools/statuspanel/ui/StatusPanelDialog.java
@@ -68,6 +68,7 @@
import org.opends.guitools.statuspanel.BaseDNDescriptor;
import org.opends.guitools.statuspanel.DatabaseDescriptor;
+import org.opends.guitools.statuspanel.ListenerDescriptor;
import org.opends.guitools.statuspanel.ServerStatusDescriptor;
import org.opends.guitools.statuspanel.event.StatusPanelButtonListener;
import org.opends.quicksetup.event.MinimumSizeComponentListener;
@@ -99,6 +100,7 @@
private JLabel lServerStatus;
private JLabel lCurrentConnections;
+ private JLabel lHostname;
private JLabel lAdministrativeUsers;
private JLabel lInstallPath;
private JLabel lOpenDSVersion;
@@ -189,6 +191,8 @@
updateCurrentConnectionContents(desc);
+ updateHostnameContents(desc);
+
updateAdministrativeUserContents(desc);
updateInstallPathContents(desc);
@@ -645,6 +649,9 @@
JLabel[] leftLabels =
{
UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
+ INFO_HOSTNAME_LABEL.get(),
+ UIFactory.TextStyle.PRIMARY_FIELD_VALID),
+ UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
INFO_ADMINISTRATIVE_USERS_LABEL.get(),
UIFactory.TextStyle.PRIMARY_FIELD_VALID),
UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
@@ -658,6 +665,9 @@
UIFactory.TextStyle.PRIMARY_FIELD_VALID)
};
+ lHostname = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
+ NOT_AVAILABLE,
+ UIFactory.TextStyle.READ_ONLY);
lAdministrativeUsers = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
NOT_AVAILABLE, UIFactory.TextStyle.READ_ONLY);
lInstallPath = UIFactory.makeJLabel(UIFactory.IconType.NO_ICON,
@@ -669,7 +679,8 @@
JLabel[] rightLabels =
{
- lAdministrativeUsers, lInstallPath, lOpenDSVersion, lJavaVersion
+ lHostname, lAdministrativeUsers, lInstallPath, lOpenDSVersion,
+ lJavaVersion
};
@@ -942,7 +953,18 @@
}
/**
- * Updates the admiinistrative user contents displaying with what is specified
+ * Updates the host name contents displaying with what is specified
+ * in the provided ServerStatusDescriptor object.
+ * This method must be called from the event thread.
+ * @param desc the ServerStatusDescriptor object.
+ */
+ private void updateHostnameContents(ServerStatusDescriptor desc)
+ {
+ lHostname.setText(desc.getHostname());
+ }
+
+ /**
+ * Updates the administrative user contents displaying with what is specified
* in the provided ServerStatusDescriptor object.
* This method must be called from the event thread.
* @param desc the ServerStatusDescriptor object.
@@ -1049,7 +1071,17 @@
*/
private void updateListenerContents(ServerStatusDescriptor desc)
{
- listenersTableModel.setData(desc.getListeners());
+ Set<ListenerDescriptor> allListeners = desc.getListeners();
+
+ Set<ListenerDescriptor> listeners = new LinkedHashSet<ListenerDescriptor>();
+ for (ListenerDescriptor listener: allListeners)
+ {
+ if (listener.getProtocol() != ListenerDescriptor.Protocol.LDIF)
+ {
+ listeners.add(listener);
+ }
+ }
+ listenersTableModel.setData(listeners);
if (listenersTableModel.getRowCount() == 0)
{
@@ -1092,6 +1124,7 @@
{
Set<BaseDNDescriptor> replicas = new HashSet<BaseDNDescriptor>();
Set<DatabaseDescriptor> dbs = desc.getDatabases();
+
for (DatabaseDescriptor db: dbs)
{
replicas.addAll(db.getBaseDns());
--
Gitblit v1.10.0