<< Click to Display Table of Contents >> Web Browser Interface |
![]() ![]() ![]() |
This interface allows to define your own line commands for any display and specify links to be opened in the default web browser. Values of all available columns of the display can be added as URL parameters.
[web_link_ln_cmd]
DSPLTU4R.1.NAME = "Open in BetaUX"
DSPLTU4R.1.LINK_BASE = "http://some.address?logsource=UC4&favid=YourFavId&"
DSPLTU4R.1.LINK_PARM.systemname = "System"
DSPLTU4R.1.LINK_PARM.runnumber = "Run Number"
DSPLTU4R.1.LINK_PARM.startdate = TIME("Start-Time", "DD.MM.YYYY")
DSPLTU4R.1.LINK_PARM.starttime = TIME("Start-Time", "HH:II:SS")
When the above option is specified in the INI file then whenever DSPLTU4R display is opened (Scheduler/Automic/Run-Data/Runtimes) then Open in BetaUX line command is added to the standard commands of that display.
When the command is selected, then the URL is constructed from its constant part (defined by LINK_BASE option) and then required columns of the table that are in the current table row are added to the URL.
Values of these parameters are URL-encoded, so they can contain any text.
Names of parameters in the URL are always in lower case.
As a value you can use:
•a column name in quotes - it must exactly match the one you can see in a header of the table.
•a function that converts the column's value to the desired format. Currently these functions are available:
i.TIME - extracts DATE/TIME information from the value.
Its first parameter must equal a name of a table column that contains date/time/timestamp value.
Its second parameter is a format string.
In the result of the function all special letters of the format string are replaced with date/time components of the current value. Other characters of the format string are preserved. You can use the following special placeholders:
YYYY - Year coded on 4 positions
YY - Year coded on 2 positions
MM - Month (2 positions with leading zeroes)
DD - Day (2 positions with leading zeroes)
HH - Hour (2 positions with leading zeroes)
II - Minute (2 positions with leading zeroes)
SS - Second (2 positions with leading zeroes)
ii.SUBSTR - extracts a part of the value.
Its first parameter must equal a name of a table column.
Its second parameter is a position where the output value should start (1-based).
Its third (optional) parameter is the count of letters returned. If not specified then the whole string starting from the start position is returned.
In case of the example above the link can look like this:
http://some.address/?logsource=UC4&favid=YourFavId&runnumber=0001715240
&startdate=04.12.2019&starttime=01%3a00%3a31&systemname=V12PROD
The URL starts with the value specified by LINK_BASE option and it contains 4 parameters from the current data row:
•runnumber ("Run Number" column)
•startdate (date part of "Start-Time" column in DD.MM.YYYY format)
•starttime (time part of 'Start-Time" column in HH:II:SS format)
•systemname ("System" column).
The number 1 which is used INI definition just after the display name is necessary. If you want to add more line commands for the same display then increase it by one for each of them.
The number of web line commands for each display is not limited.
It is also possible to show the link only for some TCP file. In this case code TCP_FILE option in the INI. This example displays the link only when P391DX TCP file is selecetd:
[web_link_ln_cmd]
DSPLTU4R.1.NAME = "Open in BetaUX"
DSPLTU4R.1.TCP_FILE = "P391DX"
DSPLTU4R.1.LINK_BASE = "http://some.address?logsource=UC4&favid=YourFavId&"
DSPLTU4R.1.LINK_PARM.systemname = "System"
DSPLTU4R.1.LINK_PARM.runnumber = "Run Number"
DSPLTU4R.1.LINK_PARM.startdate = TIME("Start-Time", "DD.MM.YYYY")
DSPLTU4R.1.LINK_PARM.starttime = TIME("Start-Time", "HH:II:SS")
You can also add variables directly in the link base. In this case variables must be in ${VarName} format. Example:
[web_link_ln_cmd]
DSPLTJOB.1.LINK_BASE = "http://some.address/${Jobname}/${Account}/"
Here ${Jobname} is replaced with the value in Jobname column and ${Account} with the value in Account column.
Web Browser Interface also allows you to define line commands that start Windows programs.
Example:
[web_link_ln_cmd]
DSPLTU4R.1.NAME = "Test executable"
DSPLTU4R.1.LINK_BASE = "TestParm.exe -thereIsSomeOption -data "There is Another one""
DSPLTU4R.1.LINK_PARM./flag1 = NULL
DSPLTU4R.1.LINK_PARM.-flag2 = "SomeValue"
DSPLTU4R.1.LINK_PARM.systemname = "System"
DSPLTU4R.1.LINK_PARM.runnumber = "Run Number"
DSPLTU4R.1.LINK_PARM.startdate = TIME("Start-Time", "DD.MM.YYYY")
DSPLTU4R.1.LINK_PARM.starttime = TIME("Start-Time", "HH:II:SS")
DSPLTU4R.2.NAME = "Test PS"
DSPLTU4R.2.LINK_BASE = "powershell.exe -file C:\Test\test.ps1 -NoExit -StringParameter"
DSPLTU4R.2.LINK_PARM.systemname = "System"
DSPLTU4R.2.LINK_PARM.runnumber = "Run Number"
1.The first command has "Test executable" title and starts TestParm.exe program. You can specify parameters either in the LINK_BASE (see -thereIsSomeOption, -data and "There is Another one") or you can append additional parameters via LINK_PARM.
When you need to specify only a flag without a value, you should use the syntax used for /flag1. In this case the text entered after 'LINK_PARM.' is appended to the command (in this case /flag1). As a Value you must specify NULL.
If you need to add a parameter having both a name and a value, you can use the syntax of -flag2 parameter. In this case it appends -flag2="SomeValue".
Remaining parameters are obtained the same way as when a web page is opened. You must specify a parameter name appended to the command line and a label of a column from which you want to extract the value. In this example 4 parameters with data of the current table row are appended to the command line:
▪systemname with a value of System column
▪runnumber with a value of Run Number column
▪startdate with a value of Start-Time column formatted as DD.MM.YYYY (it extracts the date part of the timestamp)
▪starttime with a value of Start-Time column formatted as HH:II:SS (it extracts the time part of the timestamp)
2.The second command has "Test PS" title and starts PowerShell.
The command starts with the string entered in LINK_BASE and is followed by additional parameters:
▪systemname with a value of System column
▪runnumber with a value of Run Number column
Note:
If you specify a parameter name and value in LINK_PARM, then the program first tries to locate the data column having the label equal to the value of the parameter. If such a column is found then its real value is used. If it is not found then the value coded in INI is used.