[Fedora-directory-commits] console/src/com/netscape/management/client/topology AbstractServerObject.java, 1.2, 1.3 ServerNode.java, 1.2, 1.3
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/console/src/com/netscape/management/client/topology
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv20520/src/com/netscape/management/client/topology
Modified Files:
AbstractServerObject.java ServerNode.java
Log Message:
Resolves: 246651
Summary: Cleaned up dialogs when a jar file is unable to be downloaded.
Index: AbstractServerObject.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/topology/AbstractServerObject.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractServerObject.java 29 Jun 2007 20:32:29 -0000 1.2
+++ AbstractServerObject.java 3 Jul 2007 17:27:03 -0000 1.3
@@ -540,7 +540,7 @@
// activated before any change listener is registered
while (_running && _changeListeners.size() == 0) {
try {
- Debug.println(7, "AbstractServerObject.StatusThread: waiting for chanage listeners to register");
+ Debug.println(7, "AbstractServerObject.StatusThread: waiting for change listeners to register");
_sleeping = true;
Thread.currentThread().sleep(1000);
_sleeping = false;
Index: ServerNode.java
===================================================================
RCS file: /cvs/dirsec/console/src/com/netscape/management/client/topology/ServerNode.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServerNode.java 29 Nov 2005 18:37:12 -0000 1.2
+++ ServerNode.java 3 Jul 2007 17:27:03 -0000 1.3
@@ -1231,7 +1231,7 @@
{
setBusyIndicator(null, false, "");
if(!isDownloaded) {
- // statusDialog.setVisible(false);
+ statusDialog.setVisible(false);
}
JOptionPane.showMessageDialog(parentFrame,
e.getMessage(),
16 years, 9 months
[Fedora-directory-commits] directoryconsole fedora-ds-console.spec, NONE, 1.1
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5899
Added Files:
fedora-ds-console.spec
Log Message:
Summary: Initial fedora-ds-console specfile.
--- NEW FILE fedora-ds-console.spec ---
%define major_version 1.1
%define minor_version 0
Name: fedora-ds-console
Version: %{major_version}.%{minor_version}
Release: 1
Group: Applications
Vendor: Fedora Project
URL: http://directory.fedora.redhat.com
License: LGPL
Packager: Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
Summary: Fedora Directory Server Management Console
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildArch: noarch
Source: %{name}-%{version}.tar.gz
Autoreq: 0
AutoReqProv: no
BuildPreReq: ant >= 1.6.2, ldapjdk >= 4.18, fedora-console-framework >= 1.1
%description
A Java based remote management console used for Managing Fedora
Directory Server.
# prep and setup expect there to be a Source file
# in the /usr/src/redhat/SOURCES directory - it will be unpacked
# in the _builddir (not BuildRoot)
%prep
%setup -q
%build
cd directoryconsole
ant -Dconsole.location=/usr/share/java
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/usr/share/java
install -m777 built/package/fedora-ds* $RPM_BUILD_ROOT/usr/share/java
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
/usr/share/java/fedora-ds-%{version}.jar
/usr/share/java/fedora-ds-%{version}_en.jar
%post
cd /usr/share/java
ln -s fedora-ds-%{version}.jar fedora-ds-%{major_version}.jar
ln -s fedora-ds-%{version}.jar fedora-ds.jar
ln -s fedora-ds-%{version}_en.jar fedora-ds-%{major_version}_en.jar
ln -s fedora-ds-%{version}_en.jar fedora-ds_en.jar
%preun
rm -rf /usr/share/java/fedora-ds-%{major_version}.jar
rm -rf /usr/share/java/fedora-ds.jar
rm -rf /usr/share/java/fedora-ds-%{major_version}_en.jar
rm -rf /usr/share/java/fedora-ds_en.jar
%changelog
* Mon Nov 14 2005 Nathan Kinder <nkinder(a)redhat.com> 1.1.0-1
- Initial creation
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/task NewInstanceDialog.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/task
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/task
Modified Files:
NewInstanceDialog.java
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: NewInstanceDialog.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/task/NewInstanceDialog.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- NewInstanceDialog.java 18 Jul 2005 00:56:18 -0000 1.1.1.1
+++ NewInstanceDialog.java 2 Jul 2007 19:44:11 -0000 1.2
@@ -46,13 +46,12 @@
/**
* 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.
*/
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel/replication LegacySupplierSettingPanel.java, 1.1.1.1, 1.2 ReplicationAgreement.java, 1.1.1.1, 1.2 SupplierSettingPanel.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/panel/replication
Modified Files:
LegacySupplierSettingPanel.java ReplicationAgreement.java
SupplierSettingPanel.java
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: LegacySupplierSettingPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/LegacySupplierSettingPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- LegacySupplierSettingPanel.java 18 Jul 2005 00:56:07 -0000 1.1.1.1
+++ LegacySupplierSettingPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -396,11 +396,7 @@
}
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);
}
@@ -892,7 +888,6 @@
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";
Index: ReplicationAgreement.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/ReplicationAgreement.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- ReplicationAgreement.java 18 Jul 2005 00:56:09 -0000 1.1.1.1
+++ ReplicationAgreement.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -873,7 +873,7 @@
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 {
@@ -921,7 +921,7 @@
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 );
Index: SupplierSettingPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/replication/SupplierSettingPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- SupplierSettingPanel.java 18 Jul 2005 00:56:10 -0000 1.1.1.1
+++ SupplierSettingPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -291,11 +291,7 @@
}
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);
}
@@ -953,7 +949,6 @@
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");
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/logging DSLogViewerModel.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/logging
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/logging
Modified Files:
DSLogViewerModel.java
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: DSLogViewerModel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/logging/DSLogViewerModel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSLogViewerModel.java 18 Jul 2005 00:55:49 -0000 1.1.1.1
+++ DSLogViewerModel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -31,8 +31,8 @@
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 );
@@ -65,41 +65,46 @@
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() {
}
@@ -224,6 +229,7 @@
protected String _url;
String _username;
String _password;
+ private String _serverID = null;
private String _logName = null;
protected static ResourceSet _resource;
protected static String _section;
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/also Danny-Atul-To.jpg, NONE, 1.1 files.lst, 1.1, 1.2 Danny, Atul, To.jpg, 1.1.1.1, NONE
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/also
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/also
Modified Files:
files.lst
Added Files:
Danny-Atul-To.jpg
Removed Files:
Danny, Atul,To.jpg
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: files.lst
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/also/files.lst,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- files.lst 18 Jul 2005 01:02:41 -0000 1.1
+++ files.lst 2 Jul 2007 19:44:08 -0000 1.2
@@ -3,7 +3,7 @@
Anthony.jpg
Bindu.jpg
Chandra.jpg
-Danny, Atul,To.jpg
+Danny-Atul-To.jpg
Darshan.jpg
Ey.jpg
Frank.jpg
***** Not enough context to create diffstat for file: Danny,
***** Not enough context to create diff for file: Danny,
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/panel BackupPanel.java, 1.1.1.1, 1.2 BlankPanel.java, 1.1.1.1, 1.2 DSLogViewer.java, 1.1.1.1, 1.2 LogPanel.java, 1.1.1.1, 1.2 MappingNodeBckPanel.java, 1.1.1.1, 1.2 NewLDBMPanel.java, 1.1.1.1, 1.2 RestorePanel.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/panel
Modified Files:
BackupPanel.java BlankPanel.java DSLogViewer.java
LogPanel.java MappingNodeBckPanel.java NewLDBMPanel.java
RestorePanel.java
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: BackupPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/BackupPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- BackupPanel.java 18 Jul 2005 00:55:52 -0000 1.1.1.1
+++ BackupPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -47,12 +47,9 @@
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();
Index: BlankPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/BlankPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- BlankPanel.java 18 Jul 2005 00:55:53 -0000 1.1.1.1
+++ BlankPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -1029,13 +1029,6 @@
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 );
}
Index: DSLogViewer.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/DSLogViewer.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSLogViewer.java 18 Jul 2005 00:55:56 -0000 1.1.1.1
+++ DSLogViewer.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -89,6 +89,8 @@
_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 ) {
@@ -96,14 +98,42 @@
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 {
Index: LogPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/LogPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- LogPanel.java 18 Jul 2005 00:55:59 -0000 1.1.1.1
+++ LogPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -440,7 +440,7 @@
// 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);
Index: MappingNodeBckPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/MappingNodeBckPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- MappingNodeBckPanel.java 18 Jul 2005 00:55:59 -0000 1.1.1.1
+++ MappingNodeBckPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -548,18 +548,23 @@
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");
}
@@ -631,12 +636,12 @@
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 );
@@ -706,12 +711,12 @@
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 );
Index: NewLDBMPanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/NewLDBMPanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- NewLDBMPanel.java 18 Jul 2005 00:56:01 -0000 1.1.1.1
+++ NewLDBMPanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -61,10 +61,7 @@
// Physical DB info
createFileArea( _myPanel );
- String instDir = getInstanceDirectory();
- if ( instDir != null ) {
- _baseDir = instDir;
- }
+ _baseDir = DSUtil.getDefaultDBPath( getModel().getServerInfo() );
AbstractDialog dlg = getAbstractDialog();
if ( dlg != null ) {
Index: RestorePanel.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/panel/RestorePanel.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- RestorePanel.java 18 Jul 2005 00:56:03 -0000 1.1.1.1
+++ RestorePanel.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -56,10 +56,7 @@
_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 ) {
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv/node MonitorResourceObject.java, 1.1.1.1, 1.2
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/node
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv/node
Modified Files:
MonitorResourceObject.java
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: MonitorResourceObject.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/node/MonitorResourceObject.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- MonitorResourceObject.java 18 Jul 2005 00:55:51 -0000 1.1.1.1
+++ MonitorResourceObject.java 2 Jul 2007 19:44:09 -0000 1.2
@@ -111,7 +111,7 @@
_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 );
16 years, 9 months
[Fedora-directory-commits] directoryconsole/src/com/netscape/admin/dirserv DSAdmin.java, 1.3, 1.4 DSUtil.java, 1.1.1.1, 1.2 dirserv.properties, 1.5, 1.6
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440/src/com/netscape/admin/dirserv
Modified Files:
DSAdmin.java DSUtil.java dirserv.properties
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: DSAdmin.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/DSAdmin.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DSAdmin.java 28 Oct 2005 22:18:17 -0000 1.3
+++ DSAdmin.java 2 Jul 2007 19:44:08 -0000 1.4
@@ -208,7 +208,6 @@
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 ) {
@@ -225,7 +224,6 @@
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) ) {
@@ -347,9 +345,6 @@
/* 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() );
/*
@@ -749,9 +744,6 @@
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 );
@@ -824,10 +816,6 @@
}
}
- private void readServerRoot() {
- DSUtil.readServerRoot(_info, _serverInfo, null);
- }
-
private void startUpdater() {
_animate = true;
@@ -1231,7 +1219,7 @@
private boolean checkVersion(ConsoleInfo info) {
String version = null;
JFrame frame = UtilConsoleGlobals.getActivatedFrame();
- version = VersionInfo.getVersionNumber();
+ version = VersionInfo.getMajorVersionNumber();
try {
Float f = new Float(version);
Index: DSUtil.java
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/DSUtil.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- DSUtil.java 18 Jul 2005 00:55:42 -0000 1.1.1.1
+++ DSUtil.java 2 Jul 2007 19:44:08 -0000 1.2
@@ -23,6 +23,7 @@
import java.awt.*;
import java.awt.image.*;
import java.util.*;
+import java.util.regex.*;
import java.io.*;
import java.net.*;
import java.text.SimpleDateFormat;
@@ -236,74 +237,6 @@
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.
@@ -2344,7 +2277,7 @@
}
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();
@@ -2821,49 +2754,98 @@
}
/**
+ * 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
@@ -2927,6 +2909,11 @@
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 =
@@ -2937,8 +2924,10 @@
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";
Index: dirserv.properties
===================================================================
RCS file: /cvs/dirsec/directoryconsole/src/com/netscape/admin/dirserv/dirserv.properties,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- dirserv.properties 29 Sep 2006 17:17:26 -0000 1.5
+++ dirserv.properties 2 Jul 2007 19:44:08 -0000 1.6
@@ -2657,9 +2657,13 @@
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
16 years, 9 months
[Fedora-directory-commits] directoryconsole build.properties, 1.6, 1.7 build.xml, 1.7, 1.8
by Doctor Conrad
Author: nkinder
Update of /cvs/dirsec/directoryconsole
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5440
Modified Files:
build.properties build.xml
Log Message:
Resolves: 246513
Summary: Removed server root concept from Directory Console.
Index: build.properties
===================================================================
RCS file: /cvs/dirsec/directoryconsole/build.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- build.properties 29 Sep 2006 17:17:26 -0000 1.6
+++ build.properties 2 Jul 2007 19:44:08 -0000 1.7
@@ -21,8 +21,8 @@
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
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.xml 24 Mar 2006 00:52:51 -0000 1.7
+++ build.xml 2 Jul 2007 19:44:08 -0000 1.8
@@ -82,10 +82,10 @@
<!-- 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>
@@ -149,12 +149,6 @@
<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 -->
16 years, 9 months