vSphere Web Client SDK 6.5 Update 1 Release Notes

vSphere Web Client SDK 6.5 Update 1 | 27 JUL 2017 | Build 5973321

Check for additions and updates to these release notes.

What's in the Release Notes

The release notes cover the following topics:

What's New

The following changes to the development environment are introduced to the vSphere Web Client SDK in this release:

  • Bootstrapping the Javascript API Starting with version 6.5 Update 1 of the vSphere Client and the vSphere Web Client, the practice of packaging the web-platform.js file within your plug-in is deprecated. The API is now available in a namespace object that bootstraps the library at runtime. This has two advantages:

    • Automatic updates - When you packaged the web-platform.js file within your plug-in, it became necessary to update, test, and re-release it with the changes in each new SDK release, so that your customers would have the benefits of the latest bug fixes and API improvements. The bootstrapping feature provides your customers with the latest SDK code without any changes on your part.
    • Namespace isolation - Previously, all plug-ins shared the same namespace for web-platform.js, which could lead to conflicts if all plug-ins were not simultaneously updated with the new library. The new feature provides a separate namespace to each plug-in.

    Instead of packaging the web-platform.js, you acquire the Javascript interface with the following line of code in your plug-in iframe:

       window.parent.vSphereClientSDK.getWebPlatformApi(window);
       
    where:
    • window is the plug-in iframe.
    • window.parent.vSphereClientSDK is a reference to a vSphere client SDK Javascript object in the main client window.
    • getWebPlatformApi(window) returns a Javascript object (unique for each call) that exposes the documented HTML Client SDK Javascript API.

    If your plug-in needs to maintain compatibility with previous versions of the vSphere Client, you must provide a way to load the web-platform.js for those cases. For example:

       if (window.parent.vSphereClientSDK && window.parent.vSphereClientSDK.getWebPlatformApi) {
          WEB_PLATFORM = window.parent.vSphereClientSDK.getWebPlatformApi(window);
       } else {
          //load web-platform.js file which creates and bootstraps WEB_PLATFORM object
          ...
       }
    

    All the samples in the SDK are updated to use the new bootstrapping mechanism.

    NOTE: using the new bootstrapping mechanism invalidates the [myplugin_namespace] custom generated object in the web-platform.js file. Properties and methods defined in that object are no longer available. If you need that functionality, which includes buildDataUrl(), getString(), and webContextPath, you can create your own utilities to achieve the same result. This is done in the samples where applicable. See web-platform-bootstrap.js.

  • OSGi plug-in isolation The vSphere Client uses a new deployment model that isolates OSGi plug-in dependencies to avoid conflicts. With the previous model, bundle dependency failures could result when two plug-ins included different versions of the same third-party library.

    The new model repackages and deploys a plug-in as a Plan ARchive (PAR) rather than as a set of individual bundles. The bundles of the plug-in can see only the dependencies within their own PAR, so they are certain to access the correct library.

    This feature is currently available only in the vSphere Client. The vSphere Web Client (the Flex client) continues to use the previous deployment model. In the vSphere Client, the PAR deployment is the default deployment model.

    To disable the PAR in the vSphere Client, edit the plugin-package.xml file. Add the scope attribute and set it to "global":

       scope="global"
       
    NOTE: Disabling the PAR deployment might be useful for development, but it is not supported for production environments.

  • OSGi class loading The new OSGi Sandboxing feature makes a difference to class loading from resource files. Resources in a PAR are not exported globally, so you need to specify where a resource can be found. You can do this in one of two ways:

    • In the MANIFEST.MF file, export the package containing the resource.

      For example, add this line to MANIFEST.MF:

          Export-Package: configFiles
          
      This makes the PAR aware of the resource file, so it can be imported by bundles that need it.

    • Bypass the class constructor of myConfigurationLoader and call myConfigurationLoader.getClassLoader() rather than calling the class loader of the current thread.

      The class constructor calls Thread.currentThread.getContextClassLoader() to load a configuration resource file. The current thread belongs to the PAR, which may not be aware of the resource, so the loader fails. Use this code instead:

          ClassLoader cl = MyConfigurationLoader.class.getClassLoader();
          InputStream fileStream = cl.getResourceAsStream(filename);
          
      where filename is the name of the resource file you want to load.

  • Clarity sample for custom objects The SDK contains a new sample called custom-obect-sample that demonstrates how you can use the Clarity Design System to achieve the same look and feel as the HTML-based vSphere Client. You can find the new sample in the directory \html-client-sdk\samples.

    For more information about the Clarity Design System, see https://vmware.github.io /clarity/.

  • Registration scripts Two new registration scripts have been added to the /tools directory, to simplify the process of registering your development machine with vCenter Server. The new scripts are server-registration.bat for Windows machines, and server-registration.sh for Linux machines. These scripts connect to vCenter Server and copy the generated files which previously you had to move manually.

  • Global refresh for multiple portlets The API method setGlobalRefreshHandler is enhanced to support multiple portlets in the vSphere Client. The method requires an extra parameter, representing the view document. The Javascript API document explains how to use the new method.

    NOTE: The new parameter makes the method incompatible with its former usage. If your code currently uses the method, you need to update your code to match the new method signature.

    SDK samples are updated to use setGlobalRefreshHandler with the new parameter so that views are refreshed when a user clicks on the Refresh button in the toolbar.

Earlier Releases of the vSphere Web Client SDK

Known Issues

The following problems have been identified in the vSphere Client SDK and vSphere Web Client SDK 6.5.

vSphere Client SDK

  • The log files of the Virgo server are missing on Japanese OS installations

    Workaround: To resolve this issue, you can try the following:

    1. Open the vSphereWebClient\configuration\serviceability.xml file with a Hex editor.

    2. Remove the first three invisible bytes (EF BB BF) and save the file.

    3. Restart the service of the vSphere Client.

  • Context-specific toolbar actions are not available in vSphere Client 6.5

    The vmware.prioritization.action extension point is not supported for developing HTML plug-ins for the vSphere Client 6.5.

    Workaround: None.

  • The WEB_PLATFORM.setDialogSize() API is not supported in the vSphere Client

    You can use the WEB_PLATFORM.setDialogSize() function to change the size of the dialog box at runtime when developing HTML-based plug-ins for the vSphere Web Client. This function is not supported for developing HTML plug-ins for the vSphere Client 6.5.

    Workaround: For developing HTML plug-ins for the vSphere Client, you can set the size of the dialog box upon opening the dialog.

  • String resources are not reloaded when you use the pickup directory to deploy your HTML plug-ins

    The WAR bundle of an HTML plug-in contains localized string resources that are visible in the UI. In a development environment, if you use the pickup directory of your local vSphere Client to deploy and test your HTML plug-ins, you must first deploy the WAR bundles of your plug-in package. When you update the WAR bundles, the Virgo server does not reload automatically the localized string resources.

    Workaround: You must restart the vSphere Client Virgo server after updating the WAR bundles in the plugin-packages folder.

  • The ${namespace}.manage.tagsViews extension point is not supported in vSphere 6.5

    In the vSphere Client 6.5, you cannot add a view under the Tags second-level tab of the Configure tab by using the ${namespace}.manage.tagsViews extension point. You can find the Tags second-level tab under the Tags & Custom Attributes application in the vSphere Navigator.

    Workaround: None. If you have existing HTML-based plug-ins that use the ${namespace}.manage.tagsViews extension point to add views under the Tags second-level tab, you must change their implementation to use another extension point.

  • Localized labels of a plug-in are not shown.

    The localized labels of a plug-in are sometimes not shown after you deploy a new plug-in or a change to a plug-in during development. Property keys are displayed instead of user meaningful text.

    Workaround: Clear your browser cache and log in again.

vSphere Web Client SDK

  • Google Chrome problem with WEB_PLATFORM.

    Several method calls in the WEB_PLATFORM container app in the Flex-based client work the first time an HTML plug-in opens, but fail on subsequent calls. Calls that fail include WEB_PLATFORM.getObjectId(), WEB_PLATFORM.getActionUid(), and others. This problem happens with HTML plug-ins running on the Flex-based vSphere Client on Google Chrome (version 55.0.2883.87 and later).

    Workaround: To resolve this issue, update the file web-platform.js with the following code and rebuild your plug-in:

        var WEB_PLATFORM = self.parent.WEB_PLATFORM;
        var isChromeBrowser = (window.navigator.userAgent.indexOf("Chrome/") >= 0);
        var isFlexClient = !!self.parent.document.getElementById("container_app");
        if (!WEB_PLATFORM || (isChromeBrowser && isFlexClient)) {
          WEB_PLATFORM = self.parent.document.getElementById("container_app");
          if (isChromeBrowser) {
            // Object.create is required to support Chrome version >= 55 on Flex client
            WEB_PLATFORM = Object.create(WEB_PLATFORM);
          }
          self.parent.WEB_PLATFORM = WEB_PLATFORM;
                     
  • The log files of the Virgo server are missing on Japanese OS installations

    Workaround: To resolve this issue, you can try the following:

    1. Open the vSphereWebClient\configuration\serviceability.xml file with a Hex editor.

    2. Remove the first three invisible bytes (EF BB BF) and save the file.

    3. Restart the vSphere Web Client Service.

  • The ${namespace}.manage.tagsViews extension point is not supported in vSphere 6.5

    In the vSphere Web Client 6.5, you cannot add a view under the Tags second-level tab of the Configure tab by using the ${namespace}.manage.tagsViews extension point. You can find the Tags second-level tab under the Tags & Custom Attributes application in the vSphere Navigator.

    Workaround: None. If you have existing plug-ins for the vSphere Web Client that use the ${namespace}.manage.tagsViews extension point to add views under the Tags second-level tab, you must change their implementation to use another extension point.

  • When a menu or a dialog overlaps an HTML view, the view becomes blank
    Log in to the vSphere Web Client by using Mozilla Firefox version 31.0 or earlier. When you open a menu or a dialog which overlaps an HTML view, the view is hidden temporary and is displayed as a blank pane. This issue has no functional impact and the view is restored once you close the menu or dialog.

    Workaround: Use another supported browser or a more recent version of Mozilla Firefox.

  • Global refresh error with plug-in portlet The Global Refresh button causes internal error #1009 if the user clicks the button upon first entry to a view containing a plug-in portlet. This problem is caused by a limitation in the SDK.

    Workaround: Navigate to another view with a plug-in portlet, then back to the original view, before clicking the Global Refresh button.

Resolved Issues

The following issues are resolved for the vSphere Web Client SDK 6.5U1:

  • All .sh script files have the correct end of line character and no longer report the error "^M: bad interpreter: No such file or directory".

  • WEB_PLATFORM.getString() now works when many parameters are passed.

  • When you close a dialog box with the ESC key or by clicking the X box, vSphere Client no longer encounters errors.

  • Plug-in dialog boxes no longer are cut off when the screen is too small.

Deprecated Features

The following methods or extension points are deprecated in vSphere Web Client SDK 6.5 Update 1.

  • ${namespace}.gettingStartedViews is deprecated for the vSphere Client, because it doesn't apply to the HTML layout in the vSphere Client.

  • vsphere.core.${objectType}.list.columns is deprecated for the vSphere Client for performance considerations and improved user experience.

    Alternative ways to present the same information are:

    • Use vsphere.core.${objectType}.summarySectionViews or vsphere.core.${objectType}.monitorViews or vsphere.core.${objectType}.manageViews to present the information in a Summary portlet, a Monitor view, or a Manage view.
    • Present only a data overview, with a link to a more detailed custom view.

  • getVcSelectorInfo() is deprecated for the vSphere Client.

    This method was previously used to present a drop-down menu of vCenter Servers. Starting in vSphere Client SDK 6.5 Update 1, use the following code to create a drop-down menu:

                       var userSession = WEB_PLATFORM.getUserSession();
                       $.each(userSession.serversInfo, function(index, serverInfo) {
                              dropdown.append($("<option></option>").val(
                                                serverInfo.serviceGuid).text(serverInfo.name));
                       });