VMware {code} Community
jvitorino
Enthusiast
Enthusiast

HTML client - limit on number of targets

Hi,

We've hit what seems like a limitation in the HTML client and I was wondering if there is a way around what we're hitting.

We have an ActionSpec that accepts multiple targets.  When we're testing in MSIE or MS Edge, we hit a limit on the queryString when the user select many targets (any more than 180) and attempts to launch our action.  Other browser may also have issues, but it seems like their queryString max length must be much higher.

I can't think of one, but is there perhaps a workaround for this issue?

Thank you,

Jesse

0 Kudos
3 Replies
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi Jesse,

 

Thank you for your feedback.

Are you trying to invoke a dialog or a headless action?

In addition, could you provide a code snippet of your ActionSpec from the plugin.xml?

We would also appreiate if you share more information about the exact version of the HTML Client that you are using and, if possible, more information about the failure (browser screenshots, log files).

 

Thank you,

Denis

0 Kudos
jvitorino
Enthusiast
Enthusiast

I am attempting to launch a dialog.  I recreated the issue using the chassis sample from the SDK, with a few modifications.

I set "acceptsMultipleTargets" to true on the edit action.  I also changed the objectType to "VirtualMachine" so it should also work with the original type.  Here is the modified actionSet:

   <extension id="com.vmware.samples.chassisa.actionSet">

      <extendedPoint>vise.actions.sets</extendedPoint>

      <object>

         <actions>

            <!-- Edit Chassis -->

            <com.vmware.actionsfw.ActionSpec>

               <uid>com.vmware.samples.chassisa.editChassis</uid>

               <label>#{chassis.editAction}</label>

               <icon>#{editChassis}</icon>

               <delegate>

                  <className>com.vmware.vsphere.client.htmlbridge.HtmlActionDelegate</className>

                  <object><root>

                     <!-- execute the action on client-side (html view in a modal dialog) -->

                     <actionUrl>/vsphere-client/chassisa/resources/editChassisAction.html</actionUrl>

                     <dialogTitle>Title changed at runtime</dialogTitle>

                     <dialogSize>490,240</dialogSize>

                     <dialogIcon>#{editChassis}</dialogIcon>

                  </root></object>

               </delegate>

   <acceptsMultipleTargets>true</acceptsMultipleTargets>

            </com.vmware.actionsfw.ActionSpec>

          </actions>

      </object>

      <metadata>

         <objectType>VirtualMachine</objectType>

      </metadata>

   </extension>

I am able to reproduce this with version 6.5 and 6.7 of the HTML Client.  Looking at the network tab of the browser's develop tools, we can see that there is an HTTP GET when the dialog is launched:

https://localhost:9443/ui/chassisa/resources/editChassisAction.html?locale=en_US&actionUid=com.vmwar...

As you can see, the queryString include a list of targets.  In the sample above, I only had 2 virtual machines selected.  If I selected a much larger number (200), then I believe what is happening is that the HTTP request fails to be sent since the queryString exceeds the browser's limit.  There is no error that I can see in the browser's console.

Please let me know if you need any more information to help reproduce it,

Jesse

0 Kudos
Denis_Chorbadzh
VMware Employee
VMware Employee

Hi Jesse,

 

Thank you very much for your detailed explanation and the provided information.

Unfortunately, this is a limitation of the Actions extensibility when using the legacy <delegate> className.

The good news is that we have addressed the issue in 6.5U2 and 6.7GA and you can use: <className>com.vmware.vsphere.client.HtmlPluginModalAction</className>. This is shown in the "html-sample" plugin available in the SDK deliverable.

This will open a modal dialog with the new JS APIs and then you can use "window.frameElement.htmlClientSdk.app.getContextObjects()" which will return an array of the target objects.

 

Let us know about your experience with this.

 

Best Regards,

Denis

0 Kudos