QPR Element Tooltips

From Mea Wiki
Jump to navigation Jump to search

Overview

Purpose of the element tooltips add-on is to show textual data stored in an (EA/PD) element, when a cursor is moved on top of the element, as illustrated by image 1. The element tooltips feature is implemented as a portal customization. The feature is configurable, so that it can be defined which properties (attributes) are shown in the tooltip. If value of a property is empty, it’s shown in the element tooltip. If element doesn’t contain the property at all, that property is not shown in the tooltip. This is the case when the tooltip is configured to show a property of certain type of elements, that another type of elements don’t have. Properties can also be configured by element type if further customization is needed. Element specific configuration overrides the global configuration. An example of an element tooltip.PNG

Configuration parameters

The customization contains the following parameters to adjust the behavior of the add-on.


TOOLTIP PROPERTIES contains a list of attributes that is shown by the tooltip. The list order determines the order in the tooltip. The first attribute in the list is the header attribute (shown bolded as a tooltip title). Each item in the list have the following properties:

Parameter Description
element (string) Determines the element type for which the properties are shown. Can be any element type e.g. "Core Process" or "Subprocess". Properties with element type "global" are used for other element types.
label (string) Label for the property shown in the tooltip.
webserviceproperty (string) QPR Web Service property name. Available properties: http://kb.qpr.com/qpr2017-1/index.html?supported_parameters.htm
maxchars (integer) Maximum number of character that is shown for the attribute in the tooltip. Can be used if some attributes contain more text than can be fit in the tooltip. (optional)
omitifempty (boolean) Attribute row is left out if the attribute doesn’t contain a value. Either true or false. (optional)



Example: var TOOLTIP_PROPERTIES = [

 {"element":"global", "label":"Name", webserviceproperty":"name"},
 {"element":"global", "label":"Type", "webserviceproperty":"typename"},
 {"element":"global", "label":"Owner", "webserviceproperty":"owner.name"},
 {"element":"global", "label":"Description", "webserviceproperty":"description", maxchars: 1000, omitifempty: true}

]

TOOLTIP EXCLUDE CRITERIA contains a QPR Web Service query criteria, which is used to omit the tooltip for some elements. For example all organization and information items don’t have a tooltip, when following criteria is used: typename<>\"Organization Item\" AND typename<>\"Information Item\" Note that the portal default tooltip is still shown.

Installation

  • 1. Take backup copies of your existing templates
  • 2. Copy included subpssummary.tpl file to the WAS\PG subfolder in your templates folder of your instance,
e.g. C:\ProgramData\QPR Software\QPR 2017\2017.1\Servers\Templates\WAS\PG
  • 3. Configure parameters TOOLTIP_PROPERTIES and TOOLTIP_EXCLUDE_CRITERIA (see the previous chapter).
  • 4. Copy included elementtooltips.css to C:\inetpub\wwwroot\qpr2017-1\qprsoftware\stylesheets\
  • 5. Clear the portal template cache with following command in a web browser:http://<server address>/<QPR Suite version>/Portal/qpr.isapi.dll?QPRWAS&*cleartemplatecache e.g. http://localhost/QPR2017-1/Portal/qpr.isapi.dll?QPRWAS&*cleartemplatecache