| | |
| | | |
| | | 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; |
| | |
| | | |
| | | private JLabel lServerStatus; |
| | | private JLabel lCurrentConnections; |
| | | private JLabel lHostname; |
| | | private JLabel lAdministrativeUsers; |
| | | private JLabel lInstallPath; |
| | | private JLabel lOpenDSVersion; |
| | |
| | | |
| | | updateCurrentConnectionContents(desc); |
| | | |
| | | updateHostnameContents(desc); |
| | | |
| | | updateAdministrativeUserContents(desc); |
| | | |
| | | updateInstallPathContents(desc); |
| | |
| | | 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, |
| | |
| | | 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, |
| | |
| | | |
| | | JLabel[] rightLabels = |
| | | { |
| | | lAdministrativeUsers, lInstallPath, lOpenDSVersion, lJavaVersion |
| | | lHostname, lAdministrativeUsers, lInstallPath, lOpenDSVersion, |
| | | lJavaVersion |
| | | }; |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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. |
| | |
| | | */ |
| | | 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) |
| | | { |
| | |
| | | { |
| | | Set<BaseDNDescriptor> replicas = new HashSet<BaseDNDescriptor>(); |
| | | Set<DatabaseDescriptor> dbs = desc.getDatabases(); |
| | | |
| | | for (DatabaseDescriptor db: dbs) |
| | | { |
| | | replicas.addAll(db.getBaseDns()); |