Visual Settings

Cloud Scripting enables you to create a personalized solution by customizing the visual appearance and textual content of such elements as:

Supported Fields

You can use the parameters from the following example to fetch your input data.

    type: update
    
    settings:
      prepopulate: URL
      fields:
        - showIf: object
          type: string
          inputType: string
          name: string
          default: string or localization object
          caption: string or localization object
          placeholder: string or localization object
          required: boolean
          vtype: string
          vtypeText: string or localization object
          regex: string for RegExp constructor
          regexText: string or localization object
          hideLabel: string
          id: string
          cls: string
          itemId: string     
    
    
    {
      "type": "update",
      "settings": {
        "prepopulate": "URL",
        "fields": [
          {
            "showIf": "object",
            "type": "string",
            "inputType": "string",
            "name": "string",
            "default": "string or localization object",
            "caption": "string or localization object",
            "placeholder": "string or localization object",
            "required": "boolean",
            "vtype": "string",
            "vtypeText": "string or localization object",
            "regex": "string for RegExp constructor",
            "regexText": "string or localization object",
            "hideLabel": "boolean",
            "id": "string",
            "cls": "string",
            "itemId": "string"
          }
        ]
      }
    }
    

where:

  • prepopulate [optional] - link to the script, that will fetch the default fields values
  • fields - array of fields that will be displayed in a custom form
    • showIf - shows/hides field by condition (is applicable only to the radio-fieldset field)
    • type [optional] - input field type. The default value is 'string'. Possible values:
    • inputType [optional] - type attribute of the input field (e.g. radio, text, password, file, etc.). The default value is 'text'. See more info on the type attribute.
    • name - input field name, that could be used to get a parameter value through the ${settings.your_input_name} placeholder within scripts or manifests
    • default [optional] - default value for the input field
    • caption [optional] - field label
    • placeholder [optional] - used placeholders
    • required [optional] - possible values are 'true' & 'false'. If left empty, the default value is 'true'.
    • regex [optional] - constructor for testing the JavaScript RegExp object, that refers to the stated the field value, during validation. If test fails, the field will be marked invalid using regexText. The default value is 'null'.
    • regexText [optional] - displays error message in case of the regex test failure during validation. The default value is ' ' (blank space).
    • vtype [optional] - validation type name. Possible values:
      • alpha - keystroke filter mask applied to alpha input. The default value is '/[a-z_]/i'.
      • alphanum - keystroke filter mask applied to alphanumeric input. The default value is '/[a-z0-9_]/i'.
      • email - keystroke filter mask applied to email input. The default value is '/[a-z0-9_.-+\'@]/i'. See the appropriate method for more information about complex email validation.
      • URL - keystroke filter mask applied to URL input
    • vtypeText [optional] - custom error message to be displayed instead of the default one, provided by vtype for this field. The default value is ' ' (blank space).

Note

The vtypeText parameter is applied only in case the vtype value is set, otherwise, it is ignored.

string

The basic text field.

string

    fields:
      - hideLabel: false
        type: string
        caption: string
        name: customString
    
    {
      "fields": [
        {
          "hideLabel": false,
          "type": "string",
          "caption": "string",
          "name": "customString"
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • hideLabel [optional] [boolean] - shows/hides field label. The default value is 'false'.

text

The multiline text field.

text

    fields:
      - type: text
        caption: string
        hideLabel: false
    
    {
      "fields": [
        {
          "type": "string",
          "caption": "string",
          "hideLabel": false
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • hideLabel[optional] [boolean] - hides field label. The default value is 'false'.

list

The drop-down list and a single-line textbox.

list

    fields:
      - type: list
        caption: string
        values:
          value1: hello
          value2: world
        hideLabel: false
        editable: true
    
    {
      "fields": [
        {
          "type": "list",
          "caption": "string",
          "values": {
            "value1": "hello",
            "value2": "world"
          },
          "hideLabel": false,
          "editable": true
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • values - objects values ("key":"value")
  • hideLabel [optional] [boolean] - shows/hides field label. The default value is 'false'.
  • editable [optional][boolean] - allows to input custom values. The default value is 'false'.

checkbox

The single checkbox field.

text

    fields:
      - type: checkbox
        caption: string
        value: true
        hideLabel: false
    
    {
      "fields": [
        {
          "type": "checkbox",
          "caption": "string",
          "value": true,
          "hideLabel": false
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • value - enables or disables checkbox
  • hideLabel [optional][boolean] - shows/hides field label. The default value is 'false'.

checkboxlist

The checkbox grouping.

text

    fields:
      - type: checkboxlist
        caption: Checkbox List
        values:
          value1: hello
          value2: world
        hideLabel: false
    
    {
      "fields": [
        {
          "type": "checkboxlist",
          "caption": "Checkbox List",
          "values": {
            "value1": "hello",
            "value2": "world"
          },
          "hideLabel": false
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • values - checkboxes ("key":"value")
  • hideLabel [optional] [boolean] - shows/hides field label. The default value is 'false'.

radiolist

The radio elements grouping.

text

    fields:
      - type: radiolist
        caption: Radio List
        values:
          value1: hello
          value2: world
        hideLabel: false
    
    {
      "fields": [
        {
          "type": "radiolist",
          "caption": "Radio List",
          "values": {
            "value1": "hello",
            "value2": "world"
          },
          "hideLabel": false
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • values - checkboxes ("key":"value")
  • hideLabel [optional][boolean] - shows/hides field label. The default value is 'false'.

radio-fieldset

The grouping of the radio elements with the showIf function.

Note

The hideLabel boolean is always true for this field.

text

    fields:
      - type: radio-fieldset
        name: customName
        default: '1'
        values:
          1: hello
          2: world
        showIf:
          1:
            - hideLabel: false
              type: string
              caption: First String
              name: first
          2:
            - hideLabel: false
              type: string
              caption: Second String
              name: second
    
    {
      "fields": [
        {
          "type": "radio-fieldset",
          "name": "customName",
          "default": "1",
          "values": {
            "1": "hello",
            "2": "world"
          },
          "showIf": {
            "1": [
              {
                "hideLabel": false,
                "type": "string",
                "caption": "First String",
                "name": "first"
              }
            ],
            "2": [
              {
                "hideLabel": false,
                "type": "string",
                "caption": "Second String",
                "name": "second"
              }
            ]
          }
        }
      ]
    }
    

where:

  • name [required] - name of the radio-fieldset element (for other elements it’s not required)
  • default [optional] - field selected upon opening the form
  • values - checkboxes ("key":"value")
  • showIf - conditional object that shows predefined elements by clicking on the radio-fieldset elements. Predefined elements can vary.
  • hideLabel [optional] [boolean] - shows/hides field label. The default value is 'false'.
  • caption [optional] - field label

dockertag

The field for displaying Docker tags within the list element.

text

    name: Cloud Scripting
    
    settings:
      fields:
      - type: dockertags
        name: tag
        values:
        - name: latest
        - name: first
    
    dockerImage:
      name: sych74/pokemongo-map
      registry: ''
      username: ''
      password: ''
    
    env: {}
    
    {
      "name": "Cloud Scripting",
      "settings": {
        "fields": [
          {
            "type": "dockertags",
            "name": "tag",
            "values": [
              {
                "name": "latest"
              },
              {
                "name": "first"
              }
            ]
          }
        ]
      },
      "dockerImage": {
        "name": "sych74/pokemongo-map",
        "registry": "",
        "username": "",
        "password": ""
      },
      "env": {}
    }
    

where:

  • name [required] - should have the 'tag' value
  • values [required] - Docker tag values (name: "tag_name" is required). By default, Docker image is pulled from the Docker Hub registry.
  • dockerImage - Docker image details
  • name - repository is required
  • registry, username, password [optional]
  • env - required object (can be empty)

compositefield

The compositefield is a container with specific functionality and structural components that constitute it as a block for application-oriented custom user interfaces.

compositefield

    fields:
      - pack: ''
        align: ''
        defaultMargins:
          top: 0
          right: 0
          bottom: 0
          left: 10
        defaultPadding: 0
        defaultFlex: 0
        caption: Compositefield
        type: compositefield
        name: compositefield
        items:
          - name: checkbox
            value: true
            type: checkbox
          - width: 50
            name: first
            type: string
          - width: 100
            name: latest
            type: string
    
    {
      "fields": [
        {
          "pack": "",
          "align": "",
          "defaultMargins": {
            "top": 0,
            "right": 0,
            "bottom": 0,
            "left": 10
          },
          "defaultPadding": 0,
          "defaultFlex": 0,
          "caption": "Compositefield",
          "type": "compositefield",
          "name": "compositefield",
          "items": [
            {
              "name": "checkbox",
              "value": true,
              "type": "checkbox"
            },
            {
              "width": 50,
              "name": "first",
              "type": "string"
            },
            {
              "width": 100,
              "name": "latest",
              "type": "string"
            }
          ]
        }
      ]
    }
    

where:

  • pack [optional] - manages the way items are packed together. The default value is 'start'. Possible values: 'start', 'center' and 'end'.
  • align [optional] - manages the way items are aligned. The default value is 'top'. Possible values: 'top', 'middle', 'stretch', 'stretchmax'.
  • defaultMargins [optional] - default margins for items. The default value is '0'.
  • defaultPadding [optional] - default paddings for items. The default value is '0'.
  • defaultFlex [optional] - horizontal flex for items
  • items - elements

slider

The slider element as a form field.

slider
    fields:
      - min: 0
        max: 10
        increment: 1
        useTips: true
        caption: Slider
        type: slider
        name: slider
    
    {
      "fields": [
        {
          "min": 0,
          "max": 10,
          "increment": 1,
          "useTips": true,
          "caption": "Slider",
          "type": "slider",
          "name": "slider"
        }
      ]
    }
    

where:

  • min - minimum slider value
  • max - maximum slider value
  • useTips - displaying tips for the value. The default value is 'true'.
  • caption [optional] - field label
  • name [optional] - name of the field

envlist

The account environments list expanded within a drop-down element.

envlist

    fields:
      - caption: Envlist
        editable: true
        valueField: appid
        type: envlist
        name: envlist
    
    {
      "fields": [
        {
          "caption": "Envlist",
          "editable": true,
          "valueField": "appid",
          "type": "envlist",
          "name": "envlist"
        }
      ]
    }
    
where:

  • caption [optional] - field label
  • name [optional] - name of the field
  • editable [optional][boolean] - enables/disables the envlist field editing. The default value is 'false'.
  • valueField [optional][string] - value from environment information, which will be sent to a server. The default value is 'domain'. Available values are:
    • iconCls - CSS class
    • isRunning - checking whether environment status is running
    • shortdomain - short environment domain name (without platform URL)
    • displayName - environment displayName
    • appid - unique environment ID

popupselector

(popup-selector is an alias)

The field for opening a pop-up window via the POST request to any external service. It provides the possibility to pass additional parameters.

popupselector

    fields:
      - caption: Popupselector
        type: popupselector
        name: popupselector
        buttonText: Open
        url: http://{external url}
        popupWidth: 300
        popupHeight: 300
        popupCallbackEvent: handler
        params:
          first: 1
          second: 2
    
    {
      "fields": [
        {
          "caption": "Popupselector",
          "type": "popupselector",
          "name": "popupselector",
          "buttonText": "Open",
          "url": "http://{external url}",
          "popupWidth": 300,
          "popupHeight": 300,
          "popupCallbackEvent": "handler",
          "params": {
            "first": 1,
            "second": 2
          }
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • name [optional] - name of the field
  • buttonText [optional] - button label
  • url [optional] - external source URL. The default link is to the current Jelastic Dashboard. New popup window is opened only via POST request.
  • popupWidth [optional] - width in pixels
  • popupHeight [optional] - height in pixels
  • popupCallbackEvent - event handler
  • params - parameters for sending in POST request to URL source
  • value - defined value which is filled in text field

The textfield value in popupselector element can be replaced by parameter from external url source. This parameter should be passed with popupCallbackEvent value.
For example:

    type: update
    name: Return Action
    
    settings:
      fields:
        caption: Popupselector
        type: popupselector
        name: popupselector
        buttonText: Open
        value: '3'
        url: https://{external_source}/example
        popupWidth: 300
        popupHeight: 300
        popupCallbackEvent: click
        params:
          first: 1
          second: 2
    
    {
      "type": "update",
      "name": "Return Action",
      "settings": {
        "fields": {
          "caption": "Popupselector",
          "type": "popupselector",
          "name": "popupselector",
          "buttonText": "Open",
          "value": "3",
          "url": "https://{external_source}/example",
          "popupWidth": 300,
          "popupHeight": 300,
          "popupCallbackEvent": "click",
          "params": {
            "first": 1,
            "second": 2
          }
        }
      }
    }
    

In example above the external source should returns a URL with such parameters as value and event. The event name is the same name as popupCallbackEvent in field description in manifest.

A full external resource link should be like in example below:

http://{Jelastic_Platform_URL} + "fireevent?event=click&value=hello"
where:

  • Jelastic_Platform_URL - Jelastic Dashboard URL where manifest is executed
  • click - event namewhich is handled in manifest in popupCallbackEvent parameter
  • value - type is string. The textfield will be filled by it when button "Open" will be applied.

displayfield

(spacer is an alias)

The text field intended only for display that is not validated and not submitted.

displayfield

    fields:
      - caption: Displayfield
        type: displayfield
        name: displayfield
        markup: display
    
    {
      "fields": [
        {
          "caption": "Displayfield",
          "type": "displayfield",
          "name": "displayfield",
          "markup": "display"
        }
      ]
    }
    

where:

  • caption [optional] - field label
  • name [optional] - name of the field
  • markup - value to initialize the field's display. The default value is 'undefined'.

spinner

The enhanced input field for entering numeric values, with up/down buttons and arrow keys handling.

spinner

    fields:
      - type: spinner
        name: spinner
        caption: Spinner
        min: 1
        max: 10
        increment: 2
        decimanPrecision: ''
    
    {
      "fields": [
        {
          "type": "spinner",
          "name": "spinner",
          "caption": "Spinner",
          "min": 1,
          "max": 10,
          "increment": 2,
          "decimanPrecision": ""
        }
      ]
    }
    

where:

  • name [optional] - name of the field
  • caption [optional] - field label
  • min - minimum spinner value
  • max - maximum spinner value
  • increment - increment value
  • decimanPrecision - precision value

numberpicker

(number-picker is an alias)

The field that enables to select a number from a predefined range.

numberpicker

    fields:
      - type: numberpicker
        name: numberpicker
        caption: Numberpicker
        min: 3
        max: 10
        editable: true
    
    {
      "fields": [
        {
          "type": "numberpicker",
          "name": "numberpicker",
          "caption": "Numberpicker",
          "min": 3,
          "max": 10,
          "editable": true
        }
      ]
    }
    

where:

  • name [optional] - name of the field
  • caption [optional] - field label
  • min - minimum spinner value
  • max - maximum spinner value
  • editable [optional] [boolean] - enables/disables editing the numberpicker field. The default value is 'false'.

hostpicker

(host-picker is an alias)

The drop-down menu with the environments hosts.

hostpicker

    fields:
      - type: hostpicker
        name: hostpicker
        caption: Hostpicker
        editable: true
        valueField: host
    
    {
      "fields": [
        {
          "type": "hostpicker",
          "name": "hostpicker",
          "caption": "Hostpicker",
          "editable": true,
          "valueField": "host"
        }
      ]
    }
    

where:

  • name [optional] - name of the field
  • caption [optional] - field label
  • editable [optional] [boolean] - enables/disables editing the envlist field. The default value is 'false'.
  • valueField [optional][string] - value from environment information, which will be sent to a server. The default value is 'domain'. Available values are:
    • iconCls - CSS class
    • isRunning - checking whether environment status is running
    • shortdomain - short environment domain name (without platform URL)
    • displayName - environment displayName
    • appid - unique environment ID

toggle

The toggle element is a switch between two values.

toggle
    fields:
      - type: toggle
        name: toggle
        caption: Toggle
        value: true
    
    {
      "fields": [
        {
          "type": "toggle",
          "name": "toggle",
          "caption": "Toggle",
          "value": true
        }
      ]
    }
    
where:

  • name [optional] - name of the field
  • caption [optional] - field label
  • value [boolean] - enables/disables toggle value. The default value is 'false'.

Target Nodes

Target Nodes is an optional method that allows to define environments suitable for JPS installation. This method is available only for the update installation type.

Filtering for targetNodes can be performed by nodeType, nodeGroup, dockerOs, dockerName or dockerTag.

    type: update
    name: targetNodes
    
    targetNodes:
      nodeType:
      - "..."
      nodeGroup:
      - "..."
      dockerOs:
      - "..."
      dockerName:
      - "..."
      dockerTag:
      - "..."
    
    onInstall:
      createFile:
        nodeGroup: cp
        path: "/tmp/newFile"
    
    {
      "type": "update",
      "name": "targetNodes",
      "targetNodes": {
        "nodeType": [
          "..."
        ],
        "nodeGroup": [
          "..."
        ],
        "dockerOs": [
          "..."
        ],
        "dockerName": [
          "..."
        ],
        "dockerTag": [
          "..."
        ]
      },
      "onInstall": {
        "createFile": {
          "nodeGroup": "cp",
          "path": "/tmp/newFile"
        }
      }
    }
    
There are two possible ways to define targetNodes.
"nodeType": ["..."] - to set the required nodeTypes in an array

"nodeType": "..., ..." - to set the required nodeTypes being separated with commas

Example

Let’s suppose you have three environments with different topology.

target-nodes

Within these environments, the targetNodes filtering for JPS installation can be performed with the next example.

    type: update
    name: targetNodes
    
    targetNodes:
      nodeType: nginx, mysql5
    
    onInstall:
      createFile:
        nodeGroup: cp
        path: "/tmp/newFile"
    
    {
      "type": "update",
      "name": "targetNodes",
      "targetNodes": {
        "nodeType": "nginx, mysql5"
      },
      "onInstall": {
        "createFile": {
          "nodeGroup": "cp",
          "path": "/tmp/newFile"
        }
      }
    }
    
In this case, the filtering result will be the following.

TargetNodesFilter

Custom Menus

Menu is an expandable list within the Add-ons section, comprising operations that can be extended and adjusted by means of custom buttons.

new-menu

By default, this menu contains the Uninstall button. The rest of listed actions, if there are any, execute operations from the events settings.

The properties used for custom menus are the same as for custom buttons. However, the appropriate menu field (instead of buttons) should be specified to adjust functionality exactly within the menu list of the Add-ons plank.

The sample to set custom buttons within the menu list of the Add-ons plank.

    type: update
    name: Custom buttons
    
    targetNodes:
      nodeGroup: bl
    
    actions:
      - "..."
    
    menu:
      confirmText: Custom confirm text
      loadingText: Load text while waiting
      action: "{String}"
      caption: Configure
      successText: Configuration saved successfully!
      settings: config
      title: Title
      submitButtonText: Button Text
      logsPath: "/var/log/add-on-action.log"
      logsNodeGroup: cp
    
    {
      "type": "update",
      "name": "Custom buttons",
      "targetNodes": {
        "nodeGroup": "bl"
      },
      "actions": [
        "..."
      ],
      "menu": {
        "confirmText": "Custom confirm text",
        "loadingText": "Load text while waiting",
        "action": "{String}",
        "caption": "Configure",
        "successText": "Configuration saved successfully!",
        "settings": "config",
        "title": "Title",
        "submitButtonText": "Button Text",
        "logsPath": "/var/log/add-on-action.log",
        "logsNodeGroup": "cp"
      }
    }
    
Refer to the Custom Buttons section below for a detailed description on the parameters set with the current sample.

Custom Buttons

The custom buttons settings are intended for extending and adjusting functionality of planks within the Add-ons section. It can be accessed upon clicking the same-named button next to the required node.

custom-addon

Such buttons execute operations that are predefined within a JPS manifest.

traffic-distributor

Note

The JPS manifest should include the targetNodes field in order to be displayed within the Add-ons section after installation, otherwise, it will be hidden.

Templates

The sample to set buttons within the Add-ons plank.

    type: update
    name: Custom buttons
    
    targetNodes:
      nodeGroup: bl
    
    actions:
      - "..."
    
    buttons:
      - confirmText: Custom confirm text
        loadingText: Load text while waiting
        action: "{String}"
        caption: Configure
        successText: Configuration saved successfully!
        href: http://google.com
    
    {
      "type": "update",
      "name": "Custom buttons",
      "targetNodes": {
        "nodeGroup": "bl"
      },
      "actions": [
        "..."
      ],
      "buttons": [
        {
          "confirmText": "Custom confirm text",
          "loadingText": "Load text while waiting",
          "action": "{String}",
          "caption": "Configure",
          "successText": "Configuration saved successfully!",
          "href": "http://google.com"
        }
      ]
    }
    
where:

  • buttons - button parameters array
  • confirmText [optional] - custom confirmation text for users. The default value is 'Are you sure?'.

It will be displayed after clicking on the appropriate button for an add-on. According to the code above, the text will be the following.

Confirm

  • loadingText [optional] - UI text to be displayed during loading and applying changes. The default value is 'Applying...'.

LoadingText

  • action [required] [string] - name of the custom action that will be executed. The custom action body structure is described in the actions section.
  • caption - title of the button

Caption

  • successText - message that appears once action is successfully performed

SuccessText

  • href [optional] - external link that is opened in a new browser tab and is executed only if the settings field is absent. In case of href execution, an action will not be carried out.

Another sample with additional configurations where parameters can be enabled only if the settings field is present.

    type: update
    name: Custom buttons
    
    targetNodes:
      nodeGroup: bl
    
    actions:
      - "..."
    
    buttons:
      - confirmText: Custom confirm text
        loadingText: Load text while waiting
        action: "{String}"
        caption: Configure
        successText: Configuration saved successfully!
        settings: config
        title: Title
        submitButtonText: Button Text
        logsPath: "/var/log/add-on-action.log"
        logsNodeGroup: cp
    
    {
      "type": "update",
      "name": "Custom buttons",
      "targetNodes": {
        "nodeGroup": "bl"
      },
      "actions": [
        "..."
      ],
      "buttons": [
        {
          "confirmText": "Custom confirm text",
          "loadingText": "Load text while waiting",
          "action": "{String}",
          "caption": "Configure",
          "successText": "Configuration saved successfully!",
          "settings": "config",
          "title": "Title",
          "submitButtonText": "Button Text",
          "logsPath": "/var/log/add-on-action.log",
          "logsNodeGroup": "cp"
        }
      ]
    }
    
where:

  • settings - custom form ID. The default is 'main'.
  • title - custom dialog title. If absent, then caption will be applied.
  • submitButtonText - text for submission button in the opened dialog. The default value is 'Apply'.

SubmitButtonText

  • logsPath - path to a log file that is accessible via the Show Logs button

LogsPath

  • logsNodeGroup - nodeGroup layer the logging path should be opened for

Custom Settings

The settings section can include a few custom forms. The default settings form ID is 'main'.

Example

    type: update
    name: Custom buttons
    
    targetNodes:
      nodeGroup: bl
    
    actions:
      - "..."
    
    settings:
      main:
        fields:
        - type: text
          caption: Main form
      config:
        fields:
        - type: text
          caption: Custom form from button action
    
    buttons:
      - settings: config
        action: customAction
        caption: Configure
        submitButtonText: Button Text
        logsPath: "/var/lib/jelastic/keys/111"
    
    {
      "type": "update",
      "name": "Custom buttons",
      "targetNodes": {
        "nodeGroup": "bl"
      },
      "actions": [
        "..."
      ],
      "settings": {
        "main": {
          "fields": [
            {
              "type": "text",
              "caption": "Main form"
            }
          ]
        },
        "config": {
          "fields": [
            {
              "type": "text",
              "caption": "Custom form from button action"
            }
          ]
        }
      },
      "buttons": [
        {
          "settings": "config",
          "action": "customAction",
          "caption": "Configure",
          "submitButtonText": "Button Text",
          "logsPath": "/var/lib/jelastic/keys/111"
        }
      ]
    }
    
Here, the main settings form appears during installation process.

settingMain

The config settings form appears after clicking the Configure button within the Add-ons section.

settingCustom

Success Text Customization

It is possible to customize the success text that is displayed upon successful installation either at the dashboard, or via email notification.
A success text can be defined like plain text or like Markdown syntax. More details about Markdown syntax in Cloud Scripting here

  • Setting relative to the baseUrl link that points path to the README.md file for its content to be displayed within the success response.

      type: update
      name: Success Text first example
      baseUrl: https://github.com/jelastic-jps/minio
      
      onInstall:
        log: success text first example
      
      success: README.md
      
      {
          "type" : "update",
          "name" : "Success Text first example",
          "baseUrl" : "https://github.com/jelastic-jps/minio",
          "onInstall" : {
              "log" : "success text first example"
          },
          "success" : "README.md"
      }
      

  • Customizing the success response text by means of the external link.

      type: update
      name: Success Text Second Example
      
      onInstall:
        log: success Text Second Example
      
      success: https://github.com/jelastic-jps/lets-encrypt/raw/master/README.md
      
      {
        "type": "update",
        "name": "Success Text Second Example",
        "onInstall": {
          "log": "success Text Second Example"
        },
        "success": "https://github.com/jelastic-jps/lets-encrypt/raw/master/README.md"
      }
      

As it was mentioned above, the success response is distinguished between two values:

  • text displayed at the dashboard after installation is successfully conducted

    type: update
    name: Success Text Second Example
    
    onInstall:
      log: success Text Second Example
    
    success:
      text: https://github.com/jelastic-jps/lets-encrypt/raw/master/README.md
    
    {
      "type": "update",
      "name": "Success Text Second Example",
      "onInstall": {
        "log": "success Text Second Example"
      },
      "success": {
        "text": "https://github.com/jelastic-jps/lets-encrypt/raw/master/README.md"
      }
    }
    
- message delivered via email notifying about the successful installation
    type: update
    name: Success Text Test 4
    baseUrl: https://github.com/jelastic-jps/lets-encrypt
    
    onInstall:
      log: success text test 4
    
    success:
      email: README.md
      text:
        en: README.md
        ru: https://github.com/jelastic-jps/lets-encrypt/blob/master/README.md
    
    {
      "type": "update",
      "name": "Success Text Test 4",
      "baseUrl": "https://github.com/jelastic-jps/lets-encrypt",
      "onInstall": {
        "log": "success text test 4"
      },
      "success": {
        "email": "README.md",
        "text": {
          "en": "README.md",
          "ru": "https://github.com/jelastic-jps/lets-encrypt/blob/master/README.md"
        }
      }
    }
    

A email notification also can be customized in custom responses. In this case an email value from handle custom response has a highier priority. For example:

    type: update
    name: Success Text Customization
    
    onInstall:
      return:
        result: success
        email: Custom email response text
    
    success: success!!
    
    {
      "type": "update",
      "name": "Success Text Customization",
      "onInstall": {
        "return": {
          "result": "success",
          "email": "Custom email response text"
        }
      },
      "success": "success!!"
    }
    

In the last example above, the localization functionality is applied, which depends upon the Jelastic Platform selected language.

A custom responses can be return within return or script actions. More details about custom responses here.

Markdown Description

Markdown is a light language with plain text formatting syntax. This language is supported by Cloud Scripting technology to describe a description, success texts or showing custom response texts.
Cloud Scripting uses CommonMark implementation to convert Markdown syntax into html code.

Emphasis

Markdown treats underscores and asterisks to emphase text. Wrapped text with one * or _ will be wrapped with HTML <em> tag and double *'s or _'s will be wrapped with HTML <strong> tag.

emphasis

    type: update
    name: Emphasis
    description: |
      *Italic* or _Italic_
    
      **Bolt** or __Bolt__
    
    {
        "type": "update",
        "name": "Emphasis",
        "description": "*Italic* or _Italic_\n\n**Bolt** or __Bolt__\n"
    }
    

Headers

Cloud Scripting Markdown supports two styles headers:

  • setex-style headers are two headers (first and second levels) using "underlined" signs like in examples below:

    This is a H1 
    ============
    This is a H2
    ------------
    

  • atx-style headers support 1-6 levels

    # This is H1
    ## This is H2
    ##### This is H6
    

Markdown supports two link styles - inline and reference. Both styles use [square brackets].

markdown_links

    type: update
    name: Links
    description: |
      [jelastic.com URL](https://jelastic.com)
    
      or
    
      [jelastic.com URL][1]
    
      [1]: https://jelastic.com
    
    {
        "type": "update",
        "name": "Links",
        "description": "[jelastic.com URL](https://jelastic.com)\n\nor\n\n[jelastic.com URL][1]\n\n[1]: https://jelastic.com\n"
    }
    

Images

Markdown image syntax is resemble a link and also allowing in two styles: inline and reference. A difference between them is a symbol !.

markdown_images

    type: update
    name: Images
    description: |
      ![Jelastic](/img/log-jelastic.png)
      or
      ![Jelastic][1]
    
      [1]: /img/log-jelastic.png
    
    {
        "type": "update",
        "name": "Images",
        "description": "![Jelastic](https://jelastic.com/assets/img/favicon-32x32.ico)\nor\n![Jelastic][1]\n\n[1]: https://jelastic.com/assets/img/favicon-32x32.ico\n"
    }
    

Blockquotes

This is an email-style characters >. Blockquotes can be inserted at the beginning of each line or can wrapped a full paragraph.

blockquote

    type: update
    name: Markdown blockquote
    description: |
        > Blockquote
    
    {
        "type": "update",
        "name": "Markdown blockquote",
        "description": "> Blockquote\n"
    }
    

    type: update
    name: Markdown blockquote
    description: |
        > multiline 
        blockquote
    
    {
        "type": "update",
        "name": "Markdown blockquote",
        "description": "> multiline \nblockquote\n"
    }
    

Blockquotes can be nested in each others by additional level or >:

markdown_nested_blockquote

    type: update
    name: Markdown blockquote
    description: |
      > example
      > > blockquote
    
    {
        "type": "update",
        "name": "Markdown blockquote",
        "description": "> example\n> > blockquote\n"
    }
    

Paragraph

A simple line text or consecutive lines of text. Lines is separated by one or more blank lines.

A paragraph.

A paragraph after 1 blank line.  

Lists

It is a buletted and numbered lists.
Bulleted lists can be defined with symbols * or - or +.

markdown_lists

    type: update
    name: Markdown Lists
    description: |
      * List
      * List
      * List
    
      or
      - List
      - List
      - List
    
      or
        + List
        + List
        + List
    
    {
        "type": "update",
        "name": "Markdown Lists",
        "description": "* List\n* List\n* List\nor\n- List\n- List\n- List\n"
    }
    

Ordered lisrs with numbers have two modes:

markdown_lists2

    type: update
    name: Markdown Lists
    description: |
      1. List
      2. List
      3. List
    
      or
      1) List
      2) List
      3) List
    
    {
        "type": "update",
        "name": "Markdown Lists",
        "description": "1. List\n2. List\n3. List\n\nor\n1) List\n2) List\n3) List\n"
    }
    

Horizontal Rule

Horizontal rule is a horizontal line (<hr />), can be placed by symbols *, -. A minimum required symbols number is three.

markdown_rule

    type: update
    name: Markdown Horizontal Rule
    description: |
      ---
    
      or
      ***
    
    {
        "type": "update",
        "name": "Markdown Lists",
        "description": "---\n\nor\n***\n"
    }
    

Inline code

Indicates a line of code with html tag <code>. Markdown symbol is backtick quotes `.

markdown_code

    type: update
    name: Markdown Inline code
    description: |
      `Inline code` with backticks
    
    {
        "type": "update",
        "name": "Markdown Lists",
        "description": "`Inline code` with backticks\n"
    }
    

Code block

Multiline code block. Makrdown tag symbol is three backtick quotes at the beginning and at the end of code block - ``` ```

markdown_code_block

    type: update
    name: Markdown Lists
    description: |
      ```
      # code block
      print '3 backticks or'
      print 'indent 4 spaces'
      ```
    
    {
        "type": "update",
        "name": "Markdown Code block",
        "description": "```\n# code block\nprint '3 backticks or'\nprint 'indent 4 spaces'\n```\n"
    }
    

Mode details about Markdown implementation can be find in CommonMark specification - CommonMark.


What's next?