VMware {code} Community
manojmu
Contributor
Contributor

Not able to navigate to custom object summaryView created on top of objectViewTemplate summaryViews extension

I have the following entries in the plugin.xml for a custom object using templates.

<templateInstance id="<namespace>.viewTemplateInstance">

      <templateId>vsphere.core.inventory.objectViewTemplate</templateId>

      <variable name="namespace" value="<namespace>"/>

      <variable name="objectType" value="ciscoUCS:object"/>

      <excludedExtension><namespace>.related</excludedExtension>

   </templateInstance>

   <extension id="com.cisco.ucs.vcplugin.UcsDomainAppCategory">

      <extendedPoint>vise.navigator.nodespecs</extendedPoint>

      <object>

         <title>#{objectNavigator.ucsdomain.app.category.label}</title>

         <parentUid>vsphere.core.navigator.virtualInfrastructure</parentUid>

      </object>

   </extension>

 

    <templateInstance id="com.cisco.ucs.vcplugin.lists.allUcs">

       <templateId>vsphere.core.inventorylist.objectCollectionTemplate</templateId>

       <variable name="namespace" value="<namespace>.UcsCollection"/>

       <variable name="title" value="#{someLabel}"/>

       <variable name="icon" value="#{someIcon}"/>

       <variable name="objectType" value="ciscoUCS:SomeObject"/>

       <variable name="listViewId" value="<namespace>.list"/>

       <variable name="parentUid" value="com.cisco.ucs.vcplugin.UcsDomainAppCategory"/>

    </templateInstance>

I also have a list.columns extension for the concerened namespace. On the global inventory I am able to get my object and on selecting it I am able to get the list of objects in the workspace. When I click on one object I expect I get navigated to the summary view of the object for which I have an extension too as below...

<extension id="com.cisco.ucs.vcplugin.handle.SummaryView">

<extendedPoint>com.cisco.ucs.vcplugin.handle.summaryViews</extendedPoint>

<object>

<name>Domain Summary</name>

<componentClass className="com.vmware.vsphere.client.htmlbridge.HtmlView">

<object>

<root>

<url>/vsphere-client/ucshtmlui/index.html?view=summary</url>

</root>

</object>

</componentClass>

</object>

</extension>

I have a routing table entry in the app.routing component of my app for 'summary'. But selecting an object gives the following on chrome console

GET https://localhost:9443/ui/navigation/data/vsphere.core.inventory.serverObjectViewsExtension?objectId... 500 (Internal Server Error)

For the chassisA sample I see that the object selection navigates to

zone.min.js:1 XHR finished loading: GET "https://localhost:9443/ui/navigation/data/com.vmware.samples.chassisa.SummaryView?objectId=urn:vri:s...".

Please let me know what am I missing here. Appreciate your help.

Thanks

Manoj M

<templateInstance id="com.cisco.ucs.vcplugin.handle.viewTemplateInstance">
      <templateId>vsphere.core.inventory.objectViewTemplate</templateId>
      <variable name="namespace" value="com.cisco.ucs.vcplugin.handle"/>
      <variable name="objectType" value="ciscoUCS:UcsHandleMap"/>
      <excludedExtension>com.cisco.ucs.vcplugin.handle.related</excludedExtension>
   </templateInstance>
 
    <!-- Add a new UCS Domain category to VI screen of object navigator. -->
   <extension id="com.cisco.ucs.vcplugin.UcsDomainAppCategory">
      <extendedPoint>vise.navigator.nodespecs</extendedPoint>
      <object>
         <title>#{objectNavigator.ucsdomain.app.category.label}</title>
         <parentUid>vsphere.core.navigator.virtualInfrastructure</parentUid>
      </object>
   </extension>
    <!-- Template instance to show all UCS under a UcsDomain App category -->
    <templateInstance id="com.cisco.ucs.vcplugin.lists.allUcs">
       <templateId>vsphere.core.inventorylist.objectCollectionTemplate</templateId>
       <variable name="namespace" value="com.cisco.ucs.vcplugin.handle.UcsCollection"/>
       <variable name="title" value="#{objectNavigator.ucs.label}"/>
       <variable name="icon" value="#{nuovaIcon}"/>
       <variable name="objectType" value="ciscoUCS:UcsHandleMap"/>
       <variable name="listViewId" value="com.cisco.ucs.vcplugin.handle.list"/>
       <variable name="parentUid" value="com.cisco.ucs.vcplugin.UcsDomainAppCategory"/>
    </templateInstance>
0 Kudos
3 Replies
manojmu
Contributor
Contributor

If I expand the the request

GET https://localhost:9443/ui/navigation/data/vsphere.core.inventory.serverObjectViewsExtension?objectId... 500 (Internal Server Error)

I see the below exception trace.

  1. {message: "Null param at index: 0",…} 
       
    1. message:"Null param at index: 0"
    2.  
    3. stackTrace:"java.lang.IllegalArgumentException: Null param at index: 0↵ at com.vmware.vise.util.ValidationUtil.paramsNotNull(ValidationUtil.java:35)

 

Thought this can guide you to help me faster.

Thanks

0 Kudos
manojmu
Contributor
Contributor

More information

If I inspect the UI element that is clicked I see the following in the working case i.e for chassisA sample

<a ng-click="$root._navigateToViewAndObject(&quot;vsphere.core.inventory.serverObjectViewsExtension&quot;, &quot;urn:vri:samples:ChassisA:chassis-2&quot;)" title="Chassis 3">Chassis 3</a>

And the below in case of a non working case i.e for my custom object

<a ng-click="$root._navigateToViewAndObject(&quot;vsphere.core.inventory.serverObjectViewsExtension&quot;, &quot;cr:ciscoUCS:UcsHandleMap:UCS%252F%252F10.105.219.248&quot;)" title="savbu-tpi03">savbu-tpi03</a>

Any guesses so far please?

0 Kudos
manojmu
Contributor
Contributor

Appreciate some guidance here please.
0 Kudos