mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Gaetan Boismal
15.40.2016 dbd177b18e53f486aeef896dc03911ee5ac72362
OPENDJ-2622 Improve UI

Since the temporary log file is deleted when setup is successful, we do
not always want to print the following line on top of the setup console:
"See /tmp/opendj-setup-4917524580846134354.log for a detailed log of
this operation."
This commit removes the message above and clarify the one which is
printed if any errors occurred during the setup process.
2 files modified
13 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/Installer.java 9 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/messages/org/opends/messages/quickSetup.properties 4 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/quicksetup/installer/Installer.java
@@ -248,8 +248,6 @@
      checkAbort();
      setCurrentProgressStep(InstallProgressStep.CONFIGURING_SERVER);
      notifyListenersOfLog(false);
      notifyListeners(getLineBreak());
      configureServer();
      checkAbort();
@@ -378,7 +376,7 @@
    notifyListeners(getFormattedError(exception, true));
    logger.error(LocalizableMessage.raw("Error installing.", exception));
    notifyListeners(getLineBreak());
    notifyListenersOfLog(true);
    notifyListenersOfExistingLogFile();
  }
  private void stopServerIfNeeded()
@@ -609,13 +607,12 @@
    return Utils.getInstancePathFromInstallPath(installPath);
  }
  private void notifyListenersOfLog(final boolean isError)
  private void notifyListenersOfExistingLogFile()
  {
    if (tempLogFile.isEnabled())
    {
      final String tempLogFilePath = tempLogFile.getPath();
      notifyListeners(getFormattedProgress(isError ? INFO_GENERAL_PROVIDE_LOG_IN_ERROR.get(tempLogFilePath)
          : INFO_GENERAL_SEE_FOR_DETAILS.get(tempLogFilePath)));
      notifyListeners(getFormattedProgress(INFO_GENERAL_PROVIDE_LOG_IN_ERROR.get(tempLogFilePath)));
      notifyListeners(getLineBreak());
    }
  }
opendj-server-legacy/src/messages/org/opends/messages/quickSetup.properties
@@ -344,8 +344,8 @@
INFO_GENERAL_CHECKING_DATA=Checking Data...
INFO_GENERAL_LOADING=Loading...
INFO_GENERAL_SEE_FOR_DETAILS=See %s for a detailed log of this operation.
INFO_GENERAL_PROVIDE_LOG_IN_ERROR=If you want to report this error, provide \
 the contents of file %s
INFO_GENERAL_PROVIDE_LOG_IN_ERROR=See %s for a detailed log of the failed operation.\
 \nPlease report this error and provide the log file mentioned above.
INFO_GENERAL_SERVER_STARTED=started
INFO_GENERAL_SERVER_STOPPED=stopped
INFO_GENERAL_WARNING=Warning