Difference between revisions of "HSL editor"

From Halon, SMTP software for hosting providers
Jump to: navigation, search
(File search)
Line 37: Line 37:
 
The console panel shows all messages generated by the editor. If the console is minimized it will show a badge with the number of log messages unread.
 
The console panel shows all messages generated by the editor. If the console is minimized it will show a badge with the number of log messages unread.
  
== File search ==
+
== Search ==
  
The file search panel searches in all code (currently unsaved on the server side) and shows the line and surround context of each match.
+
The search panel searches in all code (currently saved on the server side) and shows the line with a surround context of each match.

Revision as of 15:32, 8 April 2016

The HSL editor functions as an IDE for the HSL scripting language in order to test and deploy the HSL code.

File listing

The file listing panel list all contexts and scripts available. It also includes some script examples. Some files are marked with an exclamation mark, this means you will not be able to open them for editing until converted into a single code block (This is done on the Mail > Flows and Script > edit page).

Search

The button will open the "Search" panel.

Add

The add button allow you to create new scripts and include files.

Scripting editor

There is one scripting editor windows for each file. Each file work with independently of each other, and one file does not see changes done (eg. using include) until saved.

Save

The save button will save the script to the running configuration. It will also perform syntax checks, any error found may be overridden and saved anyway, however that is not recommended. If you receive a error while saving. Please consult Halon's support team.

Show changes

The show changes button will show changes made in the script in regards to the current running configuration.

Test

The test button will do syntax checks and will show the output in the console.

Run in sandbox

The run in sandbox button will execute the code in a "core language" sandbox (with the pre/post-amble script attached). The pre/post-amble script contains some of the variables and functions needed to simulate the context. Note that all function in the "core language" will be executed (that includes eg. http() calls). In order to setup a working environment uncomment and set the correct value for each variable.

Console

The console panel shows all messages generated by the editor. If the console is minimized it will show a badge with the number of log messages unread.

Search

The search panel searches in all code (currently saved on the server side) and shows the line with a surround context of each match.