Adding a custom field view to the Information tab under General Information view in Spectrum OneClick
search cancel

Adding a custom field view to the Information tab under General Information view in Spectrum OneClick


Article ID: 20624


Updated On:


CA Spectrum


This solution explains how to add the "HasStaleInterfaces" attribute to the general information subview under Information tab.




This is a step by step procedure on how to add an attribute named "HasStaleInterfaces" to the general information subview under component details:

1. Identify the xml file responsible for displaying the Information view of a model class.

2. In this document we will customize the general information view of firewall model class.

3. On the OneClick webserver -> Navigate to $SPECROOT/tomat/webapps/spectrum/web-inf/topo/config/topo-app-config.xml and look for the below code

<!-- FIREWALL -->    

4. The above code builds up the information view for firewall devices.

5. Now look for view-devicedetails-config xml under $SPECROOT/tomat/webapps/spectrum/web-inf/topo/config directory and check the idref in the view tag

<view id="view-devicedetails-config" idref="view-devicedetailsbase-config"> -------> Note this xml

6. Now search for view-devicedetailsbase-config and the below code in this xml is responsible for displaying the fields under general information sub view under component detail panel of the firewall class.

<!-- General Information -->    
<field-subview idref="device-geninfo-subview-config" expanded="true">    <title></title>    

7. Now navigate to $SPECROOT/custom/topo/config directory

8. Create a xml file with the name "device-geninfo-subview-config" and add the code below to the xml file

<?xml version="1.0" encoding="utf-8"?>    
<field-subview idref="device-geninfo-subview-config"> --> Adding new field to General Information subview
<name>HasStaleInterfaces</name> --------> Adding this field to the General Information Tab
<attribute>0x12be7</attribute> ---------> Attribute id of HasStaleInterfaces</content>    

9. Save the file

10. Close and restart any open OneClick clients.

11. Login to OneClick and search for any firewall model in the database

12. Go to the component detail panel -> Information -> General information tab and observe that "HasStaleInterfaces" field is add towards the right

This way we can add any field like device criticality , Red/Yellow/Orange threshold attributes to general information sub-view.

Additional Information

Please reference the "OneClick Customization" section of the documentation for more information.


1558687370261000020624_sktwi1f5rjvs16f9e.gif get_app