src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java | 17 ++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 21eaba8ae47ed0fb267531d53e76245b874266c9
Author: Noriko Hosoi <nhosoi(a)redhat.com>
Date: Tue Aug 31 10:44:06 2010 -0700
Bug 553066 - Directory Console: do not display "subtree" index type
https://bugzilla.redhat.com/show_bug.cgi?id=553066
Resolves: 553066
Bug Description: a special index type "subtree" is introduced for
entryrdn. The DS Console does not support the index type, and
the index page issues an error "unkown index type <subtree>".
Fix Description: The index type is special and is available only
for entryrdn. Also, entryrdn cannot have any other index type(s).
Thus, there is no much benefit to show the index type on the index
page on Console. This patch skips showing entryrdn index name and
the subtree index type.
diff --git a/src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java
b/src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java
index 4988aad..eb5ec78 100644
--- a/src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java
+++ b/src/com/netscape/admin/dirserv/panel/IndexManagementPanel.java
@@ -1028,6 +1028,22 @@ public class IndexManagementPanel extends BlankPanel {
dumpVector( "fillRow in " + str, v );
Vector vals = new Vector();
if ( v != null ) {
+ // If the attribute contains an index type to be skipped,
+ // e.g., "subtree", the index won't be displayed on the
+ // index table
+ for (int i = 0; i < v.size(); i++) {
+ String s = (String)v.elementAt(i);
+ int j = 0;
+ for (; j < SKIPFILTERS.length; j++) {
+ if ( s.equals(SKIPFILTERS[j]) ) {
+ break;
+ }
+ }
+ if (j < SKIPFILTERS.length) {
+ return;
+ }
+ }
+
initRow(str, vals);
dumpVector( "fillRow after initRow " + str, vals );
@@ -1312,6 +1328,7 @@ public class IndexManagementPanel extends BlankPanel {
static final private String DN_PREFIX = "cn=index,cn=config,cn=ldbm
database,cn=plugins,cn=config";
/* The FILTERS order must be the same as headings in the properties file */
static final private String[] FILTERS = {"approx", "eq",
"pres", "sub"};
+ static final private String[] SKIPFILTERS = {"subtree"};
// Object classes of an index entry
static final private String[] OCLASSES = { "top", "nsIndex" };