Widget for a Separate Application

To easily distribute applications among your customers, you can insert one-click deployment buttons of the next types to your site:

Note: Before proceeding further, please make sure you’ve included the appropriate JS script (described within Installation Widget instruction) to the required site page.

Place the code of your plugin wherever you want it to appear on your page:

<div
      data-manifest="{link_to_json_file}"
      data-width="280"
      data-theme="modern"
      data-lang="en"
      class="je-app"
      data-hoster-select="1"
      data-key="app.{hoster_domain}"
      data-min-version="4.8"
      data-source="app-widget"
      data-reseller-email="reseller@mail.com">
</div>

Here, the attributes are:

ParameterDescriptionObligatoryDefault/Example Value
data-manifestLink to the JSON file of your packaged application+ (cannot be used together with the data-app parameter){link_to_json_file}
data-appID of the application manifest from JCA > Marketplace (it can be application, provided by default, or your own custom one)+ (cannot be used together with the data-manifest parameter)wordpress
data-widthWidth of the widget-280
data-themeColour style of the widget. The possible values are: flat-blue, flat-purple, flat-orange, flat-green and modern+modern
data-langLocalization to be used at the user's dashboard (the stated value should point to the language, that is already available at a particular platform)-en
classThis parameter should always have the "je-app" value+je-app
data-hoster-selectEnables the hosting provider selection possibility Note: For the modern widgets only-0/1
data-keysList of available for selection service providers, separated with semicolon ";" (skip it if you want all the hosters to be listed).
Note: For the modern widgets with the data-hoster-select enabled only
-app.jelastic.dogado.eu;app.jelastichosting.nl
data-keyA particular hosting provider platform an application should be installed to (in a form of URL to the appropriate dashboard).
Note: If it’s not specified, the geographically closest platform will be chosen by means of GeoIP
-app.{hoster_domain}
data-min-versionMinimal platform version an application can be installed to (in the x[.x][.x] format). Hosting providers with lower Jelastic versions won't be available for choosing.
Note: If not a single platform suits this criteria, user will be faced an error after submitting installation request
-4.8
data-sourceCustom signup source identifier, that is stored within Jelastic DB in case of a new account creation as a result of app deployment (i.e. the specified email wasn't registered at the chosen platform previously)-app-widget
data-reseller-
email
Email of the application reseller. In case of this parameter addition, all the installation requests, submitted within the appropriate widget, will be redirected to the reseller, which should confirm the installation and send all the details to a user-reseller@mail.com

Once your widget is configured and ready to work, we recommend to test it before placing at a site.

Additionally, you can apply some extra configurations to it:

Widget Testing

Before placing the widget at your site, you can check if everything works properly using the link of the following type (it will initiate the process of installation):

https://app.{hoster_domain}?manifest={manifest_code}

where:
  • {hoster_domain} - your platform's domain (the last column in the linked table)
  • {manifest_code} - content of your packaged application's manifest (JSON file). Herewith, it should be compacted (i.e. have no whitespaces - use the appropriate button above the editor) and URL-encoded (just paste the continuous string you've got and click on Encode). The eventually received value can be inserted to the link above.

Also, you can use the http:// or https:// link to the JSON file with your manifest, uploaded wherever in the Internet, instead of the last {manifest_code} parameter. Pay attention, that such an URL should not contain the question mark "?" (otherwise it won't work properly), so in this case you'll need to use some URL shortener.

Note:

  • all the values should be specified without curly brackets
  • in case you’ve specified the data-app attribute within the widget, you need to use the link of the following type for testing:

    https://app.{hoster_domain}?app={app_ID}
And here are a few examples of links with application manifests (you should be either registered at the specified Locaweb platform or substitute it with your own one for being able to check them):
  • for a simple HelloWorld app installation, with the encoded manifest (you can check it here) directly in the URL

    https://app.jelasticlw.com.br?manifest=%7B%22jpsType%22%3A%22install%22%2C%22jpsVersion%22%3A%220.2%22%2C%22application%22%3A%7B%22id%22%3A%22helloworld%22%2C%22name%22%3A%22Hello%20world!%22%2C%22version%22%3A%221.0%22%2C%22type%22%3A%22php%22%2C%22homepage%22%3A%22http%3A%2F%2Fjelastic.com%2F%22%2C%22logo%22%3A%22https%3A%2F%2Fjelastic.com%2Fassets%2Fimg%2Fjelastic-logo-middle.png%22%2C%22description%22%3A%7B%22text%22%3A%22Hello%20World%22%7D%2C%22env%22%3A%7B%22topology%22%3A%7B%22engine%22%3A%22php5.3%22%2C%22nodes%22%3A%5B%7B%22extip%22%3Afalse%2C%22count%22%3A1%2C%22cloudlets%22%3A16%2C%22nodeType%22%3A%22apache2%22%7D%5D%2C%22ssl%22%3Afalse%2C%22ha%22%3Afalse%7D%2C%22deployments%22%3A%5B%7B%22archive%22%3A%22http%3A%2F%2Fapp.jelastic.com%2Fxssu%2Fcross%2Fdownload%2FRDYYHFNuUQYJBFpPZQ08F0UWCRlUHxdBD0ZlTS4gcQJFFBJUDwIBQmNTTEBI%22%2C%22name%22%3A%22Hello%20World%22%2C%22context%22%3A%22ROOT%22%7D%5D%7D%2C%22success%22%3A%7B%22text%22%3A%22Hello%20World%20is%20successfully%20installed%22%7D%7D%7D
  • for a packaged WordPress CMS, with the link to the corresponding JSON manifest file in the URL

    https://app.jelasticlw.com.br?manifest=https://app.jelastic.com/xssu/cross/download/RDYYHABmUQEPVFxKZQVqFxBFWRYEGEUUDEM%2BS3p5cQ5CR0dWDwIBQmNTTEBI

Tip: If you have packaged your own application for being implemented in a widget, you can also add it to the list of one-click deployments, so that it will become available for all Platform users via the Marketplace dashboard section.

Widget Localization

In case you need to customize texts of widget elements (e.g. in order to provide the appropriate translation), please append the following strings to the above mentioned div tag attributes:

<div
      ...
      data-text="Get it hosted now!"
      data-tx-empty="Type your email and click the button"
      data-tx-invalid-email="Invalid email, please check the spelling"
      data-tx-error="An error has occurred, please try again later"
      data-tx-success="Check your email">
</div>

After that, state the needed values inside the quotes according the following parameters descriptions:

Parameter

Description

Default Value

data-text

The initial label, displayed inside the widget

Get it hosted now!

data-tx-empty

This text is displayed upon hovering over the widget

Type your email and click the button

data-tx-invalid-email

This text appears when an email is entered incorrectly

Invalid email, please check the spelling

data-tx-error

Warning message to be displayed in case any error occurs

An error has occurred, please try again later

data-tx-success

This text is shown when installation is successfully completed

Check your email

Custom Widget

You can also use your own one-click installation widget with any required customization - the only demand is that it has to request the link of the following type:

https://reg.{hoster_domain}/installapp?email={user_email}&id={app_id}

Also, you can add two optional parameters to this link for getting the ability to track the sources of a particular deployment:

https://reg.{hoster_domain}/installapp?email={user_email}&id={app_id}&iref={internal referrer}&eref={external referrer}

  • &iref={internal referrer} - indicates the page where the app package widget is placed
  • &eref={external referrer} - defines the initial source from which a user came to the page with the app package widget

As a result, the values of these parameters will be displayed in Jelastic DB.