summaryrefslogtreecommitdiffstats
path: root/pki
diff options
context:
space:
mode:
authorjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-12-17 23:03:21 +0000
committerjmagne <jmagne@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-12-17 23:03:21 +0000
commitfda47d50b29de01ad9870acf89136918ff692d25 (patch)
tree9b9b2f26dc8ab094288913d7b347fc054090ac78 /pki
parent68b1fa461a523a2c0683ff3075646fa6d0a5be4b (diff)
downloadpki-fda47d50b29de01ad9870acf89136918ff692d25.tar.gz
pki-fda47d50b29de01ad9870acf89136918ff692d25.tar.xz
pki-fda47d50b29de01ad9870acf89136918ff692d25.zip
Fix Bug 662201 - Console: View button for log messages is not functional.
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1657 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki')
-rw-r--r--pki/base/console/src/com/netscape/admin/certsrv/status/CMSLogPanel.java16
-rw-r--r--pki/base/console/src/com/netscape/admin/certsrv/status/LogEntryViewDialog.java4
2 files changed, 16 insertions, 4 deletions
diff --git a/pki/base/console/src/com/netscape/admin/certsrv/status/CMSLogPanel.java b/pki/base/console/src/com/netscape/admin/certsrv/status/CMSLogPanel.java
index 93e255473..c1b28df0c 100644
--- a/pki/base/console/src/com/netscape/admin/certsrv/status/CMSLogPanel.java
+++ b/pki/base/console/src/com/netscape/admin/certsrv/status/CMSLogPanel.java
@@ -132,9 +132,16 @@ public abstract class CMSLogPanel extends CMSBasePanel
Debug.println("AccessLogPanel: Refresh Log");
refresh();
}else if (e.getSource().equals(mView)) {
- viewDetail();
+ if (mDataModel.getRowCount() == 0) {
+ refresh();
+ } else {
+ viewDetail();
+ }
}else if (e.getSource().equals(mHelp)) {
CMSAdminUtil.help(mHelpToken);
+ } else if (e.getSource().equals(mLevel) || e.getSource().equals(mSource)) {
+ Debug.println("AccessLogPanel: Changed Log Level or Source");
+ refresh();
}
}
@@ -173,6 +180,9 @@ public abstract class CMSLogPanel extends CMSBasePanel
mScrollPane.invalidate();
mScrollPane.validate();
mScrollPane.repaint(1);
+ if (mDataModel.getRowCount() > 0) {
+ mTable.setRowSelectionInterval(0,0);
+ }
}
/*==========================================================
@@ -227,7 +237,7 @@ public abstract class CMSLogPanel extends CMSBasePanel
//setColumnWidth(mTable);
mTable.setAutoResizeMode(mTable.AUTO_RESIZE_OFF);
setColumnWidth(mTable);
- mTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);
+ mTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
mListPanel.add("Center",mScrollPane);
setLabelCellRenderer(mTable,4);
mScrollPane.setBackground(Color.white);
@@ -271,6 +281,8 @@ public abstract class CMSLogPanel extends CMSBasePanel
JLabel label2 = makeJLabel("LOGLEVEL");
mLevel = makeJComboBox("LOGLEVEL");
CMSAdminUtil.addEntryField(panel, label1, mSource, label2, mLevel, gbc);
+ mLevel.addActionListener(this);
+ mSource.addActionListener(this);
//file
CMSAdminUtil.resetGBC(gbc);
diff --git a/pki/base/console/src/com/netscape/admin/certsrv/status/LogEntryViewDialog.java b/pki/base/console/src/com/netscape/admin/certsrv/status/LogEntryViewDialog.java
index d658f8e54..c86ff02ff 100644
--- a/pki/base/console/src/com/netscape/admin/certsrv/status/LogEntryViewDialog.java
+++ b/pki/base/console/src/com/netscape/admin/certsrv/status/LogEntryViewDialog.java
@@ -57,7 +57,7 @@ public class LogEntryViewDialog extends JDialog
super(parent,true);
mParentFrame = parent;
mResource = ResourceBundle.getBundle(CMSAdminResources.class.getName());
- setSize(430, 700);
+ setSize(600, 400);
setTitle(mResource.getString(PREFIX+"_TITLE"));
setLocationRelativeTo(parent);
getRootPane().setDoubleBuffered(true);
@@ -187,7 +187,7 @@ public class LogEntryViewDialog extends JDialog
scrollPanel.setAlignmentY(TOP_ALIGNMENT);
scrollPanel.setBackground(getBackground());
scrollPanel.setBorder(BorderFactory.createEmptyBorder());
- scrollPanel.setPreferredSize(new Dimension(300, 500));
+ scrollPanel.setPreferredSize(new Dimension(500, 200));
//gbc.fill = gbc.VERTICAL;
gbc.fill = gbc.BOTH;
gbc.gridwidth = gbc.REMAINDER;