opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/BackendDescriptor.java
@@ -45,6 +45,7 @@ private final boolean isEnabled; private CustomSearchResult monitoringEntry; private final Type type; private PluggableType pluggableType; private int hashCode; /** An enumeration describing the type of backend. */ @@ -66,6 +67,17 @@ TASK } /** An enumeration describing the different pluggable backends. */ public enum PluggableType { /** JE Backend. */ JE, /** PDB Backend. */ PDB, /** Unknown Type, should never fall through this. */ UNKNOWN } /** * Constructor for this class. * @param backendID the backend ID of the Backend. @@ -294,4 +306,22 @@ { return isEnabled; } /** * Set the type of pluggable backend. * @param pluggableType the type of pluggable backend. */ public void setPluggableType(PluggableType pluggableType) { this.pluggableType = pluggableType; } /** * Get the type of pluggable backend. * @return the type of pluggable backend. */ public PluggableType getPluggableType() { return pluggableType; } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/DatabaseMonitoringTableModel.java
File was renamed from opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/datamodel/DBEnvironmentMonitoringTableModel.java @@ -40,22 +40,18 @@ import static org.opends.messages.AdminToolMessages.*; import static org.opends.server.util.CollectionUtils.*; /** * The abstract table model used to display all the network groups. */ public class DBEnvironmentMonitoringTableModel extends SortableTableModel implements Comparator<BackendDescriptor> /** The table model used to display all the database monitoring information. */ public class DatabaseMonitoringTableModel extends SortableTableModel implements Comparator<BackendDescriptor> { private static final long serialVersionUID = 548035716525600536L; private Set<BackendDescriptor> data = new HashSet<>(); private ArrayList<String[]> dataArray = new ArrayList<>(); private ArrayList<BackendDescriptor> dataSourceArray = new ArrayList<>(); private String[] columnNames = {}; private LocalizableMessage NO_VALUE_SET = INFO_CTRL_PANEL_NO_MONITORING_VALUE.get(); private LocalizableMessage NOT_IMPLEMENTED = INFO_CTRL_PANEL_NOT_IMPLEMENTED.get(); /** The operations to be displayed. */ /** The fields to be displayed. */ private LinkedHashSet<String> attributes = new LinkedHashSet<>(); /** The sort column of the table. */ private int sortColumn; @@ -202,8 +198,8 @@ } /** * Returns the operations displayed by this table model. * @return the operations displayed by this table model. * Returns the fields displayed by this table model. * @return the fields displayed by this table model. */ public Collection<String> getAttributes() { @@ -211,19 +207,19 @@ } /** * Sets the operations displayed by this table model. * @param operations the operations displayed by this table model. * Sets the fields displayed by this table model. * @param fields the statistic fields displayed by this table model. */ public void setAttributes(LinkedHashSet<String> operations) public void setAttributes(LinkedHashSet<String> fields) { this.attributes.clear(); this.attributes.addAll(operations); columnNames = new String[operations.size() + 1]; this.attributes.addAll(fields); columnNames = new String[fields.size() + 1]; columnNames[0] = INFO_CTRL_PANEL_DB_HEADER.get().toString(); int i = 1; for (String operation : operations) for (String field : fields) { columnNames[i] = operation; columnNames[i] = field; i++; } } @@ -236,12 +232,10 @@ TreeSet<BackendDescriptor> sortedSet = new TreeSet<>(this); sortedSet.addAll(data); dataArray.clear(); dataSourceArray.clear(); for (BackendDescriptor ach : sortedSet) { String[] s = getLine(ach); dataArray.add(s); dataSourceArray.add(ach); } // Add the total: always at the end @@ -253,9 +247,8 @@ boolean valueSet = false; boolean notImplemented = false; long totalValue = 0; for (int j=0; j<dataArray.size(); j++) for (String[] l : dataArray) { String[] l = dataArray.get(j); String value = l[i]; try { opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BrowseGeneralMonitoringPanel.java
@@ -94,30 +94,20 @@ */ protected enum NodeType { /** * Root node. */ /** Root node. */ ROOT, /** * System information node. */ /** System information node. */ SYSTEM_INFORMATION, /** * Java information node. */ /** Java information node. */ JAVA_INFORMATION, /** * Work queue node. */ /** Work queue node. */ WORK_QUEUE, /** * Entry caches node. */ /** Entry caches node. */ ENTRY_CACHES, /** * Database environment node. */ DB_ENVIRONMENT /** JE Databases information node. */ JE_DATABASES_INFORMATION, /** PDB databases information node. */ PDB_DATABASES_INFORMATION } /** @@ -503,8 +493,11 @@ case ENTRY_CACHES: entryPane.updateEntryCaches(); break; case DB_ENVIRONMENT: entryPane.updateDBEnvironment(); case JE_DATABASES_INFORMATION: entryPane.updateJEDatabaseInformation(); break; case PDB_DATABASES_INFORMATION: entryPane.updatePDBDatbaseInformation(); break; case JAVA_INFORMATION: entryPane.updateJavaInformation(); @@ -587,7 +580,8 @@ NodeType.JAVA_INFORMATION, NodeType.WORK_QUEUE, NodeType.ENTRY_CACHES, NodeType.DB_ENVIRONMENT NodeType.JE_DATABASES_INFORMATION, NodeType.PDB_DATABASES_INFORMATION }; LocalizableMessage[] ocPaths = { INFO_CTRL_PANEL_GENERAL_MONITORING_ROOT_TREE_NODE.get(), @@ -595,6 +589,7 @@ INFO_CTRL_PANEL_JVM_MEMORY_USAGE_TREE_NODE.get(), INFO_CTRL_PANEL_WORK_QUEUE_TREE_NODE.get(), INFO_CTRL_PANEL_ENTRY_CACHES_TREE_NODE.get(), INFO_CTRL_PANEL_DB_ENVIRONMENT_TREE_NODE.get(), INFO_CTRL_PANEL_DB_ENVIRONMENT_TREE_NODE.get() }; for (int i=0; i<identifiers.length; i++) @@ -663,7 +658,8 @@ INFO_CTRL_PANEL_JAVA_INFORMATION.get(), INFO_CTRL_PANEL_WORK_QUEUE.get(), INFO_CTRL_PANEL_ENTRY_CACHES.get(), INFO_CTRL_PANEL_DB_ENVIRONMENT.get() INFO_CTRL_PANEL_JE_DB_INFO.get(), INFO_CTRL_PANEL_PDB_DB_INFO.get() }; } @@ -678,7 +674,8 @@ NodeType.JAVA_INFORMATION, NodeType.WORK_QUEUE, NodeType.ENTRY_CACHES, NodeType.DB_ENVIRONMENT NodeType.JE_DATABASES_INFORMATION, NodeType.PDB_DATABASES_INFORMATION }; } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DatabaseMonitoringPanel.java
File was renamed from opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/DBEnvironmentMonitoringPanel.java @@ -47,35 +47,37 @@ import javax.swing.table.DefaultTableCellRenderer; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; import org.opends.guitools.controlpanel.datamodel.DBEnvironmentMonitoringTableModel; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor.PluggableType; import org.opends.guitools.controlpanel.datamodel.DatabaseMonitoringTableModel; import org.opends.guitools.controlpanel.datamodel.ServerDescriptor; import org.opends.guitools.controlpanel.util.Utilities; import org.opends.server.util.ServerConstants; /** * The panel displaying the database environment monitor panel. */ public class DBEnvironmentMonitoringPanel extends GeneralMonitoringPanel /** The panel displaying the database monitoring filtered attributes. */ public class DatabaseMonitoringPanel extends GeneralMonitoringPanel { private static final long serialVersionUID = 9031734563723229830L; private JTable table; private DBEnvironmentMonitoringTableModel tableModel; private DatabaseMonitoringTableModel tableModel; private JScrollPane scroll; private JLabel noDBsFound; private JLabel noMonitoringFound; private JButton showOperations; private JButton showFields; private LinkedHashSet<String> attributes = new LinkedHashSet<>(); private LinkedHashSet<String> allAttributes = new LinkedHashSet<>(); private MonitoringAttributesViewPanel<String> operationViewPanel; private GenericDialog operationViewDlg; private MonitoringAttributesViewPanel<String> fieldsViewPanel; private GenericDialog fieldsViewDlg; private final BackendDescriptor.PluggableType pluggableType; /** Default constructor. */ public DBEnvironmentMonitoringPanel() /** * Default constructor. * @param type the type of pluggable backend. */ public DatabaseMonitoringPanel(BackendDescriptor.PluggableType type) { super(); pluggableType = type; createLayout(); } @@ -85,14 +87,12 @@ return table; } /** * Creates the layout of the panel (but the contents are not populated here). */ /** Creates the layout of the panel (but the contents are not populated here). */ private void createLayout() { GridBagConstraints gbc = new GridBagConstraints(); JLabel lTitle = Utilities.createTitleLabel( INFO_CTRL_PANEL_DB_ENVIRONMENT.get()); final JLabel lTitle = Utilities.createTitleLabel( PluggableType.JE == pluggableType ? INFO_CTRL_PANEL_JE_DB_INFO.get() : INFO_CTRL_PANEL_PDB_DB_INFO.get()); gbc.fill = GridBagConstraints.NONE; gbc.anchor = GridBagConstraints.WEST; gbc.gridwidth = 2; @@ -107,55 +107,47 @@ gbc.gridy ++; gbc.anchor = GridBagConstraints.WEST; gbc.gridwidth = 1; showOperations = Utilities.createButton(INFO_CTRL_PANEL_OPERATIONS_VIEW.get()); showOperations.addActionListener(new ActionListener() showFields = Utilities.createButton(INFO_CTRL_PANEL_OPERATIONS_VIEW.get()); showFields.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ev) { operationViewClicked(); fieldsViewClicked(); } }); showOperations.setVisible(false); showFields.setVisible(false); gbc.gridx = 0; gbc.weightx = 1.0; gbc.fill = GridBagConstraints.HORIZONTAL; add(Box.createHorizontalGlue(), gbc); gbc.gridx ++; gbc.weightx = 0.0; add(showOperations, gbc); add(showFields, gbc); gbc.gridx = 0; gbc.gridy ++; gbc.gridwidth = 2; tableModel = new DBEnvironmentMonitoringTableModel(); tableModel = new DatabaseMonitoringTableModel(); tableModel.setAttributes(attributes); table = Utilities.createSortableTable(tableModel, new DefaultTableCellRenderer()); table = Utilities.createSortableTable(tableModel, new DefaultTableCellRenderer()); scroll = Utilities.createScrollPane(table); updateTableSize(); gbc.fill = GridBagConstraints.BOTH; gbc.weightx = 1.0; gbc.weighty = 1.0; add(scroll, gbc); noDBsFound = Utilities.createDefaultLabel( INFO_CTRL_PANEL_NO_DBS_FOUND.get()); noDBsFound = Utilities.createDefaultLabel(INFO_CTRL_PANEL_NO_DBS_FOUND.get()); noDBsFound.setHorizontalAlignment(SwingConstants.CENTER); add(noDBsFound, gbc); noMonitoringFound = Utilities.createDefaultLabel( INFO_CTRL_PANEL_NO_DB_MONITORING_FOUND.get()); noMonitoringFound = Utilities.createDefaultLabel(INFO_CTRL_PANEL_NO_DB_MONITORING_FOUND.get()); noMonitoringFound.setHorizontalAlignment(SwingConstants.CENTER); add(noMonitoringFound, gbc); setBorder(PANEL_BORDER); } /** * Updates the contents of the panel. The code assumes that this is being * called from the event thread. * */ /** Updates the contents of the panel. The code assumes that this is being called from the event thread. */ public void updateContents() { boolean backendsFound = false; @@ -171,7 +163,8 @@ { for (BackendDescriptor backend : server.getBackends()) { if (backend.getType() == BackendDescriptor.Type.PLUGGABLE) if (BackendDescriptor.Type.PLUGGABLE == backend.getType() && pluggableType == backend.getPluggableType()) { dbBackends.add(backend); if (updateAttributes) @@ -195,16 +188,16 @@ } if (!attributes.isEmpty()) { setOperationsToDisplay(attributes); setFieldsToDisplay(attributes); updateTableSize(); } } tableModel.setData(dbBackends); showOperations.setVisible(backendsFound); showFields.setVisible(backendsFound); scroll.setVisible(backendsFound && !allAttributes.isEmpty()); noDBsFound.setVisible(!backendsFound); noMonitoringFound.setVisible(backendsFound && allAttributes.isEmpty()); showOperations.setVisible(!allAttributes.isEmpty()); showFields.setVisible(!allAttributes.isEmpty()); } @@ -214,34 +207,27 @@ Utilities.updateScrollMode(scroll, table); } /** * Displays a dialog allowing the user to select which operations to display. * */ private void operationViewClicked() /** Displays a dialog allowing the user to select which fields to display. */ private void fieldsViewClicked() { if (operationViewDlg == null) if (fieldsViewDlg == null) { operationViewPanel = MonitoringAttributesViewPanel.createStringInstance( allAttributes); operationViewDlg = new GenericDialog(Utilities.getFrame(this), operationViewPanel); operationViewDlg.setModal(true); Utilities.centerGoldenMean(operationViewDlg, Utilities.getParentDialog(this)); fieldsViewPanel = MonitoringAttributesViewPanel.createStringInstance(allAttributes); fieldsViewDlg = new GenericDialog(Utilities.getFrame(this), fieldsViewPanel); fieldsViewDlg.setModal(true); Utilities.centerGoldenMean(fieldsViewDlg, Utilities.getParentDialog(this)); } operationViewPanel.setSelectedAttributes(attributes); operationViewDlg.setVisible(true); if (!operationViewPanel.isCanceled()) fieldsViewPanel.setSelectedAttributes(attributes); fieldsViewDlg.setVisible(true); if (!fieldsViewPanel.isCanceled()) { attributes = operationViewPanel.getAttributes(); setOperationsToDisplay(attributes); attributes = fieldsViewPanel.getAttributes(); setFieldsToDisplay(attributes); updateTableSize(); } } private void setOperationsToDisplay( LinkedHashSet<String> attributes) private void setFieldsToDisplay(LinkedHashSet<String> attributes) { this.attributes = attributes; tableModel.setAttributes(attributes); @@ -256,9 +242,8 @@ Set<String> allNames = backend.getMonitoringEntry().getAttributeNames(); for (String attrName : allNames) { if (!attrName.equalsIgnoreCase( ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME) && !attrName.equalsIgnoreCase(ServerConstants.ATTR_COMMON_NAME)) if (!attrName.equalsIgnoreCase(ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME) && !attrName.equalsIgnoreCase(ServerConstants.ATTR_COMMON_NAME)) { attrNames.add(attrName); } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/GeneralMonitoringRightPanel.java
@@ -34,6 +34,7 @@ import javax.swing.JPanel; import org.opends.guitools.controlpanel.datamodel.BackendDescriptor; import org.opends.guitools.controlpanel.datamodel.ControlPanelInfo; import org.opends.guitools.controlpanel.event.ConfigurationChangeEvent; import org.opends.guitools.controlpanel.util.Utilities; @@ -48,42 +49,41 @@ { private static final long serialVersionUID = -4197460101279681042L; /** * The panel with a CardLayout that contains all the panels. */ /** The panel with a CardLayout that contains all the panels. */ protected JPanel mainPanel; private RootMonitoringPanel rootPanel = new RootMonitoringPanel(); private WorkQueueMonitoringPanel workQueuePanel = new WorkQueueMonitoringPanel(); private EntryCachesMonitoringPanel entryCachesPanel = new EntryCachesMonitoringPanel(); private DBEnvironmentMonitoringPanel dbEnvironmentPanel = new DBEnvironmentMonitoringPanel(); private SystemInformationMonitoringPanel systemInformationPanel = new SystemInformationMonitoringPanel(); private JavaInformationMonitoringPanel javaInformationPanel = new JavaInformationMonitoringPanel(); private WorkQueueMonitoringPanel workQueuePanel = new WorkQueueMonitoringPanel(); private EntryCachesMonitoringPanel entryCachesPanel = new EntryCachesMonitoringPanel(); private DatabaseMonitoringPanel jeMonitoringPanel = new DatabaseMonitoringPanel(BackendDescriptor.PluggableType.JE); private DatabaseMonitoringPanel pdbMonitoringPanel = new DatabaseMonitoringPanel(BackendDescriptor.PluggableType.PDB); private SystemInformationMonitoringPanel systemInformationPanel = new SystemInformationMonitoringPanel(); private JavaInformationMonitoringPanel javaInformationPanel = new JavaInformationMonitoringPanel(); /** * The panel used to update messages. */ private static final String rootPanelTitle = "RootMonitoringPanel"; private static final String workQueuePanelTitle = "WorkQueueMonitoringPanel"; private static final String entryCachesPanelTitle = "EntryCachesMonitoringPanel"; private static final String jeMonitoringPanelTitle = "JEDatabaseMonitoringPanel"; private static final String pdbMonitoringPanelTitle = "PDBDatabaseMonitoringPanel"; private static final String systemInformationPanelTitle = "SystemInformationMonitoringPanel"; private static final String javaInformationPanelTitle = "JavaInformationMonitoringPanel"; /** The panel used to update messages. */ protected NoItemSelectedPanel noEntryPanel = new NoItemSelectedPanel(); private static final String noEntryPanelTitle = "JavaInformationMonitoringPanel"; private final StatusGenericPanel[] panels = { rootPanel, workQueuePanel, entryCachesPanel, dbEnvironmentPanel, jeMonitoringPanel, pdbMonitoringPanel, systemInformationPanel, javaInformationPanel }; /** * Default constructor. * */ /** Default constructor. */ public GeneralMonitoringRightPanel() { super(); @@ -93,12 +93,11 @@ /** * Displays a panel containing a message. * @param msg the message. * */ public void displayMessage(LocalizableMessage msg) { noEntryPanel.setMessage(msg); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(noEntryPanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, noEntryPanelTitle); } /** {@inheritDoc} */ @@ -111,40 +110,25 @@ } } /** * Creates the layout of the panel (but the contents are not populated here). */ /** Creates the layout of the panel (but the contents are not populated here). */ protected void createLayout() { GridBagConstraints gbc = new GridBagConstraints(); CardLayout cardLayout = new CardLayout(); mainPanel = new JPanel(cardLayout); mainPanel.setOpaque(false); noEntryPanel.setMessage( INFO_CTRL_PANEL_GENERAL_MONITORING_NO_ITEM_SELECTED.get()); JPanel[] panelsWithScroll = { noEntryPanel, rootPanel, workQueuePanel, entryCachesPanel, systemInformationPanel, javaInformationPanel }; JPanel[] panelsWithNoScroll = { dbEnvironmentPanel }; for (JPanel panel : panelsWithScroll) { mainPanel.add(Utilities.createBorderLessScrollBar(panel), getTitle(panel)); } for (JPanel panel : panelsWithNoScroll) { mainPanel.add(panel, getTitle(panel)); } cardLayout.show(mainPanel, getTitle(noEntryPanel)); noEntryPanel.setMessage(INFO_CTRL_PANEL_GENERAL_MONITORING_NO_ITEM_SELECTED.get()); // panels with scroll mainPanel.add(Utilities.createBorderLessScrollBar(noEntryPanel), noEntryPanelTitle); mainPanel.add(Utilities.createBorderLessScrollBar(rootPanel), rootPanelTitle); mainPanel.add(Utilities.createBorderLessScrollBar(workQueuePanel), workQueuePanelTitle); mainPanel.add(Utilities.createBorderLessScrollBar(entryCachesPanel), entryCachesPanelTitle); mainPanel.add(Utilities.createBorderLessScrollBar(systemInformationPanel), systemInformationPanelTitle); mainPanel.add(Utilities.createBorderLessScrollBar(javaInformationPanel), javaInformationPanelTitle); // panels with no scroll mainPanel.add(jeMonitoringPanel, jeMonitoringPanelTitle); mainPanel.add(pdbMonitoringPanel, pdbMonitoringPanelTitle); cardLayout.show(mainPanel, noEntryPanelTitle); gbc.gridx = 0; gbc.gridy = 0; gbc.weightx = 1.0; @@ -182,72 +166,53 @@ { } /** * Updates the contents of the panel with the root monitoring information. */ /** Updates the contents of the panel with the root monitoring information. */ public void updateRoot() { rootPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(rootPanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, rootPanelTitle); } /** * Updates the contents of the panel with the system information monitoring. */ /** Updates the contents of the panel with the system information monitoring. */ public void updateSystemInformation() { systemInformationPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(systemInformationPanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, systemInformationPanelTitle); } /** Updates the contents of the panel with the work queue monitoring information. */ public void updateWorkQueue() { workQueuePanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(workQueuePanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, workQueuePanelTitle); } /** * Updates the contents of the panel with the entry caches monitoring * information. */ /** Updates the contents of the panel with the entry caches monitoring information. */ public void updateEntryCaches() { entryCachesPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(entryCachesPanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, entryCachesPanelTitle); } /** * Updates the contents of the panel with the database environment monitoring * information. */ public void updateDBEnvironment() /** Updates the contents of the panel with the je database monitoring information. */ public void updateJEDatabaseInformation() { dbEnvironmentPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(dbEnvironmentPanel)); jeMonitoringPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, jeMonitoringPanelTitle); } /** Updates the contents of the panel with the pdb database monitoring information. */ public void updatePDBDatbaseInformation() { pdbMonitoringPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, pdbMonitoringPanelTitle); } /** Updates the contents of the panel with the JAVA information. */ public void updateJavaInformation() { javaInformationPanel.updateContents(); ((CardLayout)mainPanel.getLayout()).show(mainPanel, getTitle(javaInformationPanel)); ((CardLayout)mainPanel.getLayout()).show(mainPanel, javaInformationPanelTitle); } /** * Returns the title for a given panel. It will be used to update the * CardLayout. * @param panel the panel we want to get the title from. * @return the title for a given panel. */ protected String getTitle(JPanel panel) { return panel.getClass().toString(); } } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/MonitoringAttributesViewPanel.java
@@ -80,8 +80,7 @@ * @param attributes the list of possible attributes. * @return an instance of this panel that uses String as attributes. */ public static MonitoringAttributesViewPanel<String> createStringInstance(LinkedHashSet<String> attributes) public static MonitoringAttributesViewPanel<String> createStringInstance(LinkedHashSet<String> attributes) { return new MonitoringAttributesViewPanel<>(attributes); } @@ -94,8 +93,7 @@ * attributes. */ public static MonitoringAttributesViewPanel<MonitoringAttributes> createMonitoringAttributesInstance( LinkedHashSet<MonitoringAttributes> attributes) createMonitoringAttributesInstance(LinkedHashSet<MonitoringAttributes> attributes) { return new MonitoringAttributesViewPanel<>(attributes); } @@ -156,8 +154,7 @@ gbc.gridwidth = 2; gbc.gridx = 0; add(Utilities.createPrimaryLabel( INFO_CTRL_PANEL_OPERATION_VIEW_LABEL.get()), gbc); add(Utilities.createPrimaryLabel(INFO_CTRL_PANEL_OPERATION_VIEW_LABEL.get()), gbc); gbc.gridy ++; gbc.gridwidth = 1; gbc.insets.top = 10; @@ -188,8 +185,7 @@ } }); selectNone = Utilities.createButton( INFO_CTRL_PANEL_CLEAR_SELECTION_BUTTON.get()); selectNone = Utilities.createButton(INFO_CTRL_PANEL_CLEAR_SELECTION_BUTTON.get()); selectNone.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ev) @@ -253,8 +249,7 @@ gbc.weighty = 1.0; checkBoxPanel.add(Box.createVerticalGlue(), gbc); scroll.getViewport().setPreferredSize( new Dimension(checkBoxPanel.getPreferredSize().width + 15, preferredViewHeight)); new Dimension(checkBoxPanel.getPreferredSize().width + 15, preferredViewHeight)); } /** {@inheritDoc} */ @@ -289,11 +284,11 @@ // Check that at least one checkbox is selected. selectedAttributes.clear(); int i = 0; for (T operation : monitoringAttributes) for (T attribute : monitoringAttributes) { if (checkboxes[i].isSelected()) { selectedAttributes.add(operation); selectedAttributes.add(attribute); } i++; } @@ -335,24 +330,24 @@ } /** * Returns the message for the provided operation. * @param operation the operation. * @return the message for the provided operation. * Returns the message for the provided attribute. * @param attribute the attribute. * @return the message for the provided attribute. */ protected LocalizableMessage getMessage(T operation) protected LocalizableMessage getMessage(T attribute) { LocalizableMessage m; if (operation instanceof MonitoringAttributes) if (attribute instanceof MonitoringAttributes) { m = ((MonitoringAttributes)operation).getMessage(); m = ((MonitoringAttributes)attribute).getMessage(); } else if (operation instanceof LocalizableMessage) else if (attribute instanceof LocalizableMessage) { m = (LocalizableMessage)operation; m = (LocalizableMessage)attribute; } else { m = LocalizableMessage.raw(operation.toString()); m = LocalizableMessage.raw(attribute.toString()); } return m; } opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/util/ConfigFromDirContext.java
@@ -108,7 +108,8 @@ { private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); private static final String DATABASE_ENVIRONMENT_SUFFIX = " Database Environment"; private static final String DATABASE_JE_MONITORING_ENTRY_SUFFIX = " JE Database"; private static final String DATABASE_PDB_MONITORING_ENTRY_SUFFIX = " PDB Database"; private static final String SYNC_PROVIDER_NAME = "Multimaster Synchronization"; private CustomSearchResult rootMonitor; @@ -714,19 +715,19 @@ baseDN.setAgeOfOldestMissingChange( Long.valueOf(ConnectionUtils.getFirstValue(sr, "approx-older-change-not-synchronized-millis"))); } catch (Throwable t) catch (Throwable ignored) { } try { baseDN.setMissingChanges(Integer.valueOf(missingChanges)); } catch (Throwable t) catch (Throwable ignored) { } } } catch (Throwable t) catch (Throwable ignored) { } } @@ -784,13 +785,25 @@ { // Check if it is the DB monitor entry String cn = ConnectionUtils.getFirstValue(sr, "cn"); if (cn != null && cn.endsWith(DATABASE_ENVIRONMENT_SUFFIX)) String monitorBackendID = null; BackendDescriptor.PluggableType pluggableType = BackendDescriptor.PluggableType.UNKNOWN; if (cn != null && cn.endsWith(DATABASE_JE_MONITORING_ENTRY_SUFFIX)) { String monitorBackendID = cn.substring(0, cn.length() - DATABASE_ENVIRONMENT_SUFFIX.length()); pluggableType = BackendDescriptor.PluggableType.JE; monitorBackendID = cn.substring(0, cn.length() - DATABASE_JE_MONITORING_ENTRY_SUFFIX.length()); } if (cn != null && cn.endsWith(DATABASE_PDB_MONITORING_ENTRY_SUFFIX)) { pluggableType = BackendDescriptor.PluggableType.PDB; monitorBackendID = cn.substring(0, cn.length() - DATABASE_PDB_MONITORING_ENTRY_SUFFIX.length()); } if (monitorBackendID != null) { for (BackendDescriptor backend : backends) { if (backend.getBackendID().equalsIgnoreCase(monitorBackendID)) { backend.setPluggableType(pluggableType); backend.setMonitoringEntry(csr); } } opendj-server-legacy/src/messages/org/opends/messages/admin_tool.properties
@@ -2637,7 +2637,9 @@ INFO_CTRL_PANEL_JAVA_INFORMATION=Java Information INFO_CTRL_PANEL_WORK_QUEUE=Work Queue INFO_CTRL_PANEL_ENTRY_CACHES=Entry Cache INFO_CTRL_PANEL_DB_ENVIRONMENT=Database Environment INFO_CTRL_PANEL_DB_ENVIRONMENT=Database Information INFO_CTRL_PANEL_JE_DB_INFO=JE Databases Information INFO_CTRL_PANEL_PDB_DB_INFO=PDB Databases Information INFO_CTRL_PANEL_UP_TIME_LABEL=Up Time: INFO_CTRL_PANEL_MAX_CONNECTIONS_LABEL=Max Connections: INFO_CTRL_PANEL_TOTAL_CONNECTIONS_LABEL=Total Connections: @@ -2678,8 +2680,7 @@ INFO_CTRL_PANEL_NO_MONITORING_VALUE=- INFO_CTRL_PANEL_TOTAL_LABEL=TOTAL INFO_CTRL_PANEL_ATTRIBUTE_VIEW_OPTIONS_TITLE=Attribute View Options INFO_CTRL_PANEL_NO_OPERATION_SELECTED=You must select at least one \ operation. INFO_CTRL_PANEL_NO_OPERATION_SELECTED=You must select at least one operation. INFO_CTRL_PANEL_OPERATION_VIEW_LABEL=Show Columns INFO_CTRL_PANEL_OPERATIONS_VIEW=Show Operations... INFO_CTRL_PANEL_OPERATION_NAME_AS_LABEL=%s: