3.7 Creating Custom Operations

Custom operations that are created in the Operations Center console, allow for the customization of right-click operations on CI elements. These operations can:

  • Open a URL in a CMS pop-up window.

  • Open a URL in a new browser window.

  • Retrieve and display the contents from a URL.

  • Perform an action using client-side javascript.

To facilitate the creation of operations that can modify the CMS user interface, the CMS client-side JavaScript allows for the export of a public interface to certain API functionality. Similar to the window top-level handle that a browser JavaScript depends on, the CMS API exposes a mycmdb object on the window global object. The mycmdb object contains methods to allow an extension writer the ability to programmatically control the CMS user interface. For more information about the CMS API, see the jsdocs located at /OperationsCenter_CMS_install_path/webapps/noc/cms/docs/JS API.

To create a custom operation for CI elements:

  1. From the Explorer pane, navigate to the Administration > Server > Operation Definitions element.

  2. Right-click Operation Definitions and select Create Operation.

    The Create Operation dialog box displays.

    For additional information about creating an operation, see Modifying Element and Alarm Menus in the Operations Center 5.6 Server Configuration Guide.

  3. Specify the definition name in the Name field.

  4. Specify the custom operation text in the Menu text field.

  5. In the Match by drop-down list, select Class name, the specify the CMS-related class name in the text area.

  6. In the Permission drop-down list, select View.

  7. In the Type drop-down list, select one of the following:

    • URL Popup: to open a URL in a CMS pop-up window.

    • URL Frame: to open a URL in a new browser window.

    • HTML Result: to retrieve and display the contents from a URL.

    • Web Script: to perform an action using client-side javascript.

  8. In the Operation text area, type the command that the menu operation is to execute.

  9. Click Apply to save the custom operation.