I've managed to add my custom field to show my custom attribute.
I copied the asset-info-subview-config.xml file to /spectrum/custom/topo and it has this configuration:
<field-subview idref="asset-info-subview-config">
<privilege>
<name>asset-info</name>
</privilege>
<field-column>
<display-if>
<expression>
attr(0x23000e).toString().equals("Transition Networks S4224")
</expression>
</display-if>
<column idref="custom-firmwareS4224-config"/>
</field-column>
</field-subview>
It points to a custom file (custom-firmwareS4224-config.xml) I made to show the value for the custom attribute I created that points to the corresponding OID
<?xml version="1.0" encoding="UTF-8"?>
<column id="custom-firmwareS4224-config"
xmlns ="http://www.aprisma.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.aprisma.com
../../common/schema/column-config.xsd">
<name>Firmware Transition</name>
<content>
<attribute>0xffff0004</attribute>
</content>
<header-template idref="headertemplate-singlerownonsortable-config"/>
</column>
So this is what I get.
Now I have these questions:
1) Can I add my custom field at the bottom of the first column, instead of adding a new column to the view?
2) A better option would be to map the "Firmware version" original field to my custom xml (which points to the custom attribute).
In order to do so, I want to know if it's possible to override the original column-firmwareversion-config.xml (the field on the left side, below Serial number) and to add the <display-if> element, showing a different attribute's value depending on the device type.
Something like this:
<column id="custom-firmwareS4224-config"
xmlns ="http://www.aprisma.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.aprisma.com
../../common/schema/column-config.xsd">
<name>com.aprisma.spectrum.app.topo.client.FirmwareVersion</name>
<display-if>
<expression>
attr(0x23000e).toString().equals("Transition Networks S4224")
</expression>
</display-if>
<content>
<attribute>0xffff0004</attribute>
</content>
<content>
<attribute>0x12de0</attribute>
</content>
<header-template idref="headertemplate-singlerownonsortable-config"/>
</column>
Of course, the example above is not working. Any idea?