Meter Portlet

From MT Marvelit
Jump to: navigation, search

Meter and Dial charts are displayed using the MarvelIT Meter Portlet.

Select Datasource: The datasource used to execute the query for this report.

Select from Saved Query: A list of saved queries (from the Meter table).

Parameter List: List of Parameters, separated by a space. Is available when selecting a saved query. See Parameter section below.

Title: Title of the report.

Width: Sets the width of the meter.

Height: Sets the height of the meter.

Units: Values displayed in the center of the meter - usually 'Percent', 'Units', 'Average', etc.

Meter Angle: Value representing the desired circle angle - 180 = half circle; 360 = full circle; 90 = quarter circle, etc.

URL - A hyperlink to a web, portal, wiki or other page that will be displayed upon clicking the displayed chart. See Creating Click Throughs on how this field could be used.

Target - determines the desired action on a click thru on a meter. Values are: _blank - the target URL will open in a new window - _self - the target URL will open in the same frame as it was clicked - _parent - the target URL will open in the parent frameset - _top - the target URL will open in the full body of the window

Saved Chart Name: Name of the meter (displayed in the Saved Query list). Admin only.

SQL: SQL Query used to populate the meter. Admin only.

Label: The value to be assigned to the section from/to values. Defaults to Normal - Warning - Critical but can be set to any value.

From: The lower threshold value for the desired label.

To: The upper threshold for the desired label.

Color: The color in hex (RGB) for the label - the section of the meter for this label will be the color specified. See Wikipedia entry on Web Colors for specific values

Alpha: Determines the saturation of the color. A higher value will saturate the section with deeper color while a lower value will be softer.

Stroke Size: Determines the width of the circle elements - I higher value will have a thicker line around the circle.

Stroke Color: Determines the color of the circle element. See Wikipedia entry on Web Colors for specific values

Display Details: Display SQL Results as a report above or below.

XML Descriptor: Field for entering XML formating for the meter. See Format Portlets using XML for additional information on XML formatting.

Cancel: Cancel changes and display the meter.

Save: Save changes and display the meter.

Completed Meter Portlet


Here is a completed Completed Meter Portlet. Several things to point out:

Parameters: Entering Valid Lever Names ( see Levers Portlet ) in the Parameter List field - causes the portlet to refresh and fields are displayed for entering default values for each lever. In this example: a specific value is entered. Any value for that particular lever can be entered as a default value.

Parameters in SQL: The Levers are entered into the example SQL as follows:

  • Org3 like '$P{Org3} and FClass like '$P{FClass} and RClass like '$P{RClass}'
  • When the pane is displayed - those levers will appear at the top of the pane. Selecting values for them and clicking the GO button - will cause the portlet to refresh and the lever values will be used in the SQL statement.

Variables in SQL: There are certain variables that are passed from the portal to the portlets. One of these is $V{user} - which represents the user name used on the login screen. This can be utilized in SQL to limit access to certain data values for specific users. Usually a cross reference table in the database would be utilized to link user names to database key values.

Here is the displayed meter from the Meter Portlet example: