Web¶
Web Properties¶
This document contains a list of configurable properties for the AMI web component. To run AMI web, make sure that it is included in your ami.components
property:
License¶
-
Default:
/f1license.txt
- The file containing your AMI license.
-
Default:
false
- Hide the Help -> Enter/Update License menu item, even when not in developer mode.
-
Default:
https://3forge.com
- The URL for connecting to 3forge's server and generating license keys via Help -> Enter/Update License.
-
Default:
30
- The number of days prior to a valid license expiring that a warning message will start appearing on the login page.
-
Default:
amione
- The path to your
f1license.txt
file.
- The path to your
HTTP/HTTPS Connection¶
-
Default:
33332
- Sets the port that web browsers use to connect to AMI Web.
-
Default: Optional
- Sets the port that web browsers use to connect securely to AMI Web.
-
Default: Optional
- Path to the keystore file (using Oracle keytool).
-
Default: Optional
- Password associated to the keystore file.
-
Default:
100
- The maximum number of concurrent http connections (for preventing DOS attacks).
-
Default:
off
(Optional)- Debug options for web:
off
on
verbose
- Debug options for web:
-
Default:
10240
(Optional)- Max number of bytes to store debug data if using
verbose
.
- Max number of bytes to store debug data if using
-
Default:
30000
- The number of milliseconds before an idle http connection is closed.
-
Default: Optional
- Specifies the network interface that the
http.port
server port will be bound to.
- Specifies the network interface that the
-
Default: Optional
- Specifies the network interface that the
https.port
server port will be bound to.
- Specifies the network interface that the
-
Default: Optional
- Provide either a list of permitted hostname patterns, or a plugin for blocking/granting access based on foreign network address.
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\>
- text:
text:<newline_delimited_list_of_hostname_patterns>
- plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
-
Default: Optional
- Provide either a list of permitted hostname patterns, or a plugin for blocking/granting access based on foreign network address.
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\>
- text:
text:<newline_delimited_list_of_hostname_patterns>
- plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
Session Options¶
-
Default:
F1SESSION
- Name of the cookie to store in the web browser for the sessionid.
- If multiple AMI instances are sharing a host then each must have a unique cookie name.
-
Default: Optional
- Path to directory for web-server hosted resources.
- Accessed via the front end in Dashboard -> Resource Manager.
-
Default:
"60 SECONDS"
Optional- Time in seconds that a resource can be valid in the cache for before expiring.
-
Default:
10
- Time in seconds before an attempt to access a resource times out.
-
Default:
60
- The number of seconds between which AMI checks and removes expired sessions (disconnects, closed browsers, etc).
-
Default:
300
- The number of seconds that must pass before a session is considered expired, thus logging the user out.
-
Default:
true
(Optional)-
Allow the AMI webpage to be framed inside an iframe.
-
If false, then x-Frame-Options and SameSite options are included in header.
-
-
Default: Optional
- Declare a readonly variable available in the web.
- The value must be properly formatted to indicate the type.
-
You can see variables via Dashboard > Session Variables, e.g:
amiscript.variable.hello="world" //declare the string hello with value "world"
amiscript.variable.num=123L //declare a long named "num"
-
You can access variables with
session.getPropety("yourPropertyName")
or by referencing the variable directlyyourPropertyName
. Note that the first approach will returnnull
if the property isn't set, the second will throw an error.
-
Default:
off
(Optional)off
indicates the access.txt file is plain text.- Can be set to
password
which indicates that the password portion must be encrypted. See strEncrypt(...) function for encrypting passwords.
-
Default: Optional
- Comma delimted list of centers'
host:port
to connect to. - You can optionally prefix a
host:port
with an alias in the formalias=host:port
, in which case the alias will be used to reference the center within the dashboard. - Note, the first supplied URL is considered the primary center. e.g:
ami.centers=myprimary=localhost:3270,other=some.host.com:3270
- Comma delimted list of centers'
-
Default: Optional
- Supply if center is using an SSL connection.
- Path to the keystore file (using Oracle keytool).
NAME
is the center name as it appears inami.centers
property.
-
Default: Optional
- Alternative to supplying the keystore file if center is using an SSL connection.
- The contents of the keystore as a base64.
NAME
is the center name as it appears inami.centers
property.
-
Default:
- Supply if center is using an SSL connection.
- Password associated with the key store file.
NAME
is the center name as it appears inami.centers
property.
-
Default:
5000
- Log a warning if a full round trip http request/response is greater than the specified duration in milliseconds.
-
Default:
2000
- Duration in milliseconds before displaying the loading/waiting icon.
-
Default:
1000
- Log a warning if an amiscript block can not be executed the specified duration in milliseconds.
-
Default: Optional
- Title on the portal dialog header (i.e. loading and error dialogs).
Developer Options¶
-
Default:
data/autosave
- Directory where autosaved versions of the layout are saved.
-
Default:
100
(Optional)- The minimum number of backup revisions of layouts that should be saved per user.
-
Default:
"15 MINUTES"
- How often in minutes layouts should be automatically saved to the backup log file.
-
Default:
100
- Maximum number of debug/info messages to store for debugging purposes in edit mode.
-
Default:
100
- Maximum number of warming messages to store for debugging purposes in edit mode.
Login Options¶
-
Default:
true
- Boolean indicating if login page should display animated background.
- Recommended to set to false if used on remote desktops.
-
Default: Optional
- File to include in the login page, requiring user to acknowledge the terms and conditions before logging in.
-
Default:
demo
- Default username for logging into AMI.
-
Default:
demo123
- Default password for logging into AMI.
-
Default: Optional
- Path to file containing image for login in login screen.
- Image will be scaled to a pixel width and height of 350x200.
-
Default:
WARNING: License Expires soon:
- Message shown if no license file is given.
-
Default:
Session limit reached, please choose a current session below
- Message displayed if the maximum number of sessions is exceeded (browsers of AMI open).
-
Default:
3forge AMI
- Name of the AMI tab in the browser.
-
Default: Optional
- Suffix added to the login page tab's title as viewed in the browser.
- Appended to "3forge -".
- Default:
"support@3forge.com?subject=Ami Account Request"
- The email address for contacting support on a login issue, or to create a new account. -
Default:
3forge AMI
- Name of the web browser tab.
-
Default:
rsc/favicon.ico
- The icon to put in the tab.
- The default is the 3forge logo.
-
Default: Optional
- Information to show on the splashscreen (rendered as html).
-
Default:
1
- Maximum number of sessions allowed per cookie.
- Each AMI instance will have one cookie that is shared across different sessions of AMI in the same browser, unless incognito mode is used or supplied a different cookie file.
Plugins¶
-
Default: Optional
- Class name of the custom authenticator plugin.
- Must implement the
AmiAuthenticatorPlugin
interface and be deposited in the plugin directory (amione/lib
). - More information on implementation can be found here
-
Default: Optional
- A comma-delimited list of classes to include for access within AmiScript.
- See the custom class documentation for more details on implementation.
- Default:
data/styles/*.amistyle.json
- Comma-delimited list of files (wildcards supported) which containA AMI styles. - See Menu -> Dashboard -> Style Manager within AMI. - Default:
mapbox
- Comma-delimited list of custom panel type configurations.
5000
- Amount of time in milliseconds before AMI assumes the authentication plugin has timed out.
-
Default: Optional
- Class name of custom data filter used to restrict data access.
- Must implement the
AmiWebDataFilterPlugin
interface and be deposited in the plugin directory (amione/lib
). - See the data filter documentation on how to implement.
-
Default: Optional
- A comma-delimited list of class names implementing the
AmiWebGuiServicePlugin
interface. - For more information on implementation, see custom panels and Javascript.
- A comma-delimited list of class names implementing the
-
Default:
*
- Control which origins are accepted in AMI Remote Procedure Calling (RPC).
- Please refer to the Mozilla documentation on CORS
Layout and User Files¶
-
Default:
./data/access.txt
- Location of the
access.txt
file. - See User Parameters section below.
- Location of the
-
Default:
data/users
- Directory containing the
.ami_settings
user files and the user preference files.
- Directory containing the
-
Default:
config//../data/shared
- Base directory of where shared layouts are stored (layouts available to end non-dev users).
-
Default:
data/cloud
- Base directory of the AMI One root installation's cloud directory.
- Layouts and user settings saved to the cloud will be stored in this directory.
-
Default: DEPRECATED -- use
ami.web.default.layout
- This has been deprecated. See the deprecated layout properties for more information.
-
Default:
./data/fonts/*.ttf
- A list of true type font files (.ttf) to load which will be available for use in dashboards.
- May include wild cards, e.g:
my/fonts/*.ttf
-
Default:
Arial,Courier,Georgia,Impact,Lucida,Times New Roman,Verdana,Segoe UI
- A list of font family names that are assumed to be available in the browser.
- To supply your own
.ttf
file of one of these fonts, or override it, you need remove to remove the font family from the property.
-
Default: Optional
- Optional location for where to access webmanager, used for remotely loading files.
- If not specified, the local file system is used.
-
Default: Optional
- Optional location for where to access webmanager.
- Used for remotely loading files.
-
Default: Optional
- A comma-delimited list of layout names that are accessible for all users (non-dev and non-admin).
- Stored in the
data/cloud
directory of the AMI One root installation unless otherwise specified. -
If otherwise specified, the file must be supplied as either
ABSOLUTE
,LOCAL
,CLOUD
, orSHARED
:- e.g:
ABSOLUTE:path/to/layout1.ami,ABSOLUTE:...
- e.g:
-
Default: Optional
- The default layout loaded on login.
- Stored in the
data/cloud
directory of the AMI One root installation unless otherwise specified. -
If otherwise specified, the file must be supplied as either
ABSOLUTE
,LOCAL
,CLOUD
, orSHARED
:- e.g:
ABSOLUTE:path/to/default_layout.ami
- e.g:
Default layout¶
The default layout refers to the layout loaded when a given user logs in. Each property has a set priority level ranging from 0 (highest priorty) and higher (lower priority). For example, the property ami.web.default.DEFAULT_LAYOUT
has a priority of 0, so all other properties will be ignored.
ami.web.default.DEFAULT_LAYOUT
: PRIORITY 0ami.web.default.layout
: PRIORITY 1The user's <ami_layout_shared> in access.txt
: PRIORITY 2ami.web.default.layout.shared
: PRIORITY 3 (deprecated)
Note
Using ami.web.default.layout.shared
in conjunction with ami.shared.layouts.dir=path/to/dir
will load a specific layout to every user who logs in, regardless of if they are present in access.txt
, or if using an authenticator plugin.
The properties above will apply for all users in access.txt
.
To specify the default layout for specific users via access.txt
, you can supply the filename of the layout using the DEFAULT_LAYOUT
flag. This corresponds to the property ami.web.default.DEFAULT_LAYOUT
.
For example:
This access.txt
file determines that user1
's default layout is the file user1_defaultLayout.ami
. The user user2
's default layout is user2_defaultLayout.ami
.
Deprecated¶
These properties previously determined which layouts were loaded on login. We suggest that you implement a custom entitlements plugin instead, however the property ami.web.default.layout
can be used if needed.
We generally do not recommend this as it is likely to be deprecated in the future.
-
Default: Optional (not recommended)
- Name of the layout's file name, supplied as
SHARED:default_layout.ami
. - If specified, then any users that login will be automatically assigned to the specified layout and developer/admin mode will not be available.
- Location for where layouts are stored in the location determined by the property
ami.shared.layouts.dir
.
- Name of the layout's file name, supplied as
-
Default: DEPRECATED
- Use
ami.web.default.layout
instead.
- Use
-
Default: DEPRECATED
- Use
ami.web.default.ISADMIN
instead.
- Use
End User Behavior¶
User Settings¶
All default user-specific settings can be configured programmatically using ami.default.user.<User Setting Name>
in local.properties. As an example:
sets the default user settings for timezone to be in UTC.
Other properties include:
Property Name(key) | Property Value(value) | Supported Value | Example Usage |
---|---|---|---|
dateFormat |
String, format of date, by default is M/dd/yyyy | [yyyy/MM/dd, MM/dd/yy,...] | ami.default.user.dateFormat=yyyy/MM/dd |
timeFormat |
String, format of date, by default is H:mm | [hh:mm a, h:mm, HH:mm, h:mm a], (if time is 13:30, then H:mm->3:30, h:mm->1:30 PM, HH:mm->13:30, hh:mm a->01:30 PM) | ami.default.user.timeFormat=HH:mm |
numberSeparator |
String, determines on how the number should be separted, by default is 1,234,567,890.123 | [1,234,567,890; 1,234,567,890.123; 1'234'567'890; 1234567890,123; ...] | ami.default.user.numberSeparator=1,234,567,890 |
numberDecimalPrecision |
Integer, number from 0-10, by default is 2 | Integer number from 0-10 | ami.default.user.numberDecimalPrecision=4 |
sciNotDigitsLeft |
Integer, number from 1-20, by default is 1 | Integer number from 1-20, | ami.default.user.sciNotDigitsLeft=4 |
sciNotDigitsRight |
Integer, number from 1-20, by default is 3 | Integer number from 1-20, | ami.default.user.sciNotDigitsRight=5 |
numberNegativeFormat |
String, format of Negative Number. by default is sign, can take either sign or parenthesis | [sign,parentheses] | ami.default.user.numberNegativeFormat=parentheses |
spreadSheetFormatOption |
String, spread sheet formating, by default is always, can take either always or never | [always,never] | ami.default.user.spreadSheetFormatOption=never |
autoApplyUserPrefs |
String, whether or not automatically apply use preferances, by default is ask, can take always,never or ask | [always,never,ask] | ami.default.user.autoApplyUserPrefs=always |
-
Default:
always
- Determines when and which users can view data statistics (under Menu Bar -> Help -> Data Statistics).
- Options are:
always
,never
,dev
,admin
dev
means only available in dev mode.admin
means only available in admin mode.
-
Default:
always
- Determines when and which users can set the fullscreen menu option (under Menu Bar -> Windows -> Full Screen).
- Options are:
always
,never
,dev
,admin
dev
means only available in dev mode.admin
means only available in admin mode.
-
Default:
15.0
- The rate that the web browser is updated with new data.
- This is used to tune the performance of AMI and the user experience.
- We do not recommend a refresh rate of higher than 20 frames per second.
-
Default:
30000
- The number of milliseconds to wait for a response when sending a command to the backend.
-
Default:
180
- The amount of time in seconds before a user is prompted that their request could not be serviced.
-
Default:
true
- If there is no admin user registered, then all users are considered admins (see Menu Bar -> Account -> Manage Users)
- Set to
false
to set up admin privileges for stricter privileges
-
Default:
false
- Assumes that a user is not an admin if not specified in
access.txt
. - Set to
true
to give users admin permissions by default.
- Assumes that a user is not an admin if not specified in
-
Default:
false
- Assumes that a user is not a dev if not specified in
access.txt
. - Set to
true
to give users dev permissions by default.
- Assumes that a user is not a dev if not specified in
-
Default:
false
- Determines whether the current layout appers in the URL parameters.
-
Default: "Frontend encountered unhandled condition"
- Generic error message displayed to users when an exception is not caught by AMI.
-
Default: support@3forge.com
- The email address to send error reports to when a user clicks to report an error.
-
Default: "Support Issue"
- The default subject of the error report email.
-
Default: "Please find details below:"
- The introductory sentence for the error report email.
-
Default: Optional
- Maximum number of options to show in the table filter dialog when right-clicking on a column.
Web Activity Tracking¶
This property allows for actions that happen in the web, such as callback execution or interacting with a window (closing it, hiding it, etc) to be logged.
-
Default:
off
- Options:
on
,off
,verbose
- Options:
If switched on or verbose, then activity is logged only when the web session is in user mode, so either:
- "Editor/Dev" button in web toggled off
-
ami.web.default.ISDEV=false
-
off
: Activity logging is disabled. No actions will be logged: -
on
: Logs are generated in theAmiOne.log
for key actions such as opening or minimizing a window and executing callback scripts. -
verbose
: More detailed log entries are created for each action, including additional contextual data. Example verbose log entries:
Performance¶
-
Default: Optional
- A comma-delimited list of tables (types) to automatically cache real-time inside the webserver.
- Any types that a layout references that are not explicitly listed in this property will require a snapshot request from the AMI Center.
-
Default:
100000
- Determines the number of threads to use for a chart, based on the number of points to render.
-
Default:
10
- Provides a ceiling on total threads that can be used per chart.
-
Default
100
- The total number of threads (across all users) to allocate for chart image processing.
-
Default:
100000
- The number of points before anti-aliasing should be turned off.
- For faster rendering of high density charts.
-
Default:
2
- PNG compression level for images that are transferred to the front end.
- Ranges from 0-10 where 0 = off and 10 = full compression.
-
Default:
15.0
- The rate that the web browser is updated with new data.
- We do not recommend a refresh rate of higher than 20 frames per second.
Style¶
web.loadingbar.styles
: this property takes in a list of key-value pairs. The keys are: dialogBgColor, headerBgColor, stripeColor1, stripeColor2, stripeColor3.
Example usage:
Default Authentication Access File¶
When an authentication plugin is not supplied a configurable "access" file is referenced by default. Note, this should only be used for testing and other non-production purposes due the lack of security, etc. This is where usernames, passwords, default layouts, and user parameters are defined. The access configuration files lives in the directory of the Web application and is named data/access.txt by default. Each line should contain a single user's entry which is pipe (|) delimited. The first entry is the username, 2nd is the password, additional parameters are key=value.
Username: First Param, the username defined is what a user needs to login as.
Password: Second Param, this is the only place that passwords can be set for users.
key=value: Additional parameters. The following keys are supported:
ISDEV=true/false
- Determines if the user should have developer rights, aka should they have the green toggle button in the upper right cornerISADMIN=true/false
- If ISDEV is set to false, then this has no effect. If ISDEV is set to true and ISADMIN is set to true, then dev user can shutdown AMI from the GUI via File -> Shutdown.amiscript.variable.<varname>=value
- Defines a variable in the user session, with the type inferred. For example amiscript.variable.blah=123 creates a variable named blah of type int with the value 123. Alternatively, amiscript.variable.blah="123" would create the variable as a string instead.amivar.<varname>=value
- Deprecated - defines a variable of type string in the user session prefixed with user<dot> For example amivar.blah=123 creates a variable inside user user's session named user.blah with the string value "123"developer_ami_editor_keyboard=vi/default
- For developer mode, should the editor use plain text or vi modeami_layout_shared=default
layout to load (under the directory configured using the ami.shared.layouts.dir property)ami_layout_current=
Current layoutLAYOUTS=
A comma delimited list of regular expressions for layouts that are available to this user. This is only applicable to CLOUD layouts.
User Parameters: parameters can be assigned to a user. These parameters can then be used to modify the user's access to data and inputs.
Example Configuration File
JavaScript¶
In order to allow JavaScript code to be ran from within an HTML panel in a window, this property needs to be set in your local.properties file to allow the code to be recognized:
ami.web.allow.javascript.embedded.in.html
: Boolean indicating if JavaScript is enabled for an HTML panel. False by default for security purposes to prevent Cross-Site Scripting (XSS) attacks, where JavaScript code is inherently removed from all HTML panels. Set to true to enable JavaScript within an HTML panel.