5.12.8.2.7 Tree Pop-up Menu

 



 

Introducing Tree Pop-up menus

 

There can always be a requirement for defining menus for NMS Panel, beside the Panel specific menus, for invoking some additional functionality. In order to fulfill this requirement the option to display menus on right-clicking the NMS panel has been introduced. Such type of menus are called Tree Pop-Up menus.

 

Configuring Tree pop-up menus through Tree.xml file

 

The Tree Pop Up menus are defined in XML format. The menus are defined for an attribute called TREE-POPUP-MENU in the Tree.xml file of <Web NMS Home>/users/<username> directory. The values defined in this attribute can be any number of menu configuration files or JMenus which are a subset of the parent Panel specific menu (given for the MENU-FILE-NAME attribute for the corresponding panel in Tree.xml). A combination of both can also be given. In the case of multiple menus, the menu items will be shown as different sub-menu items in the pop-up menu.

 

For example, for the Network Events panel the JMenus and the menu files specified as Tree Pop-up menu are as shown in the snippets.

 

<DEVICE

ID="Events"

Client="All"

TREE-NAME="Network Events"

TREE-POPUP-MENU="Custom Views,frameoptions.xml,TreeOperations.xml"

ICON-FILE="images/event.png"

TABLE-POPUP-MENU="View"/>

</DEVICE>

 

As per the snippets shown above, for a selected node like the Events Panel, the Tree Pop-Up menus are the Custom Views which comprises of sub menu items like Add Custom, Modify Custom etc. and menu items like Back, Forward etc and Add Node, Modify Node etc specified in frameoptions.xml and TreeOperations.xml files, respectively.

 

Configuring Tree Pop-Up menu through Custom View form

 

For every created node in the NMS tree (i.e Custom Views) a Tree Pop-Up menu can be associated. This can be achieved through the Custom View form that gets displayed when a custom view is to be created for a selected panel.

 

One of the form property named Tree Pop-Up menu can be viewed in the Custom View form on selecting it's Tree Node Properties pane. The desired menu configuration file (i.e .xml file) or the name of the panel specific menu can be specified as a tree pop-up menu, in the corresponding textbox of the form. As per the specified entries, a corresponding Tree Pop-Up menu gets displayed for the created tree node of the NMS tree.

 

Tree Pop-up menus can also be configured through hard codes. For this a user is required to write a user defined class which extends the AbstractBaseNmsPanel class. This user class is require to override the method getTreePopUpMenu() defined in the class, thereby specifying desired menus that are to be displayed as a Tree pop-up menu on right-clicking the node.



Copyright © 2011, ZOHO Corp. All Rights Reserved.