ConnectInstaller

AW4. ConnectInstaller

Contains methods to support Connect installation

Constructor

new ConnectInstaller(iframeClassopt, iframeIdopt, sdkLocationopt, styleopt, stylesheetLocationopt, versionopt)

Parameters:
Name Type Attributes Default Description
iframeClass String <optional>
"aspera-iframe-container"

Class to be added to the iframe that is going to be inserted in the DOM, for easier use with a custom stylesheet.

iframeId String <optional>
"aspera-iframe-container"

Id of the iframe that is going to be inserted in the DOM.

sdkLocation String <optional>
"//d3gcli72yxqn2z.cloudfront.net/downloads/connect/latest"

URL to the SDK location to serve Connect installers from. Needs to be served in the same level of security as the web page (HTTP/HTTPS). This option is often used if you are hosting your own instance of the Connect SDK.

Format: //domain/path/to/connect/sdk

style "carbon" | "none" <optional>
"carbon"

Style of the Connect bar design. Specify "none" if you have a custom Connect install experience. Default: "carbon"

stylesheetLocation String <optional>

URL to a stylesheet. Needs to be served in the same level of security as the web page (HTTP/HTTPS).

Format: //domain/path/to/css/file.css

version String <optional>
"latest"

Connect installer version to offer for downloads. This option is ignored if sdkLocation is specified. Only supports versions 4.x.x and up.

For example, to offer 4.1.2 Connect Installers, specify 4.1.2.

Properties:
Name Type Default Description
EVENT Object

Event types

Types:

  • EVENT.DOWNLOAD_CONNECT - "downloadconnect"
  • EVENT.REFERESH_PAGE - "refresh"
  • EVENT.IFRAME_REMOVED - "removeiframe"
  • EVENT.IFRAME_LOADED - "iframeloaded"
  • EVENT.TROUBLESHOOT - "troubleshoot"
  • EVENT.CONTINUE - "continue"
supportsInstallingExtensions Boolean false

To enable Connect extensions, this property must be set to true.

If you have a custom Connect install experience that can handle the EXTENSION_INSTALL state, set this value to 'true' This value is used by AW4.Connect to determine if the EXTENSION_INSTALL event should be used.

Example
let options = {
  style: 'carbon'
}
let asperaInstaller = new AW4.ConnectInstaller(options)

Methods

connected(timeoutopt) → {null}

Displays a temporary message that Connect has been found, and after timeout dismisses the banner

Parameters:
Name Type Attributes Default Description
timeout Number <optional>
2000

Timeout (in milliseconds) until the banner is dismissed..

dismiss() → {null}

Dismisses the banner.

doesBrowserNeedExtensionStore() → {Boolean}

Determine if current browser requires web store to install extensions.

For supported browsers, returns a url for extension installation.

// On a Chrome browser
asperaInstaller.getExtensionStoreLink()
// returns "https://chrome.google.com/webstore/detail/ibm-aspera-connect/kpoecbkildamnnchnlgoboipnblgikpn"

installationJSON(callbacks) → {null}

Queries the Connect SDK for the current system's information, returning the full spec of all the documentation and binaries available for it.

Parameters:
Name Type Description
callbacks function

Function that will be called when the result is retrieved.

Object returned to callback function:

{
  "title": "Aspera Connect for Windows",
  "platform": {
      "os": "win64"
 },
  "version": "4.1.1.73",
  "updated": "2021-12-08T22:07:40.390Z",
  "links": [
      {
          "title": "Windows 64-bit Installer",
          "type": "application/octet-stream",
          "href": "bin/ibm-aspera-connect_4.1.1.73_win64.exe",
          "hreflang": "en",
          "rel": "enclosure"
      },
      {
          "title": "Aspera Connect Release Notes for Windows",
          "type": "text/html",
          "href": "https://www.ibm.com/docs/en/aspera-connect/4.1?topic=notes-release-aspera-connect-411",
          "hreflang": "en",
          "rel": "release-notes"
      }
   ]
}
...

showDownload() → {null}

Displays a banner at the top of the screen notifying the user to download Connect.

showExtensionInstall() → {null}

Displays a page with instructions to install the browser extension.

showInstall() → {null}

Displays a banner at the top of the screen explaining to the user what to do once Connect has been downloaded.

showLaunching(timeoutopt) → {null}

Displays a banner at the top of the screen explaining to the user that Connect is trying to be launched.

Parameters:
Name Type Attributes Default Description
timeout Number <optional>
3500

Timeout to show the banner in milliseconds. If at any point during this timeout AW4.ConnectInstaller#connected or AW4.ConnectInstaller#dismiss are called, the banner will not appear.

showPrevious() → {null}

Displays the last page that was shown.

showRetry() → {null}

Displays a banner with the option to retry launching Connect.

showUnsupportedBrowser() → {null}

Displays a banner explaining that the browser is not supported by Connect.

showUpdate() → {null}

Displays a banner at the top of the screen notifying the user to update Connect to the latest version.