VMware {code} Community
calvinl01
Contributor
Contributor
Jump to solution

HTML5 Client SDK - Trouble getting an extension point to appear in Object Navigator

Hi,

I'm having trouble getting an extension point for the category id vsphere.core.navigator.solutionsCategory for Object Navigator Extension to appear using the HTML5 Client Fling SDK. (Screenshots provided below)

I have the same plugin loaded for the HTML Bridge for vSphere and it works fine.

Also, I did change the dependencies for HTML5 Client SDK (mentioned in the Getting Started pdf) when migrating from HTML Bridge.

Here is the structure in the plugin.xml file:

......

<!-- Add link to the Object Navigator -->

   <extension id="com.mycompany.testpluginui.sideLink">

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

      <object>

         <title>My test plugin</title>

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

         <navigationTargetUid>com.mycompany.testpluginui.mainView</navigationTargetUid>

         <viewOpenedUponFocus className="com.vmware.ui.objectnavigator.views.CategoryNodeTreeView" />

      </object>

   </extension>

  

  <!-- Page 2 -->

   <extension id="com.mycompany.testpluginui.pageTwo">

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

      <object>

         <title>Page 2</title>

         <navigationTargetUid>com.mycompany.testpluginui.mainView</navigationTargetUid>

         <parentUid>com.mycompany.testpluginui.sideLink</parentUid>

      </object>

   </extension>

  <!-- Page 3 -->

   <extension id="com.mycompany.testpluginui.pageThree">

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

      <object>

         <title>Page 3</title>

         <navigationTargetUid>com.mycompany.testpluginui.mainView</navigationTargetUid>

         <parentUid>com.mycompany.testpluginui.sideLink</parentUid>

      </object>

   </extension>

   <!-- Main view -->

   <extension id="com.mycompany.testpluginui.mainView">

      <extendedPoint>vise.global.views</extendedPoint>

      <object>

         <name>#{app.name}</name>

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

            <object>

               <root>

                  <url>/vsphere-client/testpluginui/resources/mainView.html</url>

               </root>

            </object>

         </componentClass>

      </object>

   </extension>

......

......

The first screenshot is from HTML Bridge, and the extension point is visible from the Object navigator and works when is clicked.

The second screenshot is from HTML5 Fling and doesn't show the extension point.

html-bridge-screenshot.png

html-fling.png

I have tried other Category IDs listed here, such as vsphere.core.navigator.virtualInfrastructure and vsphere.core.navigator.administration, and they both work

fine for the HTML5 Client but they do not display the view I'm looking for.

I also tried modifying the sample plugins (ChassisA,B, Global App) plugin.xml files but to no avail.

From the Virgo logs there's this snippet from: vsphere-ui/server/serviceability/logs/osgi.log

[2016-08-17T13:07:25.156-07:00] [DEBUG] http-bio-9443-exec-18        70000203 100002 200001 o.s.w.servlet.mvc.method.annotation.RequestMappingHandlerMapping  Looking up handler method for path /resources/ui/views/objectnavigator/CategoryNodeTreeView.html

[2016-08-17T13:07:25.157-07:00] [DEBUG] http-bio-9443-exec-18        70000203 100002 200001 o.s.w.servlet.mvc.method.annotation.RequestMappingHandlerMapping  Did not find handler method for [/resources/ui/views/objectnavigator/CategoryNodeTreeView.html]

[2016-08-17T13:07:25.157-07:00] [DEBUG] http-bio-9443-exec-18        70000203 100002 200001 o.s.w.servlet.mvc.method.annotation.RequestMappingHandlerMapping  Looking up handler method for path /resources/ui/views/objectnavigator/CategoryNodeTreeView.html

[2016-08-17T13:07:25.158-07:00] [DEBUG] http-bio-9443-exec-18        70000203 100002 200001 o.s.w.servlet.mvc.method.annotation.RequestMappingHandlerMapping  Did not find handler method for [/resources/ui/views/objectnavigator/CategoryNodeTreeView.html]

[2016-08-17T13:07:25.158-07:00] [DEBUG] http-bio-9443-exec-18        70000203 100002 200001 org.springframework.web.servlet.handler.SimpleUrlHandlerMapping   Matching patterns for request [/resources/ui/views/objectnavigator/CategoryNodeTreeView.html] are [/resources/**]

Running: vSphere Client version 6.5.0 build 4231781

0 Kudos
1 Solution

Accepted Solutions
laurentsd
VMware Employee
VMware Employee
Jump to solution

Thanks for reporting this.  The extension point vsphere.core.navigator.solutionsCategory is missing in this HTML Client fling and we'll fix that quickly to unblock you. In the mean time you could use Home view shortcuts to link to each view.

View solution in original post

0 Kudos
8 Replies
laurentsd
VMware Employee
VMware Employee
Jump to solution

Thanks for reporting this.  The extension point vsphere.core.navigator.solutionsCategory is missing in this HTML Client fling and we'll fix that quickly to unblock you. In the mean time you could use Home view shortcuts to link to each view.

0 Kudos
calvinl01
Contributor
Contributor
Jump to solution

Thanks laurent,

I'm also noticing some icons not showing up that are defined under src -> main -> locale -> en_US -> properties file. (Screenshots provided below)

I tried adding an icon to my plugin (on the homeview under Monitoring) and it shows up as a broken image.

Another example would be the sample chassis plugins provided. The icons are not appearing in the object navigator.

Icons for actions do appear though, such as Add and Edit a chassis.

testplugin-homeicon.png

chassis-object-nav.png

chassis-inventory.png

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

You are right.  Icons defined in plugin.xml are not supported yet and this will be fixed soon too.

0 Kudos
calvinl01
Contributor
Contributor
Jump to solution

Hi Laurent,

I was able to see my plugin instance in the Object Navigator and was able to click it on to see the main view, however I didn't see the Object Navigator change to have it's own left-hand side view to display the two pages under it (like the HTML Bridge screenshots above).

I'm running the latest version of HTML5 Fling (Build 4360209) and SDK (6.5.0-4321818)

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

Thanks for that bug report. We'll try to reproduce the problem.

On the topic of icons support that you reported earlier, the fix is ready for Fling 4 next week.

0 Kudos
_vladi_
VMware Employee
VMware Employee
Jump to solution

Icons support is now fixed in HTML Client SDK Fling 4.
0 Kudos
irahov
VMware Employee
VMware Employee
Jump to solution

Some questions & comments from my side:

1) How did you come up with

   <viewOpenedUponFocus className="com.vmware.ui.objectnavigator.views.CategoryNodeTreeView" />

since this is not in the public SDK?


2) Currently the Web Client (HTML) does not support that navigation out of the box.


3) If you want to have a tree like structure you may use:

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

and attach children to it the way you have done it. But again it just provides a tree like structure and will not modify the object navigator view (left hand side).

0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

Quick update the problem with <viewOpenedUponFocus>.  Even though this is not part of the documented API we recognize that many people are using this and we will provide a fix in an upcoming Fling release.  FYI the xml format changed between the Web Client and the HTML Client and we didn't catch that difference in time since it wasn't on our radar while testing the SDK.

0 Kudos