Chat now with support
Chat with Support

Foglight 6.1.0 - Web Component Guide

Introducing the Web Component Framework The Web Component Framework Configuring Views and Context Queries Functions Bindings Additional Components

Invoking a Function from a Function

Support is available for invoking a function from the script text of a Script or Script with Map Function, or from a JavaTM Function. This is achieved by using this method of FunctionHelper:

Where:

fqId—Is the Reference ID of the function to invoke. It must not be null.
args—Are the arguments to pass to the function.
A FunctionInvocationException is thrown when there is an error invoking the function.

For Script or Script with Map Functions, this method can be accessed via the functionHelper hidden parameter.

For Java Functions, the Java method for that function must have a parameter of type FunctionHelper, as previously described, so that the invoke method can be accessed via that parameter.

Example script that uses this functionality (where user.foglight.1 is a function that takes two integer inputs):

Invoking a Query from a Function

Support is available for invoking a query from the script text of a Script or Script with Map Function or from a JavaTM Function. This is achieved by using the method FunctionHelper.invokeQuery().

How this method can be accessed and used is the same as the FunctionHelper.invokeFunction() method used for invoking a function from a function (as described in the previous section).

Time Range used for testing a function

When testing a Function through the Web Component Framework’s Function editor, be aware that the time range used by the Web Component Framework to evaluate a Function is a fixed (built-in) time range, which is from Jan 01, 2000 to Now (the time you started your test).

Bindings

This section describes the configurable properties for pages and views. Configurable properties determine which data items actually display in a View. Properties are set at design time. They are typically simple types, such as numerical and string values. The properties for each View are set in its Configuration tab. Examples are a parameterized title, formatting, and the source of its data values or metrics.

Each configurable property has a specified data type. There are simple types and binding types. Simple types are types such as strings or numbers. For example, the font size property is a number. Simple types are typically for formatting or labeling properties.

The binding types are used to retrieve the dynamic data in a view. The values of these properties are extracted from data objects at run time. For example, all of the monitored hosts can be extracted from the Host data object.

Related Documents

The document was helpful.

Select Rating

I easily found the information I needed.

Select Rating