Adding a custom column to the List tab of Topology views for CA Spectrum OneClick
search cancel

Adding a custom column to the List tab of Topology views for CA Spectrum OneClick

book

Article ID: 18985

calendar_today

Updated On:

Products

CA Spectrum DX NetOps

Issue/Introduction

The $SPECROOT/tomcat/webapps/spectrum/WEB-INF/common/config/table-model-config.xml file on the CA Spectrum OneClick system defines the attributes used in the List tab of Topology views in CA Spectrum OneClick. Custom columns can be added for attributes that already have a configured xml file in CA Spectrum OneClick or for attributes that do not currently have a configured xml file in CA Spectrum OneClick. The following are instructions for adding both.

Environment

Release: All Supported Releases

Component: SPCOCK - OneClick

Resolution

Adding an attribute that already has a configured xml file in CA Spectrum OneClick

In this example, we are going to add the SNMP Community String attribute as a new column. Out of the box, the SNMP Community String is defined in the column-community-config.xml file located in the $SPECROOT/tomcat/webapps/spectrum/WEB-INF/topo/config directory.

  1. Log into the OneClick system as the user that owns the Spectrum installation

  2. Create a new file called table-model-config.xml in the $SPECROOT/custom/common/config directory

  3. Add the following to this new file:

    <?xml version="1.0" encoding="UTF-8"?>
    <table idref="table-model-config">
       <column-list>

            <column idref="column-community-config">
                 <hidden-by-default>true</hidden-by-default>

            </column>
        </column-list>
    </table>

  4. Save the changes to this new file

  5. Log into OneClick

    "SNMP Community String" is now a selectable column for the List tab of Topology views.



    It is hidden by default. When selected, the "SNMP Community String" column will display.


 


Adding an attribute that does not already have a configured xml file in CA Spectrum OneClick


In this example, let us "assume" CA Spectrum OneClick does not have an out of the box xml file configured for the Community Name.

  1. Log into the OneClick system as the user that owns the Spectrum installation

  2. Create a new file called table-model-config.xml in the $SPECROOT/custom/common/config directory

  3. Add the following to this new file:

    <?xml version="1.0" encoding="UTF-8"?>
    <table idref="table-model-config">
         <column-list>
              <column>
                   <name>Community Name</name>
                   <content>

                         <attribute>0x10024</attribute>
                   </content>

                   <hidden-by-default>true</hidden-by-default>
              </column>
         </column-list>
    </table>

  4. Save the changes to this new file

  5. Log into OneClick

    As per the previous example, "Community Name" will now be a selectable column for the List tab of Topology views which is hidden by default. When selected, the "Community Name" column will display.

NOTE: All customizations should be done in the $SPECROOT/custom directory area on the CA Spectrum OneClick system. This is to ensure your customizations are not overwritten during a patch install or upgrade. Modifying the xml files located in the $SPECROOT/tomcat/webapps/spectrum/WEB-INF directory area runs the risk of these files being overwritten during a patch install or upgrade.

Additional Information

Please reference the DX NetOps Spectrum 22.2 - Customizing OneClick section of the CA Spectrum documentation for more information on customizing CA Spectrum OneClick.


Multiple columns can be added for example if port speed is also desired in addition. 


<?xml version="1.0" encoding="UTF-8"?>
<table idref="table-model-config">
   <column-list>
        <column idref="column-community-config">
             <hidden-by-default>true</hidden-by-default>
        </column>
        <column idref="column-portspeed-config">
             <hidden-by-default>true</hidden-by-default>
        </column>
    </column-list>
</table>