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

jvergara
21.46.2006 6ab40bb68368f230de43c6a44e828ab5cd4e162d
Update some labels and URL as suggested by Brian.

Add some code to improve the displayed download progress bar. Know the code takes into consideration the actual size of the jar files instead of considering that all have the same size.
3 files modified
62 ■■■■■ changed files
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java 53 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties 7 ●●●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java 2 ●●● patch | view | raw | blame | history
opends/src/quicksetup/org/opends/quicksetup/installer/webstart/WebStartDownloader.java
@@ -220,10 +220,59 @@
      String[] urls = getJarUrls();
      String[] versions = getJarVersions();
      /*
       * Calculate the percentages that correspond to each file.
       * TODO ideally this should be done dynamically, but as this is just
       * to provide progress, updating this information from time to time can
       * be enough and does not complexify the build process.
       */
      int[] percentageMax = new int[urls.length];
      int[] ratios = new int[urls.length];
      int totalRatios = 0;
      for (int i=0; i<percentageMax.length; i++)
      {
        int ratio;
        if (urls[i].endsWith("OpenDS.jar"))
        {
          ratio =  23;
        }
        else if (urls[i].endsWith("je.jar"))
        {
          ratio = 11;
        }
        else if (urls[i].endsWith("zipped.jar"))
        {
          ratio = 110;
        }
        else
        {
          ratio = (100 / urls.length);
        }
        ratios[i] = ratio;
        totalRatios += ratio;
      }
      for (int i=0; i<percentageMax.length; i++)
      {
        int r = 0;
        for (int j=0; j<=i; j++)
        {
          r += ratios[j];
        }
        percentageMax[i] = (100 * r)/totalRatios;
      }
      for (int i = 0; i < urls.length && (getException() == null); i++)
      {
        currentPercMin = (100 * i) / urls.length;
        currentPercMax = (100 * (i + 1)) / urls.length;
        if (i == 0)
        {
          currentPercMin = 0;
        }
        else {
          currentPercMin = percentageMax[i-1];
        }
        currentPercMax = percentageMax[i];
        // determine if a particular resource is cached
        String sUrl = urls[i];
opends/src/quicksetup/org/opends/quicksetup/resources/Resources.properties
@@ -184,7 +184,7 @@
and running quickly.<br><br>If you are running this tool via Java Web Start, \
QuickSetup will install and configure the latest weekly build. You can also \
use QuickSetup to set up a weekly build you have downloaded manually. To run \
QuickSetup in this case, use the quicksetup command at the top level of the \
QuickSetup in this case, use the setup command at the top level of the \
OpenDS directory.  This instance of QuickSetup will use the following OpenDS \
build: {0} (Build ID: {1}) <br><br> \
OpenDS requires a Java SE 5.0 or higher runtime.<br><br> \
@@ -307,8 +307,9 @@
Data...
summary-starting=Starting Directory Server...
summary-finished-successfully=<b>OpenDS QuickSetup completed successfully.</b>\
<br> Visit the <a href="https://opends.dev.java.net/public/docs/index.html"> \
documentation depot</a> page for guidance on server management and \
<br> Visit the \
<a href="https://opends.dev.java.net/public/docs/user-docs/OpenDS-QuickReference.html"> \
OpenDS Quick Reference</a> page for an overview of server management and \
configuration.
summary-finished-with-error=An error occurred.  Check 'Details' text area for \
more information.
opends/src/quicksetup/org/opends/quicksetup/ui/UIFactory.java
@@ -191,7 +191,7 @@
  /**
   * Specifies the number of columns of a text field for a relative path.
   */
  public static final int RELATIVE_PATH_FIELD_SIZE = 5;
  public static final int RELATIVE_PATH_FIELD_SIZE = 10;
  /**
   * Specifies the number of columns of a text field for a port.