Extending an Existing Object Workspace

To add HTML extensions to the Monitor and Configure tabs in the vSphere Client, use the following generic extension points. These extension points generate a subordinate view inside that tab.

  • vsphere.core.${objectType}.monitorViews
  • vsphere.core.${objectType}.manageViews

For example, if you define an extension that extends the vsphere.core.vm.manageViews extension point, your extension appears as an entry in the table of contents under the Configure tab in the object workspace for virtual machine objects.

For a complete list of object workspace extension points available for the vSphere Client, see Object Workspace Extension Points.

Types of Data Views

A data view extension appears differently depending on the vSphere object that you specified with the extension point. Data views can appear in the object workspace having one of the following structures.

  • Table of contents entry - If you define an extension to a top-level tab, such as Monitor, or Configure, a data view extension appears as an entry in the table of contents on the left in the object workspace.
  • Portlet - If you define the portlet extension point, a data view extension appears as a portlet in the object workspace.

Configure and Monitor Views Extensions

You can extend a vSphere object view under the Configure and Monitor tabs by using the generic extension points vsphere.core.${objectType}.monitorViews and vsphere.core.${objectType}.manageViews to specify the generic HTML class that implements the new data view. You must also specify the URL to the HTML source of the data view.

Adding a Host Monitor View

Following is an example of how you can add an HTML view to the Monitor tab of host objects.

   <extension id="com.vmware.samples.vspherewssdk.host.monitor">
      <extendedPoint>vsphere.core.host.monitorViews</extendedPoint>
      <object>
         <name>#{monitorHtml.label}</name>
         <contentSpec>

            <url>/ui/plugin-name/monitor-view.html</url>
         </contentSpec>
      </object>
   </extension>

The value of the <url> property is a relative URL that starts with the Web context path of the plug-in, /ui/. You must set the same URL without the first slash as a value to the Web-ContextPath manifest header of the Web application MANIFEST.MF file.

To display content from another domain in the view, you can use HTTPS URLs. Note that the content is not loaded the first time that the user open the view, unless the domain certificate is already verified. You must not use HTTP URLs because the contemporary Web browsers are designed to block any insecure content that you try to display inside the secure vSphere Client domain.

The monitor-view.html document view is opened with a REST request that contains the following parameters:
  • objectId - The context object ID of the view.
  • objectType - The context object type.
  • locale - The current locale of the Web browser.