Load Embeddable Widgets

The embeddable widgets feature allows loading only a single widget instead of the entire UCMDB Browser. This enables other products to include widgets inside their own applications.

  • Starting with UCMDB Browser 4.10, the Impact Simulation Widget and Get Related Widget can be directly embedded into Service Manager. For more details, see Service Manager documentation.
  • There is no search UI, only a single widget, meaning that when loading the widget, the user must know and set the CI ID.

If using LW-SSO, the user enters the URL of the UCMDB Browser and adds to that URL certain parameters that tell the UCMDB Browser which widget to show, how to show it, and which CI to show for that widget. The Embedded widget checks the LW-SSO cookie to verify that the current user is logged on. If there is no valid session, the login page is displayed.

If not using LW-SSO, the following options are available:

  1. The user enters the URL of the UCMDB Browser and certain parameters as mentioned above, which displays the login page.
  2. The user enters the URL of the UCMDB Browser and certain parameters as mentioned above, and adds to that a username and encrypted password.

    To generate the encrypted password:

    1. Go to JMX console > UCMDB-UI:name=UCMDB Integration > getEncryptedPasswordForURL.
    2. In the user name field, enter the user name.
    3. In the password field, enter the user's password.
    4. Click Invoke.

    Important For the embedded widgets to work when using the username and encrypted password in the URL, you need to enable the LW-SSO framework. To do this, in the ucmdb_browser_lwsso_config.xml file, make sure that the value for enableLWSSOFramework is True.

Note If the UCMDB Browser is configured to work with multiple UCMDB Servers, you must specify the UCMDB server's name in the URL.

To load an embeddable widget:

For LW-SSO users, you load an embeddable widget by entering the base URL and other information as follows:

http://<UCMDB Browser host>:< UCMDB Browser port>/ucmdb-browser/ucmdb_widget.html#widget=<widget type>~<widget state>;refocus-selection (or global-id)=<CI ID>

This URL can be divided into the following parts:

  • Base URL: This is the URL of the UCMDB Browser. For example:

    http://<UCMDB Browser host>:< UCMDB Browser port>/ucmdb-browser/

  • Widget Entry Point: This is a static value, will always be:

    ucmdb_widget.html#

  • Widget type: This must be one of the possible widget types: AUTOMATION, BSM, <DYNAMIC WIDGETS>, DEFECTS, ENVIRONMENT, GET_RELATED, HISTORY, IMPACT, INCIDENTS, POLICY, PROBLEMS, PROPERTIES, RFC, SECURITY, or STAKEHOLDER.

    Note The dynamic widget's name must be used as widget type. For example, BUSINESS TOPOLOGY.

  • Mode: This is the visualization mode of the widget: CI Overview mode or Widget Details mode. The Widget Details mode is displayed by default. To change the visualization mode to CI Overview mode, add the following information in the URL:

    mode=preview

    Note The CI Overview mode is available only for the History widget, Impact Simulation widget, and Get Related widget.

  • Widget State: This is available only for Impact Simulation Widget and for Get Related Widget.

    • Impact Simulation Widget: You can specify the severity level and the bundles. For example:

      widget=IMPACT~severity=LOW&bundles=bundle1,bundle2

    • Get Related Widget: You can specify a TQL previously defined in the UCMDB, and use it to explore related CIs.

      To define a TQL Query in UCMDB, see the "How to Define a TQL Query" section in the Universal CMDB Modeling Guide.

      For example:

      widget=GET_RELATED~tql=[query_name]

      • The Element Name of the first CI Type you select must be root_node and the second CI Type must be related_node.
      • If the TQL query from URL does not exist or does not contain root_node or related_node, the default TQL query is used.

    In the CI Overview mode, the Widget State is available only for the Impact Simulation widget, and only the severity level can be specified.

  • CI ID: The ID for the CI whose data will be displayed by the widget. For example, 123456789.

    Note You can add multiple CI IDs for Impact Simulation Widget. You can view the CI IDs that are not found in the UCMDB, in the left pane, under the Not Found CIs section.

Therefore, to load a widget with the examples given above, using LW-SSO, you would enter a URL of:

http://<UCMDB Browser host>:<UCMDB Browser port>/ucmdb-browser/ucmdb_widget.html#widget=environment;refocus-selection=123456789

And if not using LW-SSO, using the above example:

http://<UCMDB Browser host>:<UCMDB Browser port>/ucmdb-browser/ucmdb_widget.html?username=guest&password=<encrypted_password>#widget=environment;refocus-selection=123456789

Once logged on, the user sees the CI Overview and Widget Details modes of the widget and CI specified in the URL. Widget Details mode cannot be collapsed.

Important When the UCMDB Browser 4.12 (or later) is embedded in UCMDB Server 10.31 (or later), for the Impact Simulation Widget and Get Related Widget to work, perform the following steps:

  1. Go to JMX console > UCMDB:service=Settings Services > setGlobalSettingValue.
  2. In the name field enter ui.framing.host.
  3. In the value field enter the desired host address (the Service Manager's IP address, or the FQDN).
  4. Click Invoke.
  5. Restart the UCMDB server.

When using UCMDB Browser 4.12 (or later) standalone, for the Impact Simulation Widget and Get Related Widget to work, perform the following:

  1. Open the %WEB_SERVER_HOME%\webapps\ucmdb-browser\WEB-INF\web.xml file.
  2. Locate the following lines:

    <filter>
        <filter-name>ClickjackingFilterSameOrigin</filter-name>
        <filter-class>com.hp.ucmdb_browser.server.web.ClickjackingFilter</filter-class>
        <init-param>
            <param-name>mode</param-name>
            <param-value>SAMEORIGIN</param-value>
        </init-param>
    </filter>
    <filter-mapping>
            <filter-name>ClickjackingFilterSameOrigin</filter-name>
            <url-pattern>/*</url-pattern>
    </filter-mapping>   
  3. In the section above, replace the following line:

    <param-value>SAMEORIGIN</param-value>  

    with

    <param-value>ALLOW_FROM <Service Manager URL></param-value>  

    For example,

    <param-value>ALLOW_FROM https://SMservername.domain.com</param-value>  
  4. Restart the UCMDB Browser.