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 a script, that will fetch default field valuesfields
- array of fields that will be displayed in a custom formshowIf
- shows/hides field by condition (applicable only to radio-fieldset field)type
[optional] - input field type. The default value is 'string'. Possible values:string
- basic text fieldtext
- multiline text fieldlist
- drop-down menu with textboxescheckbox
- single checkbox fieldradiolist
- radio field groupingradio-fieldset
- alias toradiolist
dockertags
- drop-down menu with a list of docker tagscompositefield
- component that comprises any available fieldslider
- slider element as a form fieldenvlist
- list of environments available for a corresponding accountregionlist
- drop-down menu with a regions listpopupselector
- new pop-up window via POST request with possibility to pass additional parameterspopup-selector
- alias topopupselector
displayfield
- text field intended for displaying textspacer
- alias todisplayfield
spinner
- input field for entering numeric valuesnumberpicker
- field to select a number within a rangenumber-picker
- alias tonumberpicker
hostpicker
- drop-down menu with environment hostshost-picker
- alias tohostpicker
toggle
- switcher between two 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 type attribute.name
- input field name, that can be used to get a parameter value through the${settings.your_input_name}
placeholder within scripts or manifestsdefault
[optional] - default value for the input fieldcaption
[optional] - field labelplaceholder
[optional] - used placeholdersrequired
[optional] - possible values are 'true' & 'false'. If left empty, default value is 'true'.regex
[optional] - constructor for testing JavaScript RegExp object that refers to the field value, during validation. If test fails, the field will be marked as invalid using regexText. The default value is 'null'.regexText
[optional] - displays error message in case of 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 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¶
Basic text field.
fields:
- hideLabel: false
type: string
caption: string
name: customString
{
"fields": [
{
"hideLabel": false,
"type": "string",
"caption": "string",
"name": "customString"
}
]
}
where:
caption
[optional] - field labelhideLabel
[optional] [boolean] - shows/hides field label. Default value is 'false'.
text¶
Multiline text field.
fields:
- type: text
caption: string
hideLabel: false
{
"fields": [
{
"type": "string",
"caption": "string",
"hideLabel": false
}
]
}
where:
caption
[optional] - field labelhideLabel
[optional] [boolean] - hides field label. Default value is 'false'.
list¶
Drop-down list and a single-line textbox.
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 labelvalues
- objects values ("key":"value")hideLabel
[optional] [boolean] - shows/hides field label. Default value is 'false'.editable
[optional][boolean] - allows to input custom values. Default value is 'false'.
checkbox¶
Single checkbox field.
fields:
- type: checkbox
caption: string
value: true
hideLabel: false
{
"fields": [
{
"type": "checkbox",
"caption": "string",
"value": true,
"hideLabel": false
}
]
}
where:
caption
[optional] - field labelvalue
- enables or disables checkboxhideLabel
[optional][boolean] - shows/hides field label. Default value is 'false'.
radiolist¶
Radio elements grouping.
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 labelvalues
- checkboxes ("key":"value")hideLabel
[optional][boolean] - shows/hides field label. Default value is 'false'.
radio-fieldset¶
Grouping of the radio elements with showIf function.
Note
The hideLabel boolean is always true for this field.
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 formvalues
- 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. Default value is 'false'.caption
[optional] - field label
Also there is an ability to set an values
order. It needs to be defined like an array of objects.
For example:
values:
- value: 1
caption: hello
- value: 2
caption: world
{
"values": [
{
"value": 1,
"caption": "hello"
},
{
"value": 2,
"caption": "world"
}
]
}
dockertag¶
Field for displaying Docker tags within the list element.
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' valuevalues
[required] - Docker tag values (name: "tag_name" is required). By default, Docker image is pulled from the Docker Hub registry.dockerImage
- Docker image detailsname
- repository is requiredregistry
,username
,password
[optional]env
- required object (can be empty)
compositefield¶
Compositefield is a container with specific functionality and structural components that constitute it as a block for application-oriented custom user interfaces.
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. Default value is 'start'. Possible values: 'start', 'center' and 'end'.align
[optional] - manages the way items are aligned. Default value is 'top'. Possible values: 'top', 'middle', 'stretch', 'stretchmax'.defaultMargins
[optional] - default margins for items. Default value is '0'.defaultPadding
[optional] - default paddings for items. Default value is '0'.defaultFlex
[optional] - horizontal flex for itemsitems
- elements
slider¶
Slider element as a form field.
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 valuemax
- maximum slider valueuseTips
- displaying tips for the value. Default value is 'true'.caption
[optional] - field labelname
[optional] - name of the field
envlist¶
Account environments list expanded within a drop-down element.
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 labelname
[optional] - name of the fieldeditable
[optional][boolean] - enables/disables the envlist field editing. Default value is 'false'.valueField
[optional][string] - value from environment information, which will be sent to a server. 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
regionlist¶
An available region list for a current account where new environments can be installed.
fields:
- caption: Second Env Region
type: regionlist
name: secondRegion
disableInactive: true
selectFirstAvailable: true
message: unavailable region
filter:
type: ["vz6", "vz7"]
name: .*-eu
uniqueName: String
displayName: Default Region
domain: default_domain.com
isEnabled: true
isDefault: true
isActive: true
isRegionMigrationAllowed: true
region: 1
{
"fields": [
{
"caption": "Second Env Region",
"type": "regionlist",
"name": "secondRegion",
"disableInactive": true,
"selectFirstAvailable": true,
"message": "unavailable region",
"filter": {
"type": [
"vz6",
"vz7"
],
"name": ".*-eu",
"uniqueName": "default_region",
"displayName": "Default Region",
"domain": "default_domain.com",
"isEnabled": true,
"isDefault": true,
"isActive": true,
"isRegionMigrationAllowed": true,
"region": 1
}
}
]
}
where:
caption
[optional] - field labelname
- name of the fielddisableInactive
[boolean] - an ability to chose inactive regions in combo. The default value is 'true'selectFirstAvailable
- displaying a first available region in combomessage
[optional] [string] - text to display after hover on disabled regions on expanded combofilter
*[optional]:type
- filtering regions by virtualization types in combo [possible options: PVC, PCS_STORAGE, VZ6, VZ7],vzTypes
is an alias.vzTypes
- virtualization typesname
[string] - filtering regions by name, name's part or expressions.uniqueName
is an aliasuniqueName
[string] - region unique name filteringdisplayName
[string] - filtering by region display namedomain
[string] - filtering by region domainisEnabled
[boolean] - show only enabled regionsisDefault
[boolean] - display only default regionisActive
[boolean] - only active regions will be available in comboisRegionMigrationAllowed
[boolean] - display regions where migration is allowedregion
[number] - filtering by region identifier
popupselector¶
(popup-selector is an alias)
Field for opening a pop-up window via POST request to any external service. It provides a possibility to pass additional parameters.
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 labelname
[optional] - name of the fieldbuttonText
[optional] - button labelurl
[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 pixelspopupHeight
[optional] - height in pixelspopupCallbackEvent
- event handlerparams
- parameters for sending in POST request to URL sourcevalue
- 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 the example above, the external source should return 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 the example below:
http://{Jelastic_Platform_URL} + "fireevent?event=click&value=hello"
where:
Jelastic_Platform_URL
- Jelastic Dashboard URL where manifest is executedclick
- event name which is handled in manifest inpopupCallbackEvent
parametervalue
- type is string. Thetextfield
will be filled by it when button "Open" will be applied.
displayfield¶
(spacer is an alias)
Text field intended only for not validated and not submitted display.
fields:
- caption: Displayfield
type: displayfield
name: displayfield
markup: display
{
"fields": [
{
"caption": "Displayfield",
"type": "displayfield",
"name": "displayfield",
"markup": "display"
}
]
}
where:
caption
[optional] - field labelname
[optional] - name of the fieldmarkup
- value to initialize the field's display. Default value is 'undefined'.
spinner¶
Enhanced input field for entering numeric values, with up/down buttons and arrow keys handling.
fields:
- type: spinner
name: spinner
caption: Spinner
min: 1
max: 10
increment: 2
decimalPrecision: ''
{
"fields": [
{
"type": "spinner",
"name": "spinner",
"caption": "Spinner",
"min": 1,
"max": 10,
"increment": 2,
"decimalPrecision": ""
}
]
}
where:
name
[optional] - name of the fieldcaption
[optional] - field labelmin
- minimum spinner valuemax
- maximum spinner valueincrement
- increment valuedecimalPrecision
- precision value
numberpicker¶
(number-picker is an alias)
Field that enables to select a number from a predefined range.
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 fieldcaption
[optional] - field labelmin
- minimum spinner valuemax
- maximum spinner valueeditable
[optional] [boolean] - enables/disables editing the numberpicker field. Default value is 'false'.
hostpicker¶
(host-picker is an alias)
Drop-down menu with environments hosts.
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 fieldcaption
[optional] - field labeleditable
[optional] [boolean] - enables/disables editing the envlist field. Default value is 'false'.valueField
[optional][string] - value from environment information, which will be sent to a server. 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¶
Toggle element is a switch between two values.
fields:
- type: toggle
name: toggle
caption: Toggle
value: true
{
"fields": [
{
"type": "toggle",
"name": "toggle",
"caption": "Toggle",
"value": true
}
]
}
where:
name
[optional] - name of the fieldcaption
[optional] - field labelvalue
[boolean] - enables/disables toggle value. Default value is 'false'.
Dynamic filling of the manifest fields¶
Ability to dynamically determine UI in JPS manifest is accessible via onBeforeInit onBeforeInstall events.
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.
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.
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.
By default, this menu contains the Uninstall button. The rest of listed actions, if there are any, executes 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.
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¶
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.
Such buttons execute operations that are predefined within a JPS manifest.
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
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://example.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://example.com/"
}
]
}
where:
buttons
- button parameters arrayconfirmText
[optional] - custom confirmation text for users. Default value is 'Are you sure?'.
It will be displayed after clicking the appropriate button for an add-on. According to the code above, the text will be the following.
loadingText
[optional] - UI text to be displayed during loading and applying changes. Default value is 'Applying...'.
action
[required] [string] - name of the custom action that will be executed. Custom action body structure is described in the actions section.caption
- title of the button
successText
- message that appears once action is successfully performed
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. Default is 'main'.title
- custom dialog title. If absent, caption will be applied.submitButtonText
- text for submission button in the opened dialog. Default value is 'Apply'.
logsPath
- path to a log file that is accessible via the Show Logs button
logsNodeGroup
- nodeGroup layer the logging path should be opened for
Custom Settings¶
Settings section can include a few custom forms. 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.
config settings form appears after clicking the Configure button within the Add-ons section.
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 as plain text or 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/blob/master/ 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 an 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"
}
}
}
Email notification also can be customized in custom responses. In this case email
value from handle custom response has a higher 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.
Custom responses can be returned 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 show custom response
texts.
Cloud Scripting uses CommonMark implementation to convert Markdown syntax into html code.
Therefore, there is a main supported Markdown tag list:
Style 1 | Style 2 | Result |
---|---|---|
*Italic* | _Italic_ | Italic |
**Bold** | __Bold__ | Bold |
# Heading 1 | Heading 1 ========= |
Heading 1 |
## Heading 2 | Heading 2 ------------ |
Heading 2 |
[Link](https://jelastic.com) | [Link][1] . . . [1]: https://jelastic.com |
jelastic.com URL |
 | ![Image][1] . . . [1]: https://example.com/logo.png |
![]() |
> Blockquote | ![]() |
|
A paragraph. A paragraph after 1 blank line. |
A paragraph. A paragraph after 1 blank line. |
|
* List * List |
- List - List |
* List * List |
1. One 2. Two 3. Three |
1) One 2) Two 3) Three |
1. One 2. Two 3. Three |
Horizontal Rule --- |
Horizontal Rule *** |
Horizontal Rule![]() |
``Inline code`` with backticks | ![]() |
|
``` print '3 backticks or3 tildes' ``` |
~~~~ print '3 backticks or 3 tildes' ~~~~ |
![]() |
The elements visualization can be found on the screen below:
Source code for each of these elements is displayed below:
type: update
name: Markdown tags
description: |
*Italic* or _Italic_
**Bold** or __Bold__
# This is H1
## This is H2
##### This is H6
[jelastic.com URL](https://jelastic.com)

> Blockquote
* List
---
`Inline code` with backticks
```
# code block
print '3 backticks or'
print 'indent 4 spaces'
```
{
"type": "update",
"name": "Markdown tags",
"description": "*Italic* or _Italic_ \n**Bold** or __Bold__ \n\n# This is H1 \n## This is H2 \n##### This is H6 \n\n[jelastic.com URL](https://jelastic.com) \n\n \n\n> Blockquote \n\n* List \n\n--- \n\n`Inline code` with backticks \n\n```\n# code block\nprint '3 backticks or'\nprint 'indent 4 spaces'\n```\n"
}
More details about Markdown implementation can be found in CommonMark specification - CommonMark.
What's next?
-
Examine a bunch of Samples with operation and package examples
-
See Troubleshooting for helpful tips and specific suggestions
-
Read Realese Notes to find out about the recent CS improvements
-
Find out the correspondence between CS & Jelastic Versions