Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158366 Details for
Bug 246513
Directory Console needs concept of a server root removed
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
CVS Diffs
diffs.txt (text/plain), 47.23 KB, created by
Nathan Kinder
on 2007-07-02 19:14:51 UTC
(
hide
)
Description:
CVS Diffs
Filename:
MIME Type:
Creator:
Nathan Kinder
Created:
2007-07-02 19:14:51 UTC
Size:
47.23 KB
patch
obsolete
>? src/com/netscape/admin/dirserv/also/Danny-Atul-To.jpg >Index: build.properties >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/build.properties,v >retrieving revision 1.6 >diff -u -5 -t -r1.6 build.properties >--- build.properties 29 Sep 2006 17:17:26 -0000 1.6 >+++ build.properties 2 Jul 2007 18:47:26 -0000 >@@ -19,10 +19,10 @@ > # Properties to control the build > > lang=en > > ldapconsole.root=.. >-ldapconsole.version=1.0.3 >-ldapconsole.gen.version=1.0 >+ldapconsole.version=1.1.0 >+ldapconsole.gen.version=1.1 > brand=fedora > ldapconsole.name=${brand}-ds-${ldapconsole.version} > ldapconsole.gen.name=${brand}-ds-${ldapconsole.gen.version} >Index: build.xml >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/build.xml,v >retrieving revision 1.7 >diff -u -5 -t -r1.7 build.xml >--- build.xml 24 Mar 2006 00:52:51 -0000 1.7 >+++ build.xml 2 Jul 2007 18:47:26 -0000 >@@ -80,14 +80,14 @@ > <!-- Build --> > <target name="build" depends="import_console"> > <!-- Construct classpath --> > <path id="ldapconsole.classpath"> > <fileset dir="${console.location}"> >- <include name="**/java/${brand}-base-*.jar"/> >- <include name="**/java/${brand}-mcc-*.jar"/> >- <include name="**/java/${brand}-nmclf-*.jar"/> >- <include name="**/java/ldapjdk.jar"/> >+ <include name="**/${brand}-base-*.jar"/> >+ <include name="**/${brand}-mcc-*.jar"/> >+ <include name="**/${brand}-nmclf-*.jar"/> >+ <include name="**/ldapjdk.jar"/> > </fileset> > <pathelement path="${built.classdir}"/> > </path> > <!-- compile regular java code --> > <javac srcdir="${java.src.dir}" >@@ -147,16 +147,10 @@ > <jar jarfile="${package.dir}/${ldapconsole.name}_${lang}.jar" > > <fileset dir="${java.src.dir}"> > <include name="com/**/*.properties" /> > </fileset> > </jar> >- <exec executable="ln" dir="${package.dir}" vmlauncher="true"> >- <arg line="-s ${ldapconsole.name}.jar ${ldapconsole.gen.name}.jar"/> >- </exec> >- <exec executable="ln" dir="${package.dir}" vmlauncher="true"> >- <arg line="-s ${ldapconsole.name}_${lang}.jar ${ldapconsole.gen.name}_${lang}.jar"/> >- </exec> > </target> > > <!-- Javadoc --> > <target name="javadoc" depends="prepare_doc"> > <javadoc >Index: src/com/netscape/admin/dirserv/DSAdmin.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/DSAdmin.java,v >retrieving revision 1.3 >diff -u -5 -t -r1.3 DSAdmin.java >--- src/com/netscape/admin/dirserv/DSAdmin.java 28 Oct 2005 22:18:17 -0000 1.3 >+++ src/com/netscape/admin/dirserv/DSAdmin.java 2 Jul 2007 18:47:26 -0000 >@@ -206,11 +206,10 @@ > String host = null; > int port = 0; > int securePort = 0; > String baseDN = null; > String sServerID = null; // Instance of DS server >- String installPath = null; // Path where server is installed > try { > LDAPConnection ldc = _info.getLDAPConnection(); > if ( ldc == null ) { > Debug.println( "DSAdmin.getInfo: No LDAP connection " + > "in _info" ); >@@ -223,11 +222,10 @@ > host = getAttrVal( entry, "serverHostName" ); > String sPort = getAttrVal(entry, "nsServerPort"); > baseDN = getAttrVal( entry, "nsBaseDN" ); > _bindDN = getAttrVal( entry, "nsBindDN" ); > sServerID = getAttrVal( entry, "nsServerID" ); >- installPath = getAttrVal ( entry, "serverroot"); > > if ( (host == null) || (sPort == null) || > (baseDN == null) || (sServerID == null) ) { > return; > } >@@ -345,13 +343,10 @@ > _serverInfo.put( "ServerInstance", sServerID ); > > /* For the key and cert wizard */ > _serverInfo.put( "SIE", sServerID ); > >- /* Save the install path */ >- _serverInfo.put( "InstallPath", installPath); >- > Debug.println(9, "DSAdmin.getInfo: OS = " + _info.getAdminOS() ); > > /* > Debug.println( "Console info:" ); > DSUtil.dumpConsoleInfo( _info ); >@@ -747,13 +742,10 @@ > /* Initialize DSUtil */ > /* ??? This is probably wrong; shouldn't be sharing these > things statically across server instances */ > DSUtil.initialize( ldc, _serverInfo.getAuthenticationDN() ); > >- // set the server root for other directory console classes to use >- readServerRoot(); >- > // create new frame > _serverInfo.frame = null; > _pagefeeder = new DSPageFeeder( this, _info, _serverInfo ); > _framework = new DSFramework( this, _pagefeeder ); > _framework.setHelpDirectory( DSUtil.HELP_DIRECTORY ); >@@ -822,14 +814,10 @@ > } else { > stopUpdater(); > } > } > >- private void readServerRoot() { >- DSUtil.readServerRoot(_info, _serverInfo, null); >- } >- > > private void startUpdater() { > _animate = true; > if ( _updater == null ) { > _updater = new Thread() { >@@ -1229,11 +1217,11 @@ > } > > private boolean checkVersion(ConsoleInfo info) { > String version = null; > JFrame frame = UtilConsoleGlobals.getActivatedFrame(); >- version = VersionInfo.getVersionNumber(); >+ version = VersionInfo.getMajorVersionNumber(); > > try { > Float f = new Float(version); > // Check if the console meets the minimum version requirement > if ((f != null) && (f.floatValue() >= MINIMUM_VERSION)) { >Index: src/com/netscape/admin/dirserv/DSUtil.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/DSUtil.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 DSUtil.java >--- src/com/netscape/admin/dirserv/DSUtil.java 18 Jul 2005 00:55:42 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/DSUtil.java 2 Jul 2007 18:47:27 -0000 >@@ -21,10 +21,11 @@ > > import java.lang.reflect.Method; > import java.awt.*; > import java.awt.image.*; > import java.util.*; >+import java.util.regex.*; > import java.io.*; > import java.net.*; > import java.text.SimpleDateFormat; > import java.text.Collator; > import java.text.ParsePosition; >@@ -234,78 +235,10 @@ > } while (result == AUTH_FAILURE); > > return (result == AUTH_SUCCESS); > } > >- /** >- * Reads server root and writes it to the serverInfo provided with the key >- * "serverroot". >- * >- * @param consoleInfo ConsoleInfo; the ConsoleInfo of the admin console >- * @param frame Parent frame for error dialogs >- * @param serverInfo ConsoleInfo; the ConsoleInfo of the server we are connected to >- * >- */ >- static public void readServerRoot(ConsoleInfo consoleInfo, >- ConsoleInfo serverInfo, >- JFrame frame) { >- String root = null; >- String authName = null; >- /* Get the server root */ >- if (serverInfo != null) { >- LDAPConnection ldc = serverInfo.getLDAPConnection(); >- authName = ldc.getAuthenticationDN(); >- LDAPEntry entry = null; >- Debug.println(9, "DSUtil.readServerRoot ldc=" + format(ldc)); >- try { >- String[] attrs = { INSTANCE_ATTR, SECURITY_ATTR }; >- entry = ldc.read( "cn=config", attrs ); >- Debug.println(9, "DSUtil.readServerRoot entry=" + entry); >- root = getAttrValue(entry, INSTANCE_ATTR); >- String secValue = getAttrValue(entry, SECURITY_ATTR); >- } catch ( LDAPException e ) { >- Debug.println("DSUtil.readServerRoot(): exception " + e); >- Debug.println( "DSUtil.readServerRoot: cannot read " + >- "cn=config ldc " + >- (ldc.isConnected() ? "is" : "is not") + >- " connected, bind DN = " + >- ldc.getAuthenticationDN()); >- } >- } >- >- /* Get the server root from the SIE */ >- if (root == null && consoleInfo != null) { >- LDAPConnection ldc = consoleInfo.getLDAPConnection(); >- authName = ldc.getAuthenticationDN(); >- LDAPEntry entry = null; >- Debug.println(9, "DSUtil.readServerRoot console ldc=" + >- format(ldc)); >- try { >- String[] attrs = { "serverroot" }; >- entry = ldc.read( consoleInfo.getCurrentDN(), attrs ); >- Debug.println(9, "DSUtil.readServerRoot entry=" + entry); >- root = getAttrValue(entry, "serverroot"); >- } catch ( LDAPException e ) { >- Debug.println("DSUtil.readServerRoot(): exception " + e); >- Debug.println( "DSUtil.readServerRoot: cannot read " + >- consoleInfo.getCurrentDN() + >- " ldc " + >- (ldc.isConnected() ? "is" : "is not") + >- " connected, bind DN = " + >- ldc.getAuthenticationDN()); >- } >- } >- >- if (root == null && frame != null) { >- showErrorDialog( frame, "config-privilege", authName ); >- } else if (root != null && serverInfo != null) { >- serverInfo.put("serverroot", root); >- } >- >- return; >- } >- > > /** > * Returns the name of the server instance corresponding to the server connection. > * > * @param consoleInfo, information of the config server >@@ -2342,11 +2275,11 @@ > if (filter == null) { > filter = DEFAULT_DB_INSTANCE_FILTER; > } > LDAPSearchResults res = null; > try { >- res = ldc.search(LDBM_CONFIG_BASE_DN, ldc.SCOPE_SUB, >+ res = ldc.search(LDBM_BASE_DN, ldc.SCOPE_SUB, > filter, null, false); > while (res.hasMoreElements()) { > LDAPEntry entry = (LDAPEntry)res.nextElement(); > if (results == null) { > results = new Vector(); >@@ -2819,53 +2752,102 @@ > } > return false; > } > > /** >+ * Returns the default path used for backups. >+ * >+ * @param info serverInfo, information for the current server >+ * >+ * @return the default backup path >+ */ >+ public static String getDefaultBackupPath(ConsoleInfo serverInfo) { >+ return getDefaultDSPath( serverInfo, CONFIG_BASE_DN, BAKDIR_ATTR ); >+ } >+ >+ /** >+ * Returns the default path used to store the changelog database. >+ * >+ * @param info serverInfo, information for the current server >+ * >+ * @return the default changelog database path >+ */ >+ public static String getDefaultChangelogPath(ConsoleInfo serverInfo) { >+ String path = getDefaultDBPath( serverInfo ); >+ >+ // We want the changelog path to be at the same level as the db directory. >+ Matcher matcher = Pattern.compile("/db$").matcher( path ); >+ return matcher.replaceAll("/" + CHANGELOG_DIR); >+ } >+ >+ /** >+ * Returns the default path used to store database files. >+ * >+ * @param info serverInfo, information for the current server >+ * >+ * @return the default database path >+ */ >+ public static String getDefaultDBPath(ConsoleInfo serverInfo) { >+ return getDefaultDSPath( serverInfo, LDBM_CONFIG_BASE_DN, DBDIR_ATTR ); >+ } >+ >+ /** > * Returns the default path used to store the LDIF files. >- * Returns a path of type /usr/fedora/servers/slapd-host/ldif/. >- * If something is wrong returns the parent path (../) > * > * @param info serverInfo, information for the current server > * >- * @return the name of the instance >+ * @return the default LDIF path > */ >- public static String getDefaultLDIFPath(ConsoleInfo serverInfo) { >- String defaultPath = ""; >- if (serverInfo != null) { >- String installPath = (String) serverInfo.get("InstallPath"); >- >- if (installPath != null) { >- /* We get the OS of the server we are working with from the admin */ >- String separator = "\\"; >- if (!isNT(serverInfo)) { >- separator = "/"; >- } >- String slapd = (String)serverInfo.get("ServerInstance"); >- if (slapd != null) { >- /* The slapd variable contains now the 'slapd-<instance name>' */ >- defaultPath = installPath + separator + >- slapd + separator + >- "ldif" + separator; >- } >- } >- } >- >- File defaultPathFile = new File(defaultPath); >- if (!defaultPathFile.exists() && >- isLocal(serverInfo.getHost())) { >- Debug.println("DSUtil.getDefaultLDIFPath() : "+defaultPath+" does not exist"); >- String separator = "\\"; >- if (serverInfo != null) { >- if (!isNT(serverInfo)) { >- separator = "/"; >- } >- } >- defaultPath = ".."+separator; >- } >- return defaultPath; >- } >+ public static String getDefaultLDIFPath(ConsoleInfo serverInfo) { >+ return getDefaultDSPath( serverInfo, CONFIG_BASE_DN, LDIFDIR_ATTR ); >+ } >+ >+ /** >+ * Returns the default path used to store the server log files. >+ * >+ * @param info serverInfo, information for the current server >+ * >+ * @return the default server logfile path >+ */ >+ public static String getDefaultLogPath(ConsoleInfo serverInfo) { >+ String path = getDefaultDSPath( serverInfo, CONFIG_BASE_DN, LOGDIR_ATTR ); >+ >+ // There is no logdir attribute, so we get the errorlog location and >+ // trim off the logfile name to get the default path. >+ Matcher matcher = Pattern.compile("/errors$").matcher( path ); >+ return matcher.replaceAll(""); >+ } >+ >+ private static String getDefaultDSPath(ConsoleInfo serverInfo, >+ String entry, >+ String pathAttr) { >+ String defaultPath = ""; >+ >+ if (serverInfo != null) { >+ LDAPConnection ldc = serverInfo.getLDAPConnection(); >+ if ( reconnect( ldc ) ) { >+ try { >+ /* Lookup the path from the server config */ >+ String[] attrs = { pathAttr }; >+ LDAPEntry lde = ldc.read(entry, attrs); >+ defaultPath = getAttrValue(lde, pathAttr); >+ } catch ( LDAPException e ) { >+ Debug.println("DSUtil.getDefaultDSPath() : Caught ldap exception + e"); >+ } >+ } >+ } else { >+ Debug.println("DSUtil.getDefaultDSPath() : serverInfo is null"); >+ } >+ >+ File defaultPathFile = new File(defaultPath); >+ if (!defaultPathFile.exists() && >+ isLocal(serverInfo.getHost())) { >+ Debug.println("DSUtil.getDefaultDSPath() : " + defaultPath + " does not exist"); >+ } >+ >+ return defaultPath; >+ } > > /** > * Gets a boolean valued attribute from a properties file. Values meaning > * true are the following: "true", "yes", "on", "1". Values meaning false > * are the following: "false", "no", "off", "0". Case >@@ -2925,22 +2907,29 @@ > private static Icon _warningIcon = null; > private static Icon _errorIcon = null; > public static final String AUTH_CHANGE_LISTENERS = "AuthChangeListeners"; > private static final String INSTANCE_ATTR = "nsslapd-instancedir"; > private static final String SECURITY_ATTR = "nsslapd-security"; >+ private static final String BAKDIR_ATTR = "nsslapd-bakdir"; >+ private static final String DBDIR_ATTR = "nsslapd-directory"; >+ private static final String LDIFDIR_ATTR = "nsslapd-ldifdir"; >+ private static final String LOGDIR_ATTR = "nsslapd-errorlog"; >+ private static final String CHANGELOG_DIR = "changelogdb"; > private static final ResourceSet _helpResource = > new ResourceSet("com.netscape.admin.dirserv.dirserv-help"); > static public ResourceSet _resource = > new ResourceSet("com.netscape.admin.dirserv.dirserv"); > static public ResourceSet _langResource = > new ResourceSet( > "com.netscape.management.client.ug.PickerEditorResource"); > > private static int _local = -1; > >+ static public final String CONFIG_BASE_DN = "cn=config"; > static public final String PLUGIN_CONFIG_BASE_DN = "cn=plugins,cn=config"; >- static public final String LDBM_CONFIG_BASE_DN = "cn=ldbm database,cn=plugins,cn=config"; >+ static public final String LDBM_BASE_DN = "cn=ldbm database,cn=plugins,cn=config"; >+ static public final String LDBM_CONFIG_BASE_DN = "cn=config,cn=ldbm database,cn=plugins,cn=config"; > static public final String CHAINING_CONFIG_BASE_DN = "cn=chaining database,cn=plugins,cn=config"; > static public final String DEFAULT_DB_INSTANCE_FILTER = "objectclass=nsBackendInstance"; > static public final String MAPPING_TREE_BASE_DN = "cn=mapping tree,cn=config"; > static public final String DEFAULT_LDBM_INDEX_PREFIX= "cn=default indexes, cn=config"; > static public final String LDBM_PLUGIN_ID = "ldbm-backend"; >Index: src/com/netscape/admin/dirserv/dirserv.properties >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/dirserv.properties,v >retrieving revision 1.5 >diff -u -5 -t -r1.5 dirserv.properties >--- src/com/netscape/admin/dirserv/dirserv.properties 29 Sep 2006 17:17:26 -0000 1.5 >+++ src/com/netscape/admin/dirserv/dirserv.properties 2 Jul 2007 18:47:28 -0000 >@@ -2655,13 +2655,17 @@ > mappingtree-backend-bdelete-label=Delete > mappingtree-backend-bdelete-mnemonic=D > mappingtree-backend-bdelete-ttip=Remove a database from the list > mappingtree-backend-bck-list-label=Databases containing entries for this suffix: > mappingtree-backend-bck-list-ttip=Select the database(s) managed by this suffix from the list. >-mappingtree-backend-error-no-funct-label=The function name is missing >-mappingtree-backend-error-no-lib-label=The library path is missing >-mappingtree-backend-update-error-title=Failed to Update Databases Info >+mappingtree-backend-error-no-funct-msg=The distribution library function name is missing. >+mappingtree-backend-error-no-funct-title=Distribution Plugin Error >+mappingtree-backend-error-no-lib-msg=The distribution library path is missing. >+mappingtree-backend-error-no-lib-title=Distribution Plugin Error >+mappingtree-backend-error-not-local-msg=You must be local to the server to browse for distribution libraries. >+mappingtree-backend-error-not-local-title=Browsing Error >+mappingtree-backend-update-error-title=Failed to Update Databases Info. > mappingtree-backend-update-error-msg=Error updating :%1 \n %2 > mappingtree-backend-add-backend-description=Use this dialog to choose a database to add to this suffix > > mappingtree-referral-title=Referrals > mappingtree-referral-bhelp-label=Construct... >Index: src/com/netscape/admin/dirserv/also/files.lst >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/also/files.lst,v >retrieving revision 1.1 >diff -u -5 -t -r1.1 files.lst >--- src/com/netscape/admin/dirserv/also/files.lst 18 Jul 2005 01:02:41 -0000 1.1 >+++ src/com/netscape/admin/dirserv/also/files.lst 2 Jul 2007 18:47:28 -0000 >@@ -1,11 +1,11 @@ > Andy.jpg > Anish.jpg > Anthony.jpg > Bindu.jpg > Chandra.jpg >-Danny, Atul,To.jpg >+Danny-Atul-To.jpg > Darshan.jpg > Ey.jpg > Frank.jpg > Hin.jpg > Jay.jpg >Index: src/com/netscape/admin/dirserv/logging/DSLogViewerModel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/logging/DSLogViewerModel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 DSLogViewerModel.java >--- src/com/netscape/admin/dirserv/logging/DSLogViewerModel.java 18 Jul 2005 00:55:49 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/logging/DSLogViewerModel.java 2 Jul 2007 18:47:28 -0000 >@@ -29,12 +29,12 @@ > import com.netscape.admin.dirserv.GlobalConstants; > > public class DSLogViewerModel extends DefaultTableModel { > > public DSLogViewerModel(ConsoleInfo consoleInfo, String url) { >- _url = consoleInfo.getAdminURL() + >- consoleInfo.get( "ServerInstance" ) + "/" + url; >+ _serverID = (String)consoleInfo.get( "ServerInstance" ); >+ _url = consoleInfo.getAdminURL() + _serverID + "/" + url; > _password = consoleInfo.getAuthenticationPassword(); > _username = (String)consoleInfo.get( GlobalConstants.TASKS_AUTH_DN ); > _password = (String)consoleInfo.get( GlobalConstants.TASKS_AUTH_PWD ); > } > >@@ -63,45 +63,50 @@ > */ > public boolean isCellEditable(int row, int column) { > return false; > } > >- /** >- * Fetch data from Directory/Admin Server. >- * >- */ >+ /** >+ * Fetch data from Directory/Admin Server. >+ * >+ */ > public void updateLogData() { > if (!_updating) { > _updating = true; // this gets reset in derived classes finish() >- /* Tack the log file name on to the URL */ >- Hashtable args = new Hashtable(); >- args.put("logfile", getLogFileName()); >- /* Tack on the number of lines to return */ >- args.put("num", Integer.toString(getLineCount())); >- /* If a filter string was specified, tack that on */ >- if ( getFilter() != null ) >- args.put("str", getFilter()); >- try { >- URL url = new URL( _url ); >- Debug.println( "DSLogViewerModel.updateLogData: " + url ); >- HttpManager _httpManager = new HttpManager(); >- // tell the http manager to use UTF8 encoding >- _httpManager.setSendUTF8(true); >- InputStream data = CGIReportTask.encode(args); >- _httpManager.post(url, getCommClient(), null, data, data.available(), >- CommManager.FORCE_BASIC_AUTH| >- CommManager.ASYNC_RESPONSE); >- waitForFinish(); >- } >- catch (Exception e) { >- Debug.println( "DSLogViewerModel.updateLogData for " + >- _url + ": " + e ); >- } >- fireTableDataChanged(); >+ Hashtable args = new Hashtable(); >+ /* Set which server's log you want */ >+ args.put("id", _serverID); >+ /* Set which logfile you want to view */ >+ args.put("file", getLogFileName()); >+ /* Tack on the number of lines to return */ >+ args.put("num", Integer.toString(getLineCount())); >+ /* We only want the CGI to return raw log content */ >+ args.put("nohtml", "1"); >+ /* If a filter string was specified, tack that on */ >+ if ( getFilter() != null ) >+ args.put("str", getFilter()); >+ try { >+ URL url = new URL( _url ); >+ Debug.println( "DSLogViewerModel.updateLogData: " + url ); >+ HttpManager _httpManager = new HttpManager(); >+ // tell the http manager to use UTF8 encoding >+ _httpManager.setSendUTF8(true); >+ InputStream data = CGIReportTask.encode(args); >+ _httpManager.post(url, getCommClient(), null, >+ data, data.available(), >+ CommManager.FORCE_BASIC_AUTH| >+ CommManager.ASYNC_RESPONSE); >+ waitForFinish(); >+ } >+ catch (Exception e) { >+ Debug.println( "DSLogViewerModel.updateLogData for " + >+ _url + ": " + e ); >+ } >+ fireTableDataChanged(); > Debug.println("DSLogViewerModel done requesting"); > } >- } >+ } > > public void updateLogLength() { > } > > CommClient getCommClient() { >@@ -222,10 +227,11 @@ > private int _lineCount = 25; > private String _filter = null; > protected String _url; > String _username; > String _password; >+ private String _serverID = null; > private String _logName = null; > protected static ResourceSet _resource; > protected static String _section; > boolean _updating = false; > protected Thread _thread = null; >Index: src/com/netscape/admin/dirserv/node/MonitorResourceObject.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/node/MonitorResourceObject.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 MonitorResourceObject.java >--- src/com/netscape/admin/dirserv/node/MonitorResourceObject.java 18 Jul 2005 00:55:51 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/node/MonitorResourceObject.java 2 Jul 2007 18:47:28 -0000 >@@ -109,11 +109,11 @@ > en.hasMoreElements()); > while( en.hasMoreElements() ) { > _isLeaf = false; > String dn = (String)en.nextElement(); > DN monitorDN = new DN( dn ); >- if( monitorDN.isDescendantOf( new DN(DSUtil.LDBM_CONFIG_BASE_DN ))){ >+ if( monitorDN.isDescendantOf( new DN(DSUtil.LDBM_BASE_DN ))){ > MonitorDbResourceObject MonBack = > new MonitorDbResourceObject( _model, dn); > add( MonBack ); > } else if (monitorDN.isDescendantOf( new DN(DSUtil.CHAINING_CONFIG_BASE_DN ))){ > // for RTM maybe >Index: src/com/netscape/admin/dirserv/panel/BackupPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/BackupPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 BackupPanel.java >--- src/com/netscape/admin/dirserv/panel/BackupPanel.java 18 Jul 2005 00:55:52 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/BackupPanel.java 2 Jul 2007 18:47:28 -0000 >@@ -45,16 +45,13 @@ > _helpToken = "tasks-backup-help"; > } > > public void init() { > >- String instDir = getInstanceDirectory(); >- if ( instDir != null ) { >- _baseDir = instDir + "/bak"; >- } >+ _baseDir = DSUtil.getDefaultBackupPath(getModel().getServerInfo()); > >- _myPanel.setLayout( new GridBagLayout() ); >+ _myPanel.setLayout( new GridBagLayout() ); > createFileArea( _myPanel ); > setDefaultDirectory(); > > getSimpleDialog().setFocusComponent(_tfExport); > } >Index: src/com/netscape/admin/dirserv/panel/BlankPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/BlankPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 BlankPanel.java >--- src/com/netscape/admin/dirserv/panel/BlankPanel.java 18 Jul 2005 00:55:53 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/BlankPanel.java 2 Jul 2007 18:47:29 -0000 >@@ -1027,17 +1027,10 @@ > return false; > } > return true; > } > >- /** >- * Get the directory where the server instance lives >- */ >- protected String getInstanceDirectory() { >- return (String)getModel().getServerInfo().get( "serverroot" ); >- } >- > static protected boolean requiresConfirmation( String item ) { > return DSUtil.requiresConfirmation( item ); > } > > static protected SimpleDialog createDialog( JComponent comp, >Index: src/com/netscape/admin/dirserv/panel/DSLogViewer.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/DSLogViewer.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 DSLogViewer.java >--- src/com/netscape/admin/dirserv/panel/DSLogViewer.java 18 Jul 2005 00:55:56 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/DSLogViewer.java 2 Jul 2007 18:47:29 -0000 >@@ -87,25 +87,55 @@ > protected boolean refreshFileSelector() { > _cbFilename.removeItemListener(this); > _cbFilename.removeAllItems(); > LDAPConnection ldc = getModel().getServerInfo().getLDAPConnection(); > String attrs[] = { _configAttr, _configListAttr }; >+ String logfile; >+ int i; > try { > LDAPEntry entry = ldc.read( _configDN, attrs ); > if ( entry != null ) { > LDAPAttribute attr = entry.getAttribute( attrs[0] ); > if ( attr != null ) { > Enumeration en = attr.getStringValues(); > while ( en.hasMoreElements() ) { >- _cbFilename.addItem( (String)en.nextElement() ); >+ // Chop off the path. We only want the filename. >+ logfile = (String)en.nextElement(); >+ if ((i = logfile.lastIndexOf('/')) >= 0 ) { >+ // Make sure we're not at the end of the string >+ if ( logfile.length() > (i + 1) ) { >+ logfile = logfile.substring(i + 1); >+ } else { >+ logfile = ""; >+ } >+ } >+ >+ // Check if string is empty before adding >+ if (logfile.length() > 0) { >+ _cbFilename.addItem(logfile); >+ } > } > } > attr = entry.getAttribute( attrs[1] ); > if ( attr != null ) { > Enumeration en = attr.getStringValues(); > while ( en.hasMoreElements() ) { >- _cbFilename.addItem( (String)en.nextElement() ); >+ // Chop off the path. We only want the filename. >+ logfile = (String)en.nextElement(); >+ if ((i = logfile.lastIndexOf('/')) >= 0 ) { >+ // Make sure we're not at the end of the string >+ if ( logfile.length() > (i + 1) ) { >+ logfile = logfile.substring(i + 1); >+ } else { >+ logfile = ""; >+ } >+ } >+ >+ // Check if string is empty before adding >+ if (logfile.length() > 0) { >+ _cbFilename.addItem(logfile); >+ } > } > } > } else { > return false; > } >Index: src/com/netscape/admin/dirserv/panel/LogPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/LogPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 LogPanel.java >--- src/com/netscape/admin/dirserv/panel/LogPanel.java 18 Jul 2005 00:55:59 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/LogPanel.java 2 Jul 2007 18:47:29 -0000 >@@ -438,11 +438,11 @@ > // If _tfLog has no value, _cbSelected is forced to off. > // This is to accomodate with the server behavior: for the > // server, logging is implicitly disabled if there is no > // log file specified. > if (_tfLog.getText().trim().length() == 0) { >- String path = getInstanceDirectory() + File.separator + "logs" + File.separator + LOG_BASE_NAME; >+ String path = DSUtil.getDefaultLogPath(getModel().getServerInfo()) + File.separator + LOG_BASE_NAME; > _cbEnabled.setSelected(false); > _cbRotationSyncEnabled.setSelected(false); > _tfLog.setText(path); > enableFields(false); > } >Index: src/com/netscape/admin/dirserv/panel/MappingNodeBckPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/MappingNodeBckPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 MappingNodeBckPanel.java >--- src/com/netscape/admin/dirserv/panel/MappingNodeBckPanel.java 18 Jul 2005 00:55:59 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/MappingNodeBckPanel.java 2 Jul 2007 18:47:29 -0000 >@@ -546,22 +546,27 @@ > } > checkBckDirty(); > checkBckNumber(); > > } else if ( e.getSource().equals( _bLibBrowse )){ >- String file = getInstanceDirectory(); >- String[] extensions = { "so","dll","sl","dl", "a" }; >- String[] descriptions = { DSUtil._resource.getString( "filefilter", "dynamic-lib-so" ), >+ if (isLocal()) { >+ String file = ""; >+ String[] extensions = { "so","dll","sl","dl", "a" }; >+ String[] descriptions = { DSUtil._resource.getString( "filefilter", "dynamic-lib-so" ), > DSUtil._resource.getString( "filefilter", "dynamic-lib-dll"), > DSUtil._resource.getString( "filefilter", "dynamic-lib-sl"), > DSUtil._resource.getString( "filefilter", "dynamic-lib-dl"), > DSUtil._resource.getString( "filefilter", "dynamic-lib-a")}; >- file = DSFileDialog.getFileName(file, false, extensions, >+ file = DSFileDialog.getFileName(file, false, extensions, > descriptions, this); >- if ( file != null) { >- _LibText.setText( file ); >- } >+ if ( file != null) { >+ _LibText.setText( file ); >+ } >+ } else { >+ // Must be local to browse >+ DSUtil.showErrorDialog( getModel().getFrame(), "error-not-local", "", _section); >+ } > } else { > Debug.println(" MappingNodeSettingPanel.actionPerformed() : wrong action performed"); > } > checkOkay(); > } >@@ -629,16 +634,16 @@ > String sFunction = _functDistribText.getText(); > > if(( _isLibDirty ) && > (( sFunction == null ) || > (sFunction.trim().length() == 0)) ) { >- DSUtil.showErrorDialog( getModel().getFrame(),"error-no-funct", ""); >+ DSUtil.showErrorDialog( getModel().getFrame(), "error-no-funct", "", _section); > return; > } > if(( _isFctDirty ) && > (( sLib == null) || ( sLib.trim().length() == 0 ))) { >- DSUtil.showErrorDialog( getModel().getFrame(),"error-no-lib",""); >+ DSUtil.showErrorDialog( getModel().getFrame(), "error-no-lib", "", _section); > return; > } > prepSaveDistrib( attrs ); > } > if (( _isLibDirty) || ( _isFctDirty ) || ( _isBckDirty)) { >@@ -704,16 +709,16 @@ > String sFunction = _functDistribText.getText(); > > if(( _isLibDirty ) && > (( sFunction == null ) || > (sFunction.trim().length() == 0)) ) { >- DSUtil.showErrorDialog( getModel().getFrame(),"error-no-funct", ""); >+ DSUtil.showErrorDialog( getModel().getFrame(), "error-no-funct", "", _section); > return( false ) ; > } > if(( _isFctDirty ) && > (( sLib == null) || ( sLib.trim().length() == 0 ))) { >- DSUtil.showErrorDialog( getModel().getFrame(),"error-no-lib",""); >+ DSUtil.showErrorDialog( getModel().getFrame(), "error-no-lib", "", _section); > return( false ); > } > prepSaveDistrib( attrs ); > } > if (( _isLibDirty) || ( _isFctDirty ) || (( _isBckDirty) && isbcktoSave)) { >Index: src/com/netscape/admin/dirserv/panel/NewLDBMPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/NewLDBMPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 NewLDBMPanel.java >--- src/com/netscape/admin/dirserv/panel/NewLDBMPanel.java 18 Jul 2005 00:56:01 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/NewLDBMPanel.java 2 Jul 2007 18:47:29 -0000 >@@ -59,14 +59,11 @@ > GridBagConstraints gbc = getGBC(); > > // Physical DB info > createFileArea( _myPanel ); > >- String instDir = getInstanceDirectory(); >- if ( instDir != null ) { >- _baseDir = instDir; >- } >+ _baseDir = DSUtil.getDefaultDBPath( getModel().getServerInfo() ); > > AbstractDialog dlg = getAbstractDialog(); > if ( dlg != null ) { > dlg.setOKButtonEnabled( false ); > } >Index: src/com/netscape/admin/dirserv/panel/RestorePanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/RestorePanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 RestorePanel.java >--- src/com/netscape/admin/dirserv/panel/RestorePanel.java 18 Jul 2005 00:56:03 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/RestorePanel.java 2 Jul 2007 18:47:29 -0000 >@@ -54,14 +54,11 @@ > getModel().setWaitCursor( false ); > > _myPanel.setLayout( new GridBagLayout() ); > createFileArea( _myPanel, dirList ); > >- String instDir = getInstanceDirectory(); >- if ( instDir != null ) { >- _baseDir = instDir + "/bak"; >- } >+ String _baseDir = DSUtil.getDefaultBackupPath(getModel().getServerInfo()); > > SimpleDialog dlg = getSimpleDialog(); > if ( dlg != null ) { > dlg.setFocusComponent(_tfExport); > } >Index: src/com/netscape/admin/dirserv/panel/replication/LegacySupplierSettingPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/LegacySupplierSettingPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 LegacySupplierSettingPanel.java >--- src/com/netscape/admin/dirserv/panel/replication/LegacySupplierSettingPanel.java 18 Jul 2005 00:56:07 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/replication/LegacySupplierSettingPanel.java 2 Jul 2007 18:47:29 -0000 >@@ -394,15 +394,11 @@ > if (dir != null) > _dbText.setText(dir); > } > > private void SetDefaultDir () { >- String dir = getInstanceDirectory () + "/" + DEFAULT_DBDIR; >- >- /* replace all \ with / in the path */ >- dir = dir.replace('\\', '/'); >- >+ String dir = DSUtil.getDefaultChangelogPath( getModel().getServerInfo() ); > _dbText.setText(dir); > } > > private void RemoveChangelog () { > // ask for confirmation >@@ -890,11 +886,10 @@ > private static int DAY_AGE_UNIT = 3; > private static int WEEK_AGE_UNIT = 4; > private static int DEFAULT_AGE_UNIT = DAY_AGE_UNIT; //day > > private static final String REMOVE = "remove"; >- private static final String DEFAULT_DBDIR = "changelogdb"; > private static final String DEFAULT_SUFFIX = "cn=changelog"; > private static final String CONFIG_DN = "cn=config"; > private static final String PRIVATE_SUFFIX_ATTR = "nsslapd-privatenamespaces"; > private static final String DBCONFIG_DN = "cn=config,cn=ldbm"; > private static final String LEGACY_CHANGELOG_OBJECTCLASS = "nsChangelog4Config"; >Index: src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 ReplicationAgreement.java >--- src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java 18 Jul 2005 00:56:09 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java 2 Jul 2007 18:47:30 -0000 >@@ -871,11 +871,11 @@ > // RM : TBD : We must add the database dn > String backendName = MappingUtils.getBackendForSuffix(_serverInfo.getLDAPConnection(), replicatedSubtree); > if (backendName == null) { > return false; > } >- String dnDB = "cn="+backendName+"," + DSUtil.LDBM_CONFIG_BASE_DN; >+ String dnDB = "cn="+backendName+"," + DSUtil.LDBM_BASE_DN; > /* Get read-only state of database */ > > try { > wasReadOnly = ReadOnly.isReadOnly( _serverInfo, dnDB ); > status = true; >@@ -919,11 +919,11 @@ > // RM : TBD : We must add the database dn > String backendName = MappingUtils.getBackendForSuffix(ld, replicatedSubtree); > if (backendName == null) { > return false; > } >- String dnDB = "cn="+backendName+"," + DSUtil.LDBM_CONFIG_BASE_DN; >+ String dnDB = "cn="+backendName+"," + DSUtil.LDBM_BASE_DN; > /* Get read-only state of database */ > try { > wasReadOnly = ReadOnly.isReadOnly( model.getServerInfo(), dnDB ); > status = true; > } catch ( LDAPException e ) { >Index: src/com/netscape/admin/dirserv/panel/replication/SupplierSettingPanel.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/SupplierSettingPanel.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 SupplierSettingPanel.java >--- src/com/netscape/admin/dirserv/panel/replication/SupplierSettingPanel.java 18 Jul 2005 00:56:10 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/panel/replication/SupplierSettingPanel.java 2 Jul 2007 18:47:30 -0000 >@@ -289,15 +289,11 @@ > _dbText.setText(dir); > } > } > > private void SetDefaultDir () { >- String dir = getInstanceDirectory () + "/" + DEFAULT_DBDIR; >- >- /* replace all \ with / in the path */ >- dir = dir.replace('\\', '/'); >- >+ String dir = DSUtil.getDefaultChangelogPath( _model.getServerInfo() ); > _dbText.setText(dir); > } > > private void RemoveChangelog () { > // ask for confirmation >@@ -951,11 +947,10 @@ > private static int DAY_AGE_UNIT = 3; > private static int WEEK_AGE_UNIT = 4; > private static int DEFAULT_AGE_UNIT = DAY_AGE_UNIT; //day > > private static final String REMOVE = "remove"; >- private static final String DEFAULT_DBDIR = "changelogdb"; > > private static ResourceSet _resource = > new ResourceSet("com.netscape.admin.dirserv.panel.replication.replication"); > private static final String _section = "replication-supplier"; > private static final int LIMIT_MIN_VAL = 0; >Index: src/com/netscape/admin/dirserv/task/NewInstanceDialog.java >=================================================================== >RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/task/NewInstanceDialog.java,v >retrieving revision 1.1.1.1 >diff -u -5 -t -r1.1.1.1 NewInstanceDialog.java >--- src/com/netscape/admin/dirserv/task/NewInstanceDialog.java 18 Jul 2005 00:56:18 -0000 1.1.1.1 >+++ src/com/netscape/admin/dirserv/task/NewInstanceDialog.java 2 Jul 2007 18:47:30 -0000 >@@ -44,17 +44,16 @@ > > public class NewInstanceDialog extends AbstractDialog { > /** > * Creates a dialog which asks the user to input the basic parameters > * needed to create a new DS instance. All of the other needed basic >- * information is derived from the server root directory or other >- * information stored in the topology. The parameters may be given >- * default values in the constructor. If the default value given is >- * null, this means to disable that field. If the default value given >- * is "" the empty string, enable the field with an empty value. >- * If root DN is null the root DN password entry field will be disabled >- * as well. >+ * information is derived from other information stored in the topology. >+ * The parameters may be given default values in the constructor. If >+ * the default value given is null, this means to disable that field. >+ * If the default value given is "" the empty string, enable the field >+ * with an empty value. If root DN is null the root DN password entry >+ * field will be disabled as well. > * > * @param parent Parent container. > */ > public NewInstanceDialog( JFrame parent, String[] keys, Hashtable values) { > super(parent, "", true, OK|CANCEL|HELP);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246513
: 158366 |
158371