Chatta subito con l'assistenza
Chat con il supporto

Foglight 5.9.2 - Web Component Guide

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

Removing a Data Object from Storage

An object using Site, User, or Session storage can be removed from those storage mechanisms by calling the remove() method on the object.

Query

A Query Binding evaluates to a specified value in the data object or list of data objects returned by a query. For example, you can display a list of hosts from a selected data object.

A Query has the following properties:

The query that is run to determine the set of values to be used. Open the drop-down menu and select from a tree of queries.

A path within the results from the query. This displays the actual names of the data-object properties, and not the localized names. For more information, see the Data Type Reference.

For details, see Configuring the Query Dialog Box .

If this is checked, the TimeRange currently in force is ignored, and data for all time is selected.

This lets you select the first item out of the results of the Query property, which is always a list. The optional Path is then applied to that specified element.

See Renderers .

Allows you to choose a binding for On Null, or any other parameter that has been declared in the query.

Unlike String parameters, Query parameters are not used directly by the Query. Rather, they are evaluated by the Query, and then passed on to the underlying query, which is executed by the Query. For more information, see Parameters in Queries .

Parameters in a Query are often used to specify the root path of a query. If the root is not a parameter, it is an absolute path from the root of the data source. If a query’s root is specified with a parameter reference, then the corresponding parameter from the Query is assumed to have evaluated to a data object or a list of data objects. That value is used as the root object for the query.

The behavior becomes more complex if the root is a parameter that evaluates to a list of data objects, and the query specifies aggregation, such as Max. In this case you have a choice:

For example, you have a view which is a row-oriented table that displays a list of hosts down the rows. You want to see the maximum severity of events for each host in another column of the table, which requires using option b. If the root parameter is the list of hosts, and the aggregate Query is selecting the maximum severity of events, then the results are a list of the maximum severities of the events for each of the hosts (one maximum per host).

Configuring the Query Dialog Box

1
Select the Values property of the desired column of the row-oriented table view.
2
Set that property to be a Query that accesses the correct query.
3
Check the Iterate Over 1st Parameter check box in the Query.

If Iterate Over 1st Parameter is selected, then the query executes once for each row. This mechanism is available only for the first parameter in a query with multiple parameters. It executes for each element from the list that is the value of the first parameter. The results of each of those query executions are amalgamated into a list, which becomes the final value of the Query.

If a Query uses Iterate Over 1st Parameter and has an On Null binding, the On Null may need to access the current value being iterated over during the Query evaluation of the list that is set as the first parameter. To make this possible, the current value from the first parameter is put into the context with the key currentParameter prior to evaluating the On Null.

Queries always return a list of results even if there is just one element in the list, as is the case with aggregation queries. Therefore, if a Query uses Iterate Over 1st Parameter and has a list of hosts as the parameter being iterated over, then the result returned is a list containing one result element for the evaluation of the query for each host. In most cases, each result element is a one-element list containing the result data object.

To easily access this sole result element, check Return First Object in List. This selects the first element out of each list of query results. When Return First Object in List is used in combination with Iterate Over 1st Parameter, it is applied to each of the query results. The final result is a list that includes one element per host where each list element is the data object containing the result data object.

Theme

Themes can be defined so that views can have a different appearance when printed. Settings for different colors or theme palettes are available for those properties that support these choices.

Figure 37. Themes

Related Documents

The document was helpful.

Seleziona valutazione

I easily found the information I needed.

Seleziona valutazione