Configuring context menus

You can add a menu item to, or edit the menu items in, the context menus that are displayed when you right-click a device or subnet from a topology map.

You can associate tools with menu items to enable network operators to right-click a device, link or subnet and run a script or a third-party Web application. Tools can also be invoked from components in the device structure browser, such as network ports, via the Tools menu. Any new menu items you define appear after the default menu items.

To add or edit an item in a context menu for a device, event, subnet, link or component within the device structure browser, complete the following steps.

  1. Edit an XML file in the $NMGUI_HOME/profile/etc/tnm/menus/ directory.
  2. Configure the elements and attributes of the menu definition to define the name, filters, label, and other properties of the menu item. Use the reference information about the XML elements and attributes available for menu items and the example provided to help you define the menu item.
  3. Add the menu item that you have defined to the appropriate menu type in the $NMGUI_HOME/profile/etc/tnm/topoviz.properties file:
    Menus launched from devices or subnets
    topoviz.menu.device = menu-id
    Menus launched from subviews
    topoviz.menu.subview = menu-id
    Menus launched from the background with no objects selected
    topoviz.menu.background = menu-id
    Menus launched from a link between devices, subnets, or subviews
    topoviz.menu.link = menu-id

    Where menu-id is an identifier that points to the top level of a menu hierarchy defined in an XML file in the $NMGUI_HOME/profile/etc/tnm/menus/ directory. Subnets require a separate menu because the tools executed on subnets are executed for all nodes contained within the subnet.

    The following example defines a menu item for devices with the identifier mytools:

    topoviz.menu.device = mytools