4.7 Creating Custom Tooltips

Custom tooltips allow you to view important information about a service model or adapter element without opening property pages. The default tooltip shows basic information: element condition, class, and custom algorithm (if it exists). Use a custom tooltip property to display additional information in the element tooltip, such as user contact information.

In the following illustration, a custom tooltip property definition displays an element’s Contact information:

Figure 4-10 Tooltip with Contact Information

4.7.1 Creating a Custom Tooltip

  1. In the Explorer pane, expand Administration > Metamodel > Property Pages.

  2. From an existing property page or from a newly created property page, click Create a Property to create a new property.

    The Add Property dialog box opens.

    For more information about property pages and custom properties, see Creating and Deleting Property Pages and Properties.

  3. Enter _mosol_ElementTooltip in the Name field as shown:

    Add Property Dialog Box

    This is an important step as the _mosol_ElementTooltip property name tells Operations Center to expose the property as a tooltip.

  4. Click Forward.

    The dialog box updates to define property attributes.

  5. Define the property attributes using the following information:

    • A custom tooltip property can be any property type that allows you to store text. Custom tooltips support the use of HTML, but it is not necessary to enter the <html> and <body> tags. Just enter the actual markup tags.

    • Use the Computed Field type to embed logic when the custom tooltip is generated. For example, in the following illustration, a Macro Expression is used to show contact information from the element’s Contact property page, with a code check to not display anything if the property hasn’t been defined.

      Add Property Dialog Box

      The code in the above illustration results in the following tooltip:

      [Resulting Tooltip]
    • The computed field can contain NOC Script language or a velocity macro. For more information about velocity macros, go to http://velocity.apache.org/engine/devel/user-guide.html. For example, the following Script Expression uses NOC Script to get and display element name, DName, and current time in a table format using HTML:

      [FormulaScript Expression]
  6. Click Finish to apply the custom property page to adapter or service model elements.

    When a user hovers the mouse over an element with the _mosol_ElementTooltip property, the tooltip displays information based on the custom tooltip definition.

4.7.2 Removing Element Class from Tooltips

By default, element class displays in element tooltips. It can be disabled if necessary in the applet_params.xml file.

To disable class name from tooltips:

  1. Open the /OperationsCenter_install_path/html/applet_params.xml file in a text editor.

  2. Set the following line to f"alse" to omit the class name from tooltips:

    <param name="ElementToolTip.ShowClass" value="false" />